Skip to content

Keep old deps working for changesets cli - #2303

Merged
lightwalker-eth merged 2 commits into
mainfrom
fix/changeset-cli-deps
Jun 16, 2026
Merged

Keep old deps working for changesets cli#2303
lightwalker-eth merged 2 commits into
mainfrom
fix/changeset-cli-deps

Conversation

@tk-o

@tk-o tk-o commented Jun 16, 2026

Copy link
Copy Markdown
Member

It's a follow up PR for #2302 which updates @changesets/* dependencies to most recent version available. The PR also creates a patch for the js-yaml package in order to:
a) address security issues
b) resolve breaking changes introduced in the nest version of the package

Copilot AI review requested due to automatic review settings June 16, 2026 15:00
@changeset-bot

changeset-bot Bot commented Jun 16, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1e645db

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel

vercel Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
admin.ensnode.io Ready Ready Preview, Comment Jun 16, 2026 3:48pm
enskit-react-example.ensnode.io Ready Ready Preview, Comment Jun 16, 2026 3:48pm
ensnode.io Ready Ready Preview, Comment Jun 16, 2026 3:48pm
ensrainbow.io Ready Ready Preview, Comment Jun 16, 2026 3:48pm

@coderabbitai

coderabbitai Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 044441cd-964c-4eeb-9aaa-6f7873cb85dd

📥 Commits

Reviewing files that changed from the base of the PR and between 562e4f5 and 1e645db.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (2)
  • package.json
  • patches/js-yaml@4.2.0.patch

📝 Walkthrough

Walkthrough

Changesets tooling is updated: the config schema URL is bumped to 3.1.4, @changesets/changelog-github and @changesets/cli devDependencies are bumped, and the @changesets/assemble-release-plan patched dependency is updated from 6.0.9 to 6.0.10 with a new patch that suppresses major-version bumps for peer dependencies. Additionally, a new js-yaml@4.2.0 patch is added to align export compatibility, and hono is bumped in the workspace catalog.

Changes

Dependency and Tooling Updates

Layer / File(s) Summary
Changesets tooling and peer-dependency patch
.changeset/config.json, package.json, patches/@changesets__assemble-release-plan@6.0.10.patch
Config schema URL bumped to 3.1.4; @changesets/changelog-github and @changesets/cli dev deps bumped; patchedDependencies updated to reference the 6.0.10 patch; new patch adds an early-exit return false in shouldBumpMajor when depType === 'peerDependencies'.
hono and js-yaml version updates
pnpm-workspace.yaml, patches/js-yaml@4.2.0.patch
hono catalog constraint bumped from ^4.12.23 to ^4.12.25; new js-yaml@4.2.0 patch replaces safeLoad, safeLoadAll, and safeDump export wrappers with direct references to load, loadAll, and dump for 4.x compatibility.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐇 Hop, hop, a version we chase,
Peer deps won't bump to major's grace,
js-yaml gets a friendly face,
hono shines with patches in place,
The changeset schema freshly traced! 🌟

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description lacks the required structure from the template, missing explicit Summary, Why, Testing, and Pre-Review Checklist sections. Restructure the description to follow the template: organize content under Summary, Why, Testing, and include the Pre-Review Checklist with required checkboxes.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Keep old deps working for changesets cli' clearly summarizes the main change—maintaining backward compatibility with changesets CLI dependencies.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/changeset-cli-deps

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates repo-level tooling dependencies (Changesets + Hono) and refreshes the pnpm patch used for @changesets/assemble-release-plan, aiming to keep the Changesets CLI working after the dependency/security-upgrade follow-up to #2302.

Changes:

  • Bump Changesets toolchain (@changesets/cli, @changesets/changelog-github, config schema) and update the corresponding pnpm patch target/version.
  • Adjust pnpm overrides related to js-yaml and refresh the lockfile accordingly.
  • Bump hono catalog version (and propagate through the lockfile).

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
pnpm-workspace.yaml Updates the catalog hono version used across workspaces.
pnpm-lock.yaml Regenerates lockfile for the updated catalogs, overrides, and Changesets versions/patching.
patches/@changesets__assemble-release-plan@6.0.10.patch Updates the pnpm patch to apply against @changesets/assemble-release-plan@6.0.10.
package.json Bumps Changesets devDependencies; updates pnpm override selector for js-yaml; updates patchedDependencies mapping.
.changeset/config.json Updates the $schema URL to match the newer @changesets/config version.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file
Comments suppressed due to low confidence (1)

