rsbuild-plugin-workspace-dev 0.1.2 → 0.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.cjs CHANGED
@@ -218,16 +218,22 @@ class WorkspaceDevRunner {
218
218
  return this.start().then(()=>resolve());
219
219
  }
220
220
  this.visiting[node] = true;
221
- const child = (0, external_child_process_namespaceObject.spawn)('npm', [
221
+ const spawnCommand = 'win32' === process.platform ? 'cmd.exe' : 'npm';
222
+ const spawnArgs = 'win32' === process.platform ? [
223
+ '/c',
224
+ 'npm',
222
225
  'run',
223
226
  command
224
- ], {
227
+ ] : [
228
+ 'run',
229
+ command
230
+ ];
231
+ const child = (0, external_child_process_namespaceObject.spawn)(spawnCommand, spawnArgs, {
225
232
  cwd: path,
226
233
  env: {
227
234
  ...process.env,
228
235
  FORCE_COLOR: '3'
229
- },
230
- shell: true
236
+ }
231
237
  });
232
238
  child.stdout.on('data', async (data)=>{
233
239
  const stdout = data.toString();
package/dist/index.js CHANGED
@@ -176,16 +176,22 @@ class WorkspaceDevRunner {
176
176
  return this.start().then(()=>resolve());
177
177
  }
178
178
  this.visiting[node] = true;
179
- const child = spawn('npm', [
179
+ const spawnCommand = 'win32' === process.platform ? 'cmd.exe' : 'npm';
180
+ const spawnArgs = 'win32' === process.platform ? [
181
+ '/c',
182
+ 'npm',
180
183
  'run',
181
184
  command
182
- ], {
185
+ ] : [
186
+ 'run',
187
+ command
188
+ ];
189
+ const child = spawn(spawnCommand, spawnArgs, {
183
190
  cwd: path,
184
191
  env: {
185
192
  ...process.env,
186
193
  FORCE_COLOR: '3'
187
- },
188
- shell: true
194
+ }
189
195
  });
190
196
  child.stdout.on('data', async (data)=>{
191
197
  const stdout = data.toString();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rsbuild-plugin-workspace-dev",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "An Rsbuild plugin to provides workspace recursive dev functionality for Monorepo topologies.",
5
5
  "repository": "https://github.com/rstackjs/rsbuild-plugin-workspace-dev",
6
6
  "license": "MIT",
@@ -62,7 +62,7 @@
62
62
  "typescript": "^5.9.3"
63
63
  },
64
64
  "peerDependencies": {
65
- "@rsbuild/core": "1.x"
65
+ "@rsbuild/core": "^1.0.0 || ^2.0.0-0"
66
66
  },
67
67
  "peerDependenciesMeta": {
68
68
  "@rsbuild/core": {