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

Let wp-scripts packages-update install packages for a specific version of WordPress. #36005

Open
wants to merge 1 commit into
base: trunk
Choose a base branch
from

Conversation

@tomalec
Copy link
Contributor

@tomalec tomalec commented Oct 27, 2021

Description

This is to mitigate the problems related to DEWP usage mentioned in #35630.

This allows a plugin developer to install to-be-extracted dependencies at the lowest version of their plugin targets. To be able to run local tests and linters against that version. To give some insight to the developer, on what is the lowest anticipated version of an individual package.

How has this been tested?

  1. Cloned and installed a plugin, like git clone https://github.com/woocommerce/google-listings-and-ads.git && npm install
  2. Replaced the node_modules/@wordpress/scripts with the content of this branch
  3. Executed npm run packages-update / wp-scripts packages-update, to see it still installs the latest by default
  4. Executed npm run packages-update -- --wpVersion=5.6 / wp-scripts packages-update--wpVersion=5.6, to see it installs the versions from https://github.com/WordPress/wordpress-develop/blob/5.6/package.json#L79-L154

Screenshots

Types of changes

New feature

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • [n/a] I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • [n/a] I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

Additional notes:

  • For a developer using Dependency Extraction Webpack Plugin, it may be useful to update only those packages that are actually externalized, but to do so we need a list of those first - #35106
…ion of WordPress.

This is to mitigate the problems related to DEWP usage mentioned in WordPress#35630.

This allows a plugin developer to install to-be-extracted dependencies at the lowest version of their plugin targets. To be able to run local tests and linters against that version. To give some insight to the developer, on what is the lowest anticipated version of an individual package.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

1 participant