@astrojs/upgrade 0.4.0-beta.0 → 0.4.1
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 +8 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -493,7 +493,7 @@ function filterPackages(ctx) {
|
|
|
493
493
|
const devDependencies = [];
|
|
494
494
|
for (const packageInfo of ctx.packages) {
|
|
495
495
|
const { currentVersion, targetVersion, isDevDependency } = packageInfo;
|
|
496
|
-
if (currentVersion.replace(/^\D+/, "") === targetVersion) {
|
|
496
|
+
if (currentVersion.replace(/^\D+/, "") === targetVersion.replace(/^\D+/, "")) {
|
|
497
497
|
current.push(packageInfo);
|
|
498
498
|
} else {
|
|
499
499
|
const arr = isDevDependency ? devDependencies : dependencies;
|
|
@@ -586,7 +586,13 @@ async function verify(ctx) {
|
|
|
586
586
|
ctx.exit(1);
|
|
587
587
|
}
|
|
588
588
|
}
|
|
589
|
-
await verifyAstroProject(ctx);
|
|
589
|
+
const isAstroProject = await verifyAstroProject(ctx);
|
|
590
|
+
if (!isAstroProject) {
|
|
591
|
+
bannerAbort();
|
|
592
|
+
newline();
|
|
593
|
+
error("error", `Astro installation not found in the current directory.`);
|
|
594
|
+
ctx.exit(1);
|
|
595
|
+
}
|
|
590
596
|
const ok = await verifyVersions(ctx, registry);
|
|
591
597
|
if (!ok) {
|
|
592
598
|
bannerAbort();
|