Repository navigation
Release Tools: Drop the root @wordpress/release-tools dependency - #79046
im3dabasia wants to merge 10 commits into
Conversation
manzoorwanijk
left a comment
There was a problem hiding this comment.
This is beneficial if we can remove @wordpress/release-tools and @wordpress/validation-tools from the root package.json.
9a5eeed to
0d1a6b7
Compare
There was a problem hiding this comment.
Pull request overview
This PR continues the workspace migration by removing the root-level @wordpress/release-tools dependency and updating CI/scripts to invoke validation and release tooling via their dedicated npm workspaces.
Changes:
- Remove
@wordpress/release-toolsfrom the rootdevDependencies. - Update
static-checks.ymlto run lockfile/tsconfig validation via@wordpress/validation-toolsworkspace scripts. - Update
publish-npm-packages.ymlto execute release publishing commands via the@wordpress/release-toolsworkspace.
Reviewed changes
Copilot reviewed 3 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
package.json |
Removes root dependency on release tools and updates a release-related script to use a workspace-scoped npm exec. |
package-lock.json |
Updates lockfile metadata to reflect removal of the root dependency entry. |
.github/workflows/static-checks.yml |
Runs package-lock and tsconfig validation directly from the validation-tools workspace. |
.github/workflows/publish-npm-packages.yml |
Switches npm publishing steps to execute release tooling from the release-tools workspace. |
| "lint:php": "wp-env run --env-cwd='wp-content/plugins/gutenberg' cli composer run-script lint", | ||
| "lint:pkg-json": "wp-scripts lint-pkg-json . 'packages/*/package.json'", | ||
| "other:changelog": "npm exec --no release-cli -- changelog", | ||
| "other:changelog": "npm exec --workspace @wordpress/release-tools -- release-cli changelog", |
| cd cli | ||
| npm ci | ||
| npm exec --no release-cli -- npm-next --ci --repository-path ../publish | ||
| npm exec --workspace @wordpress/release-tools -- release-cli -- npm-next --ci --repository-path ../publish |
| cd cli | ||
| npm ci | ||
| npm exec --no release-cli -- npm-latest --semver minor --ci --repository-path ../publish | ||
| npm exec --workspace @wordpress/release-tools -- release-cli -- npm-latest --semver minor --ci --repository-path ../publish |
| cd cli | ||
| npm ci | ||
| npm exec --no release-cli -- npm-bugfix --ci --repository-path ../publish | ||
| npm exec --workspace @wordpress/release-tools -- release-cli -- npm-bugfix --ci --repository-path ../publish |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Let us update this PR from trunk and also address the feedback from Copilot - #79046 (review) |
|
Hi @manzoorwanijk, Sorry for the late response. I noticed that the issue has been marked as completed. I just wanted to check if we should still move forward with this PR. I’d be happy to make the necessary changes by EOD if they’re still needed. Please let me know when you get a chance. Thanks! |
|
This is still a good change to make. |
Resolved by taking trunk for .github/workflows/static-checks.yml, .github/workflows/publish-npm-packages.yml and the other:changelog script: WordPress#82331 already routes those through the workspaces, and the --workspace form this branch used changes the working directory, which breaks the relative --repository-path passed to release-cli. What remains from this branch is dropping @wordpress/release-tools from the root devDependencies. npm links every workspace bin into the root node_modules/.bin regardless, so 'npm exec --no release-cli' still resolves.
|
Hey @manzoorwanijk A lot changed after #82331 got merged, so this PR has moved quite far from its initial code. There's still one important thing left in it that's worth doing. Could you take a look and let me know whether this can still make it to trunk? Looking forward to your thoughts. |
The PR currently does nothing more than removing Will it work in isolated deps mode? |
Unfortunately 😂
Good catch, it won't; the root actually uses release-cli, so it's an honest dependency, not a phantom one. Closing this. Thanks ! |
What?
Removes @wordpress/release-tools from the root package.json devDependencies. Part of #75041.
Why?
How?
Testing Instructions
npm installnpm exec --no release-cli -- --helpstill resolves.