Skip to content

Commit 04d3064

Browse files
chore: update ignores and tasks (#3761)
1 parent d237ab9 commit 04d3064

File tree

7 files changed

+146
-41
lines changed

7 files changed

+146
-41
lines changed

.changeset/brave-boats-tan.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@module-federation/storybook-addon': patch
3+
---
4+
5+
remove utilities package import

.cursorignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ webpack/benchmark/
2525
tools/
2626
.husky/
2727
.github/
28-
.vscode/
2928
.verdaccio/
3029

3130

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,4 @@ packages/enhanced/test/js
7575

7676
# Federation
7777
**/.federation
78+
*.ts.timestamp*

.vscode/launch.json

Lines changed: 102 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -2,112 +2,176 @@
22
"version": "0.2.0",
33
"configurations": [
44
{
5-
"command": "npm run nx",
5+
"command": "pnpm run nx",
66
"name": "Run nx",
77
"request": "launch",
88
"type": "node-terminal"
99
},
1010
{
11-
"command": "npm run commit",
11+
"command": "pnpm run commit",
1212
"name": "Run commit",
1313
"request": "launch",
1414
"type": "node-terminal"
1515
},
1616
{
17-
"command": "npm run docs",
17+
"command": "pnpm run docs",
1818
"name": "Run docs",
1919
"request": "launch",
2020
"type": "node-terminal"
2121
},
2222
{
23-
"command": "npm run e2e:test",
24-
"name": "Run e2e:test",
25-
"request": "launch",
26-
"type": "node-terminal"
27-
},
28-
{
29-
"command": "npm run lint",
23+
"command": "pnpm run lint",
3024
"name": "Run lint",
3125
"request": "launch",
3226
"type": "node-terminal"
3327
},
3428
{
35-
"command": "npm run test",
36-
"name": "Run test",
37-
"request": "launch",
38-
"type": "node-terminal"
39-
},
40-
{
41-
"command": "npm run build",
29+
"command": "pnpm run build",
4230
"name": "Run build",
4331
"request": "launch",
4432
"type": "node-terminal"
4533
},
4634
{
47-
"command": "npm run lint-fix",
35+
"command": "pnpm run lint-fix",
4836
"name": "Run lint-fix",
4937
"request": "launch",
5038
"type": "node-terminal"
5139
},
5240
{
53-
"command": "npm run trigger-release",
41+
"command": "pnpm run trigger-release",
5442
"name": "Run trigger-release",
5543
"request": "launch",
5644
"type": "node-terminal"
5745
},
5846
{
59-
"command": "npm run serve:next",
47+
"command": "pnpm run serve:next",
6048
"name": "Run serve:next",
6149
"request": "launch",
6250
"type": "node-terminal"
6351
},
6452
{
65-
"command": "npm run serve:website",
53+
"command": "pnpm run serve:website",
6654
"name": "Run serve:website",
6755
"request": "launch",
6856
"type": "node-terminal"
6957
},
7058
{
71-
"command": "npm run build:website",
59+
"command": "pnpm run build:website",
7260
"name": "Run build:website",
7361
"request": "launch",
7462
"type": "node-terminal"
7563
},
7664
{
77-
"command": "npm run extract-i18n:website",
65+
"command": "pnpm run extract-i18n:website",
7866
"name": "Run extract-i18n:website",
7967
"request": "launch",
8068
"type": "node-terminal"
8169
},
8270
{
83-
"command": "npm run postinstall",
84-
"name": "Run postinstall",
85-
"request": "launch",
86-
"type": "node-terminal"
87-
},
88-
{
89-
"command": "npm run sync:types:webpack",
90-
"name": "Run sync:types:webpack",
91-
"request": "launch",
92-
"type": "node-terminal"
93-
},
94-
{
95-
"command": "npm run sync:pullMFTypes",
71+
"command": "pnpm run sync:pullMFTypes",
9672
"name": "Run sync:pullMFTypes",
9773
"request": "launch",
9874
"type": "node-terminal"
9975
},
10076
{
101-
"command": "npm run app:next:dev",
77+
"command": "pnpm run app:next:dev",
10278
"name": "Run app:next:dev",
10379
"request": "launch",
10480
"type": "node-terminal"
10581
},
10682
{
107-
"command": "npm run app:next:prod",
83+
"command": "pnpm run app:next:prod",
10884
"name": "Run app:next:prod",
10985
"request": "launch",
11086
"type": "node-terminal"
87+
},
88+
{
89+
"name": "Debug Enhanced Tests",
90+
"type": "node",
91+
"request": "launch",
92+
"preLaunchTask": "pnpm-build-enhanced",
93+
"runtimeExecutable": "/Users/bytedance/.nvm/versions/node/v18.20.8/bin/node",
94+
"runtimeArgs": [
95+
"${workspaceFolder}/node_modules/jest/bin/jest.js",
96+
"test/ConfigTestCases.basictest.js",
97+
"test/unit",
98+
"--runInBand",
99+
"--no-cache"
100+
],
101+
"cwd": "${workspaceFolder}/packages/enhanced",
102+
"console": "integratedTerminal",
103+
"internalConsoleOptions": "neverOpen",
104+
"env": {
105+
"NODE_OPTIONS": "--experimental-vm-modules"
106+
},
107+
"skipFiles": ["<node_internals>/**"],
108+
"outFiles": ["${workspaceFolder}/packages/enhanced/dist/**/*.js"],
109+
"sourceMaps": true
110+
},
111+
{
112+
"name": "Debug Current Test File",
113+
"type": "node",
114+
"request": "launch",
115+
"runtimeExecutable": "pnpm",
116+
"runtimeArgs": [
117+
"nx",
118+
"test",
119+
"${relativeFileDirname}",
120+
"--testFile=${fileBasename}",
121+
"--runInBand",
122+
"--no-cache"
123+
],
124+
"console": "integratedTerminal",
125+
"internalConsoleOptions": "neverOpen",
126+
"skipFiles": ["<node_internals>/**"],
127+
"env": {
128+
"NODE_ENV": "test"
129+
}
130+
},
131+
{
132+
"name": "Debug Package Tests",
133+
"type": "node",
134+
"request": "launch",
135+
"runtimeExecutable": "pnpm",
136+
"runtimeArgs": [
137+
"nx",
138+
"test",
139+
"${input:package}",
140+
"--runInBand",
141+
"--no-cache"
142+
],
143+
"console": "integratedTerminal",
144+
"internalConsoleOptions": "neverOpen",
145+
"skipFiles": ["<node_internals>/**"],
146+
"env": {
147+
"NODE_ENV": "test"
148+
}
149+
},
150+
{
151+
"name": "Debug All Tests",
152+
"type": "node",
153+
"request": "launch",
154+
"runtimeExecutable": "pnpm",
155+
"runtimeArgs": [
156+
"nx",
157+
"run-many",
158+
"--target=test",
159+
"--runInBand",
160+
"--no-cache"
161+
],
162+
"console": "integratedTerminal",
163+
"internalConsoleOptions": "neverOpen",
164+
"skipFiles": ["<node_internals>/**"],
165+
"env": {
166+
"NODE_ENV": "test"
167+
}
168+
}
169+
],
170+
"inputs": [
171+
{
172+
"id": "package",
173+
"type": "promptString",
174+
"description": "Enter the package name to test (e.g., enhanced, cli, runtime)"
111175
}
112176
]
113177
}

