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

build: Move to es2021, fix some typing problems #21391

Merged
merged 7 commits into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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 build.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const pkgOptions = {
nodePaths,
outbase: './pkg',
outdir: "./dist",
target: ['es2020'],
target: ['es2021'],
Copy link
Member

Choose a reason for hiding this comment

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

This should be lib, we don't want to target es2021 in the end result of the transpilation 5f68dfe

Copy link
Member Author

@martinpitt martinpitt Dec 6, 2024

Choose a reason for hiding this comment

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

I don't want half of our code 2021 and half 2020. Let's stick to one standard.

Copy link
Member

Choose a reason for hiding this comment

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

Alright! Would have also liked a .eslintrc.json downgrade but we can do that later.

};

// context options for qunit tests in qunit/
Expand Down
1 change: 0 additions & 1 deletion test/common/typecheck
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,6 @@ javascript_ignored_codes = [
"TS1345", # An expression of type 'void' cannot be tested for truthiness.
"TS2554", # Expected 0 arguments, but got 1.
"TS2810", # Expected 1 argument, but got 0.
"TS2550", # Property 'replaceAll' does not exist on type 'string'.
"TS2447", # The '|' operator is not allowed for boolean types.
"TS2540", # Cannot assign to 'location' because it is a read-only property.
]
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@
"jsx": "react",
"lib": [
"dom",
"es2020"
"es2021"
],
"moduleResolution": "node",
"noEmit": true, // we only use `tsc` for type checking
"strict": true,
"target": "es2020",
"target": "es2021",
},
"include": [
"pkg/**/*"
Expand Down