Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore] bump TS to 4.8 #6428

Merged
merged 2 commits into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changeset/four-meals-learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
'create-svelte': patch
'@sveltejs/kit': patch
---

[chore] bump ts version and ensure it works with latest changes
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"svelte": "^3.48.0",
"tiny-glob": "^0.2.9",
"turbo": "^1.3.4",
"typescript": "^4.7.4"
"typescript": "^4.8.2"
},
"packageManager": "pnpm@7.9.5",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-auto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@
},
"devDependencies": {
"@types/node": "^16.11.36",
"typescript": "^4.7.4"
"typescript": "^4.8.2"
}
}
2 changes: 1 addition & 1 deletion packages/adapter-cloudflare-workers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,6 @@
"devDependencies": {
"@cloudflare/kv-asset-handler": "^0.2.0",
"@types/node": "^16.11.36",
"typescript": "^4.7.4"
"typescript": "^4.8.2"
}
}
2 changes: 1 addition & 1 deletion packages/adapter-cloudflare/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"devDependencies": {
"@types/node": "^16.11.36",
"@types/ws": "^8.5.3",
"typescript": "^4.7.4"
"typescript": "^4.8.2"
},
"publishConfig": {
"access": "public"
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-netlify/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
"@types/set-cookie-parser": "^2.4.2",
"rimraf": "^3.0.2",
"rollup": "^2.78.1",
"typescript": "^4.7.4",
"typescript": "^4.8.2",
"uvu": "^0.5.3"
}
}
2 changes: 1 addition & 1 deletion packages/adapter-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"rimraf": "^3.0.2",
"rollup": "^2.78.1",
"sirv": "^2.0.2",
"typescript": "^4.7.4",
"typescript": "^4.8.2",
"uvu": "^0.5.3"
},
"dependencies": {
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-static/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"playwright-chromium": "^1.25.0",
"sirv": "^2.0.2",
"svelte": "^3.48.0",
"typescript": "^4.7.4",
"typescript": "^4.8.2",
"uvu": "^0.5.3",
"vite": "^3.1.0-beta.1"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter-vercel/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@
"devDependencies": {
"@sveltejs/kit": "workspace:*",
"@types/node": "^16.11.36",
"typescript": "^4.7.4"
"typescript": "^4.8.2"
}
}
2 changes: 1 addition & 1 deletion packages/create-svelte/templates/default/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@sveltejs/kit": "workspace:*",
"svelte": "^3.48.0",
"svelte-preprocess": "^4.10.6",
"typescript": "^4.7.4",
"typescript": "^4.8.2",
"vite": "^3.1.0-beta.1"
},
"type": "module",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"@sveltejs/package": "workspace:*",
"svelte": "^3.44.0",
"tslib": "^2.3.1",
"typescript": "^4.7.4",
"typescript": "^4.8.2",
"vite": "^3.1.0-beta.1"
},
"type": "module"
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"rollup": "^2.78.1",
"svelte": "^3.48.0",
"svelte-preprocess": "^4.10.6",
"typescript": "^4.7.4",
"typescript": "^4.8.2",
"uvu": "^0.5.3",
"vite": "^3.1.0-beta.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/src/core/sync/write_types/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ function update_types(config, routes, route) {
`type OutputDataShape<T> = MaybeWithVoid<Omit<App.PageData, RequiredKeys<T>> & Partial<Pick<App.PageData, keyof T & keyof App.PageData>> & Record<string, any>>`
);
// null & {} == null, we need to prevent that in some situations
declarations.push(`type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;`);
declarations.push(`type EnsureParentData<T> = T extends null | undefined ? {} : T;`);
}

