Skip to content

Commit 6c95b04

Browse files
committed
chore: made TS a root dev dep for easier maintenance
1 parent b585cc7 commit 6c95b04

File tree

6 files changed

+30
-26
lines changed

6 files changed

+30
-26
lines changed

1st-gen/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,6 @@
192192
"tachometer": "0.7.2",
193193
"tar-stream": "3.1.7",
194194
"terser": "4.8.1",
195-
"typescript": "5.9.2",
196195
"webpack-merge": "6.0.1",
197196
"wireit": "0.14.12",
198197
"yargs": "17.7.2"

2nd-gen/packages/core/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
"devDependencies": {
5555
"glob": "11.0.3",
5656
"rimraf": "6.0.1",
57-
"typescript": "5.9.2",
5857
"vite": "7.1.7",
5958
"vite-plugin-dts": "4.5.4"
6059
},

2nd-gen/packages/swc/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
"react-dom": "19.1.1",
7878
"rimraf": "6.0.1",
7979
"storybook": "10.0.3",
80-
"typescript": "5.9.2",
8180
"vite": "7.1.7",
8281
"vite-plugin-dts": "4.5.4",
8382
"vite-plugin-lit-css": "2.2.1",

CONTRIBUTOR-DOCS/01_contributor-guides/10_typescript-configuration.md

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -162,53 +162,61 @@ The top-level `yarn build` command handles this automatically.
162162

163163
### Current version
164164

165-
**TypeScript version**: 5.9.2 (aligned across all workspaces as of November 7, 2025)
165+
**TypeScript version**: 5.9.2 (managed at root level as of November 2025)
166166

167-
All three locations use the same version:
167+
TypeScript is installed in:
168168

169-
- `1st-gen/package.json`
170-
- `1st-gen/projects/css-custom-vars-viewer/package.json`
171-
- `1st-gen/projects/example-project-rollup/package.json`
169+
- Root `package.json` (primary dependency for all workspaces via hoisting)
170+
- `1st-gen/projects/css-custom-vars-viewer/package.json` (example project)
171+
- `1st-gen/projects/example-project-rollup/package.json` (example project)
172+
173+
Example projects maintain their own TypeScript dependency to simulate external consumer environments.
172174

173175
### Upgrading TypeScript
174176

175-
When updating TypeScript versions, follow these steps to ensure consistency:
177+
When updating TypeScript versions:
176178

177-
**1. Update all three package.json files:**
179+
**1. Update the root package.json:**
178180

179181
```bash
180-
# Update version in all three locations
181-
# 1st-gen/package.json
182-
# 1st-gen/projects/css-custom-vars-viewer/package.json
183-
# 1st-gen/projects/example-project-rollup/package.json
182+
# Edit package.json at root and update typescript version
184183
```
185184

186-
**2. Install the new version:**
185+
**2. Update example projects (optional):**
186+
187+
Example projects can update independently, but should generally stay aligned:
188+
189+
- `1st-gen/projects/css-custom-vars-viewer/package.json`
190+
- `1st-gen/projects/example-project-rollup/package.json`
191+
192+
**3. Install the new version:**
187193

188194
```bash
189195
yarn install
190196
```
191197

192-
**3. Verify TypeScript version:**
198+
**4. Verify TypeScript version:**
193199

194200
```bash
195-
cd 1st-gen && yarn tsc --version
201+
yarn tsc --version # Check hoisted version
202+
cd 1st-gen && yarn tsc --version # Verify in 1st-gen
203+
cd 2nd-gen && yarn tsc --version # Verify in 2nd-gen
196204
```
197205

198-
**4. Clean and rebuild:**
206+
**5. Clean and rebuild:**
199207

200208
```bash
201209
yarn workspace @spectrum-web-components/1st-gen build:clear-cache
202210
yarn build
203211
```
204212

205-
**5. Run the test suite:**
213+
**6. Run the test suite:**
206214

207215
```bash
208216
yarn test
209217
```
210218

211-
**6. Check for breaking changes:**
219+
**7. Check for breaking changes:**
212220

213221
- Review the [TypeScript release notes](https://www.typescriptlang.org/docs/handbook/release-notes/overview.html)
214222
- Pay special attention to `lib.d.ts` changes (DOM types)

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@
2727
"start:1st-gen": "yarn workspace @spectrum-web-components/1st-gen start",
2828
"start:2nd-gen": "yarn workspace @spectrum-web-components/2nd-gen start",
2929
"test": "run-p test:2nd-gen test:1st-gen",
30+
"test:1st-gen": "yarn workspace @spectrum-web-components/1st-gen test",
31+
"test:2nd-gen": "yarn workspace @spectrum-web-components/2nd-gen test",
3032
"test:a11y": "playwright test --config=playwright.a11y.config.ts",
31-
"test:a11y:ui": "playwright test --config=playwright.a11y.config.ts --ui",
3233
"test:a11y:1st": "playwright test --config=playwright.a11y.config.ts --project=1st-gen",
3334
"test:a11y:2nd": "playwright test --config=playwright.a11y.config.ts --project=2nd-gen",
3435
"test:a11y:report": "playwright show-report 2nd-gen/test/playwright-a11y/report",
35-
"test:1st-gen": "yarn workspace @spectrum-web-components/1st-gen test",
36-
"test:2nd-gen": "yarn workspace @spectrum-web-components/2nd-gen test"
36+
"test:a11y:ui": "playwright test --config=playwright.a11y.config.ts --ui"
3737
},
3838
"workspaces": [
3939
"1st-gen",
@@ -57,6 +57,7 @@
5757
"lint-staged": "16.2.6",
5858
"npm-run-all2": "8.0.4",
5959
"replace-in-file": "8.3.0",
60+
"typescript": "5.9.2",
6061
"yargs": "17.7.2"
6162
},
6263
"keywords": [

yarn.lock

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,6 @@ __metadata:
199199
react-dom: "npm:19.1.1"
200200
rimraf: "npm:6.0.1"
201201
storybook: "npm:10.0.3"
202-
typescript: "npm:5.9.2"
203202
vite: "npm:7.1.7"
204203
vite-plugin-dts: "npm:4.5.4"
205204
vite-plugin-lit-css: "npm:2.2.1"
@@ -5419,7 +5418,6 @@ __metadata:
54195418
tachometer: "npm:0.7.2"
54205419
tar-stream: "npm:3.1.7"
54215420
terser: "npm:4.8.1"
5422-
typescript: "npm:5.9.2"
54235421
webpack-merge: "npm:6.0.1"
54245422
wireit: "npm:0.14.12"
54255423
yargs: "npm:17.7.2"
@@ -5836,7 +5834,6 @@ __metadata:
58365834
glob: "npm:11.0.3"
58375835
lit: "npm:^2.5.0 || ^3.1.3"
58385836
rimraf: "npm:6.0.1"
5839-
typescript: "npm:5.9.2"
58405837
vite: "npm:7.1.7"
58415838
vite-plugin-dts: "npm:4.5.4"
58425839
languageName: unknown
@@ -27175,6 +27172,7 @@ __metadata:
2717527172
lint-staged: "npm:16.2.6"
2717627173
npm-run-all2: "npm:8.0.4"
2717727174
replace-in-file: "npm:8.3.0"
27175+
typescript: "npm:5.9.2"
2717827176
yargs: "npm:17.7.2"
2717927177
languageName: unknown
2718027178
linkType: soft

0 commit comments

Comments
 (0)