.vscode/tasks.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"version": "2.0.0",
3+
"tasks": [
4+
{
5+
"label": "pnpm-build-enhanced",
6+
"type": "shell",
7+
// Use nx to build only the 'enhanced' package dependencies if possible
8+
// Adjust 'enhanced' if the nx project name is different
9+
// --- Updated Command to include NVM ---
10+
// This assumes NVM is installed in the default location ($HOME/.nvm)
11+
// and uses the latest installed Node v18. Adjust if needed.
12+
"command": "source $HOME/.nvm/nvm.sh && nvm use 18 && pnpm nx build enhanced",
13+
// args are no longer needed as the full command is specified above
14+
// "args": ["nx", "build", "enhanced"],
15+
"problemMatcher": [],
16+
"options": {
17+
// Ensure the shell runs commands correctly
18+
"shell": {
19+
"executable": "/bin/zsh", // Or your preferred shell like /bin/bash
20+
"args": ["-l", "-c"] // Use login shell args to potentially source NVM automatically, then execute command
21+
}
22+
},
23+
"presentation": {
24+
"reveal": "silent", // Don't show the terminal panel unless there's an error
25+
"panel": "dedicated",
26+
"clear": true
27+
},
28+
"detail": "Sources NVM, uses Node v18, then builds the 'enhanced' package using nx."
29+
}
30+
]
31+
}

packages/chrome-devtools/project.json

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@
99
"executor": "nx:run-commands",
1010
"options": {
1111
"commands": ["npm run build:lib --prefix packages/chrome-devtools"]
12-
}
12+
},
13+
"dependsOn": [
14+
{
15+
"target": "build",
16+
"dependencies": true
17+
}
18+
]
1319
},
1420
"build:chrome-plugins": {
1521
"executor": "nx:run-commands",

packages/storybook-addon/package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@
6363
},
6464
"peerDependencies": {
6565
"@rsbuild/core": "^1.0.1",
66-
"@module-federation/utilities": "^3.1.54",
6766
"@module-federation/sdk": "^0.13.1",
6867
"@nx/react": ">= 16.0.0",
6968
"@nx/webpack": ">= 16.0.0",

0 commit comments

Comments
 (0)