Skip to content

Commit

Permalink
Update typescript to 3.9 and enable skipLibCheck
Browse files Browse the repository at this point in the history
TS 3.9 offers a few speed improvements. Nothing huuuuuge, but it shaves 3
seconds of our build and type-check commands.

Enabling skipLibCheck (as set by our parent TS configs) meanwhile saves
an additional 10 seconds as we don't bother checking TS declaration files
that we don't use. Recently TS's init scripts were updated so now this
is set to true in newly creacted configs so I'm now more confident in
following suit.

On Master: type-check took ~38s, build took ~52s
This commit: type-check took ~24.5s, build took ~37s
  • Loading branch information
BPScott committed May 13, 2020
1 parent 3105307 commit 3bda1b3
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
4 changes: 4 additions & 0 deletions UNRELEASED.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@

### Development workflow

- Improved speed of type-check and build by enabling TypeScript's `skipLibCheck` option ([#2981](https://github.com/Shopify/polaris-react/pull/2981))

### Dependency upgrades

- Updated TypeScript to 3.9.2 ([#2981](https://github.com/Shopify/polaris-react/pull/2981))

### Code quality

### Deprecations
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@
"shx": "^0.3.2",
"storybook-chromatic": "^3.4.1",
"svgo": "^1.3.0",
"typescript": "~3.8.3"
"typescript": "~3.9.2"
},
"peerDependencies": {
"react": "^16.8.6",
Expand Down
3 changes: 1 addition & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@
// strictFunctionTypes is implictly enabled by strict mode but
// we're not yet compliant, so disable for now
"strictFunctionTypes": false,
"importHelpers": true,
"skipLibCheck": false
"importHelpers": true
},
"include": ["./config/typescript", "./src", "./tests", "./playground"]
}
13 changes: 4 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -17846,15 +17846,10 @@ typedarray@^0.0.6:
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=

typescript@^3.7.2:
version "3.7.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.7.3.tgz#b36840668a16458a7025b9eabfad11b66ab85c69"
integrity sha512-Mcr/Qk7hXqFBXMN7p7Lusj1ktCBydylfQM/FZCk5glCNQJrCUKPkMHdo9R0MTFWsC/4kPFvDS0fDPvukfCkFsw==

typescript@^3.8.0-dev.20200111, typescript@~3.8.3:
version "3.8.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.8.3.tgz#409eb8544ea0335711205869ec458ab109ee1061"
integrity sha512-MYlEfn5VrLNsgudQTVJeNaQFUAI7DkhnOjdpAp4T+ku1TfQClewlbSuTVHiA+8skNBgaf02TL/kLOvig4y3G8w==
typescript@^3.7.2, typescript@^3.8.0-dev.20200111, typescript@~3.9.2:
version "3.9.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.2.tgz#64e9c8e9be6ea583c54607677dd4680a1cf35db9"
integrity sha512-q2ktq4n/uLuNNShyayit+DTobV2ApPEo/6so68JaD5ojvc/6GClBipedB9zNWYxRSAlZXAe405Rlijzl6qDiSw==

ua-parser-js@^0.7.18:
version "0.7.19"
Expand Down

0 comments on commit 3bda1b3

Please sign in to comment.