mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-27 21:01:03 +08:00
Upgrade TypeScript from 5.9.3 to 6.0.3 (#1644)
This commit is contained in:
parent
591554c3b1
commit
433d4dcc96
@ -525,14 +525,16 @@ function createTableRegistry(schema: Record<string, unknown>): {
|
||||
return { tables, tableById, idByTable, categories };
|
||||
}
|
||||
|
||||
const AVAILABLE_SCHEMAS: Record<string, () => Record<string, unknown>> = {
|
||||
const AVAILABLE_SCHEMAS: Partial<Record<string, () => Record<string, unknown>>> = {
|
||||
"example": () => exampleFungibleLedgerSchema,
|
||||
"payments": () => createPaymentsSchema(),
|
||||
};
|
||||
let currentSchemaName = getEnvVariable("STACK_BULLDOZER_STUDIO_SCHEMA", "example");
|
||||
let registry = createTableRegistry(
|
||||
(AVAILABLE_SCHEMAS[currentSchemaName] ?? AVAILABLE_SCHEMAS["example"])()
|
||||
);
|
||||
const schemaFactory = AVAILABLE_SCHEMAS[currentSchemaName] ?? AVAILABLE_SCHEMAS["example"];
|
||||
if (!schemaFactory) {
|
||||
throw new Error(`Schema not found: ${currentSchemaName}. Available: ${Object.keys(AVAILABLE_SCHEMAS).join(", ")}`);
|
||||
}
|
||||
let registry = createTableRegistry(schemaFactory());
|
||||
function switchSchema(name: string): void {
|
||||
const factory = Reflect.get(AVAILABLE_SCHEMAS, name);
|
||||
if (typeof factory !== "function") {
|
||||
|
||||
@ -63,7 +63,7 @@
|
||||
"@types/react": "19.2.1",
|
||||
"@types/react-dom": "19.2.1",
|
||||
"@vitejs/plugin-react": "^5.0.0",
|
||||
"typescript": "5.9.3",
|
||||
"typescript": "6.0.3",
|
||||
"vite": "^7.0.0",
|
||||
"vite-tsconfig-paths": "^4.3.2"
|
||||
},
|
||||
|
||||
@ -79,7 +79,7 @@ InputOTPGroup.displayName = "InputOTPGroup";
|
||||
const InputOTPSlot = forwardRefIfNeeded<HTMLDivElement, React.HTMLAttributes<HTMLDivElement> & { index: number, size?: "default" | "lg" }>(
|
||||
({ index, className, size = "default", ...props }, ref) => {
|
||||
const context = useInputOTPContext();
|
||||
const char = context.value[index] ?? "";
|
||||
const char = context.value.at(index) ?? "";
|
||||
const isActive = context.value.length === index && context.value.length < context.maxLength && !context.disabled;
|
||||
|
||||
return (
|
||||
|
||||
@ -5,6 +5,7 @@
|
||||
"lib": ["DOM", "DOM.Iterable", "ES2021"],
|
||||
"module": "ESNext",
|
||||
"moduleResolution": "Bundler",
|
||||
"noUncheckedSideEffectImports": false,
|
||||
"strict": true,
|
||||
"skipLibCheck": true,
|
||||
"isolatedModules": true,
|
||||
|
||||
@ -37,7 +37,7 @@
|
||||
"postcss": "^8.5.4",
|
||||
"@tailwindcss/typography": "^0.5.16",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"typescript": "5.9.3"
|
||||
"typescript": "6.0.3"
|
||||
},
|
||||
"packageManager": "pnpm@11.5.0"
|
||||
}
|
||||
|
||||
@ -7,6 +7,6 @@
|
||||
"spacetimedb": "^2.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"typescript": "5.9.3"
|
||||
"typescript": "6.0.3"
|
||||
}
|
||||
}
|
||||
|
||||
@ -14,6 +14,7 @@
|
||||
"esModuleInterop": true,
|
||||
"skipLibCheck": true,
|
||||
"forceConsistentCasingInFileNames": true,
|
||||
"noUncheckedSideEffectImports": false,
|
||||
"plugins": [
|
||||
{
|
||||
"name": "next"
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
"@types/react": "^18.2.0",
|
||||
"@types/react-dom": "^18.2.0",
|
||||
"rimraf": "^5.0.5",
|
||||
"typescript": "5.9.3"
|
||||
"typescript": "6.0.3"
|
||||
},
|
||||
"packageManager": "pnpm@11.5.0"
|
||||
}
|
||||
|
||||
@ -23,6 +23,6 @@
|
||||
"@types/react": "^19.2.3",
|
||||
"@types/react-dom": "^19.2.3",
|
||||
"rimraf": "^5.0.5",
|
||||
"typescript": "5.9.3"
|
||||
"typescript": "6.0.3"
|
||||
}
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@
|
||||
"glob": "^11.0.0",
|
||||
"postcss": "^8.5.3",
|
||||
"tailwindcss": "^4.1.7",
|
||||
"typescript": "5.9.3"
|
||||
"typescript": "6.0.3"
|
||||
},
|
||||
"packageManager": "pnpm@11.5.0"
|
||||
}
|
||||
|
||||
@ -1,6 +1,5 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"target": "ESNext",
|
||||
"lib": [
|
||||
"dom",
|
||||
@ -15,6 +14,7 @@
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"noUncheckedSideEffectImports": false,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
@ -25,6 +25,9 @@
|
||||
],
|
||||
"@/*": [
|
||||
"./src/*"
|
||||
],
|
||||
"lib/*": [
|
||||
"./lib/*"
|
||||
]
|
||||
},
|
||||
"plugins": [
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
"eslint-config-next": "14.2.3",
|
||||
"postcss": "^8",
|
||||
"tailwindcss": "^3.4.1",
|
||||
"typescript": "5.9.3"
|
||||
"typescript": "6.0.3"
|
||||
},
|
||||
"packageManager": "pnpm@11.5.0"
|
||||
}
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
"incremental": true,
|
||||
"noUncheckedSideEffectImports": false,
|
||||
"plugins": [
|
||||
{
|
||||
"name": "next"
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
"prettier": "^3.5.3",
|
||||
"rimraf": "^5.0.5",
|
||||
"tailwindcss": "^4",
|
||||
"typescript": "5.9.3",
|
||||
"typescript": "6.0.3",
|
||||
"wait-on": "^8.0.1"
|
||||
},
|
||||
"packageManager": "pnpm@11.5.0"
|
||||
|
||||
@ -9,6 +9,7 @@
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"noUncheckedSideEffectImports": false,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
|
||||
@ -14,16 +14,19 @@
|
||||
"noErrorTruncation": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "Bundler",
|
||||
"noUncheckedSideEffectImports": false,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"incremental": true,
|
||||
"jsx": "preserve",
|
||||
"baseUrl": ".",
|
||||
"plugins": [
|
||||
{
|
||||
"name": "next"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"src/*": ["./src/*"]
|
||||
},
|
||||
"strictNullChecks": true,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
|
||||
@ -14,16 +14,19 @@
|
||||
"noErrorTruncation": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "Bundler",
|
||||
"noUncheckedSideEffectImports": false,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"incremental": true,
|
||||
"jsx": "preserve",
|
||||
"baseUrl": ".",
|
||||
"plugins": [
|
||||
{
|
||||
"name": "next"
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"src/*": ["./src/*"]
|
||||
},
|
||||
"strictNullChecks": true,
|
||||
"skipLibCheck": true
|
||||
},
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-next": "14.2.5",
|
||||
"rimraf": "^5.0.5",
|
||||
"typescript": "5.9.3"
|
||||
"typescript": "6.0.3"
|
||||
},
|
||||
"packageManager": "pnpm@11.5.0"
|
||||
}
|
||||
|
||||
@ -7,7 +7,8 @@
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"moduleResolution": "bundler",
|
||||
"noUncheckedSideEffectImports": false,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
|
||||
@ -15,7 +15,7 @@
|
||||
"dependencies": {
|
||||
"@hexclave/js": "workspace:*",
|
||||
"dotenv-cli": "^7.4.1",
|
||||
"typescript": "5.9.3",
|
||||
"typescript": "6.0.3",
|
||||
"vite": "^6.1.0"
|
||||
},
|
||||
"packageManager": "pnpm@11.5.0"
|
||||
|
||||
@ -79,7 +79,7 @@
|
||||
"lovable-tagger": "^1.1.11",
|
||||
"postcss": "^8.5.6",
|
||||
"tailwindcss": "^3.4.17",
|
||||
"typescript": "5.9.3",
|
||||
"typescript": "6.0.3",
|
||||
"typescript-eslint": "^8.38.0",
|
||||
"vite": "^5.4.19"
|
||||
},
|
||||
|
||||
@ -8,6 +8,7 @@
|
||||
|
||||
/* Bundler mode */
|
||||
"moduleResolution": "bundler",
|
||||
"noUncheckedSideEffectImports": false,
|
||||
"allowImportingTsExtensions": true,
|
||||
"isolatedModules": true,
|
||||
"moduleDetection": "force",
|
||||
@ -21,7 +22,6 @@
|
||||
"noImplicitAny": false,
|
||||
"noFallthroughCasesInSwitch": false,
|
||||
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
}
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
"files": [],
|
||||
"references": [{ "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" }],
|
||||
"compilerOptions": {
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"@/*": ["./src/*"]
|
||||
},
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
"@types/react-dom": "^18",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-next": "14.2.3",
|
||||
"typescript": "5.9.3"
|
||||
"typescript": "6.0.3"
|
||||
},
|
||||
"packageManager": "pnpm@11.5.0"
|
||||
}
|
||||
|
||||
@ -12,6 +12,7 @@
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "bundler",
|
||||
"noUncheckedSideEffectImports": false,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
"@types/react-dom": "^19.0.3",
|
||||
"@vitejs/plugin-react": "^4.3.4",
|
||||
"globals": "^15.14.0",
|
||||
"typescript": "5.9.3",
|
||||
"typescript": "6.0.3",
|
||||
"vite": "^6.1.0"
|
||||
},
|
||||
"packageManager": "pnpm@11.5.0"
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
"@types/node": "20.17.6",
|
||||
"@types/react": "18.3.12",
|
||||
"@types/react-dom": "^18.3.0",
|
||||
"typescript": "5.9.3"
|
||||
"typescript": "6.0.3"
|
||||
},
|
||||
"packageManager": "pnpm@11.5.0"
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"target": "es5",
|
||||
"target": "es2017",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
@ -9,7 +9,8 @@
|
||||
"noEmit": true,
|
||||
"esModuleInterop": true,
|
||||
"module": "esnext",
|
||||
"moduleResolution": "node",
|
||||
"moduleResolution": "bundler",
|
||||
"noUncheckedSideEffectImports": false,
|
||||
"resolveJsonModule": true,
|
||||
"isolatedModules": true,
|
||||
"jsx": "preserve",
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
"postcss": "^8.4.47",
|
||||
"rimraf": "^5.0.10",
|
||||
"tailwindcss": "^3.4.14",
|
||||
"typescript": "5.9.3",
|
||||
"typescript": "6.0.3",
|
||||
"vite": "^7.0.0",
|
||||
"vite-tsconfig-paths": "^4.3.2"
|
||||
},
|
||||
|
||||
@ -11,7 +11,6 @@
|
||||
"noEmit": true,
|
||||
"resolveJsonModule": true,
|
||||
"esModuleInterop": true,
|
||||
"baseUrl": ".",
|
||||
"paths": {
|
||||
"~/*": ["./src/*"]
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@
|
||||
"rimraf": "^5.0.10",
|
||||
"tsdown": "^0.20.3",
|
||||
"turbo": "^2.8.15",
|
||||
"typescript": "5.9.3",
|
||||
"typescript": "6.0.3",
|
||||
"vite-tsconfig-paths": "^4.3.2",
|
||||
"vitest": "^1.6.0",
|
||||
"wait-on": "^8.0.1"
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
"@types/node": "20.17.6",
|
||||
"rimraf": "^6.0.1",
|
||||
"tsdown": "^0.20.3",
|
||||
"typescript": "5.9.3"
|
||||
"typescript": "6.0.3"
|
||||
},
|
||||
"packageManager": "pnpm@11.5.0"
|
||||
}
|
||||
|
||||
@ -56,6 +56,7 @@ let intersectionObserverRecords: ObserverRecord[] = [];
|
||||
class MockIntersectionObserver implements IntersectionObserver {
|
||||
readonly root: Element | Document | null;
|
||||
readonly rootMargin: string;
|
||||
readonly scrollMargin: string;
|
||||
readonly thresholds: ReadonlyArray<number>;
|
||||
private readonly callback: IntersectionObserverCallback;
|
||||
private readonly record: ObserverRecord;
|
||||
@ -67,6 +68,7 @@ class MockIntersectionObserver implements IntersectionObserver {
|
||||
this.callback = callback;
|
||||
this.root = options?.root ?? null;
|
||||
this.rootMargin = options?.rootMargin ?? "";
|
||||
this.scrollMargin = "";
|
||||
this.thresholds = Array.isArray(options?.threshold)
|
||||
? options.threshold
|
||||
: [options?.threshold ?? 0];
|
||||
|
||||
@ -41,7 +41,7 @@
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "20.17.6",
|
||||
"typescript": "5.9.3"
|
||||
"typescript": "6.0.3"
|
||||
},
|
||||
"packageManager": "pnpm@11.5.0"
|
||||
}
|
||||
|
||||
652
pnpm-lock.yaml
652
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user