From d2305c07fb62d0a3c1a417289e23337ea9658487 Mon Sep 17 00:00:00 2001 From: showerbee <13712377+showerbee@users.noreply.github.com> Date: Mon, 12 Oct 2026 23:30:45 -0400 Subject: [PATCH 1/2] fix: accept later 2.x releases of the @salesforce-ux/design-system peer 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. --- components/__tests__/package-dependencies.test.js | 14 ++++++++++++++ package-lock.json | 6 +++--- package.json | 2 +- 3 files changed, 18 insertions(+), 4 deletions(-) create mode 100644 components/__tests__/package-dependencies.test.js diff --git a/components/__tests__/package-dependencies.test.js b/components/__tests__/package-dependencies.test.js new file mode 100644 index 000000000..2361742b5 --- /dev/null +++ b/components/__tests__/package-dependencies.test.js @@ -0,0 +1,14 @@ +import { describe, it, expect } from 'vitest'; +import pkg from '../../package.json'; + +const EXACT_VERSION = /^\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?$/; + +describe('package.json peerDependencies', () => { + // An exact pin makes npm fail with ERESOLVE for any consumer that already + // has a newer @salesforce-ux/design-system, though only its icon sprites are used. + it('accepts later 2.x releases of @salesforce-ux/design-system', () => { + const range = pkg.peerDependencies['@salesforce-ux/design-system']; + expect(range).not.toMatch(EXACT_VERSION); + expect(range).toMatch(/^\^2\./); + }); +}); diff --git a/package-lock.json b/package-lock.json index 7277c375c..68f694edc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@salesforce/design-system-react", - "version": "11.0.0-alpha.3", + "version": "11.0.0-alpha.4", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@salesforce/design-system-react", - "version": "11.0.0-alpha.3", + "version": "11.0.0-alpha.4", "license": "BSD-3-Clause", "dependencies": { "@floating-ui/dom": "^1.8.0", @@ -88,7 +88,7 @@ "node": ">=24" }, "peerDependencies": { - "@salesforce-ux/design-system": "2.25.0-alpha.2", + "@salesforce-ux/design-system": "^2.25.0-alpha.2", "react": "^19.2.0", "react-dom": "^19.2.0" } diff --git a/package.json b/package.json index c880ca408..d9992ee1c 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "warning": "^4.0.3" }, "peerDependencies": { - "@salesforce-ux/design-system": "2.25.0-alpha.2", + "@salesforce-ux/design-system": "^2.25.0-alpha.2", "react": "^19.2.0", "react-dom": "^19.2.0" }, From 571c08eb8cba65bd46d73cb330b5473640ec4fd6 Mon Sep 17 00:00:00 2001 From: showerbee <13712377+showerbee@users.noreply.github.com> Date: Mon, 12 Oct 2026 23:30:49 -0400 Subject: [PATCH 2/2] docs: scope the SLDS peer ERESOLVE workaround to alpha.4 and earlier --- CHANGELOG.md | 4 ++++ README.md | 2 +- ROADMAP.md | 6 +++--- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43a25d0aa..cbb3f1565 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), - `Button`: `xx-small` icon size ([#3228](https://github.com/salesforce/design-system-react/pull/3228)) - `ButtonStateful`: `success` and `text` variants ([#3234](https://github.com/salesforce/design-system-react/pull/3234)) +### Fixed + +- The `@salesforce-ux/design-system` peer dependency accepts `^2.25.0-alpha.2` instead of exactly `2.25.0-alpha.2`, so installing into a project that already has a newer version no longer fails with `ERESOLVE` + ## [11.0.0-alpha.4] - 2026-10-06 ### Changed diff --git a/README.md b/README.md index 96f854585..3ab98e279 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ npm 7 and later also installs the peer dependencies: `react`, `react-dom`, and ` ### Troubleshooting `ERESOLVE` errors - **`Found: react@18…`**: v11 requires React 19.2 or later. Upgrade React, or stay on 0.10.x. -- **`Found: @salesforce-ux/design-system@…`**: v11 pins this peer dependency to `2.25.0-alpha.2`, so a project that already has a newer version fails to install. Until the pin is loosened, install with `--legacy-peer-deps`. That flag also skips automatic peer installs, so add React yourself: +- **`Found: @salesforce-ux/design-system@…`**: 11.0.0-alpha.4 and earlier pin this peer dependency to exactly `2.25.0-alpha.2`, so a project that already has another version fails to install. Later releases accept any 2.x version from `2.25.0-alpha.2` on. On an affected version, install with `--legacy-peer-deps`. That flag also skips automatic peer installs, so add React yourself: ```bash npm install @salesforce/design-system-react@alpha react@^19.2.0 react-dom@^19.2.0 --legacy-peer-deps diff --git a/ROADMAP.md b/ROADMAP.md index 45a7ce776..6e287f912 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -26,9 +26,9 @@ - [ ] Fix the `components/` entry points for `ColorPicker`, `Filter`, and `Tree`. `scripts/generate-entry-shims.mjs` only emits a shim beside a built `index` file, and these three have none in `dist/`, so the subpath import fails to resolve. -- [ ] Loosen the `@salesforce-ux/design-system` peer dependency. It is pinned to - `2.25.0-alpha.2`, which npm 7+ auto-installs and which conflicts with any newer - version already in the consumer's tree. It is only needed for the icon sprites. +- [x] Loosen the `@salesforce-ux/design-system` peer dependency. It was pinned to + `2.25.0-alpha.2`, which conflicted with any newer version already in the + consumer's tree. It is now `^2.25.0-alpha.2`. - [ ] Write a 0.10.x → v11 migration guide (removed components, `DataTable` rename, React 19, module format). - [ ] Publish hosted docs for v11. `react.lightningdesignsystem.com` redirects to