Skip to content

Commit 292637d

Browse files
authored
[code-infra] Update module resolution for typescript@next (#46940)
1 parent 3538543 commit 292637d

File tree

13 files changed

+23
-19
lines changed

13 files changed

+23
-19
lines changed

.circleci/config.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,10 +258,14 @@ jobs:
258258
command: pnpm typescript:ci
259259
environment:
260260
NODE_OPTIONS: --max-old-space-size=3072
261+
- run:
262+
name: Prepare files
263+
# Enable configuration that is only valid in typescript@next
264+
command: sed -i 's|// <ts@next uncomment>||g' test/moduleResolution/tsconfig.node.json
261265
- run:
262266
name: Build declaration files
263267
command: |
264-
pnpm -r build
268+
pnpm lerna run --scope "@mui/*" build
265269
- run:
266270
name: Log defect declaration files
267271
command: |

packages-internal/docs-utils/tsconfig.build.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
"composite": true,
99
"tsBuildInfoFile": "./build/.tsbuildinfo",
1010
"target": "ES2020",
11-
"module": "commonjs",
1211
"types": ["node"]
1312
},
1413
"exclude": ["./test/*.ts"]

packages-internal/docs-utils/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"compilerOptions": {
33
"noEmit": true,
4-
"moduleResolution": "node",
4+
"module": "nodenext",
5+
"moduleResolution": "nodenext",
56
"types": ["node"],
67
"strict": true,
78
"esModuleInterop": true,

packages-internal/scripts/tsconfig.base.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
{
22
"compilerOptions": {
33
"target": "ES2020",
4-
"moduleResolution": "node",
5-
"module": "commonjs",
4+
"moduleResolution": "nodenext",
5+
"module": "nodenext",
66
"types": ["node"],
7-
87
"strict": true,
98
"declaration": true,
109
"declarationMap": true,
1110
"sourceMap": true,
1211
"composite": true,
13-
1412
"esModuleInterop": true,
1513
"isolatedModules": true
1614
}

packages-internal/scripts/typescript-to-proptypes/tsconfig.test.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"compilerOptions": {
33
"noEmit": true,
4-
"moduleResolution": "node",
54
"types": ["node", "mocha"],
65
"strict": true,
76
"esModuleInterop": true,

packages-internal/test-utils/src/setupVitest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ testingLibrary.configure({
2323
(globalThis as any).IS_REACT_ACT_ENVIRONMENT = true;
2424

2525
failOnConsole({
26-
silenceMessage: (message) => {
26+
silenceMessage: (message: string) => {
2727
if (process.env.NODE_ENV === 'production') {
2828
// TODO: mock scheduler
2929
if (message.includes('act(...) is not supported in production builds of React')) {

packages-internal/test-utils/tsconfig.build.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"composite": true,
1111
"tsBuildInfoFile": "./build/.tsbuildinfo",
1212
"target": "ES2020",
13-
"module": "commonjs",
1413
"types": ["node"],
1514
"allowJs": true
1615
}

packages-internal/test-utils/tsconfig.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"compilerOptions": {
33
"lib": ["es2020", "dom"],
44
"noEmit": true,
5-
"moduleResolution": "node",
5+
"module": "nodenext",
6+
"moduleResolution": "nodenext",
67
"types": ["node", "mocha"],
78
"strict": true,
89
"esModuleInterop": true,

packages/api-docs-builder/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
"esModuleInterop": true,
1010
"types": ["node", "mocha"],
1111
"target": "ES2020",
12-
"module": "CommonJS",
13-
"moduleResolution": "node",
12+
"module": "nodenext",
13+
"moduleResolution": "nodenext",
1414
"strict": true,
1515
"baseUrl": "./",
1616
"paths": {

test/moduleResolution/tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
"compilerOptions": {
33
// rely on workspace linking
44
"paths": {},
5-
"module": "commonjs",
65
"target": "es5",
76
"lib": ["es6", "dom"],
87
"jsx": "react",
9-
"moduleResolution": "node",
8+
"module": "nodenext",
9+
"moduleResolution": "nodenext",
1010
"strict": true,
1111
"noEmit": true,
1212
"noErrorTruncation": true,

0 commit comments

Comments
 (0)