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

chore(devDep): Bump typescript from ~4.8.4 to ~5.0.4 #2594

Merged
merged 3 commits into from
Jul 23, 2024

Conversation

MajorLift
Copy link
Contributor

@MajorLift MajorLift commented Jul 22, 2024

Motivation

As part of its OKRs (Q2 2024 O3KR4, Q3 2024 O2KR4) the Wallet Framework Team has upgraded all core packages to use TypeScript v5.0, and is enabling other packages throughout our codebase to upgrade as well. Unblocking the snaps monorepo is a high priority, as it has close interdependencies with core monorepo.

This commit upgrades the TypeScript version used in the snaps monorepo by two major versions: v4.9 and v5.0.

Features

v4.9

v5.0

  • const Type Parameters:
    • Causes as const inference by default.
    • 77 as const instances in the snaps monorepo.
type HasNames = { names: readonly string[] };
function getNamesExactly<const T extends HasNames>(arg: T): T["names"] {
//                       ^^^^^
    return arg.names;
}
// Inferred type without `const`: string[]
// Inferred type with `const`: readonly ["Alice", "Bob", "Eve"]
// Note: Didn't need to write 'as const' here
const names = getNamesExactly({ names: ["Alice", "Bob", "Eve"] });

Breaking Changes

v5.0

@MajorLift MajorLift self-assigned this Jul 22, 2024
@MajorLift MajorLift requested a review from a team as a code owner July 22, 2024 17:09
Copy link

socket-security bot commented Jul 22, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/typescript@5.0.4 None 0 39.2 MB typescript-bot

🚮 Removed packages: npm/typescript@4.8.4

View full report↗︎

Copy link

codecov bot commented Jul 22, 2024

Codecov Report

Attention: Patch coverage is 0% with 4 lines in your changes missing coverage. Please review.

Project coverage is 94.00%. Comparing base (3ec6169) to head (077b015).

Files Patch % Lines
...lator/src/features/builder/components/BaseNode.tsx 0.00% 2 Missing ⚠️
...lator/src/features/builder/components/NodeTree.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2594   +/-   ##
=======================================
  Coverage   94.00%   94.00%           
=======================================
  Files         459      459           
  Lines        9650     9650           
  Branches     1482     1482           
=======================================
  Hits         9071     9071           
  Misses        579      579           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MajorLift MajorLift marked this pull request as draft July 22, 2024 17:33
@MajorLift MajorLift marked this pull request as ready for review July 22, 2024 18:24
@MajorLift
Copy link
Contributor Author

RE codecov: It looks like there are no tests written for the BaseNode and NodeTree components. Would I be correct in assuming that the codecov warning can be safely ignored?

@Mrtenz
Copy link
Member

Mrtenz commented Jul 23, 2024

Would I be correct in assuming that the codecov warning can be safely ignored?

Yes. The coverage for snaps-simulator is generally lacking, because we haven't prioritised it in a while.

@MajorLift MajorLift merged commit f7c4121 into main Jul 23, 2024
155 of 156 checks passed
@MajorLift MajorLift deleted the bump-typescript-to-5.0.4 branch July 23, 2024 19:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants