Repository navigation
fix: accept later 2.x releases of the @salesforce-ux/design-system peer dependency - #3241
Merged
Merged
Conversation
The peer dependency was pinned to exactly 2.25.0-alpha.2, so npm failed with ERESOLVE in any project that already had another version (e.g. 2.264.1). Only the icon sprites are used, and no sprite symbol is removed between 2.25.0-alpha.2 and 2.264.2, so accept ^2.25.0-alpha.2. Also syncs the stale root version in package-lock.json.
interactivellama
approved these changes
Oct 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #3236
Additional description
Symptom:
npm install @salesforce/design-system-react@alphafails withERESOLVEin any project that already has@salesforce-ux/design-system. The currentlatestis 2.264.1.Root cause: the
@salesforce-ux/design-systempeer dependency is pinned to exactly2.25.0-alpha.2, and has been since #3148. npm 7+ enforces peer ranges, so every version other than that one prerelease conflicts. The package is used only for its icon sprites (assets/icons/*-sprite).Fix: the peer range is now
^2.25.0-alpha.2. The tested version stays the floor, and any later 2.x release is accepted.Why this range is safe: I diffed the sprite
<symbol id>s between 2.25.0-alpha.2 and 2.264.2. All five sprites have the same layout, and no symbols were removed:So every icon a component can reference still exists. The artwork of existing symbols can differ between versions, but the names don't.
Verified end to end: I packed this branch, installed it into clean consumer projects, and ran the same projects against the published alpha.4:
Note: a fresh install now gets the latest SLDS sprites (2.264.1) instead of 2.25.0-alpha.2.
Other changes:
components/__tests__/package-dependencies.test.jsfails if this peer is pinned to one exact version again.package-lock.json: syncs the peer range and the rootversion, which still said alpha.3 after the alpha.4 release commit.--legacy-peer-depsworkaround now applies only to 11.0.0-alpha.4 and earlier, which stay on npm with the pin.Not changed: the
devDependencystays at2.25.0-alpha.2, so Storybook and CI keep testing the lowest supported version and this PR introduces no Chromatic diffs. Bumping it can be a separate PR if we'd rather develop against the latest sprites.CONTRIBUTOR checklist (do not remove)
Please complete for every pull request.
Green gate — all of these must pass locally (CI runs the same):
npm run lintpasses with 0 errors (npm run lint:fixto auto-fix). Warnings are the tracked gradual-migration backlog; do not add new errors.npm run typecheckis clean (tsc --noEmit).npm test -- --runpasses — this runs both Vitest projects (jsdomunit+ real-browserbrowser) and the story HTML snapshots. If you changed rendered markup on purpose, update snapshots withnpm test -- --run -uand review the diff.npm run buildsucceeds (type-check + Vite library build +.d.ts+ entry shims).Behavior & docs:
components/button/__tests__). New props and bug fixes should get a regression test. Tests that genuinely need a real browser (focus traversal, layout/measurement, canvas) go in a*.browser.test.jsxfile (thebrowserproject); everything else is jsdom.npm run storybook→ http://localhost:6007/. Confirm the story actually renders and behaves (deprecated Storyshots/Karma are gone; there is no separate browser-tests server). N/A: no component changes.onRenderContent/onRenderVisualPicker,iconprops,events), not assumptions — a common source of "component looks broken" reports has been stories authored against the wrong API. Cross-check againstcomponents/<name>/__examples__. N/A..d.ts(they're generated by the build); JS consumers rely on them via editor type-acquisition. N/A.REVIEWER checklist (do not remove)
CIworkflow: lint, typecheck, test, build). Chromatic visual review, if configured, has been checked.components/__tests__/__snapshots__/story-snapshots.test.jsx.snap).@salesforce/design-system-react/components/<name>and nested paths resolve for ESM, CJS, and types). Removing/renaming a public component or export is a breaking change →feat!:/BREAKING CHANGE:and a major version bump.