@astrojs/upgrade 0.2.1 → 0.2.2
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 +4 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -513,6 +513,7 @@ async function runInstallCommand(ctx, dependencies, devDependencies) {
|
|
|
513
513
|
const cwd = fileURLToPath(ctx.cwd);
|
|
514
514
|
if (ctx.packageManager === "yarn")
|
|
515
515
|
await ensureYarnLock({ cwd });
|
|
516
|
+
const installCmd = ctx.packageManager === "yarn" || ctx.packageManager === "pnpm" ? "add" : "install";
|
|
516
517
|
await spinner({
|
|
517
518
|
start: `Installing dependencies with ${ctx.packageManager}...`,
|
|
518
519
|
end: `Installed dependencies!`,
|
|
@@ -522,7 +523,7 @@ async function runInstallCommand(ctx, dependencies, devDependencies) {
|
|
|
522
523
|
await shell(
|
|
523
524
|
ctx.packageManager,
|
|
524
525
|
[
|
|
525
|
-
|
|
526
|
+
installCmd,
|
|
526
527
|
...dependencies.map(
|
|
527
528
|
({ name, targetVersion }) => `${name}@${targetVersion.replace(/^\^/, "")}`
|
|
528
529
|
)
|
|
@@ -534,7 +535,7 @@ async function runInstallCommand(ctx, dependencies, devDependencies) {
|
|
|
534
535
|
await shell(
|
|
535
536
|
ctx.packageManager,
|
|
536
537
|
[
|
|
537
|
-
|
|
538
|
+
installCmd,
|
|
538
539
|
"--save-dev",
|
|
539
540
|
...devDependencies.map(
|
|
540
541
|
({ name, targetVersion }) => `${name}@${targetVersion.replace(/^\^/, "")}`
|
|
@@ -550,7 +551,7 @@ async function runInstallCommand(ctx, dependencies, devDependencies) {
|
|
|
550
551
|
"error",
|
|
551
552
|
`Dependencies failed to install, please run the following command manually:
|
|
552
553
|
${color2.bold(
|
|
553
|
-
`${ctx.packageManager}
|
|
554
|
+
`${ctx.packageManager} ${installCmd} ${packages}`
|
|
554
555
|
)}`
|
|
555
556
|
);
|
|
556
557
|
return ctx.exit(1);
|