@vercel/remix-builder 2.0.4 → 2.0.5
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.js +30 -19
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2987,25 +2987,36 @@ function addDependencies(cliType, names, opts = {}) {
|
|
|
2987
2987
|
(0, import_build_utils.debug)(` - ${name}`);
|
|
2988
2988
|
}
|
|
2989
2989
|
const args = [];
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
args.push("
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
2990
|
+
switch (cliType) {
|
|
2991
|
+
case "npm":
|
|
2992
|
+
case "pnpm":
|
|
2993
|
+
args.push("install");
|
|
2994
|
+
if (opts.saveDev) {
|
|
2995
|
+
args.push("--save-dev");
|
|
2996
|
+
}
|
|
2997
|
+
if (cliType === "pnpm" && opts.cwd) {
|
|
2998
|
+
if ((0, import_fs.existsSync)((0, import_path.join)(opts.cwd, "pnpm-workspace.yaml"))) {
|
|
2999
|
+
args.push("--workspace-root");
|
|
3000
|
+
}
|
|
3001
|
+
}
|
|
3002
|
+
break;
|
|
3003
|
+
case "bun":
|
|
3004
|
+
case "yarn":
|
|
3005
|
+
args.push("add");
|
|
3006
|
+
if (opts.saveDev) {
|
|
3007
|
+
args.push("--dev");
|
|
3008
|
+
}
|
|
3009
|
+
if (cliType === "yarn") {
|
|
3010
|
+
const yarnVersion = (0, import_child_process.execSync)("yarn -v", { encoding: "utf8" }).trim();
|
|
3011
|
+
const isYarnV1 = import_semver.default.satisfies(yarnVersion, "1");
|
|
3012
|
+
if (isYarnV1) {
|
|
3013
|
+
args.push("--ignore-workspace-root-check");
|
|
3014
|
+
}
|
|
3015
|
+
}
|
|
3016
|
+
break;
|
|
3017
|
+
default: {
|
|
3018
|
+
const n = cliType;
|
|
3019
|
+
throw new Error(`Unexpected package manager: ${n}`);
|
|
3009
3020
|
}
|
|
3010
3021
|
}
|
|
3011
3022
|
return (0, import_build_utils.spawnAsync)(cliType, args.concat(names), opts);
|