if (route.leaf) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type OutputDataShape<T> = MaybeWithVoid<
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
Record<string, any>
>;
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
type EnsureParentData<T> = T extends null | undefined ? {} : T;
type LayoutParams = RouteParams & {};
type LayoutParentData = EnsureParentData<{}>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type OutputDataShape<T> = MaybeWithVoid<
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
Record<string, any>
>;
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
type EnsureParentData<T> = T extends null | undefined ? {} : T;
type PageParentData = EnsureParentData<import('../$types.js').LayoutData>;
type LayoutParams = RouteParams & {};
type LayoutServerParentData = EnsureParentData<import('../$types.js').LayoutServerData>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type OutputDataShape<T> = MaybeWithVoid<
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
Record<string, any>
>;
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
type EnsureParentData<T> = T extends null | undefined ? {} : T;
type PageParentData = Omit<
EnsureParentData<import('../../$types.js').LayoutData>,
keyof import('../$types.js').LayoutData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type OutputDataShape<T> = MaybeWithVoid<
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
Record<string, any>
>;
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
type EnsureParentData<T> = T extends null | undefined ? {} : T;
type PageServerParentData = EnsureParentData<LayoutServerData>;
type PageParentData = EnsureParentData<LayoutData>;
type LayoutParams = RouteParams & {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type OutputDataShape<T> = MaybeWithVoid<
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
Record<string, any>
>;
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
type EnsureParentData<T> = T extends null | undefined ? {} : T;
type PageServerParentData = EnsureParentData<LayoutServerData>;
type PageParentData = EnsureParentData<LayoutData>;
type LayoutParams = RouteParams & {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type OutputDataShape<T> = MaybeWithVoid<
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
Record<string, any>
>;
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
type EnsureParentData<T> = T extends null | undefined ? {} : T;
type PageServerParentData = EnsureParentData<LayoutServerData>;
type PageParentData = EnsureParentData<LayoutData>;
type LayoutParams = RouteParams & {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type OutputDataShape<T> = MaybeWithVoid<
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
Record<string, any>
>;
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
type EnsureParentData<T> = T extends null | undefined ? {} : T;
type PageParentData = EnsureParentData<LayoutData>;
type LayoutParams = RouteParams & {};
type LayoutParentData = EnsureParentData<{}>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type OutputDataShape<T> = MaybeWithVoid<
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
Record<string, any>
>;
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
type EnsureParentData<T> = T extends null | undefined ? {} : T;
type LayoutParams = RouteParams & { rest?: string; slug?: string };
type LayoutParentData = EnsureParentData<{}>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type OutputDataShape<T> = MaybeWithVoid<
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
Record<string, any>
>;
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
type EnsureParentData<T> = T extends null | undefined ? {} : T;
type LayoutParams = RouteParams & { rest?: string };
type LayoutParentData = EnsureParentData<import('../$types.js').LayoutData>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type OutputDataShape<T> = MaybeWithVoid<
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
Record<string, any>
>;
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
type EnsureParentData<T> = T extends null | undefined ? {} : T;
type PageParentData = Omit<
EnsureParentData<import('../../$types.js').LayoutData>,
keyof import('../$types.js').LayoutData
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type OutputDataShape<T> = MaybeWithVoid<
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
Record<string, any>
>;
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
type EnsureParentData<T> = T extends null | undefined ? {} : T;
type PageParentData = EnsureParentData<import('../../$types.js').LayoutData>;

export type PageServerData = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type OutputDataShape<T> = MaybeWithVoid<
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
Record<string, any>
>;
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
type EnsureParentData<T> = T extends null | undefined ? {} : T;
type LayoutParams = RouteParams & { rest?: string; slug?: string };
type LayoutParentData = EnsureParentData<{}>;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type OutputDataShape<T> = MaybeWithVoid<
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
Record<string, any>
>;
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
type EnsureParentData<T> = T extends null | undefined ? {} : T;
type PageParentData = EnsureParentData<import('../$types.js').LayoutData>;

export type PageServerData = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type OutputDataShape<T> = MaybeWithVoid<
Partial<Pick<App.PageData, keyof T & keyof App.PageData>> &
Record<string, any>
>;
type EnsureParentData<T> = NonNullable<T> extends never ? {} : T;
type EnsureParentData<T> = T extends null | undefined ? {} : T;
type PageParentData = EnsureParentData<import('../$types.js').LayoutData>;

export type PageServerData = null;
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/test/apps/amp/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"purify-css": "^1.2.5",
"svelte": "^3.48.0",
"svelte-check": "^2.7.1",
"typescript": "^4.7.4",
"typescript": "^4.8.2",
"vite": "^3.1.0-beta.1"
},
"type": "module"
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/test/apps/basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"rimraf": "^3.0.2",
"svelte": "^3.48.0",
"svelte-check": "^2.7.1",
"typescript": "^4.7.4",
"typescript": "^4.8.2",
"vite": "^3.1.0-beta.1"
},
"type": "module"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script lang="ts">
<script>
/** @type {import('./$types').PageData} */
export let data
export let data;
</script>

<p>Page with server load</p>
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/test/apps/dev-only/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"rimraf": "^3.0.2",
"svelte": "^3.48.0",
"svelte-check": "^2.7.1",
"typescript": "^4.7.4",
"typescript": "^4.8.2",
"vite": "^3.1.0-beta.1"
},
"type": "module"
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/test/apps/options-2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"cross-env": "^7.0.3",
"svelte": "^3.48.0",
"svelte-check": "^2.7.1",
"typescript": "^4.7.4",
"typescript": "^4.8.2",
"vite": "^3.1.0-beta.1"
},
"type": "module"
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/test/apps/options/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"cross-env": "^7.0.3",
"svelte": "^3.48.0",
"svelte-check": "^2.7.1",
"typescript": "^4.7.4",
"typescript": "^4.8.2",
"vite": "^3.1.0-beta.1"
},
"type": "module"
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/test/apps/writes/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"rimraf": "^3.0.2",
"svelte": "^3.48.0",
"svelte-check": "^2.7.1",
"typescript": "^4.7.4",
"typescript": "^4.8.2",
"vite": "^3.1.0-beta.1"
},
"type": "module"
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/test/prerendering/basics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@sveltejs/kit": "workspace:*",
"svelte": "^3.48.0",
"svelte-check": "^2.7.1",
"typescript": "^4.7.4",
"typescript": "^4.8.2",
"uvu": "^0.5.3",
"vite": "^3.1.0-beta.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/test/prerendering/fallback/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@sveltejs/kit": "workspace:*",
"svelte": "^3.48.0",
"svelte-check": "^2.7.1",
"typescript": "^4.7.4",
"typescript": "^4.8.2",
"uvu": "^0.5.3",
"vite": "^3.1.0-beta.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/test/prerendering/options/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@sveltejs/kit": "workspace:*",
"svelte": "^3.48.0",
"svelte-check": "^2.7.1",
"typescript": "^4.7.4",
"typescript": "^4.8.2",
"uvu": "^0.5.3",
"vite": "^3.1.0-beta.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/test/prerendering/paths-base/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@sveltejs/kit": "workspace:*",
"svelte": "^3.48.0",
"svelte-check": "^2.7.1",
"typescript": "^4.7.4",
"typescript": "^4.8.2",
"uvu": "^0.5.3",
"vite": "^3.1.0-beta.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/kit/test/prerendering/trailing-slash/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"@sveltejs/kit": "workspace:*",
"svelte": "^3.48.0",
"svelte-check": "^2.7.1",
"typescript": "^4.7.4",
"typescript": "^4.8.2",
"uvu": "^0.5.4",
"vite": "^3.1.0-beta.1"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/package/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@types/node": "^16.11.36",
"svelte": "^3.48.0",
"svelte-preprocess": "^4.10.6",
"typescript": "^4.7.4",
"typescript": "^4.8.2",
"uvu": "^0.5.3"
},
"peerDependencies": {
Expand Down
Loading