From 68992e3f75fff171df59bfe484745a220292b39d Mon Sep 17 00:00:00 2001 From: bholmesdev Date: Tue, 26 Apr 2022 12:03:13 -0400 Subject: [PATCH 1/4] refactor: simplify dir error log to avoid wrapped text --- packages/create-astro/src/index.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/packages/create-astro/src/index.ts b/packages/create-astro/src/index.ts index 80b3b4fd1043..c9751cff940b 100644 --- a/packages/create-astro/src/index.ts +++ b/packages/create-astro/src/index.ts @@ -66,8 +66,7 @@ export async function main() { } if (!cwd || !isEmpty(cwd)) { - const notEmptyMsg = (dirPath: string) => - `"${bold(dirPath)}" is not empty. Please clear contents or choose a different path.`; + const notEmptyMsg = (dirPath: string) => `"${bold(dirPath)}" is not empty!`; if (!isEmpty(cwd)) { let rejectProjectDir = ora({ color: 'red', text: notEmptyMsg(cwd) }); From 26690abdcfb525ec0a65675d7841624fca56cb5f Mon Sep 17 00:00:00 2001 From: bholmesdev Date: Tue, 26 Apr 2022 12:03:33 -0400 Subject: [PATCH 2/4] refactor: remove redundant "issue" callout --- packages/create-astro/src/index.ts | 5 ----- 1 file changed, 5 deletions(-) diff --git a/packages/create-astro/src/index.ts b/packages/create-astro/src/index.ts index c9751cff940b..a6cedeb8659e 100644 --- a/packages/create-astro/src/index.ts +++ b/packages/create-astro/src/index.ts @@ -45,11 +45,6 @@ export async function main() { logger.debug('Verbose logging turned on'); console.log(`\n${bold('Welcome to Astro!')} ${gray(`(create-astro v${version})`)}`); - console.log( - `If you encounter a problem, visit ${cyan( - 'https://github.com/withastro/astro/issues' - )} to search or file a new issue.\n` - ); let spinner = ora({ color: 'green', text: 'Prepare for liftoff.' }); From 5f484b2eddb69dc7d3328c6495991f37cc8cb32c Mon Sep 17 00:00:00 2001 From: bholmesdev Date: Tue, 26 Apr 2022 16:45:57 -0400 Subject: [PATCH 3/4] chore: changeset --- .changeset/curly-cobras-kneel.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/curly-cobras-kneel.md diff --git a/.changeset/curly-cobras-kneel.md b/.changeset/curly-cobras-kneel.md new file mode 100644 index 000000000000..d45af83e3292 --- /dev/null +++ b/.changeset/curly-cobras-kneel.md @@ -0,0 +1,5 @@ +--- +'create-astro': patch +--- + +Simplify logging during welcome message and directory selection From 212cde9245c3100e331a72385d0672e76a67061d Mon Sep 17 00:00:00 2001 From: bholmesdev Date: Tue, 26 Apr 2022 17:20:46 -0400 Subject: [PATCH 4/4] chore: update tests for new dir log --- packages/create-astro/test/directory-step.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/create-astro/test/directory-step.test.js b/packages/create-astro/test/directory-step.test.js index 02ddc672a5b1..7193fe298fc2 100644 --- a/packages/create-astro/test/directory-step.test.js +++ b/packages/create-astro/test/directory-step.test.js @@ -58,7 +58,7 @@ describe('[create-astro] select directory', function () { return promiseWithTimeout((resolve) => { const { stdout, stdin } = setup(); stdout.on('data', (chunk) => { - if (chunk.includes('Please clear contents or choose a different path.')) { + if (chunk.includes('is not empty!')) { resolve(); } if (chunk.includes(PROMPT_MESSAGES.directory)) {