create-astro 4.7.2 → 4.7.3

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 +6 -3
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -233,11 +233,14 @@ var _registry;
233
233
  async function getRegistry(packageManager) {
234
234
  if (_registry)
235
235
  return _registry;
236
+ const fallback = "https://registry.npmjs.org";
236
237
  try {
237
238
  const { stdout: stdout2 } = await shell(packageManager, ["config", "get", "registry"]);
238
- _registry = stdout2?.trim()?.replace(/\/$/, "") || "https://registry.npmjs.org";
239
+ _registry = stdout2?.trim()?.replace(/\/$/, "") || fallback;
240
+ if (!new URL(_registry).host)
241
+ _registry = fallback;
239
242
  } catch (e) {
240
- _registry = "https://registry.npmjs.org";
243
+ _registry = fallback;
241
244
  }
242
245
  return _registry;
243
246
  }
@@ -363,7 +366,7 @@ function printHelp({
363
366
  if (headline) {
364
367
  message.push(
365
368
  linebreak(),
366
- `${title(commandName)} ${color.green(`v${"4.7.2"}`)} ${headline}`
369
+ `${title(commandName)} ${color.green(`v${"4.7.3"}`)} ${headline}`
367
370
  );
368
371
  }
369
372
  if (usage) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-astro",
3
- "version": "4.7.2",
3
+ "version": "4.7.3",
4
4
  "type": "module",
5
5
  "author": "withastro",
6
6
  "license": "MIT",
@@ -46,6 +46,6 @@
46
46
  "build": "astro-scripts build \"src/index.ts\" --bundle && tsc",
47
47
  "build:ci": "astro-scripts build \"src/index.ts\" --bundle",
48
48
  "dev": "astro-scripts dev \"src/**/*.ts\"",
49
- "test": "mocha --exit --timeout 20000 --parallel"
49
+ "test": "astro-scripts test \"test/**/*.test.js\""
50
50
  }
51
51
  }