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
feat: update TypeScript to 5.0 RC #6570
Merged
bradzacher
merged 18 commits into
typescript-eslint:main
from
sosukesuzuki:update-to-ts-5.0
Mar 13, 2023
Merged
Changes from 13 commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
264d495
feat: update to typescript 5.0
sosukesuzuki 033d6a9
chore: update patch files
sosukesuzuki 5e6fe24
chore: update `api-extractor`
sosukesuzuki c7ab394
chore: update `downlevel-dts`
sosukesuzuki 70f47a4
chore(typescript-estree): use `@ts-ignore` for removed properties
sosukesuzuki 6188c1a
chore(type-utils): use `@ts-ignore` comment for invalid enum assignment
sosukesuzuki de114a5
test(typescript-estree): update snapshots for `convert.test.ts`
sosukesuzuki db61916
feat(typescript-estree): add `5.0.0-rc` to supported version
sosukesuzuki 1a2f0cd
feat(typescript-estree): set `experimentalDecorators: true`
sosukesuzuki 7e7c143
feat(scope-manager): run `generate:lib`
sosukesuzuki ced41d2
feat(types): run `generate:lib`
sosukesuzuki f9d0594
chore: fixes linting problems
sosukesuzuki d022d8e
chore: use `ts.identifierToKeywordKind` instead of `originalKeywordKind`
sosukesuzuki 49e64cb
fix(eslint-plugin): fix printing BigInt literal
sosukesuzuki ef5475f
chore(website): add `@ts-expect-error` for imcompatible types
sosukesuzuki 1210fec
feat(typescript-estree): disable `experimentalDecorators`
sosukesuzuki fc536c5
chore: use `@ts-expect-error` instead of `@ts-ignore`
sosukesuzuki 43ae7de
chore(eslint-plugin): move the branch for printing BigInt literal
sosukesuzuki File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// THIS CODE WAS AUTOMATICALLY GENERATED | ||
// DO NOT EDIT THIS CODE BY HAND | ||
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: | ||
// npx nx generate-lib @typescript-eslint/scope-manager | ||
|
||
import type { ImplicitLibVariableOptions } from '../variable'; | ||
import { TYPE } from './base-config'; | ||
|
||
export const decorators_legacy = { | ||
ClassDecorator: TYPE, | ||
PropertyDecorator: TYPE, | ||
MethodDecorator: TYPE, | ||
ParameterDecorator: TYPE, | ||
} as Record<string, ImplicitLibVariableOptions>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// THIS CODE WAS AUTOMATICALLY GENERATED | ||
// DO NOT EDIT THIS CODE BY HAND | ||
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: | ||
// npx nx generate-lib @typescript-eslint/scope-manager | ||
|
||
import type { ImplicitLibVariableOptions } from '../variable'; | ||
import { TYPE } from './base-config'; | ||
|
||
export const decorators = { | ||
ClassMemberDecoratorContext: TYPE, | ||
DecoratorContext: TYPE, | ||
ClassDecoratorContext: TYPE, | ||
ClassMethodDecoratorContext: TYPE, | ||
ClassGetterDecoratorContext: TYPE, | ||
ClassSetterDecoratorContext: TYPE, | ||
ClassAccessorDecoratorContext: TYPE, | ||
ClassAccessorDecoratorTarget: TYPE, | ||
ClassAccessorDecoratorResult: TYPE, | ||
ClassFieldDecoratorContext: TYPE, | ||
} as Record<string, ImplicitLibVariableOptions>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// THIS CODE WAS AUTOMATICALLY GENERATED | ||
// DO NOT EDIT THIS CODE BY HAND | ||
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: | ||
// npx nx generate-lib @typescript-eslint/scope-manager | ||
|
||
import type { ImplicitLibVariableOptions } from '../variable'; | ||
import { TYPE } from './base-config'; | ||
|
||
export const es2022_regexp = { | ||
RegExpMatchArray: TYPE, | ||
RegExpExecArray: TYPE, | ||
RegExpIndicesArray: TYPE, | ||
RegExp: TYPE, | ||
} as Record<string, ImplicitLibVariableOptions>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// THIS CODE WAS AUTOMATICALLY GENERATED | ||
// DO NOT EDIT THIS CODE BY HAND | ||
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: | ||
// npx nx generate-lib @typescript-eslint/scope-manager | ||
|
||
import type { ImplicitLibVariableOptions } from '../variable'; | ||
import { TYPE } from './base-config'; | ||
|
||
export const es2023_array = { | ||
Array: TYPE, | ||
ReadonlyArray: TYPE, | ||
Int8Array: TYPE, | ||
Uint8Array: TYPE, | ||
Uint8ClampedArray: TYPE, | ||
Int16Array: TYPE, | ||
Uint16Array: TYPE, | ||
Int32Array: TYPE, | ||
Uint32Array: TYPE, | ||
Float32Array: TYPE, | ||
Float64Array: TYPE, | ||
BigInt64Array: TYPE, | ||
BigUint64Array: TYPE, | ||
} as Record<string, ImplicitLibVariableOptions>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// THIS CODE WAS AUTOMATICALLY GENERATED | ||
// DO NOT EDIT THIS CODE BY HAND | ||
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: | ||
// npx nx generate-lib @typescript-eslint/scope-manager | ||
|
||
import type { ImplicitLibVariableOptions } from '../variable'; | ||
import { dom } from './dom'; | ||
import { dom_iterable } from './dom.iterable'; | ||
import { es2023 } from './es2023'; | ||
import { scripthost } from './scripthost'; | ||
import { webworker_importscripts } from './webworker.importscripts'; | ||
|
||
export const es2023_full = { | ||
...es2023, | ||
...dom, | ||
...webworker_importscripts, | ||
...scripthost, | ||
...dom_iterable, | ||
} as Record<string, ImplicitLibVariableOptions>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// THIS CODE WAS AUTOMATICALLY GENERATED | ||
// DO NOT EDIT THIS CODE BY HAND | ||
// RUN THE FOLLOWING COMMAND FROM THE WORKSPACE ROOT TO REGENERATE: | ||
// npx nx generate-lib @typescript-eslint/scope-manager | ||
|
||
import type { ImplicitLibVariableOptions } from '../variable'; | ||
import { es2022 } from './es2022'; | ||
import { es2023_array } from './es2023.array'; | ||
|
||
export const es2023 = { | ||
...es2022, | ||
...es2023_array, | ||
} as Record<string, ImplicitLibVariableOptions>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to be so strict here? If we release 4.9.6 (however unlikely), that'll cause problems. That and I see basically no future in which we change the APIs post-RC, so it feels pretty safe to just bump this to
< 5.1.0
.Though, I also think that you shouldn't specify versions here at all; given ts-eslint prints a very loud warning about using a potentially incompatible TypeScript version, this particular bit IMO only causes pain when trying to get package managers happy in the TypeScript repo or when testing newer releases of TypeScript in other repos...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the private package.json for our repo, and is not published to the outside world.
Each package that actually depends on TS uses an optional, unbounded peer dependency on TS:
typescript-eslint/packages/eslint-plugin/package.json
Lines 78 to 82 in a249412
This range here is primarily here as our "top level" range to clearly specify the range for the project. At some point we want to automatically flow this value into our docs and package as the single point-of-definition.
It actually doesn't even do anything technically because just below it we have a resolution which forces a specific version of TS (eg this PR sets it to
~5.0.1-rc
).I agree though that we should probably keep it as
<5.0.0
instead of dropping it down to<4.9.5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, yes, oops. I'm conflating this with the fact that prereleases in the tree don't satisfy "*" or "latest" and cause duplication (boo).