patches/@changesets__assemble-release-plan@6.0.10.patch:12

  • This patch effectively makes shouldBumpMajor return false in all cases (the remaining return expression is only reachable when depType !== peerDependencies, where it immediately short-circuits to false). That may be intentional, but the retained comment/logic about peerDependencies becomes misleading and makes future patch rebases harder. Consider rewriting the patched section so the intent is explicit (e.g., adjust/remove the now-irrelevant peerDependency major-bump logic rather than relying on a short-circuit + dead condition).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
@tk-o

tk-o commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

@greptile review

@greptile-apps

greptile-apps Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR upgrades the @changesets/cli toolchain from 2.29.8→2.31.0 and @changesets/changelog-github from 0.5.2→0.7.0, updates the companion assemble-release-plan patch from version 6.0.9 to 6.0.10, and introduces a new pnpm patch for js-yaml@4.2.0 to restore the removed 3.x API aliases needed by the abandoned read-yaml-file@1.1.0.

  • js-yaml patch: read-yaml-file@1.1.0 (a transitive dependency of @manypkg/get-packages@changesets/parse) still calls yaml.safeLoad, which js-yaml 4.x removed. The patch re-exports safeLoad/safeLoadAll/safeDump as aliases to load/loadAll/dump, which are already safe by default in 4.x, making the alias semantically equivalent.
  • assemble-release-plan patch: Correctly rebased onto the 6.0.10 bundle (line-number context updated from 317→336); the early-return guard for peerDependencies behaviour is unchanged.
  • hono bump: Catalog version bumped from ^4.12.23 to ^4.12.25 as a minor version update across all consuming workspaces.

Confidence Score: 5/5

Safe to merge — all changes are dev-tooling dependency upgrades with no production code paths affected.

The js-yaml patch is a correct and semantically equivalent alias (safeLoad→load, both are safe-by-default in 4.x). The assemble-release-plan patch is correctly rebased onto the new bundle. The @changesets and hono version bumps are routine. No logic changes to application code are introduced.

No files require special attention.

Important Files Changed

