Pin exact versions for all npm dependencies#11932
Draft
desrosj wants to merge 5 commits into
Draft
Conversation
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
7b62c73 to
5b4e1b6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This attempts to pin versions of npm and Composer dependencies to ensure every update to a dependency (both direct and transitive) is intentional.
This helps to guard against supply chain attacks where a vulnerable package may be installed unintentionally and unknowingly.
Reintroduce
composer.lockfileRemoving version ranges in favor of explicitly pinning specific versions is straightforward and does not result in any meaningful change today provided a lock file is present. However, lock file generation for Composer has been disabled in this repository since WP 6.7 (see Core-61530/r59082).
This PR proposes re-enabling lock file generation and committing the
composer.lockfile to version control ensuring thatcomposer installdoes not install untested and unverified versions of dependencies.Trac ticket:
Notes
Use of AI Tools
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.