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

bump typescript #7669

Closed
wants to merge 9 commits into from
Closed

bump typescript #7669

wants to merge 9 commits into from

Conversation

Rich-Harris
Copy link
Member

#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:

  • 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
  • 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

  • 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

@changeset-bot
Copy link

changeset-bot bot commented Nov 15, 2022

🦋 Changeset detected

Latest commit: d7c8a6f

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

@Rich-Harris
Copy link
Member Author

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

@benmccann
Copy link
Member

benmccann commented Nov 15, 2022

I filed an issue in the sucrase repo: alangpierce/sucrase#763. It's now been addressed

@dummdidumm
Copy link
Member

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
Copy link
Member

dummdidumm commented Nov 16, 2022

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

@dummdidumm dummdidumm marked this pull request as draft November 16, 2022 14:20
@dummdidumm
Copy link
Member

Aside: It would be great if this microsoft/TypeScript#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
Copy link
Member

dummdidumm commented Nov 16, 2022

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

@benmccann
Copy link
Member

benmccann commented Nov 16, 2022

Prettier was updated in the 2.8 release (prettier/prettier#13792), which master now uses

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

@@ -82,7 +82,11 @@ const redirects = {
};

/** @type {import('.').default} **/
export default function ({ external = [], edge, split } = {}) {
export default function ({
Copy link
Member

Choose a reason for hiding this comment

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

don't need to duplicate the types here. just declare the function as a const and then export it later

@benmccann
Copy link
Member

master is now using TypeScript 4.9, so most of this PR is obsolete. I'm going to close it in favor of #7861, which extracts out the parts that haven't already been committed to master

@benmccann benmccann closed this Nov 28, 2022
@benmccann benmccann deleted the gh-7654 branch November 28, 2022 22:02
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