Skip to content

Commit 957ebe8

Browse files
mrTuomoKcursoragent
andcommitted
fix(common-i18n): scope tsconfig types for pnpm hoisted layout
pnpm no longer hoists vitest/jest-dom types into packages that do not declare them. Override compilerOptions.types per package and add test deps to common-tests where wait-utils uses them. Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent d9579fc commit 957ebe8

5 files changed

Lines changed: 4031 additions & 11556 deletions

File tree

packages/common-i18n/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
"jsx": "react-jsx",
1616
"noEmit": false,
1717
"incremental": true,
18+
"types": ["node"],
1819
"paths": {}
1920
},
2021
"exclude": [

packages/common-tests/package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"devDependencies": {
3030
"@events-helsinki/eslint-config-bases": "workspace:^",
3131
"@testing-library/dom": "^10.4.0",
32+
"@testing-library/jest-dom": "^6.6.3",
3233
"@testing-library/react": "^16.3.0",
3334
"@testing-library/testcafe": "^5.0.1",
3435
"@types/node": "24.10.10",
@@ -42,7 +43,8 @@
4243
"prettier": "^3.6.2",
4344
"rimraf": "6.0.1",
4445
"testcafe": "^3.7.4",
45-
"typescript": "5.8.3"
46+
"typescript": "5.8.3",
47+
"vitest": "4.1.2"
4648
},
4749
"./package.json": "./package.json"
4850
}

packages/common-tests/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"jsx": "react-jsx",
1111
"noEmit": false,
1212
"incremental": true,
13+
"types": ["node", "@testing-library/jest-dom", "vitest/globals"],
1314
"paths": {
1415
"@events-helsinki/common-i18n": ["../common-i18n/src/index"],
1516
"@events-helsinki/common-i18n/*": ["../common-i18n/src/*"],

packages/graphql-proxy-server/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@
1212
"module": "esnext",
1313
"incremental": true,
1414
"esModuleInterop": true,
15-
"moduleResolution": "bundler"
15+
"moduleResolution": "bundler",
16+
"types": ["node", "vitest/globals"]
1617
},
1718
"exclude": [
1819
"**/node_modules",

0 commit comments

Comments
 (0)