create-astro 2.0.0 → 2.0.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.
Files changed (2) hide show
  1. package/dist/index.js +4 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -265,7 +265,7 @@ ${bold(
265
265
  ora().warn(dim('--typescript <choice> missing. Defaulting to "strict"'));
266
266
  args.typescript = "strict";
267
267
  }
268
- const tsResponse = args.typescript || (await prompts(
268
+ let tsResponse = args.typescript || (await prompts(
269
269
  {
270
270
  type: "select",
271
271
  name: "typescript",
@@ -290,7 +290,7 @@ ${bold(
290
290
  )).typescript;
291
291
  if (tsResponse === "unsure") {
292
292
  await typescriptByDefault();
293
- tsResponse.typescript = "base";
293
+ tsResponse = "base";
294
294
  }
295
295
  if (args.dryRun) {
296
296
  ora().info(dim(`--dry-run enabled, skipping.`));
@@ -300,14 +300,14 @@ ${bold(
300
300
  if (err && err.code === "ENOENT") {
301
301
  fs.writeFileSync(
302
302
  templateTSConfigPath,
303
- stringify({ extends: `astro/tsconfigs/${tsResponse}` }, null, 2)
303
+ stringify({ extends: `astro/tsconfigs/${tsResponse ?? "base"}` }, null, 2)
304
304
  );
305
305
  return;
306
306
  }
307
307
  const templateTSConfig = parse(data.toString());
308
308
  if (templateTSConfig && typeof templateTSConfig === "object") {
309
309
  const result = assign(templateTSConfig, {
310
- extends: `astro/tsconfigs/${tsResponse.typescript}`
310
+ extends: `astro/tsconfigs/${tsResponse ?? "base"}`
311
311
  });
312
312
  fs.writeFileSync(templateTSConfigPath, stringify(result, null, 2));
313
313
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "create-astro",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "type": "module",
5
5
  "author": "withastro",
6
6
  "license": "MIT",