create-astro 4.8.4 → 4.9.0
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.
- package/dist/index.js +16 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -463,7 +463,7 @@ function printHelp({
|
|
|
463
463
|
if (headline) {
|
|
464
464
|
message.push(
|
|
465
465
|
linebreak(),
|
|
466
|
-
`${title(commandName)} ${color.green(`v${"4.
|
|
466
|
+
`${title(commandName)} ${color.green(`v${"4.9.0"}`)} ${headline}`
|
|
467
467
|
);
|
|
468
468
|
}
|
|
469
469
|
if (usage) {
|
|
@@ -540,7 +540,7 @@ async function getContext(argv) {
|
|
|
540
540
|
prompt,
|
|
541
541
|
packageManager,
|
|
542
542
|
username: getName(),
|
|
543
|
-
version: getVersion(packageManager, "astro", "4.
|
|
543
|
+
version: getVersion(packageManager, "astro", "4.15.4"),
|
|
544
544
|
skipHouston,
|
|
545
545
|
fancy,
|
|
546
546
|
dryRun,
|
|
@@ -1174,6 +1174,20 @@ var FILES_TO_UPDATE2 = {
|
|
|
1174
1174
|
);
|
|
1175
1175
|
}
|
|
1176
1176
|
}
|
|
1177
|
+
},
|
|
1178
|
+
"astro.config.mjs": async (file, options) => {
|
|
1179
|
+
if (!(options.value === "strict" || options.value === "strictest")) {
|
|
1180
|
+
return;
|
|
1181
|
+
}
|
|
1182
|
+
try {
|
|
1183
|
+
let data = await readFile(file, { encoding: "utf-8" });
|
|
1184
|
+
data = `// @ts-check
|
|
1185
|
+
${data}`;
|
|
1186
|
+
await writeFile(file, data, { encoding: "utf-8" });
|
|
1187
|
+
} catch (err) {
|
|
1188
|
+
if (err && err.code === "ENOENT") return;
|
|
1189
|
+
if (err instanceof Error) throw new Error(err.message);
|
|
1190
|
+
}
|
|
1177
1191
|
}
|
|
1178
1192
|
};
|
|
1179
1193
|
async function setupTypeScript(value, ctx) {
|