Skip to content

Commit

Permalink
[infra] Upgrade and standardize TypeScript to ~4.7.4 (#3116)
Browse files Browse the repository at this point in the history
- All packages now depend on TypeScript `~4.7.4`.
- `~` is used instead of `^` because TypeScript doesn't follow semver.
- I took `typescript` out of the `devDependencies` for most packages, so that they just rely on the one in the top-level `package.json`. This is to make it more likely we'll upgrade all packages at once in the future, instead of one at a time.
- `@lit/ts-transformers`, `@lit/localize-tools`, and `@lit-labs/analyzer` include `typescript` in their production dependencies, so those get a changeset and will get releases.
- `@lit/ts-transformers` needed a fix in the tests so that the "legacy" output emits `ES2021` instead of `ESNext`, since it will include static class initializer blocks otherwise.
- A `@lit-labs/analyzer` test had to be upgraded to due some minor change in the way a generated type union was formatted.
- This drops 800MB off our total npm install size, if you can believe that, since each typescript version is ~65MB, and we had a bunch of versions which needed to get duplicated into multiple sub-package `node_modules/` folders.
  • Loading branch information
aomarks committed Jul 9, 2022
1 parent c93a8ee commit 7d185b4
Show file tree
Hide file tree
Showing 43 changed files with 109 additions and 443 deletions.
7 changes: 7 additions & 0 deletions .changeset/angry-badgers-swim.md
@@ -0,0 +1,7 @@
---
'@lit-labs/analyzer': patch
'@lit/localize-tools': patch
'@lit/ts-transformers': patch
---

Upgraded TypeScript version to ~4.7.4

0 comments on commit 7d185b4

Please sign in to comment.