Merged
Conversation
🦋 Changeset detectedLatest commit: 0655d8d The changes in this PR will be included in the next version bump. This PR includes changesets to release 80 packages
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 |
Contributor
📚 Branch Preview🔍 Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
42cb9fe to
12ff023
Compare
caseyisonit
approved these changes
Nov 10, 2025
TarunAdobe
approved these changes
Nov 11, 2025
rise-erpelding
pushed a commit
that referenced
this pull request
Jan 6, 2026
* chore: add typesVersion to core * chore: add changeset * apply sort fixes from bot --------- Co-authored-by: Casey Eickhoff <48574582+caseyisonit@users.noreply.github.com> Co-authored-by: Rajdeep Chandra <rajrock38@gmail.com>
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.
Description
Adds
typesVersionsmapping to@spectrum-web-components/corepackage.json to improve TypeScript type resolution compatibility, particularly for users withmoduleResolution: "node"or older TypeScript versions.https://www.typescriptlang.org/docs/handbook/declaration-files/publishing.html#version-selection-with-typesversions
Motivation and context
After the monorepo restructure in v1.10.0, some customers using
moduleResolution: "node"withskipLibCheck: falsereported TypeScript compilation errors when the type resolution chain passes through the core package.The
typesVersionsfield provides a fallback mechanism for TypeScript to locate declaration files when the standardexportsfield resolution encounters issues. This improves compatibility across different TypeScript configurations and versions.From my brief investigation,
typesVersionsworks because it provides explicit path mappings for TypeScript to find.d.tsfiles, works as a fallback whenexportsresolution is incomplete and supports older TypeScript versions that don't fully understandexportsfield. So this seems defensive enough.Author's checklist
Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
Import and use SWC components (extend IconBase, use querySelector, etc.)
Expect: No TypeScript errors about missing HTMLElement or Element properties
Test with StackBlitz reproduction
Open the existing StackBlitz reproduction: https://stackblitz.com/edit/vitejs-vite-supsbswo?file=package.json,src%2Fmy-element.ts,tsconfig.json
Update dependencies to use this PR's changes (via snapshot or branch)
Run TypeScript type checking
Expect: TypeScript errors should be resolved