fix: support TypeScript 7 under npm alias#3073
Conversation
🦋 Changeset detectedLatest commit: 51114db The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
it's intentionally different so master still does allow npm alias
dummdidumm
left a comment
There was a problem hiding this comment.
Some stylistic comments otherwise looks good - now that TS7 is out and we know that they will not release it under the preview anymore is there anything we need to adjust in this PR?
Co-authored-by: Simon H <5968653+dummdidumm@users.noreply.github.com>
|
It seems the typescript devs want the reverse to happen, since the put typescript 6 under a namespace. Maybe the repo should move to instead? |
Just checked it again. I think that is all I can think of right now. We prioritise typescript-7 over |
It's explained here.
|
|
Seems like they updated the blog to replace the |
#3063 This PR adds a version check in bin/svelte-check before importing the main entry point. This way, we can throw an error about TypeScript 7 without having to remove all the top-level ts import just yet.
This also allows loading TypeScript 7 through an npm alias. i.e. install TypeScript 7 as
"typescript-7": "npm:typescript@rc". This is mostly preparing for TypeScript 7 stable. According to the TypeScript RC announcement, once the stable version is released, the nightly version will also be released under "typescript" instead of "@typescript/native-preview".I was originally considering moving all top-level imports to a few dynamic imports. And we try to load TypeScript 6 from
@typescript/typescript-6. But even if we do that, people might still run into issues withsvelte-kit syncandtypescript-eslint