-
Notifications
You must be signed in to change notification settings - Fork 236
chore(typescript): Unify ES2020 target and TypeScript 5.9.2 across monorepo #5871
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
📚 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 |
Description
This PR standardizes the TypeScript configuration across the entire monorepo by:
tsconfig.base.json) to eliminate duplicationKey changes
TypeScript version alignment:
typescriptdependency to5.9.2in:1st-gen/package.json1st-gen/projects/css-custom-vars-viewer/package.json1st-gen/projects/example-project-rollup/package.jsonUnified ES2020 target:
1st-gen/scripts/ts-tools.js(esbuild target)2nd-gen/packages/core/vite.config.js2nd-gen/packages/swc/vite.config.tsNew base configuration:
tsconfig.base.jsonwith shared settings:target: "ES2020"andlib: ["ES2020", "DOM", "DOM.Iterable"]Refactored workspace configs:
1st-gen/tsconfig.jsonnow extends base, only specifies Node resolution2nd-gen/tsconfig.jsonnow extends base, only specifies bundler resolutionDocumentation:
CONTRIBUTOR-DOCS/01_contributor-guides/10_typescript-configuration.mdCONTRIBUTOR-DOCS/README.mdandCONTRIBUTOR-DOCS/01_contributor-guides/README.mdMotivation and context
The monorepo previously had inconsistent TypeScript targets (ES2018 in 1st-gen, ES2022 in 2nd-gen) and duplicated configuration across workspaces. This made it difficult to:
ES2020 was chosen because:
Related issue(s)
No associated GitHub issue or Jira ticket. This is a proactive refactoring to improve maintainability and developer experience.
Screenshots (if appropriate)
N/A - Configuration changes only
Author's checklist
Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
Verify 1st-gen build succeeds
yarn workspace @spectrum-web-components/1st-gen build:clear-cacheyarn build:1st-genVerify 2nd-gen build succeeds
yarn build:2nd-genVerify cross-generation imports work
yarn buildVerify example projects build
1st-gen/projects/example-project-rollupyarn buildVerify test suite passes
yarn testDevice review