Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation: Include section on how to test code for a given WP major #42390

Merged
merged 1 commit into from
Jul 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions docs/reference-guides/packages.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,19 @@ Once installed, you can access the component in your code using:
```js
import { PlainText } from '@wordpress/block-editor';
```

## Testing JavaScript code from a specific major WordPress version

There is a way to quickly install a version of the individual WordPress package used with a given WordPress major version using [npm distribution tags](https://docs.npmjs.com/cli/v8/commands/npm-dist-tag) (example for WordPress `5.8.x`):

```bash
npm install @wordpress/block-editor@wp-5.8
```

It’s also possible to update all existing WordPress packages in the project with a single command:

```bash
npx @wordpress/scripts packages-update --dist-tag=wp-5.8
```

All major WordPress versions starting from `5.7.x` are supported (e.g., `wp-5.7` or `wp-6.0`). Each individual dist-tag always points to the latest bug fix release for that major version line.