@astrojs/upgrade 0.4.0 → 0.4.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.
Files changed (2) hide show
  1. package/dist/index.js +9 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -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();
@@ -597,8 +603,8 @@ async function verify(ctx) {
597
603
  }
598
604
  }
599
605
  function isOnline(registry) {
600
- const { host } = new URL(registry);
601
- return dns.lookup(host).then(
606
+ const { hostname } = new URL(registry);
607
+ return dns.lookup(hostname).then(
602
608
  () => true,
603
609
  () => false
604
610
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrojs/upgrade",
3
- "version": "0.4.0",
3
+ "version": "0.4.2",
4
4
  "type": "module",
5
5
  "author": "withastro",
6
6
  "license": "MIT",