diff --git a/.changeset/light-falcons-battle.md b/.changeset/light-falcons-battle.md new file mode 100644 index 000000000000..14059d8337e4 --- /dev/null +++ b/.changeset/light-falcons-battle.md @@ -0,0 +1,5 @@ +--- +"create-astro": patch +--- + +Fixes a case where a promise wasn't awaited, causing an issue in Deno. diff --git a/packages/create-astro/src/actions/template.ts b/packages/create-astro/src/actions/template.ts index e5cf22e50b95..3afd5f3cf47a 100644 --- a/packages/create-astro/src/actions/template.ts +++ b/packages/create-astro/src/actions/template.ts @@ -59,7 +59,7 @@ const FILES_TO_UPDATE = { fs.promises.readFile(file, 'utf-8').then((value) => { // Match first indent in the file or fallback to `\t` const indent = /(^\s+)/m.exec(value)?.[1] ?? '\t'; - fs.promises.writeFile( + return fs.promises.writeFile( file, JSON.stringify( Object.assign(JSON.parse(value), Object.assign(overrides, { private: undefined })),