Repository navigation
fix(ci): keep release dependencies and lockfile in sync - #141
Conversation
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c409624d7d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "Codex (@codex) review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "Codex (@codex) address that feedback".
| uses: changesets/action@v1 | ||
| with: | ||
| github-token: ${{ github.token }} | ||
| version: pnpm exec changeset version && pnpm install --lockfile-only --no-frozen-lockfile |
There was a problem hiding this comment.
Run the compound version command through a shell
When this workflow processes a nonempty changeset, version is not executed as a shell expression: the Changesets action implementation invokes await exec(script, undefined, { cwd, env }), and the exec implementation parses the string into an executable and arguments. Consequently, && pnpm install --lockfile-only --no-frozen-lockfile becomes arguments to changeset version rather than a second command, so the lockfile refresh never runs and release PRs can still leave the frozen install at the start of this workflow broken. Put both commands in a package script and reference that script here, or explicitly invoke a shell.
Useful? React with 👍 / 👎.
The publish job stops at
pnpm iwithERR_PNPM_OUTDATED_LOCKFILEafter the release PR updatespackages/cli/package.json. Its self dev dependency is@swc/cli@0.8.2, while the lockfile still resolves0.8.0. Version0.8.2is not yet on npm, so resolving that dependency would also block its own release.Use
workspace:*for the CLI self dev dependency and regenerate the lockfile. This links the local CLI and removes the old registry CLI dependency tree. Update the Changesets version command to refresh the lockfile after version changes so future release PRs include it. The initial CI install still uses the frozen lockfile.Failed job: https://github.com/swc-project/pkgs/actions/runs/40671449316/job/122758955853
Validation of the changes before commit
c409624:CI=1 pnpm install --frozen-lockfile --ignore-scriptspassed with pnpm 10.11.0.@swc/jest, then ranpnpm --filter @swc/cli test --runInBand: all 7 suites and 63 tests passed. The first test attempt could not start because the local Jest transformer was not built.CI=1 pnpm install --lockfile-only --frozen-lockfile --ignore-scripts. The CLI advanced to0.8.4, retainedworkspace:*, and the lockfile check passed.actionlint .github/workflows/publish.ymlandgit diff --checkpassed.No packages were published during local validation. The authenticated publish workflow still requires a GitHub Actions run after merge.