kit icon indicating copy to clipboard operation
kit copied to clipboard

bump typescript

Open Rich-Harris opened this issue 3 years ago • 8 comments

#7654. We also need to

  • [ ] update the TS conversion for the docs to use satisfies (in this PR, or in a follow-up?)
  • [ ] use satisfies in the template

Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

  • [x] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
  • [x] This message body should clearly illustrate what problems it solves.
  • [ ] Ideally, include a test that fails without this PR but passes with it.

Tests

  • [ ] Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

  • [x] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

Rich-Harris avatar Nov 15 '22 19:11 Rich-Harris

🦋 Changeset detected

Latest commit: d7c8a6f7086afc783473aa2484d8544ae7072d82

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
create-svelte Patch

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

changeset-bot[bot] avatar Nov 15 '22 19:11 changeset-bot[bot]

Couple of blockers:

  • adapter-vercel no longer typechecks. wtf?
  • Sucrase, which we use to strip TypeScript out of the template source files, does not know how to deal with the satisfies operator

Rich-Harris avatar Nov 15 '22 20:11 Rich-Harris

I filed an issue in the sucrase repo: https://github.com/alangpierce/sucrase/issues/763. It's now been addressed

benmccann avatar Nov 15 '22 21:11 benmccann

Re "use satisfies in the docs" - I would maybe wait 1-2 months before doing that, so people can familiarize themselves more with that. Also, VS Code is likely not on TS 4.9 yet so everyone not turning on "use TS workspace version" would see type errors and be confused.

dummdidumm avatar Nov 16 '22 09:11 dummdidumm

Another blocker: prettier doesn't support that syntax yet. ESLint likely, too?

dummdidumm avatar Nov 16 '22 11:11 dummdidumm

Aside: It would be great if this https://github.com/microsoft/TypeScript/issues/51086 was implemented, too - then JSDoc could also use that, and we don't need to create proxy types anymore for both JS/TS when people use it.

dummdidumm avatar Nov 16 '22 14:11 dummdidumm

Bummer, function foo () {} satisfies Bar is invalid syntax, so we need to keep using const foo = (() => {}) satisfies Bar instead. Opened #51556

dummdidumm avatar Nov 16 '22 14:11 dummdidumm

Prettier was updated in the 2.8 release (https://github.com/prettier/prettier/issues/13792), which master now uses

@typescript-eslint/parser was addressed in 5.45.0 (https://github.com/typescript-eslint/typescript-eslint/issues/5688). This repo doesn't use that project, but users are now unblocked

benmccann avatar Nov 16 '22 18:11 benmccann

master is now using TypeScript 4.9, so most of this PR is obsolete. I'm going to close it in favor of https://github.com/sveltejs/kit/pull/7861, which extracts out the parts that haven't already been committed to master

benmccann avatar Nov 28 '22 22:11 benmccann