Skip to content
This repository was archived by the owner on Jan 10, 2025. It is now read-only.

Conversation

@BPScott
Copy link
Member

@BPScott BPScott commented Sep 6, 2022

Description

Updating to typescript 4.9.2.

In particular I'm excited by the 4.8 update to how file watching works, which should stop VSCode's typescript server thrashing when you switch branches. Also type-check goes from ~15 to ~12 seconds which is always nice.

See https://devblogs.microsoft.com/typescript/announcing-typescript-4-8/
See https://devblogs.microsoft.com/typescript/announcing-typescript-4-9/

Most changes relate to [Generic constraints no longer extending from {}](https://devblogs.microsoft.com/typescript/announcing-typescript-4-8/#unconstrained-generics-no-longer-assignable-to}. The explanation is pretty dense but the fix boils down to: "Add extends {} if the generic argument can be null/undefined, otherwise add extends object or the the functionally equal extends {[key: string]: unknown} if it's always going to be an object. See microsoft/TypeScript#49489 / microsoft/TypeScript#49119 for more info.

For GraphQL stuff we want to mimic graphql-typed-document-node so we use extends {[key: string]: unknown}

Other changes are regarding small adjustments to Window and NavigatorConnection.

@BPScott BPScott force-pushed the ts4.8 branch 3 times, most recently from 3e0ddcf to 783a8bd Compare November 29, 2022 21:29
@BPScott BPScott changed the title Typescript 4.8 Typescript 4.9 Nov 29, 2022
@BPScott BPScott marked this pull request as ready for review November 29, 2022 21:46
@BPScott BPScott requested a review from a team as a code owner November 29, 2022 21:46
@BPScott
Copy link
Member Author

BPScott commented Nov 29, 2022

/snapit

@github-actions
Copy link
Contributor

🫰✨ Thanks @BPScott! Your snapshots have been published to npm.

Test the snapshots by updating your package.json with the newly published versions:

yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]

@BPScott
Copy link
Member Author

BPScott commented Nov 29, 2022

/snapit

@github-actions
Copy link
Contributor

🫰✨ Thanks @BPScott! Your snapshots have been published to npm.

Test the snapshots by updating your package.json with the newly published versions:

yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]

@BPScott BPScott marked this pull request as draft November 30, 2022 16:56
@BPScott
Copy link
Member Author

BPScott commented Dec 1, 2022

Trying these snapshots out over in https://buildkite.com/shopify/web-ci-builder/builds?branch=quilt-ts49-test. They're failing at the moment, hold off on reviewing till they go green.

@BPScott BPScott self-assigned this Jan 9, 2023
- Update types to account for lib.d.ts changes regarding Navigator and
  Window.
- Propogate generic constraints
@BPScott
Copy link
Member Author

BPScott commented Feb 6, 2023

/snapit

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2023

🫰✨ Thanks @BPScott! Your snapshots have been published to npm.

Test the snapshots by updating your package.json with the newly published versions:

yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]

@BPScott
Copy link
Member Author

BPScott commented Feb 6, 2023

/snapit

@github-actions
Copy link
Contributor

github-actions bot commented Feb 6, 2023

🫰✨ Thanks @BPScott! Your snapshots have been published to npm.

Test the snapshots by updating your package.json with the newly published versions:

yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]
yarn add @shopify/[email protected]

@BPScott BPScott marked this pull request as ready for review February 7, 2023 00:12
@BPScott
Copy link
Member Author

BPScott commented Feb 7, 2023

Haha, yes that's now passing in web, with some minor changes.

@BPScott BPScott merged commit 0bff6fa into main Feb 7, 2023
@BPScott BPScott deleted the ts4.8 branch February 7, 2023 00:16
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant