Skip to content

chore(react-refresh-webpack-plugin): add missed changeset for peer range bump#2626

Merged
colinaaa merged 2 commits into
mainfrom
fix/react-refresh-peer-changeset
May 14, 2026
Merged

chore(react-refresh-webpack-plugin): add missed changeset for peer range bump#2626
colinaaa merged 2 commits into
mainfrom
fix/react-refresh-peer-changeset

Conversation

@upupming
Copy link
Copy Markdown
Collaborator

@upupming upupming commented May 14, 2026

Summary

#2423 extended the @lynx-js/react-webpack-plugin peer range on @lynx-js/react-refresh-webpack-plugin to include ^0.9.0:

- "@lynx-js/react-webpack-plugin": "^0.3.0 || ^0.4.0 || ^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0"
+ "@lynx-js/react-webpack-plugin": "^0.3.0 || ^0.4.0 || ^0.5.0 || ^0.6.0 || ^0.7.0 || ^0.8.0 || ^0.9.0"

…but the changeset in that PR only bumped @lynx-js/react, @lynx-js/react-webpack-plugin, and @lynx-js/react-rsbuild-plugin. The react-refresh-webpack-plugin change has been sitting on main without ever triggering a new release.

Impact

The published @lynx-js/react-refresh-webpack-plugin@0.3.5 still ships the old (narrow) peer range, so npm install consumers continue to pull @lynx-js/react-webpack-plugin@0.8.0 alongside the newer ^0.9.0 instance their direct deps demand. That parallel install in turn pins @lynx-js/template-webpack-plugin@0.10.9 at the top of node_modules and pushes 0.11.0 into nested copies under different parents — the exact precondition that drives the Cannot destructure property 'buffer' of '(intermediate value)' as it is undefined build error.

(pnpm install was unaffected because its symlinked layout collapses references regardless.)

Change

Single changeset file. No source code change is needed — the peer-range fix is already in place on main; this entry just makes sure the next release cuts a new @lynx-js/react-refresh-webpack-plugin carrying it.

Test plan

  • pnpm changeset status now lists @lynx-js/react-refresh-webpack-plugin under "Packages to be bumped at patch"
  • CI pass

Summary by CodeRabbit

  • Chores
    • Updated internal dependency metadata and peer dependency version ranges for enhanced compatibility.

Review Change Stack

…nge bump

#2423 extended the `@lynx-js/react-webpack-plugin` peer range on
`@lynx-js/react-refresh-webpack-plugin` to `^0.9.0`, but the changeset
in that PR only bumped `@lynx-js/react`, `@lynx-js/react-webpack-plugin`,
and `@lynx-js/react-rsbuild-plugin`. As a result the peer-range fix has
been sitting on `main` without ever shipping a new
`@lynx-js/react-refresh-webpack-plugin` version, so npm installs still
resolve `0.3.5` with the old peer range, force a duplicate
`@lynx-js/react-webpack-plugin@0.8.0` install, and pin
`@lynx-js/template-webpack-plugin@0.10.9` at the top of node_modules
alongside nested `0.11.0` copies.

Add a patch-level changeset so the next release cuts a new
`@lynx-js/react-refresh-webpack-plugin` carrying the fix.
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 14, 2026

🦋 Changeset detected

Latest commit: 9a311f1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@lynx-js/react-refresh-webpack-plugin Patch
@lynx-js/react-rsbuild-plugin Patch
@lynx-js/react-alias-rsbuild-plugin Patch

Not sure what this means? Click here to learn what changesets are.

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

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 14, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1dc9c937-5980-4f69-82d9-041bbe30f3de

📥 Commits

Reviewing files that changed from the base of the PR and between bdbcf79 and 9a311f1.

📒 Files selected for processing (1)
  • .changeset/react-refresh-peer-bump.md

📝 Walkthrough

Walkthrough

A changeset file is added to document a patch release for @lynx-js/react-refresh-webpack-plugin and update its peer dependency range to include @lynx-js/react-webpack-plugin version ^0.9.0.

Changes

Peer Dependency Range Update

Layer / File(s) Summary
Changeset metadata for peer dependency range bump
.changeset/react-refresh-peer-bump.md
A changeset file is added to document a patch release for @lynx-js/react-refresh-webpack-plugin and widen the peer dependency range for @lynx-js/react-webpack-plugin to include version ^0.9.0.

Estimated Code Review Effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly Related PRs

  • lynx-family/lynx-stack#2117: Adjusts peer-dependency ranges for @lynx-js/react-webpack-plugin, sharing the same package dependency update pattern.

