10000 feat: update TypeScript to 5.3-rc (#7923) · c0sta/typescript-eslint@9034d17 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9034d17

Browse files
feat: update TypeScript to 5.3-rc (typescript-eslint#7923)
* feat: update TypeScript to 5.3-rc * Add 5.3.0-beta || * yarn.lock too * Revert "Went back to 5.3.0-beta" This reverts commit a2bef1d. * Use 5.4.0-dev.20231117 * Revert warnAboutTSVersion range * Aha, checksum now updates
1 parent 5dbf622 commit 9034d17

File tree

6 files changed

+106
-23
lines changed

6 files changed

+106
-23
lines changed

.yarn/patches/typescript-npm-5.3.0-beta-33b1e90865.patch renamed to .yarn/patches/typescript-npm-5.3.1-rc-6c4278ffd3.patch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/lib/typescript.d.ts b/lib/typescript.d.ts
2-
index d785077fd9e4eb5959c0badb857358fad09d4d3f..54f71344b098e8d46acd8dd77638c60d505bb996 100644
2+
index 5ee1d5258cb019bddb259c7d31b1ae0156a98f0c..fc5f4d2a757a9fef92b2135148c22bb0cc81b2c1 100644
33
--- a/lib/typescript.d.ts
44
+++ b/lib/typescript.d.ts
55
@@ -4491,8 +4491,8 @@ declare namespace ts {
@@ -54,7 +54,7 @@ index d785077fd9e4eb5959c0badb857358fad09d4d3f..54f71344b098e8d46acd8dd77638c60d
5454
}
5555
interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer {
5656
readonly kind: SyntaxKind.ConstructorType;
57-
@@ -8978,7 +8992,13 @@ declare namespace ts {
57+
@@ -8991,7 +9005,13 @@ declare namespace ts {
5858
function symbolName(symbol: Symbol): string;
5959
function getNameOfJSDocTypedef(declaration: JSDocTypedefTag): Identifier | PrivateIdentifier | undefined;
6060
function getNameOfDeclaration(declaration: Declaration | Expression | undefined): DeclarationName | undefined;
@@ -68,7 +68,7 @@ index d785077fd9e4eb5959c0badb857358fad09d4d3f..54f71344b098e8d46acd8dd77638c60d
6868
function getModifiers(node: HasModifiers): readonly Modifier[] | undefined;
6969
/**
7070
* Gets the JSDoc parameter tags for the node if present.
71-
@@ -9508,7 +9528,13 @@ declare namespace ts {
71+
@@ -9521,7 +9541,13 @@ declare namespace ts {
7272
function isModuleName(node: Node): node is ModuleName;
7373
function isBinaryOperatorToken(node: Node): node is BinaryOperatorToken;
7474
function setTextRange<T extends TextRange>(range: T, location: TextRange | undefined): T;
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
diff --git a/lib/typescript.d.ts b/lib/typescript.d.ts
2+
index 7135bb786332478763097e4fa2274ac0222ecbb2..446baab7b0d29f1e88842f97f58d343b816c8df0 100644
3+
--- a/lib/typescript.d.ts
4+
+++ b/lib/typescript.d.ts
5+
@@ -4493,8 +4493,8 @@ declare namespace ts {
6+
JSDocFunctionType = 324,
7+
JSDocVariadicType = 325,
8+
JSDocNamepathType = 326,
9+
+ /** @deprecated This was only added in 4.7 */
10+
JSDoc = 327,
11+
- /** @deprecated Use SyntaxKind.JSDoc */
12+
JSDocComment = 327,
13+
JSDocText = 328,
14+
JSDocTypeLiteral = 329,
15+
@@ -5068,6 +5068,8 @@ declare namespace ts {
16+
readonly name: PropertyName;
17+
readonly questionToken?: QuestionToken;
18+
readonly type?: TypeNode;
19+
+ /** @deprecated removed in 5.0 but we want to keep it for backwards compatibility checks! */
20+
+ readonly initializer?: Expression | undefined;
21+
}
22+
interface PropertyDeclaration extends ClassElement, JSDocContainer {
23+
readonly kind: SyntaxKind.PropertyDeclaration;
24+
@@ -5093,6 +5095,10 @@ declare namespace ts {
25+
readonly parent: ObjectLiteralExpression;
26+
readonly name: PropertyName;
27+
readonly initializer: Expression;
28+
+ /** @deprecated removed in 5.0 but we want to keep it for backwards compatibility checks! */
29+
+ readonly questionToken?: QuestionToken | undefined;
30+
+ /** @deprecated removed in 5.0 but we want to keep it for backwards compatibility checks! */
31+
+ readonly exclamationToken?: ExclamationToken | undefined;
32+
}
33+
interface ShorthandPropertyAssignment extends ObjectLiteralElement, JSDocContainer {
34+
readonly kind: SyntaxKind.ShorthandPropertyAssignment;
35+
@@ -5100,6 +5106,12 @@ declare namespace ts {
36+
readonly name: Identifier;
37+
readonly equalsToken?: EqualsToken;
38+
readonly objectAssignmentInitializer?: Expression;
39+
+ /** @deprecated removed in 5.0 but we want to keep it for backwards compatibility checks! */
40+
+ readonly modifiers?: NodeArray<Modifier> | undefined;
41+
+ /** @deprecated removed in 5.0 but we want to keep it for backwards compatibility checks! */
42+
+ readonly questionToken?: QuestionToken | undefined;
43+
+ /** @deprecated removed in 5.0 but we want to keep it for backwards compatibility checks! */
44+
+ readonly exclamationToken?: ExclamationToken | undefined;
45+
}
46+
interface SpreadAssignment extends ObjectLiteralElement, JSDocContainer {
47+
readonly kind: SyntaxKind.SpreadAssignment;
48+
@@ -5224,6 +5236,8 @@ declare namespace ts {
49+
}
50+
interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer {
51+
readonly kind: SyntaxKind.FunctionType;
52+
+ /** @deprecated removed in 5.0 but we want to keep it for backwards compatibility checks! */
53+
+ readonly modifiers?: NodeArray<Modifier> | undefined;
54+
}
55+
interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer {
56+
readonly kind: SyntaxKind.ConstructorType;
57+
@@ -8995,7 +9009,13 @@ declare namespace ts {
58+
function symbolName(symbol: Symbol): string;
59+
function getNameOfJSDocTypedef(declaration: JSDocTypedefTag): Identifier | PrivateIdentifier | undefined;
60+
function getNameOfDeclaration(declaration: Declaration | Expression | undefined): DeclarationName | undefined;
61+
+ /**
62+
+ * @deprecated don't use this directly as it does not exist pre-4.8; instead use getDecorators from `@typescript-eslint/type-utils`.
63+
+ */
64+
function getDecorators(node: HasDecorators): readonly Decorator[] | undefined;
65+
+ /**
66+
+ * @deprecated don't use this directly as it does not exist pre-4.8; instead use getModifiers from `@typescript-eslint/type-utils`.
67+
+ */
68+
function getModifiers(node: HasModifiers): readonly Modifier[] | undefined;
69+
/**
70+
* Gets the JSDoc parameter tags for the node if present.
71+
@@ -9525,7 +9545,13 @@ declare namespace ts {
72+
function isModuleName(node: Node): node is ModuleName;
73+
function isBinaryOperatorToken(node: Node): node is BinaryOperatorToken;
74+
function setTextRange<T extends TextRange>(range: T, location: TextRange | undefined): T;
75+
+ /**
76+
+ * @deprecated don't use this directly as it does not exist pre-4.8; instead use getModifiers from `@typescript-eslint/type-utils`.
77+
+ */
78+
function canHaveModifiers(node: Node): node is HasModifiers;
79+
+ /**
80+
+ * @deprecated don't use this directly as it does not exist pre-4.8; instead use getDecorators from `@typescript-eslint/type-utils`.
81+
+ */
82+
function canHaveDecorators(node: Node): node is HasDecorators;
83+
/**
84+
* Invokes a callback for each child of the given node. The 'cbNode' callback is invoked for all child nodes

docs/maintenance/Dependency_Version_Upgrades.mdx

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,15 +86,14 @@ We generally start the process of supporting a new TypeScript version just after
8686
1. Once the TypeScript RC version is released, start merging PRs
8787
- Whenever a PR is merged, change the respective heading's emoji from 🏗 to ✅
8888
1. Create a PR with a title like `feat: update TypeScript to X.Y-rc` and the following changes:
89-
- In the root `package.json`, add `|| X.Y.2-rc2` to the `dependency` on `typescript`
90-
- In the root `package.json`, change the `devDependency` on `typescript` to `~X.Y.2-rc2`
89+
- In the root `package.json`, add `|| X.Y.1-rc2` to the `devDependency` on `typescript`
9190
- Change the `SUPPORTED_TYPESCRIPT_VERSIONS` constant's `<` version to the next version of TypeScript
92-
- Change the `SUPPORTED_PRERELEASE_RANGES` constant to equal `['X.Y.2-rc']`
91+
- Change the `SUPPORTED_PRERELEASE_RANGES` constant to equal `['X.Y.1-rc']`
9392
- Rename and update `patches/typescript*` to the new TypeScript version
9493
- Run `yarn generate-lib` to update `scope-manager`
9594
1. Once all PRs needed for the RC update PR are merged, merge the RC update PR
9695
1. Once TypeScript releases the stable X.Y version, create and merge a PR with a title like `chore: bump TypeScript from X.YRC to X.Y` and the following changes:
97-
- In the root `package.json`, remove `|| X.Y.2-rc2` from the `dependency` on `typescript`, and bump its `<` version to the next version of TypeScript
96+
- In the root `package.json`, remove `|| X.Y.1-rc2` from the `dependency` on `typescript`, and bump its `<` version to the next version of TypeScript
9897
- In the root `package.json`, change the `devDependency` on `typescript` to `~X.Y.3`
9998
- Rename and update `patches/typescript*` to the new TypeScript version
10099
- Any other changes made necessary due to changes in TypeScript between the RC version and stable version

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@
114114
"ts-node": "10.7.0",
115115
"tslint": "^6.1.3",
116116
"tsx": "^3.12.7",
117-
"typescript": ">=4.3.5 <5.4.0"
117+
"typescript": ">=4.3.5 <5.4.0 || 5.3.0-beta || 5.3.1-rc || 5.4.0-dev.20231117"
118118
},
119119
"resolutions": {
120120
"@jest/create-cache-key-function": "^29",
@@ -141,7 +141,7 @@
141141
"pretty-format": "^29",
142142
"react-split-pane@^0.1.92": "patch:react-split-pane@npm%3A0.1.92#./.yarn/patches/react-split-pane-npm-0.1.92-93dbf51dff.patch",
143143
"tsx": "^3.12.7",
144-
"typescript": "patch:typescript@npm%3A5.3.0-beta#./.yarn/patches/typescript-npm-5.3.0-beta-33b1e90865.patch"
144+
"typescript": "patch:typescript@npm%3A5.4.0-dev.20231117#./.yarn/patches/typescript-npm-5.4.0-dev.20231117-78a04a34c5.patch"
145145
},
146146
"packageManager": "yarn@3.7.0"
147147
}

packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const SUPPORTED_TYPESCRIPT_VERSIONS = '>=4.3.5 <5.3.0';
1212
* The semver package will ignore prerelease ranges, and we don't want to explicitly document every one
1313
* List them all separately here, so we can automatically create the full string
1414
*/
15-
const SUPPORTED_PRERELEASE_RANGES: string[] = [];
15+
const SUPPORTED_PRERELEASE_RANGES: string[] = ['5.3.1-rc'];
1616
const ACTIVE_TYPESCRIPT_VERSION = ts.version;
1717
const isRunningSupportedTypeScriptVersion = semver.satisfies(
1818
ACTIVE_TYPESCRIPT_VERSION,

yarn.lock

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6120,7 +6120,7 @@ __metadata:
61206120
ts-node: 10.7.0
61216121
tslint: ^6.1.3
61226122
tsx: ^3.12.7
6123-
typescript: ">=4.3.5 <5.4.0"
6123+
typescript: ">=4.3.5 <5.4.0 || 5.3.0-beta || 5.3.1-rc || 5.4.0-dev.20231117"
61246124
languageName: unknown
61256125
linkType: soft
61266126

@@ -20163,33 +20163,33 @@ __metadata:
2016320163
languageName: node
2016420164
linkType: hard
2016520165

20166-
"typescript@npm:5.3.0-beta":
20167-
version: 5.3.0-beta
20168-
resolution: "typescript@npm:5.3.0-beta"
20166+
"typescript@npm:5.4.0-dev.20231117":
20167+
version: 5.4.0-dev.20231117
20168+
resolution: "typescript@npm:5.4.0-dev.20231117"
2016920169
bin:
2017020170
tsc: bin/tsc
2017120171
tsserver: bin/tsserver
20172-
checksum: 12c5b05df8be536c3f5789323ca2e2f21ab6b7571bd21407b152c080be1dc8628c3cd9fb5fa342a304a266f5ad22827f3a27b7961da1600d27890be93f3e2d73
20172+
checksum: c538a15c3c528275591f40a0d3db191be6410d0da91fa24bd78376b0b674721382ae80f30f1625f565d41c755fab4659e8c6af5072a695401ff6cfb849b3e06e
2017320173
languageName: node
2017420174
linkType: hard
2017520175

20176-
"typescript@patch:typescript@npm%3A5.3.0-beta#./.yarn/patches/typescript-npm-5.3.0-beta-33b1e90865.patch::locator=%40typescript-eslint%2Ftypescript-eslint%40workspace%3A.":
20177-
version: 5.3.0-beta
20178-
resolution: "typescript@patch:typescript@npm%3A5.3.0-beta#./.yarn/patches/typescript-npm-5.3.0-beta-33b1e90865.patch::version=5.3.0-beta&hash=aba397&locator=%40typescript-eslint%2Ftypescript-eslint%40workspace%3A."
20176+
"typescript@patch:typescript@npm%3A5.4.0-dev.20231117#./.yarn/patches/typescript-npm-5.4.0-dev.20231117-78a04a34c5.patch::locator=%40typescript-eslint%2Ftypescript-eslint%40workspace%3A.":
20177+
version: 5.4.0-dev.20231117
20178+
resolution: "typescript@patch:typescript@npm%3A5.4.0-dev.20231117#./.yarn/patches/typescript-npm-5.4.0-dev.20231117-78a04a34c5.patch::version=5.4.0-dev.20231117&hash=f57760&locator=%40typescript-eslint%2Ftypescript-eslint%40workspace%3A."
2017920179
bin:
2018020180
tsc: bin/tsc
2018120181
tsserver: bin/tsserver
20182-
checksum: 85a8cc0ce7b9d4243db899dbf77632d63cf32818cfc076f27e929f1b89c062c2a94f5fa2f0a72e9fc315164532aac1580c9cad5b453f4a4aed464557593c8168
20182+
checksum: eb20effe30527f1a08981f985cd002519d52a5314cd4feca5e145987bea8ac09e023b95c5d82fddb12bedc8401255209ec6e076a48aab6519dbcafce60f5f219
2018320183
languageName: node
2018420184
linkType: hard
2018520185

20186-
"typescript@patch:typescript@patch%3Atypescript@npm%253A5.3.0-beta%23./.yarn/patches/typescript-npm-5.3.0-beta-33b1e90865.patch%3A%3Alocator=%2540typescript-eslint%252Ftypescript-eslint%2540workspace%253A.#~builtin<compat/typescript>":
20187-
version: 5.3.0-beta
20188-
resolution: "typescript@patch:typescript@patch%3Atypescript@npm%253A5.3.0-beta%23./.yarn/patches/typescript-npm-5.3.0-beta-33b1e90865.patch%3A%3Aversion=5.3.0-beta&hash=aba397&locator=%2540typescript-eslint%252Ftypescript-eslint%2540workspace%253A.#~builtin<compat/typescript>::version=5.3.0-beta&hash=29ae49"
20186+
"typescript@patch:typescript@patch%3Atypescript@npm%253A5.4.0-dev.20231117%23./.yarn/patches/typescript-npm-5.4.0-dev.20231117-78a04a34c5.patch%3A%3Alocator=%2540typescript-eslint%252Ftypescript-eslint%2540workspace%253A.#~builtin<compat/typescript>":
20187+
version: 5.4.0-dev.20231117
20188+
resolution: "typescript@patch:typescript@patch%3Atypescript@npm%253A5.4.0-dev.20231117%23./.yarn/patches/typescript-npm-5.4.0-dev.20231117-78a04a34c5.patch%3A%3Aversion=5.4.0-dev.20231117&hash=f57760&locator=%2540typescript-eslint%252Ftypescript-eslint%2540workspace%253A.#~builtin<compat/typescript>::version=5.4.0-dev.20231117&hash=e012d7"
2018920189
bin:
2019020190
tsc: bin/tsc
2019120191
tsserver: bin/tsserver
20192-
checksum: d1ed47d2a7f35e4692c439bca41f0622be732f33927e59afe4af9c6640219a2f1cc7c4622852787a96c5300f2b88fb06bb46b5125ae8db2c080b0fad2f12ae98
20192+
checksum: 923f407da16df26c7810244c3455cc88e1d9db20067fbac7f988f484fea6239f89da9d41ae5ebbf7e0b86e096c4d809cb4b0732c6d40a634cb0fdbefd210bc18
2019320193
languageName: node
2019420194
linkType: hard
2019520195

0 commit comments

Comments
 (0)
0