From b211eadeffd6260700254c1492c8e6528d279ad1 Mon Sep 17 00:00:00 2001 From: Nate Moore Date: Tue, 8 Nov 2022 10:33:36 -0600 Subject: [PATCH] `create-astro` bug fixes (#5319) * fix(create-astro): upgrade cli-kit * fix(create-astro): avoid setRawMode error * chore(lint): disable create-astro linting Co-authored-by: Nate Moore --- .changeset/witty-bobcats-eat.md | 5 +++++ packages/create-astro/create-astro.mjs | 1 + packages/create-astro/package.json | 2 +- packages/create-astro/src/index.ts | 6 ++++-- pnpm-lock.yaml | 8 ++++---- 5 files changed, 15 insertions(+), 7 deletions(-) create mode 100644 .changeset/witty-bobcats-eat.md diff --git a/.changeset/witty-bobcats-eat.md b/.changeset/witty-bobcats-eat.md new file mode 100644 index 000000000..9052f0b4d --- /dev/null +++ b/.changeset/witty-bobcats-eat.md @@ -0,0 +1,5 @@ +--- +'create-astro': patch +--- + +Fix bug with `setRawMode`. Respect `--skip-houston` in all cases. diff --git a/packages/create-astro/create-astro.mjs b/packages/create-astro/create-astro.mjs index 7f09ba700..b7489a6b1 100755 --- a/packages/create-astro/create-astro.mjs +++ b/packages/create-astro/create-astro.mjs @@ -1,4 +1,5 @@ #!/usr/bin/env node +/* eslint-disable no-console */ 'use strict'; const currentVersion = process.versions.node; diff --git a/packages/create-astro/package.json b/packages/create-astro/package.json index c254e961f..0c8c66077 100644 --- a/packages/create-astro/package.json +++ b/packages/create-astro/package.json @@ -29,7 +29,7 @@ "tsconfigs" ], "dependencies": { - "@astrojs/cli-kit": "^0.1.3", + "@astrojs/cli-kit": "^0.1.4", "chalk": "^5.0.1", "comment-json": "^4.2.3", "execa": "^6.1.0", diff --git a/packages/create-astro/src/index.ts b/packages/create-astro/src/index.ts index e4808796f..aa1024329 100644 --- a/packages/create-astro/src/index.ts +++ b/packages/create-astro/src/index.ts @@ -133,7 +133,7 @@ export async function main() { type: 'text', name: 'directory', message: 'Where would you like to create your new project?', - initial: `./${generateProjectName()}`, + initial: generateProjectName(), validate(value) { if (!isValidProjectDirectory(value)) { return notEmptyMsg(value); @@ -347,7 +347,9 @@ export async function main() { const devCmd = pkgManager === 'npm' ? 'npm run dev' : `${pkgManager} dev`; await nextSteps({ projectDir, devCmd }); - await say(['Good luck out there, astronaut!']); + if (!args.skipHouston) { + await say(['Good luck out there, astronaut!']); + } } function emojiWithFallback(char: string, fallback: string) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c94ee868b..4ca5d7c18 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2464,7 +2464,7 @@ importers: packages/create-astro: specifiers: - '@astrojs/cli-kit': ^0.1.3 + '@astrojs/cli-kit': ^0.1.4 '@types/chai': ^4.3.1 '@types/degit': ^2.8.3 '@types/mocha': ^9.1.1 @@ -2486,7 +2486,7 @@ importers: which-pm-runs: ^1.1.0 yargs-parser: ^21.0.1 dependencies: - '@astrojs/cli-kit': 0.1.3 + '@astrojs/cli-kit': 0.1.4 chalk: 5.1.2 comment-json: 4.2.3 execa: 6.1.0 @@ -3827,8 +3827,8 @@ packages: lite-youtube-embed: 0.2.0 dev: false - /@astrojs/cli-kit/0.1.3: - resolution: {integrity: sha512-thLIdCggboKsOyYF5prn46tIpUH55Y+Y0fRN2NGD09WyxqqO5eA5aon0i4cELKTuzQrmSuu0Wl4d4xFin5OPvg==} + /@astrojs/cli-kit/0.1.4: + resolution: {integrity: sha512-krtRhJr2uNdt947feVSNV9REoLupEh85g+5WRWHCKl60HhpbTRlwT962FUue26X3OeZbdoAT2pBJQmlznIIQtg==} dependencies: chalk: 5.1.2 log-update: 5.0.1