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

fix(connect): test install to use target ES2019 #16927

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/connect/e2e/test-yarn-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,5 @@ echo import TrezorConnect from \"@trezor/connect\" >index.ts

# compile with typescript
yarn add [email protected]
Copy link

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify the TypeScript version.

The TypeScript version 5.5.4 seems to be from the future. Let's verify the latest stable version.


🌐 Web query:

What is the latest stable version of TypeScript?

💡 Result:

As of February 2025, the latest stable version of TypeScript is 5.7.3[8]. This version includes performance improvements, enhanced type checking capabilities, and continued support for modern ECMAScript features while maintaining backward compatibility with previous releases[4][7].

The current beta release is TypeScript 5.8[2], which developers can test through npm using npm install -D typescript@beta. However, for production environments, Microsoft recommends using the stable 5.7.x branch until 5.8 completes its testing phase[7][9].

Key details about recent versions:

  • TypeScript 5.7 introduced isolated declaration generation and improved regular expression syntax checking[4]
  • Version 5.6 added support for the ECMAScript Set methods proposal[2]
  • The package size has been optimized through tree-shaking and module system improvements since TypeScript 5.0[1]

To install the latest stable version:

npm install -D typescript

Developers can verify their installed version using:

tsc --version

Citations:


Update TypeScript version and align library configuration.

  • The installation command pins TypeScript to version 5.5.4, which is behind the current stable release (5.7.3 as of February 2025). Consider updating to 5.7.3.
  • Additionally, the library flags in the configuration differ from the PR objectives (the PR mentions using ES2022.error, yet the script uses ES2022,DOM). This inconsistency should be reviewed and corrected.

yarn tsc ./index.ts --types node,w3c-web-usb --esModuleInterop --target ES2022 --module commonjs
yarn tsc ./index.ts --types node,w3c-web-usb --esModuleInterop --lib ES2022,DOM --target ES2019 --module commonjs

Loading