Filename Overview
.changeset/config.json Schema URL updated from @changesets/config@3.1.2 to @3.1.4 to match the upgraded CLI dependency.
package.json Bumps @changesets/changelog-github from ^0.5.2→^0.7.0 and @changesets/cli from ^2.29.8→^2.31.0; swaps the assemble-release-plan patch from 6.0.9 to 6.0.10 and adds the new js-yaml@4.2.0 patch entry.
patches/@changesets__assemble-release-plan@6.0.10.patch Renamed/updated from the 6.0.9 patch; the injected early-return for peerDependencies is correct and the line-number context updated from 317→336 to match the new upstream CJS bundle.
patches/js-yaml@4.2.0.patch New patch that re-aliases the removed js-yaml 3.x APIs (safeLoad/safeLoadAll/safeDump) to their 4.x equivalents so that the abandoned read-yaml-file@1.1.0 package can resolve without errors.
pnpm-workspace.yaml Bumps the hono catalog version from ^4.12.23 to ^4.12.25.
pnpm-lock.yaml Lock file regenerated to reflect all @changesets/* upgrades, the js-yaml patch being applied consistently to all eight consumers of js-yaml@4.2.0, and the hono 4.12.25 bump across all workspaces.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A["@changesets/cli@2.31.0"] --> B["@changesets/read@0.6.7"]
    A --> C["@changesets/assemble-release-plan@6.0.10\n(patched: early-return for peerDeps)"]
    B --> D["@changesets/parse@0.4.3"]
    D --> E["js-yaml@4.2.0\n(patched)"]
    C --> F["@manypkg/get-packages@1.1.3"]
    F --> G["read-yaml-file@1.1.0"]
    G --> E
    E -->|"safeLoad → load alias"| H["✅ No runtime error"]
    style E fill:#f0ad4e,color:#000
    style H fill:#5cb85c,color:#fff
Loading
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A["@changesets/cli@2.31.0"] --> B["@changesets/read@0.6.7"]
    A --> C["@changesets/assemble-release-plan@6.0.10\n(patched: early-return for peerDeps)"]
    B --> D["@changesets/parse@0.4.3"]
    D --> E["js-yaml@4.2.0\n(patched)"]
    C --> F["@manypkg/get-packages@1.1.3"]
    F --> G["read-yaml-file@1.1.0"]
    G --> E
    E -->|"safeLoad → load alias"| H["✅ No runtime error"]
    style E fill:#f0ad4e,color:#000
    style H fill:#5cb85c,color:#fff
Loading

Reviews (3): Last reviewed commit: "Apply patch for `js-yaml` package" | Re-trigger Greptile

Comment on lines +9 to +14
-module.exports.safeLoad = renamed('safeLoad', 'load')
-module.exports.safeLoadAll = renamed('safeLoadAll', 'loadAll')
-module.exports.safeDump = renamed('safeDump', 'dump')
+module.exports.safeLoad = module.exports.load
+module.exports.safeLoadAll = module.exports.loadAll
+module.exports.safeDump = module.exports.dump

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Deprecated-API patch masks an upstream bug in @changesets/parse@0.4.3

In js-yaml 4.x, safeLoad, safeLoadAll, and safeDump intentionally throw via renamed() to force callers to migrate to load/loadAll/dump. These same packages (gray-matter@4.0.3, read-yaml-file@1.1.0) were already using js-yaml@4.2.0 without this patch before this PR, so they were either already migrated or never called the deprecated methods. The most likely trigger for needing this patch now is @changesets/parse@0.4.3, which means that package is calling a deprecated API. Silently re-aliasing those functions across the entire dependency tree hides the real issue and may cause other callers to silently use the deprecated path indefinitely. A more targeted fix would be filing/contributing upstream to @changesets/parse@0.4.3, or at minimum documenting which package triggered the need for this patch.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only package that was using js-yaml@3 was read-yaml-file@1.1.0.

  read-yaml-file@1.1.0:
    dependencies:
      graceful-fs: 4.2.11
      js-yaml: 3.14.2
      pify: 4.0.1
      strip-bom: 3.0.0

The upstream dependency (@changesets/parse@0.4.3) has a hard dependency on @manypkg/get-packages@1.1.3, which references read-yaml-file@1.1.0:.

The patch I've submitted is provides a direct alias to solve this issue:

> ensnode-monorepo@0.0.1 changeset:next /home/runner/_work/ensnode/ensnode
> changeset version --snapshot next && pnpm release:postversion

🦋  error Error: Function yaml.safeLoad is removed in js-yaml 4. Use yaml.load instead, which is now safe by default.
🦋  error     at Object.safeLoad (/home/runner/_work/ensnode/ensnode/node_modules/.pnpm/js-yaml@4.2.0/node_modules/js-yaml/index.js:8:11)
🦋  error     at parse (/home/runner/_work/ensnode/ensnode/node_modules/.pnpm/read-yaml-file@1.1.0/node_modules/read-yaml-file/index.js:8:28)
🦋  error     at /home/runner/_work/ensnode/ensnode/node_modules/.pnpm/read-yaml-file@1.1.0/node_modules/read-yaml-file/index.js:10:71

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right, and the stack trace makes it clear — read-yaml-file@1.1.0 is calling yaml.safeLoad directly, and pnpm is resolving that to the hoisted js-yaml@4.2.0 which removed those functions. My original comment was wrong about the culprit being @changesets/parse.

The patch is a pragmatic and correct fix here: read-yaml-file is essentially abandoned, the upstream chain (@changesets/parse@manypkg/get-packagesread-yaml-file) makes an upstream fix impractical, and the alias is semantically equivalent since load in js-yaml 4.x is already safe by default (it's what safeLoad was in 3.x).

No issue with the patch.

Tip: You can customize Greptile's behavior for this repo with .greptile/rules.md and .greptile/config.json.

@tk-o

tk-o commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

@greptile review

@tk-o
tk-o marked this pull request as ready for review June 16, 2026 16:18
@tk-o
tk-o requested a review from a team as a code owner June 16, 2026 16:18
Copilot AI review requested due to automatic review settings June 16, 2026 16:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 6 changed files in this pull request and generated no new comments.

Files not reviewed (1)
  • pnpm-lock.yaml: Generated file
Comments suppressed due to low confidence (1)

patches/@changesets__assemble-release-plan@6.0.10.patch:12

  • This patch makes shouldBumpMajor effectively always return false: when depType is peerDependencies it returns early, and for all other depType values the remaining return depType === "peerDependencies" && ... expression is necessarily false. If the intent is only to change peer-dependency behavior (or to preserve upstream semantics), this condition looks inverted; if the intent is to disable major-bump inference entirely, the patch should be made explicit (and the now-dead upstream comment/return line should be adjusted) so future updates don’t misread the behavior.

@lightwalker-eth lightwalker-eth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tk-o Dang. Changesets is such a pain. Thanks for wrestling with this 👍

@lightwalker-eth
lightwalker-eth merged commit 95a7c36 into main Jun 16, 2026
23 checks passed
@lightwalker-eth
lightwalker-eth deleted the fix/changeset-cli-deps branch June 16, 2026 16:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants