refactor: delete the compatibility config surface

This commit is contained in:
2026-08-20 01:11:35 +05:30
parent d19595c7ba
commit 5c8f3ede54
14 changed files with 46 additions and 261 deletions
+2 -2
View File
@@ -385,8 +385,8 @@ function updateV060Config(ctx: MigrationCtx): void {
const file = candidates.map((name) => join(ctx.appRoot, name)).find(existsSync);
if (!file) return;
const current = readFileSync(file, "utf8");
if (/\bimports\s*:/.test(current) && /\bcompatibility\s*:/.test(current)) return;
const insertion = `\n imports: { mode: "compatible", autoImport: true, aliases: { "@": "./app" } },\n types: { strict: false, noImplicitAny: false, strictNullChecks: true, checkTemplates: true, checkComponentProps: true, generateDeclarations: true, globalTypes: "./app/types/global.d.ts" },\n functions: { legacyDefaultRuntime: "current" },\n stores: { strictMutations: true, persistence: true },\n compatibility: { legacyEmit: true, legacyEventProps: true, legacyComponentDiscovery: true, stringLayouts: true },`;
if (/\bimports\s*:/.test(current)) return;
const insertion = `\n imports: { mode: "compatible", autoImport: true, aliases: { "@": "./app" } },\n types: { strict: false, noImplicitAny: false, strictNullChecks: true, checkTemplates: true, checkComponentProps: true, generateDeclarations: true, globalTypes: "./app/types/global.d.ts" },\n stores: { strictMutations: true, persistence: true },`;
const index = current.lastIndexOf("}");
if (index < 0) return;
const next =