Repository navigation
Added initial version of changeset ci check scripts - #29428
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughThe PR adds changeset validation to CI and the pre-commit hook, with workspace and Git helpers for detecting package and catalog changes. Release automation is migrated to ES modules and gains a packages-only mode driven by workflow environment variables. Workspace catalog metadata and package manager configuration are updated. A new workflow publishes public workspace packages through npm trusted publishing, while the previous Koenig publishing path is removed. Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run ghost:test:ci:integration |
✅ Succeeded | 2m 58s | View ↗ |
nx run-many -t test:unit -p @tryghost/adapter-b... |
✅ Succeeded | 7m 16s | View ↗ |
nx run ghost:test:integration |
✅ Succeeded | 3m 7s | View ↗ |
nx run @tryghost/admin:test:acceptance |
✅ Succeeded | 6m 26s | View ↗ |
nx run ghost-monorepo:lint:boundaries |
✅ Succeeded | 20s | View ↗ |
nx run-many -t lint -p @tryghost/adapter-base-r... |
✅ Succeeded | 3m 29s | View ↗ |
nx run ghost:test:legacy |
✅ Succeeded | 3m 10s | View ↗ |
nx run ghost-admin:test |
✅ Succeeded | 3m 11s | View ↗ |
Additional runs (8) |
✅ Succeeded | ... | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-07-21 17:48:43 UTC
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #29428 +/- ##
==========================================
+ Coverage 74.53% 74.57% +0.03%
==========================================
Files 1605 1605
Lines 141105 141105
Branches 17200 17210 +10
==========================================
+ Hits 105173 105223 +50
+ Misses 34875 34855 -20
+ Partials 1057 1027 -30
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@scripts/create-package.js`:
- Line 7: Update the ESM import in create-package.js to include the .js
extension when importing ROOT_DIR from ./lib/constants, leaving the imported
symbol and surrounding logic unchanged.
In `@scripts/lib/git.js`:
- Around line 16-22: Update getFileFromCommit to support an explicit
nullable/missing-file mode that returns a falsy result when the requested path
does not exist, while continuing to throw for invalid commits and other Git
failures. Update loadPackage to use this mode when checking the base package
manifest so new packages follow the existing changeset-required path, and add
coverage for that scenario.
- Around line 56-62: Update pathHasChanges to normalize each changed file to a
path relative to the supplied path before applying the ignorePatterns matcher,
while preserving repository-relative paths for change detection. Ensure
pnpm-style patterns such as test/** match files within the target package and
ignored-only changes are excluded.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 3ce9dc1c-546b-47c1-86ba-31c698178356
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (13)
.github/workflows/release.ymlghost/core/package.jsonpackage.jsonpnpm-workspace.yamlscripts/README.mdscripts/change-check.jsscripts/clean.jsscripts/create-package.jsscripts/lib/git.jsscripts/lib/pnpm.jsscripts/package.jsonscripts/release.jsscripts/test/pnpm.test.js
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/publish-packages.yml:
- Around line 67-70: Disable dependency caching in the OIDC publishing job by
removing the cache configuration from the setup-node step using
actions/setup-node and retaining only the required Node.js version setup.
In `@scripts/publish-packages.js`:
- Around line 109-118: Update the publish loop and final summary in
scripts/publish-packages.js so packages processed with dryRun are not added to
the published list or reported as actually published. Track dry-run packages
separately and include them in a clearly labeled simulated/dry-run summary while
preserving the existing real publish and skipped summaries.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: eb16f0e7-7fb3-4b79-9ba0-92b84b389250
📒 Files selected for processing (15)
.changeset/cold-jeans-call.md.github/workflows/ci.yml.github/workflows/publish-koenig-package.yml.github/workflows/publish-packages.ymlpackages/adapters/redirects-base/package.jsonpackages/adapters/scheduling-base/package.jsonpackages/adapters/sso-base/package.jsonscripts/create-package.jsscripts/lib/git.jsscripts/lib/pnpm.jsscripts/publish-koenig-packages.cjsscripts/publish-packages.jsscripts/release.jsscripts/test/git.test.jsscripts/test/pnpm.test.js
💤 Files with no reviewable changes (5)
- packages/adapters/scheduling-base/package.json
- .github/workflows/publish-koenig-package.yml
- packages/adapters/redirects-base/package.json
- scripts/publish-koenig-packages.cjs
- packages/adapters/sso-base/package.json
🚧 Files skipped from review as they are similar to previous changes (4)
- scripts/test/pnpm.test.js
- scripts/create-package.js
- scripts/release.js
- scripts/lib/pnpm.js
b48a0c5 to
8cc7152
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/publish-packages.yml (1)
62-63: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winDisable credential persistence in the checkout action.
Since this workflow job operates with privileged
id-token: writeaccess (and OIDC publishing workflows should generally operate with least privilege), it is recommended to preventactions/checkoutfrom persisting the defaultGITHUB_TOKENin the local Git configuration. This mitigates the risk of a compromised dependency extracting the token.🛡️ Proposed fix
- name: Checkout code uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 + with: + persist-credentials: false🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/publish-packages.yml around lines 62 - 63, Update the “Checkout code” actions/checkout step to disable credential persistence by setting its persist-credentials option to false, while preserving the pinned action reference and existing workflow permissions.Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/publish-packages.yml:
- Around line 62-63: Update the “Checkout code” actions/checkout step to disable
credential persistence by setting its persist-credentials option to false, while
preserving the pinned action reference and existing workflow permissions.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: e3618024-b129-4a93-82e7-8e89495a0fe2
📒 Files selected for processing (17)
.changeset/cold-jeans-call.md.github/workflows/ci.yml.github/workflows/publish-koenig-package.yml.github/workflows/publish-packages.yml.github/workflows/release.ymlpackage.jsonpackages/adapters/redirects-base/package.jsonpackages/adapters/scheduling-base/package.jsonpackages/adapters/sso-base/package.jsonscripts/create-package.jsscripts/lib/git.jsscripts/lib/pnpm.jsscripts/publish-koenig-packages.cjsscripts/publish-packages.jsscripts/release.jsscripts/test/git.test.jsscripts/test/pnpm.test.js
💤 Files with no reviewable changes (5)
- .github/workflows/publish-koenig-package.yml
- packages/adapters/sso-base/package.json
- packages/adapters/scheduling-base/package.json
- packages/adapters/redirects-base/package.json
- scripts/publish-koenig-packages.cjs
🚧 Files skipped from review as they are similar to previous changes (8)
- .changeset/cold-jeans-call.md
- scripts/test/git.test.js
- scripts/test/pnpm.test.js
- scripts/lib/git.js
- package.json
- scripts/lib/pnpm.js
- .github/workflows/ci.yml
- scripts/release.js
72e6d55 to
8443b9d
Compare
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
scripts/release.js (1)
74-74: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winConsider importing the shared
CHANGES_DIRconstant instead of hardcoding.changeset.
scripts/lib/pnpm.jsalready importsCHANGES_DIRfrom@pnpm/releasing.versioningfor the same concept; hardcoding'.changeset'here duplicates that value and risks silent drift if the underlying constant ever changes.♻️ Proposed refactor
+import {CHANGES_DIR} from '`@pnpm/releasing.versioning`'; + function applyChangesetVersions() { - if (!existsSync(join(ROOT_DIR, '.changeset'))) { + if (!existsSync(join(ROOT_DIR, CHANGES_DIR))) { log('No .changeset directory — nothing to version'); return; }🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@scripts/release.js` at line 74, Update the release script’s `.changeset` existence check to reuse the shared CHANGES_DIR constant from `@pnpm/releasing.versioning`, matching scripts/lib/pnpm.js, and remove the hardcoded directory value while preserving the existing join and conditional behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/hooks/pre-commit.bash:
- Around line 115-117: Update the pre-commit branch around CHANGESET_BASE and
change-check.js so validation includes staged index contents rather than
comparing only against HEAD. Use git diff --cached directly or invoke a
staged-aware change-check mode, while preserving the existing no-base and
no-branch-commits behavior.
In @.github/workflows/publish-packages.yml:
- Around line 62-63: Update the actions/checkout step in the publish workflow to
disable credential persistence by setting persist-credentials to false. Keep the
existing pinned checkout action and all other job permissions unchanged.
In `@scripts/lib/pnpm.js`:
- Around line 130-160: Update getPublishablePackages to pass the computed ignore
patterns through the glob option supported by node:fs/promises.glob(), using
exclude instead of ignore. Preserve the existing negated workspace-entry
filtering and subsequent package selection logic.
---
Nitpick comments:
In `@scripts/release.js`:
- Line 74: Update the release script’s `.changeset` existence check to reuse the
shared CHANGES_DIR constant from `@pnpm/releasing.versioning`, matching
scripts/lib/pnpm.js, and remove the hardcoded directory value while preserving
the existing join and conditional behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 93299b26-25c0-43f2-a884-f6b3da4c9ead
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (21)
.github/CONTRIBUTING.md.github/hooks/pre-commit.bash.github/workflows/ci.yml.github/workflows/publish-koenig-package.yml.github/workflows/publish-packages.yml.github/workflows/release.ymlghost/core/package.jsonpackage.jsonpnpm-workspace.yamlscripts/README.mdscripts/change-check.jsscripts/clean.jsscripts/create-package.jsscripts/lib/git.jsscripts/lib/pnpm.jsscripts/package.jsonscripts/publish-koenig-packages.cjsscripts/publish-packages.jsscripts/release.jsscripts/test/git.test.jsscripts/test/pnpm.test.js
💤 Files with no reviewable changes (2)
- .github/workflows/publish-koenig-package.yml
- scripts/publish-koenig-packages.cjs
🚧 Files skipped from review as they are similar to previous changes (13)
- pnpm-workspace.yaml
- .github/workflows/release.yml
- scripts/package.json
- scripts/create-package.js
- ghost/core/package.json
- package.json
- scripts/test/pnpm.test.js
- scripts/README.md
- scripts/clean.js
- scripts/change-check.js
- scripts/publish-packages.js
- scripts/lib/git.js
- .github/workflows/ci.yml
3963582 to
314ccd6
Compare
no ref - add catalog-aware diffing logic leveraging pnpm libraries to determine packages changed between versions - add initial version of change-check script to ensure that changed publishable packages have committed changesets - refactor release/clean scripts to esm
314ccd6 to
db0fcaa
Compare

no ref
Initial work on pnpm-based changeset release flows. Ideally, the new script in
./scripts/change-check.jsreplicates the behavior thatpnpm change checkwill implement.