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

Update TypeScript to 5.7.2 #1082

Merged
merged 5 commits into from
Dec 4, 2024
Merged

Update TypeScript to 5.7.2 #1082

merged 5 commits into from
Dec 4, 2024

Conversation

kevinb-khan
Copy link
Contributor

@kevinb-khan kevinb-khan commented Nov 28, 2024

Summary:

Wonder Blocks is updating Storybook to 8.x which requires using "moduleResolution": "bundler" in its tsconfig, see https://stackoverflow.com/questions/72193784/why-doesnt-the-exports-field-of-npm-work-in-typescript for details. To fix this, I decided to update TypeScript in Wonder Blocks. Instead of updating to the minimally required version I figured I may as well upgrade to the most recent version since I'm upgrading anyways.

Although we probably don't need to update TypeScript in all of our repos at the same time (unless we start using new syntax), we may as well.

In theory, this shouldn't affect the output of the code since we use babel for compilation.

Issue: None

Test plan:

  • yarn typecheck

@kevinb-khan kevinb-khan self-assigned this Nov 28, 2024
Copy link

changeset-bot bot commented Nov 28, 2024

🦋 Changeset detected

Latest commit: da3e822

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

This PR includes changesets to release 0 packages

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@khan-actions-bot
Copy link
Contributor

khan-actions-bot commented Nov 28, 2024

Gerald

Required Reviewers
  • @Khan/frontend-infra for changes to .gitattributes, package.json, tsconfig-common.json, yarn.lock, .changeset/tidy-walls-destroy.md, packages/wonder-stuff-render-environment-jsdom/src/apply-abortable-promises-patch.ts, packages/wonder-stuff-i18n/src/utils/extract-i18n.ts

Don't want to be involved in this pull request? Comment #removeme and we won't notify you of further changes.

@khan-actions-bot khan-actions-bot requested a review from a team November 28, 2024 23:01
Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.85%. Comparing base (cf1af29) to head (da3e822).
Report is 8 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1082   +/-   ##
=======================================
  Coverage   99.85%   99.85%           
=======================================
  Files          97       97           
  Lines        1392     1392           
  Branches      351      351           
=======================================
  Hits         1390     1390           
  Misses          1        1           
  Partials        1        1           
Files with missing lines Coverage Δ
...ckages/wonder-stuff-i18n/src/utils/extract-i18n.ts 100.00% <ø> (ø)
...onment-jsdom/src/apply-abortable-promises-patch.ts 100.00% <ø> (ø)

Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4673bc2...da3e822. Read the comment docs.

Copy link
Contributor

github-actions bot commented Nov 28, 2024

Size Change: 0 B

Total Size: 4.63 kB

ℹ️ View Unchanged
Filename Size
packages/wonder-stuff-core/dist/browser/es/index.js 1.85 kB
packages/wonder-stuff-sentry/dist/browser/es/index.js 1.65 kB
packages/wonder-stuff-testing/dist/browser/es/index.js 1.12 kB

compressed-size-action

Copy link
Member

@somewhatabstract somewhatabstract left a comment

Choose a reason for hiding this comment

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

Thanks for doing this. The changes look good to me except for one. I have left a question/suggestion inline; but to summarize, I think we need to be more explicit about which modules/globals conflict so that future us can properly understand the implications of future updates and know when certain config values may no longer be relevant.

tsconfig-common.json Outdated Show resolved Hide resolved
yarn.lock Outdated Show resolved Hide resolved
Comment on lines +30 to +32
// - node_modules/@google-cloud/kms/node_modules/long/index.d.ts:446:1 - error
// TS1203: Export assignment cannot be used when targeting ECMAScript modules.
// Consider using 'export default' or another module format instead.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This one is not a conflict. Maybe the .d.ts files will be different in a more recent version. I don't want to make changes that could modify the runtime behavior.

Copy link
Member

Choose a reason for hiding this comment

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

praise: Thanks. This is really helpful. It won't catch any new issues that come up, but it gives us something to understand.

Comment on lines 33 to 36
// - node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts:19:3551 - error
// TS2694: Namespace 'ts' has no exported member 'InputFiles'.
// - node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts:19:3567 - error
// TS2694: Namespace 'ts' has no exported member 'UnparsedSource'.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@typescript-eslint/typescript-estree provides ambient type definitions that conflict with the TypeScript types for TypeScript itself.

.gitattributes Outdated Show resolved Hide resolved
Copy link
Member

@somewhatabstract somewhatabstract left a comment

Choose a reason for hiding this comment

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

LGTM

Thank you!

.gitattributes Show resolved Hide resolved
Comment on lines +30 to +32
// - node_modules/@google-cloud/kms/node_modules/long/index.d.ts:446:1 - error
// TS1203: Export assignment cannot be used when targeting ECMAScript modules.
// Consider using 'export default' or another module format instead.
Copy link
Member

Choose a reason for hiding this comment

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

praise: Thanks. This is really helpful. It won't catch any new issues that come up, but it gives us something to understand.

@kevinb-khan kevinb-khan merged commit b2fc2d0 into main Dec 4, 2024
8 checks passed
@kevinb-khan kevinb-khan deleted the ts-5.7.2 branch December 4, 2024 15:24
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