Repository navigation
feat!: v11 RC breaking changes (key values, package exports) - #3333
Merged
Merged
Conversation
interactivellama
force-pushed
the
feat/v11-rc-breaking
branch
from
November 17, 2026 22:45
54b7f44 to
8172551
Compare
4 of 15 tasks
interactivellama
changed the base branch from
master
to
feat/v11-asks-1-release-policy
November 17, 2026 22:47
interactivellama
force-pushed
the
feat/v11-rc-breaking
branch
from
November 18, 2026 19:20
8172551 to
66a3653
Compare
Niznikr
reviewed
Nov 18, 2026
| "require": "./dist/cjs/utilities/*.cjs", | ||
| "default": "./dist/es/utilities/*.js" | ||
| }, | ||
| "./components/*check-props": null, |
Collaborator
There was a problem hiding this comment.
Would it be possible to regex for private like ./**/**/private/*?
Contributor
Author
There was a problem hiding this comment.
Good catch! Updated.
Contributor
Author
There was a problem hiding this comment.
My understanding is that we can't ** in node packages and only *
keyCode, which and charCode are deprecated DOM APIs. Keyboard handling across
components now reads event.key, and the key-code utilities hold key values.
Radio listened to the deprecated keypress event and selected on any key when
unchecked. It now listens to keydown and selects only on Space or Enter.
Unlike keyCode (229), event.key reports 'Enter' for the keydown that commits
an IME composition, so mapKeyEventCallbacks and Search's Enter handler now
skip composing keys (EventUtil.isComposing).
BREAKING CHANGE: utilities/key-code exports KeyboardEvent.key strings
('Enter', 'ArrowDown', ...) instead of numeric key codes, and keyObjects
entries carry only `key`. utilities/keyboard-navigate and
utilities/keyboard-navigable-dialog take `key` instead of `keyCode`.
Every type that a public component's props refer to is now declared in a public file and can be named from a public entry point, so consumers don't need a deep import into `utilities/` or a `private/` folder: - `TriggerRender` moves to `types/common` and is exported from the root, `components/tooltip` and `components/menu-dropdown`. - `ChildrenOf` and `IconCategory` are exported from the root, and `IconCategory` from `components/icon`. - The combobox option types move from `private/menu` to a new `components/combobox/types.ts`. `components/combobox` now also exports `ComboboxOptionIcon`, `ComboboxOptionLabelRenderer`, `ComboboxActionOptionFields` and `ComboboxMenuRenderMenuItemData` (renamed from the private `MenuRenderMenuItemData`). - `CarouselItemProps` moves to `components/carousel/types.ts`, `SplitViewListItem` to `components/split-view/types.ts`, and the props of page-header's legacy `Info`, `Title`, `DetailRow` and `DetailBlock` exports to `components/page-header/types.ts`. They are exported from `components/carousel`, `split-view/listbox` and `components/page-header`. The private implementation files import them from there. The root barrel becomes `components/index.ts` so it can export types. Its shipped declarations were already generated from `index.js`; the unused hand-written `components/index.d.ts` (which had drifted from it) and the ambient `components/settings.d.ts` are removed.
The `exports` map no longer publishes internals: - `./utilities/*` is removed. - Every `components/**/private` folder and everything under it, and every `check-props` module, map to `null`, so `import` and `require` throw `ERR_PACKAGE_PATH_NOT_EXPORTED` and TypeScript can't resolve them. One `./components/*/private` pattern blocks every folder (it ties `./components/*` on prefix and wins on length), but the files under each `private` folder need their own `./components/<path>/private/*` key: an exports key allows a single `*`, and Node ignores a key with two. The build follows suit. `utilities/*/index` is no longer a Vite entry, the entry shims are generated only for `components/` and skip `private/` folders, and `build:types` prunes every internal `.d.ts` that no public declaration imports (`scripts/prune-internal-types.ts`). Eight stay because public declarations import them by relative path for value exports or class state (`utilities/constants`, `utilities/log`, page-header's legacy subcomponents, split-view's list-item HOC and simple-data-table's mode); they are not in `exports`, so they are not entry points. BREAKING CHANGE: `@salesforce/design-system-react/utilities/*` and `@salesforce/design-system-react/components/*/private/*` (and the `check-props` modules) no longer resolve. They were never public API. Copy the helper you need, or use the platform equivalent (`event.key` instead of `utilities/key-code`). This includes the `utilities/hooks` hooks (`useClickOutside`, `useControllableState`, `useLatestRef`), which are internal.
`check-package-exports` no longer treats `utilities/<name>` as an entry point and adds two checks against the built package: - Negative: every module under `utilities/`, every module and folder under a `private/` folder in `components/`, and every `check-props` module must fail to resolve for types (`bundler` and `node16`, `import` and `require` conditions), and `import()`/`require()` must throw `ERR_PACKAGE_PATH_NOT_EXPORTED`. - Type surface: every type a public value export's signature refers to, and every type-only export of a public entry point, must be declared in a public file, not under `utilities/` or a `private/` folder. A shared type declared in `types/` must also be exported by name from a public entry point.
- CHANGELOG: a BREAKING entry for the `exports` change, with the 0.10.x deep imports most likely in use and how to migrate; the `utilities/hooks` hooks are no longer listed as added public API; the newly exported prop types are listed under Added. - codebase-overview: state the public-surface rule next to the folder structure, add entry points to the breaking-change taxonomy, and note that `exports` now enforces the `private/` boundary for consumers. - CONTRIBUTING: the root barrel is `components/index.ts`, with generated types.
interactivellama
force-pushed
the
feat/v11-rc-breaking
branch
from
November 18, 2026 21:26
66a3653 to
50a4b41
Compare
Niznikr
approved these changes
Nov 18, 2026
5 of 15 tasks
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.
Fixes #
Additional description
RC breaking changes: merge this first, then cut 11.0.0-rc.0. This PR is outside the merge-train stacks and based on
master. It pulls the train's two breaking changes forward so the RC carries every public-API break, and the remaining stacks can be rebased onto it as non-breaking cleanups.Commits (moved from #3327 and #3328):
fix!: compare KeyboardEvent.key instead of keyCode(from fix: replace deprecated DOM and React APIs #3327).keyCode,whichandcharCodeare deprecated DOM APIs, so keyboard handling now readsevent.key. Radio listened to the deprecatedkeypressevent and selected on any key while unchecked; it now listens tokeydownand selects only on Space or Enter.feat: export the types used in public prop signatures(from feat!: remove utilities and private folders from the package exports #3328).TriggerRender,ChildrenOf,IconCategoryand the Combobox, Carousel, SplitView and PageHeader prop types can now be named without a deep import.feat!: remove utilities and private folders from the package exports(from feat!: remove utilities and private folders from the package exports #3328), plus its test and docs commits.BREAKING CHANGE:
@salesforce/design-system-react/utilities/*,components/*/private/*and thecheck-propsmodules no longer resolve. This includes theutilities/hookshooks (useClickOutside,useControllableState,useLatestRef). They were never public API. Migration: copy the helper you need, or use the platform equivalent (event.keyinstead ofutilities/key-code).utilities/key-codenow exportsKeyboardEvent.keystrings instead of numeric codes, andutilities/keyboard-navigateandkeyboard-navigable-dialogtakekey. After the change above this only affects consumers who deep-imported internals.Conflicts resolved while moving: in
types/common.tsthe React type imports from both sides are merged. InCHANGELOG.mdthis PR carries the exported-types entry; the deprecated-lint docs entry stays with #3311.npm run test:ciis green locally: 1650 tests, typecheck, build, and lint with 0 errors (warnings are the tracked backlog).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).content/visualPickerFigure, render props likerenderItem,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__..d.ts(they're generated by the build); JS consumers rely on them via editor type-acquisition.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.