@infly/libs 2.0.50 → 2.0.51

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.
@@ -78,10 +78,16 @@ function commandParts(command) {
78
78
  }
79
79
 
80
80
  function defaultRunCommand(command, args, options) {
81
- execFileSync(command, args, {
81
+ // Windows: node_modules/.bin 的 npm-script 命令是 .CMD 批处理垫片,
82
+ // execFileSync 无 shell 时 CreateProcess 只解析 .exe → ENOENT;与 build-utils/command.js 约定一致。
83
+ const useShell = process.platform === "win32";
84
+ // shell=true 时按 build-utils/command.js 约定传单字符串,规避 DEP0190
85
+ const [cmd, cmdArgs] = useShell ? [[command, ...args].join(" "), []] : [command, args];
86
+ execFileSync(cmd, cmdArgs, {
82
87
  cwd: options.cwd,
83
88
  env: options.env,
84
89
  stdio: "inherit",
90
+ shell: useShell,
85
91
  });
86
92
  }
87
93
 
@@ -196,4 +202,5 @@ module.exports = {
196
202
  loadConfig,
197
203
  resolveBuildPlatforms,
198
204
  runProjectCommand,
205
+ defaultRunCommand,
199
206
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infly/libs",
3
- "version": "2.0.50",
3
+ "version": "2.0.51",
4
4
  "description": "不受前端框架限制的独立工具库",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",