Skip to content

TypeScript 6 compatibility#393

Open
rgieseke wants to merge 6 commits intomhkeller:mainfrom
rgieseke:ts-6-compat
Open

TypeScript 6 compatibility#393
rgieseke wants to merge 6 commits intomhkeller:mainfrom
rgieseke:ts-6-compat

Conversation

@rgieseke
Copy link
Copy Markdown
Contributor

SvelteKit supports TypeScript 6 so I think it might be possible to remove the peer dependency for "typescript": "^5.0.2" in Layer Cake.

There are a bunch of changes in the Kit PR which haven't yet dug into (changes to config options, e.g. strict is removed, and some type declarations are removed, like /** @type {import('./$types').PageServerLoad} */):

sveltejs/kit#15595

@github-actions
Copy link
Copy Markdown
Contributor

🎭 Playwright tests failed

The Playwright tests failed on this PR. Please check the test results and fix any issues.

📊 View full test report

@rgieseke
Copy link
Copy Markdown
Contributor Author

On main and in this PR I get the same number of errors with npm run check:

svelte-check found 463 errors and 19 warnings in 108 files

@mhkeller
Copy link
Copy Markdown
Owner

Thanks for starting this. What do you think the failing playwright test is about?

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the project’s SvelteKit toolchain to support TypeScript 6 and removes the package-level TypeScript peer dependency.

Changes:

  • Bump SvelteKit and related Svelte tooling versions and update TypeScript to ^6.0.2.
  • Remove typescript from peerDependencies, leaving svelte as the only peer dependency.
  • Regenerate package-lock.json to reflect the dependency upgrades.

Reviewed changes

Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.

File Description
package.json Upgrades Svelte/SvelteKit/TypeScript dev deps and removes the TypeScript peer dependency.
package-lock.json Updates the resolved dependency graph for the upgraded Svelte/SvelteKit/TypeScript toolchain.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
Comment on lines 90 to 95
"engines": {
"node": "^20.17.0 || >=22.9.0"
},
"peerDependencies": {
"svelte": ">=5",
"typescript": "^5.0.2"
"svelte": ">=5"
},
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

engines.node currently allows Node ^20.17.0 || >=22.9.0, but the updated toolchain in this PR pulls in Vite 7.x which requires Node ^20.19.0 || >=22.12.0 (per package-lock.json). This mismatch can cause installs to fail under engine-strict setups or mislead users about supported Node versions. Consider bumping the engine range to match the strictest dependency requirement (or pinning Vite/@sveltejs/vite-plugin-svelte to versions compatible with the current engine range).

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sveltekit has

"engines": {
	"node": ">=18.13"
}

Maybe we don't need to pin node anymore in Layer Cake?

@rgieseke
Copy link
Copy Markdown
Contributor Author

Thanks for starting this. What do you think the failing playwright test is about?

Looks like some node actions being outdated issues maybe?

https://github.com/mhkeller/layercake/actions/runs/24331283820/job/71037519592

I'll try and see if an update fixes it.

@github-actions
Copy link
Copy Markdown
Contributor

🎭 Playwright tests failed

The Playwright tests failed on this PR. Please check the test results and fix any issues.

📊 View full test report

@rgieseke
Copy link
Copy Markdown
Contributor Author

Ok, seems to have been an issue with npm changing something about promise-retry:

I tried a workaround with pinning to a sub-version from:

npm/cli#9151

There was a fix here with more details on the issue:

npm/cli#9152

Do you remember why we needed an update to 11, @mhkeller?

@rgieseke
Copy link
Copy Markdown
Contributor Author

Do you remember why we needed an update to 11, @mhkeller?

I removed the npm install and it seems to also run with the default npm 10.9.7 included in the image.

@rgieseke rgieseke mentioned this pull request Apr 13, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants