Skip to content
Merged
5 changes: 5 additions & 0 deletions .changeset/fuzzy-news-sort.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'create-astro': patch
---

Fixes a case where a deprecation warning would be shown on Node 24
4 changes: 2 additions & 2 deletions packages/create-astro/src/actions/project-name.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ import type { Context } from './context.js';
import { isEmpty, toValidName } from './shared.js';

export async function projectName(
ctx: Pick<Context, 'cwd' | 'yes' | 'dryRun' | 'prompt' | 'projectName' | 'exit'>,
ctx: Pick<Context, 'yes' | 'dryRun' | 'prompt' | 'projectName' | 'exit'> & { cwd?: string },
) {
await checkCwd(ctx.cwd);

if (!ctx.cwd || !isEmpty(ctx.cwd)) {
if (!isEmpty(ctx.cwd)) {
if (ctx.cwd && !isEmpty(ctx.cwd)) {
await info('Hmm...', `${color.reset(`"${ctx.cwd}"`)}${color.dim(` is not empty!`)}`);
}

Expand Down
Loading