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
Show file tree
Hide file tree
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: 2 additions & 0 deletions .changeset/tidy-walls-destroy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
1 change: 1 addition & 0 deletions .gitattributes
kevinb-khan marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yarn.lock linguist-generated
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@
"@types/jsdom": "^21.1.1",
"@types/superagent": "^4.1.16",
"@types/winston": "^2.4.4",
"@typescript-eslint/eslint-plugin": "^6.9.1",
"@typescript-eslint/parser": "^6.21.0",
"@typescript-eslint/eslint-plugin": "^7.3.1",
"@typescript-eslint/parser": "^7.3.1",
"babel-jest": "^29.7.0",
"babel-watch": "^7.8.1",
"eslint": "^8.52.0",
Expand Down Expand Up @@ -71,7 +71,7 @@
"rollup-plugin-preserve-shebangs": "^0.2.0",
"superagent": "^5.3.1",
"typedoc": "^0.25.3",
"typescript": "^5.1.5",
"typescript": "5.7.2",
"winston": "^3.10.0"
},
"resolutions": {
Expand Down
1 change: 0 additions & 1 deletion packages/wonder-stuff-i18n/src/utils/extract-i18n.ts
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,6 @@ export function* extractStrings(
const endOffset =
textString.indexOf(
groups.ngettext_plural,
// @ts-expect-error [FEI-5011] - TS2532 - Object is possibly 'undefined'.
match.index + groups.ngettext_singular.length,
) + groups.ngettext_plural.length;
yield {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ export const applyAbortablePromisesPatch = (force = false): void => {
const ourAbort = () => {
/* empty */
};
// @ts-expect-error We know that the inferred type is wrong here and
// it's not worth convincing TS with a better type, so just suppress it.
ourAbort[patchedMarker] = true;

// @ts-expect-error We know this isn't on the Promise type. We could
Expand Down
21 changes: 20 additions & 1 deletion tsconfig-common.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,25 @@

/* Completeness */
"skipDefaultLibCheck": true, // it's safe to assume that built-in .d.ts files are correct
"skipLibCheck": false
// Setting `skipLibCheck: true`, avoids the following issues in various .d.ts files:
// - 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.
Comment on lines +30 to +32
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.

// - 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'.
// Conflicts with node_modules/typescript/lib/typescript.d.ts.
// - 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'.
// Conflicts with node_modules/typescript/lib/typescript.d.ts.
// - node_modules/typescript/lib/typescript.d.ts:5515:15 - error
// TS2320: Interface 'AssertEntry' cannot simultaneously extend types 'ImportAttribute' and 'Node'.
// Conflicts with node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts
// - node_modules/typescript/lib/typescript.d.ts:5518:15 - error
// TS2320: Interface 'AssertClause' cannot simultaneously extend types 'ImportAttributes' and 'Node'.
// Conflicts with node_modules/@typescript-eslint/utils/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts
// NOTE(kevinb): I tried update @typescript-eslint/plugin and @typescript-eslint/parser to
// the most recent version (8.17.0 at the time this was written) but it didn't have any
// effect on these errors.
"skipLibCheck": true,
}
}
203 changes: 88 additions & 115 deletions yarn.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading