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

feat: support TS 5.4 #8630

Merged
merged 5 commits into from Mar 11, 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -94,7 +94,7 @@ We generally start the process of supporting a new TypeScript version just after
1. Once all PRs needed for the RC update PR are merged, merge the RC update PR
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:
- 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
- In the root `package.json`, change the `devDependency` on `typescript` to `~X.Y.3`
- In the root `package.json`, change the `resolutions` on `typescript` to `X.Y.3`
- Rename and update `patches/typescript*` to the new TypeScript version
- Any other changes made necessary due to changes in TypeScript between the RC version and stable version
1. Send a PR that updates this documentation page to point to your newer issues and PRs
Expand Down
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -118,7 +118,7 @@
"tmp": "^0.2.1",
"ts-node": "10.7.0",
"tsx": "^4.6.2",
"typescript": ">=4.7.4 <5.4.0",
"typescript": ">=4.7.4 <5.5.0",
"typescript-eslint": "workspace:^",
"yargs": "17.7.2"
},
Expand All @@ -140,7 +140,7 @@
"pretty-format": "^29",
"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",
"tsx": "^4.6.2",
"typescript": "5.3.3",
"typescript": "5.4.2",
"@nx/eslint@17.3.1": "patch:@nx/eslint@npm%3A17.3.1#./.yarn/patches/@nx-eslint-npm-17.3.1-a2f85d8c50.patch"
},
"packageManager": "yarn@3.8.1"
Expand Down
11 changes: 11 additions & 0 deletions packages/scope-manager/src/lib/dom.asynciterable.ts
@@ -0,0 +1,11 @@
// 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/repo-tools

import type { ImplicitLibVariableOptions } from '../variable';
import { TYPE } from './base-config';

export const dom_asynciterable = {
FileSystemDirectoryHandle: TYPE,
} as Record<string, ImplicitLibVariableOptions>;
2 changes: 2 additions & 0 deletions packages/scope-manager/src/lib/dom.iterable.ts
Expand Up @@ -33,6 +33,8 @@ export const dom_iterable = {
HTMLFormElement: TYPE,
HTMLSelectElement: TYPE,
Headers: TYPE,
Highlight: TYPE,
HighlightRegistry: TYPE,
IDBDatabase: TYPE,
IDBObjectStore: TYPE,
MIDIInputMap: TYPE,
Expand Down
8 changes: 7 additions & 1 deletion packages/scope-manager/src/lib/dom.ts
Expand Up @@ -170,7 +170,6 @@ export const dom = {
MultiCacheQueryOptions: TYPE,
MutationObserverInit: TYPE,
NavigationPreloadState: TYPE,
NotificationAction: TYPE,
NotificationOptions: TYPE,
OfflineAudioCompletionEventInit: TYPE,
OfflineAudioContextOptions: TYPE,
Expand Down Expand Up @@ -256,6 +255,7 @@ export const dom = {
RTCRtpTransceiverInit: TYPE,
RTCSentRtpStreamStats: TYPE,
RTCSessionDescriptionInit: TYPE,
RTCSetParameterOptions: TYPE,
RTCStats: TYPE,
RTCTrackEventInit: TYPE,
RTCTransportStats: TYPE,
Expand Down Expand Up @@ -659,6 +659,8 @@ export const dom = {
HTMLVideoElement: TYPE_VALUE,
HashChangeEvent: TYPE_VALUE,
Headers: TYPE_VALUE,
Highlight: TYPE_VALUE,
HighlightRegistry: TYPE_VALUE,
History: TYPE_VALUE,
IDBCursor: TYPE_VALUE,
IDBCursorWithValue: TYPE_VALUE,
Expand Down Expand Up @@ -848,6 +850,7 @@ export const dom = {
RTCPeerConnectionIceErrorEvent: TYPE_VALUE,
RTCPeerConnectionIceEvent: TYPE_VALUE,
RTCRtpReceiver: TYPE_VALUE,
RTCRtpScriptTransform: TYPE_VALUE,
RTCRtpSender: TYPE_VALUE,
RTCRtpTransceiver: TYPE_VALUE,
RTCSctpTransportEventMap: TYPE,
Expand Down Expand Up @@ -1239,6 +1242,7 @@ export const dom = {
OptionalPostfixToken: TYPE,
OptionalPrefixToken: TYPE,
PerformanceEntryList: TYPE,
RTCRtpTransform: TYPE,
ReadableStreamController: TYPE,
ReadableStreamReadResult: TYPE,
ReadableStreamReader: TYPE,
Expand Down Expand Up @@ -1318,6 +1322,7 @@ export const dom = {
GlobalCompositeOperation: TYPE,
HardwareAcceleration: TYPE,
HdrMetadataType: TYPE,
HighlightType: TYPE,
IDBCursorDirection: TYPE,
IDBRequestReadyState: TYPE,
IDBTransactionDurability: TYPE,
Expand Down Expand Up @@ -1398,6 +1403,7 @@ export const dom = {
RequestCredentials: TYPE,
RequestDestination: TYPE,
RequestMode: TYPE,
RequestPriority: TYPE,
RequestRedirect: TYPE,
ResidentKeyRequirement: TYPE,
ResizeObserverBoxOptions: TYPE,
Expand Down
11 changes: 11 additions & 0 deletions packages/scope-manager/src/lib/es2016.intl.ts
@@ -0,0 +1,11 @@
// 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/repo-tools

import type { ImplicitLibVariableOptions } from '../variable';
import { TYPE_VALUE } from './base-config';

export const es2016_intl = {
Intl: TYPE_VALUE,
} as Record<string, ImplicitLibVariableOptions>;
2 changes: 2 additions & 0 deletions packages/scope-manager/src/lib/es2016.ts
Expand Up @@ -6,8 +6,10 @@
import type { ImplicitLibVariableOptions } from '../variable';
import { es2015 } from './es2015';
import { es2016_array_include } from './es2016.array.include';
import { es2016_intl } from './es2016.intl';

export const es2016 = {
...es2015,
...es2016_array_include,
...es2016_intl,
} as Record<string, ImplicitLibVariableOptions>;
2 changes: 2 additions & 0 deletions packages/scope-manager/src/lib/es2018.full.ts
Expand Up @@ -5,6 +5,7 @@

import type { ImplicitLibVariableOptions } from '../variable';
import { dom } from './dom';
import { dom_asynciterable } from './dom.asynciterable';
import { dom_iterable } from './dom.iterable';
import { es2018 } from './es2018';
import { scripthost } from './scripthost';
Expand All @@ -16,4 +17,5 @@ export const es2018_full = {
...webworker_importscripts,
...scripthost,
...dom_iterable,
...dom_asynciterable,
} as Record<string, ImplicitLibVariableOptions>;
2 changes: 2 additions & 0 deletions packages/scope-manager/src/lib/es2019.full.ts
Expand Up @@ -5,6 +5,7 @@

import type { ImplicitLibVariableOptions } from '../variable';
import { dom } from './dom';
import { dom_asynciterable } from './dom.asynciterable';
import { dom_iterable } from './dom.iterable';
import { es2019 } from './es2019';
import { scripthost } from './scripthost';
Expand All @@ -16,4 +17,5 @@ export const es2019_full = {
...webworker_importscripts,
...scripthost,
...dom_iterable,
...dom_asynciterable,
} as Record<string, ImplicitLibVariableOptions>;
2 changes: 2 additions & 0 deletions packages/scope-manager/src/lib/es2020.full.ts
Expand Up @@ -5,6 +5,7 @@

import type { ImplicitLibVariableOptions } from '../variable';
import { dom } from './dom';
import { dom_asynciterable } from './dom.asynciterable';
import { dom_iterable } from './dom.iterable';
import { es2020 } from './es2020';
import { scripthost } from './scripthost';
Expand All @@ -16,4 +17,5 @@ export const es2020_full = {
...webworker_importscripts,
...scripthost,
...dom_iterable,
...dom_asynciterable,
} as Record<string, ImplicitLibVariableOptions>;
2 changes: 2 additions & 0 deletions packages/scope-manager/src/lib/es2021.full.ts
Expand Up @@ -5,6 +5,7 @@

import type { ImplicitLibVariableOptions } from '../variable';
import { dom } from './dom';
import { dom_asynciterable } from './dom.asynciterable';
import { dom_iterable } from './dom.iterable';
import { es2021 } from './es2021';
import { scripthost } from './scripthost';
Expand All @@ -16,4 +17,5 @@ export const es2021_full = {
...webworker_importscripts,
...scripthost,
...dom_iterable,
...dom_asynciterable,
} as Record<string, ImplicitLibVariableOptions>;
2 changes: 2 additions & 0 deletions packages/scope-manager/src/lib/es2022.full.ts
Expand Up @@ -5,6 +5,7 @@

import type { ImplicitLibVariableOptions } from '../variable';
import { dom } from './dom';
import { dom_asynciterable } from './dom.asynciterable';
import { dom_iterable } from './dom.iterable';
import { es2022 } from './es2022';
import { scripthost } from './scripthost';
Expand All @@ -16,4 +17,5 @@ export const es2022_full = {
...webworker_importscripts,
...scripthost,
...dom_iterable,
...dom_asynciterable,
} as Record<string, ImplicitLibVariableOptions>;
2 changes: 2 additions & 0 deletions packages/scope-manager/src/lib/es2023.full.ts
Expand Up @@ -5,6 +5,7 @@

import type { ImplicitLibVariableOptions } from '../variable';
import { dom } from './dom';
import { dom_asynciterable } from './dom.asynciterable';
import { dom_iterable } from './dom.iterable';
import { es2023 } from './es2023';
import { scripthost } from './scripthost';
Expand All @@ -16,4 +17,5 @@ export const es2023_full = {
...webworker_importscripts,
...scripthost,
...dom_iterable,
...dom_asynciterable,
} as Record<string, ImplicitLibVariableOptions>;
1 change: 1 addition & 0 deletions packages/scope-manager/src/lib/es5.ts
Expand Up @@ -84,6 +84,7 @@ export const es5 = {
Lowercase: TYPE,
Capitalize: TYPE,
Uncapitalize: TYPE,
NoInfer: TYPE,
ThisType: TYPE,
WeakKeyTypes: TYPE,
WeakKey: TYPE,
Expand Down
2 changes: 2 additions & 0 deletions packages/scope-manager/src/lib/es7.ts
Expand Up @@ -6,8 +6,10 @@
import type { ImplicitLibVariableOptions } from '../variable';
import { es2015 } from './es2015';
import { es2016_array_include } from './es2016.array.include';
import { es2016_intl } from './es2016.intl';

export const es7 = {
...es2015,
...es2016_array_include,
...es2016_intl,
} as Record<string, ImplicitLibVariableOptions>;
2 changes: 1 addition & 1 deletion packages/scope-manager/src/lib/esnext.collection.ts
Expand Up @@ -7,5 +7,5 @@ import type { ImplicitLibVariableOptions } from '../variable';
import { TYPE } from './base-config';

export const esnext_collection = {
WeakKeyTypes: TYPE,
MapConstructor: TYPE,
} as Record<string, ImplicitLibVariableOptions>;
2 changes: 2 additions & 0 deletions packages/scope-manager/src/lib/esnext.full.ts
Expand Up @@ -5,6 +5,7 @@

import type { ImplicitLibVariableOptions } from '../variable';
import { dom } from './dom';
import { dom_asynciterable } from './dom.asynciterable';
import { dom_iterable } from './dom.iterable';
import { esnext } from './esnext';
import { scripthost } from './scripthost';
Expand All @@ -16,4 +17,5 @@ export const esnext_full = {
...webworker_importscripts,
...scripthost,
...dom_iterable,
...dom_asynciterable,
} as Record<string, ImplicitLibVariableOptions>;
11 changes: 11 additions & 0 deletions packages/scope-manager/src/lib/esnext.object.ts
@@ -0,0 +1,11 @@
// 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/repo-tools

import type { ImplicitLibVariableOptions } from '../variable';
import { TYPE } from './base-config';

export const esnext_object = {
ObjectConstructor: TYPE,
} as Record<string, ImplicitLibVariableOptions>;
5 changes: 2 additions & 3 deletions packages/scope-manager/src/lib/esnext.promise.ts
Expand Up @@ -4,10 +4,9 @@
// npx nx generate-lib @typescript-eslint/repo-tools

import type { ImplicitLibVariableOptions } from '../variable';
import { TYPE, TYPE_VALUE } from './base-config';
import { TYPE } from './base-config';

export const esnext_promise = {
AggregateError: TYPE_VALUE,
AggregateErrorConstructor: TYPE,
PromiseWithResolvers: TYPE,
PromiseConstructor: TYPE,
} as Record<string, ImplicitLibVariableOptions>;
6 changes: 6 additions & 0 deletions packages/scope-manager/src/lib/esnext.ts
Expand Up @@ -5,13 +5,19 @@

import type { ImplicitLibVariableOptions } from '../variable';
import { es2023 } from './es2023';
import { esnext_collection } from './esnext.collection';
import { esnext_decorators } from './esnext.decorators';
import { esnext_disposable } from './esnext.disposable';
import { esnext_intl } from './esnext.intl';
import { esnext_object } from './esnext.object';
import { esnext_promise } from './esnext.promise';

export const esnext = {
...es2023,
...esnext_intl,
...esnext_decorators,
...esnext_disposable,
...esnext_promise,
...esnext_object,
...esnext_collection,
} as Record<string, ImplicitLibVariableOptions>;
8 changes: 8 additions & 0 deletions packages/scope-manager/src/lib/index.ts
Expand Up @@ -6,6 +6,7 @@
import { decorators } from './decorators';
import { decorators_legacy } from './decorators.legacy';
import { dom } from './dom';
import { dom_asynciterable } from './dom.asynciterable';
import { dom_iterable } from './dom.iterable';
import { es5 } from './es5';
import { es6 } from './es6';
Expand All @@ -23,6 +24,7 @@ import { es2015_symbol_wellknown } from './es2015.symbol.wellknown';
import { es2016 } from './es2016';
import { es2016_array_include } from './es2016.array.include';
import { es2016_full } from './es2016.full';
import { es2016_intl } from './es2016.intl';
import { es2017 } from './es2017';
import { es2017_date } from './es2017.date';
import { es2017_full } from './es2017.full';
Expand Down Expand Up @@ -83,13 +85,15 @@ import { esnext_decorators } from './esnext.decorators';
import { esnext_disposable } from './esnext.disposable';
import { esnext_full } from './esnext.full';
import { esnext_intl } from './esnext.intl';
import { esnext_object } from './esnext.object';
import { esnext_promise } from './esnext.promise';
import { esnext_string } from './esnext.string';
import { esnext_symbol } from './esnext.symbol';
import { esnext_weakref } from './esnext.weakref';
import { lib as libBase } from './lib';
import { scripthost } from './scripthost';
import { webworker } from './webworker';
import { webworker_asynciterable } from './webworker.asynciterable';
import { webworker_importscripts } from './webworker.importscripts';
import { webworker_iterable } from './webworker.iterable';

Expand All @@ -109,9 +113,11 @@ const lib = {
esnext,
dom,
'dom.iterable': dom_iterable,
'dom.asynciterable': dom_asynciterable,
webworker,
'webworker.importscripts': webworker_importscripts,
'webworker.iterable': webworker_iterable,
'webworker.asynciterable': webworker_asynciterable,
scripthost,
'es2015.core': es2015_core,
'es2015.collection': es2015_collection,
Expand All @@ -123,6 +129,7 @@ const lib = {
'es2015.symbol': es2015_symbol,
'es2015.symbol.wellknown': es2015_symbol_wellknown,
'es2016.array.include': es2016_array_include,
'es2016.intl': es2016_intl,
'es2017.date': es2017_date,
'es2017.object': es2017_object,
'es2017.sharedmemory': es2017_sharedmemory,
Expand Down Expand Up @@ -171,6 +178,7 @@ const lib = {
'esnext.promise': esnext_promise,
'esnext.weakref': esnext_weakref,
'esnext.decorators': esnext_decorators,
'esnext.object': esnext_object,
decorators,
'decorators.legacy': decorators_legacy,
'es2016.full': es2016_full,
Expand Down
11 changes: 11 additions & 0 deletions packages/scope-manager/src/lib/webworker.asynciterable.ts
@@ -0,0 +1,11 @@
// 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/repo-tools

import type { ImplicitLibVariableOptions } from '../variable';
import { TYPE } from './base-config';

export const webworker_asynciterable = {
FileSystemDirectoryHandle: TYPE,
} as Record<string, ImplicitLibVariableOptions>;