Suggested Labels

framework:React

Suggested Reviewers

  • colinaaa

Poem

🐰 A version bump hops into view,
Peer dependencies widened, fresh and true,
^0.9.0 now fits the bill,
React refresh stays peaceful and still! 🌿

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title accurately describes the main change: adding a missed changeset to trigger a peer dependency range bump release for react-refresh-webpack-plugin.
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/react-refresh-peer-changeset

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.

@upupming upupming force-pushed the fix/react-refresh-peer-changeset branch from 46c5085 to 9a311f1 Compare May 14, 2026 03:23
@upupming upupming marked this pull request as ready for review May 14, 2026 03:32
colinaaa pushed a commit that referenced this pull request May 14, 2026
…set (#2627)

## Summary

Add a CI check that catches the case where a PR modifies a package's
`dependencies` or `peerDependencies` but the changesets in that PR don't
bump the affected package. Without this guard, the dep change lands on
`main` and sits there until someone makes another change that triggers a
release — silently shipping broken peer ranges and tripping the kind of
npm hoist conflict that surfaced as #2624.

## Concrete motivation

#2423 widened the `@lynx-js/react-webpack-plugin` peer range on
`@lynx-js/react-refresh-webpack-plugin`, but the changeset only bumped
`@lynx-js/react`, `@lynx-js/react-webpack-plugin`, and
`@lynx-js/react-rsbuild-plugin`. The peer-range fix sat unreleased; `npm
install` consumers continued to pull the old
`@lynx-js/react-refresh-webpack-plugin@0.3.5` with the narrow peer
range, force a parallel `@lynx-js/react-webpack-plugin@0.8.0` install,
pin `@lynx-js/template-webpack-plugin@0.10.9` at the top of
`node_modules` next to nested `0.11.0` copies, and ultimately produce
the build error tracked in #2624. The missed-changeset follow-up is
#2626.

Running this new check against the `#2423` state (locally, with
`--since=$(git rev-parse 1f4f117^)`) reproduces the catch:

```
The following packages changed `dependencies` or `peerDependencies` but no changeset bumps them:

  - @lynx-js/react-refresh-webpack-plugin  [peerDependencies]
    packages/webpack/react-refresh-webpack-plugin/package.json

Add a changeset (e.g. `pnpm changeset add`) bumping each affected package so the dependency change actually ships in the next release.
```

Exit code is non-zero — CI would have blocked the PR until either a
changeset was added or the dep change was reverted.

## What the check does

For each `package.json` modified relative to the PR's base ref:

- Skip `private: true` packages (not published, so no release-time
impact).
- Skip files newly added in the PR (initial release is a separate
workflow).
- Diff `dependencies` and `peerDependencies` against the base.
`devDependencies` is intentionally ignored — those don't affect
downstream consumers.
- If the diff is non-empty and the changeset status report does **not**
list the package, flag it.
- Print all flagged packages with the field that changed, then exit
non-zero.

`isShallowEqual` is tolerant of key reordering and ignores anything
outside the two examined fields, so changes that don't actually move the
resolution surface (formatting, version-field re-sorts via `pnpm
meta-updater`) don't trip the check.

## Integration

Inserted in the existing `code-style-check` job, immediately after
`Changeset Heading Check`. The script's own unit-test file is also
exercised in the same step via `node --test`, so the helper logic gets
regression coverage without spinning up a separate runner.

## Test plan

- [x] `node --test
.github/scripts/check-dep-changes-have-changeset.test.cjs` — 10 cases,
all pass (key reorder tolerance, dev-deps-only skip, private-pkg skip,
newly-added-pkg skip, multi-package flagging, etc.)
- [x] Running the script against the `#2423` state reproduces the catch
and exits non-zero
- [x] Running against this branch itself returns "all good" (no dep
changes here)
- [ ] CI pass on this PR

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Chores**
* Enhanced internal validation processes for dependency changes during
the development workflow.

---

**Note:** This release includes internal infrastructure improvements
with no direct impact to end-user functionality.

<!-- review_stack_entry_start -->

[![Review Change
Stack](https://storage.googleapis.com/coderabbit_public_assets/review-stack-in-coderabbit-ui.svg)](https://app.coderabbit.ai/change-stack/lynx-family/lynx-stack/pull/2627)

<!-- review_stack_entry_end -->

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
@colinaaa colinaaa merged commit 13a0776 into main May 14, 2026
5 checks passed
@colinaaa colinaaa deleted the fix/react-refresh-peer-changeset branch May 14, 2026 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants