refactor: delete the compatibility config surface
This commit is contained in:
1 parent
d19595c7ba
commit
5c8f3ede54
14 files changed
+46
-261
No files matched your search
@@ -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 =
|
||||
|
||||
Reference in new issue
Block a user