From 799d99c08c92aab45f3634ce9aae3a0f9d5187a1 Mon Sep 17 00:00:00 2001 From: Brad Zacher Date: Sat, 2 Aug 2025 11:25:35 +0930 Subject: [PATCH 1/2] feat: update to TypeScript 5.9.2 --- package.json | 4 +- .../snapshots/2-TSESTree-Tokens.shot | 14 +- .../snapshots/6-AST-Alignment-Tokens.shot | 158 +++++++++++++++++- .../snapshots/2-TSESTree-Tokens.shot | 14 +- .../snapshots/6-AST-Alignment-Tokens.shot | 26 +-- .../fixtures-with-differences-tokens.shot | 1 + packages/eslint-plugin/package.json | 2 +- packages/parser/package.json | 2 +- packages/project-service/package.json | 2 +- .../scope-manager/src/lib/dom.iterable.ts | 1 + packages/scope-manager/src/lib/dom.ts | 36 +++- .../scope-manager/src/lib/esnext.error.ts | 13 ++ .../src/lib/esnext.sharedmemory.ts | 13 ++ packages/scope-manager/src/lib/esnext.ts | 4 + packages/scope-manager/src/lib/index.ts | 4 + .../src/lib/webworker.iterable.ts | 1 + packages/scope-manager/src/lib/webworker.ts | 20 ++- packages/tsconfig-utils/package.json | 2 +- packages/type-utils/package.json | 2 +- packages/types/src/lib.ts | 2 + packages/typescript-eslint/package.json | 2 +- packages/typescript-estree/package.json | 2 +- .../src/parseSettings/warnAboutTSVersion.ts | 2 +- .../lib/__snapshots__/convert.test.ts.snap | 2 +- packages/utils/package.json | 2 +- tools/scripts/generate-lib.mts | 8 +- tools/scripts/typings/typescript.d.ts | 13 -- yarn.lock | 34 ++-- 28 files changed, 302 insertions(+), 84 deletions(-) create mode 100644 packages/scope-manager/src/lib/esnext.error.ts create mode 100644 packages/scope-manager/src/lib/esnext.sharedmemory.ts delete mode 100644 tools/scripts/typings/typescript.d.ts diff --git a/package.json b/package.json index 33567c469efa..7181cc9af196 100644 --- a/package.json +++ b/package.json @@ -98,7 +98,7 @@ "rimraf": "^5.0.5", "semver": "7.7.0", "tsx": "*", - "typescript": ">=4.8.4 <5.9.0", + "typescript": ">=4.8.4 <6.0.0", "typescript-eslint": "workspace:^", "vite": "^6.3.5", "vitest": "^3.1.3", @@ -114,7 +114,7 @@ "prettier": "3.5.0", "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.7.2", - "typescript": "5.8.2" + "typescript": "5.9.2" }, "packageManager": "yarn@3.8.2", "nx": { diff --git a/packages/ast-spec/src/jsx/JSXAttribute/fixtures/element-non-self-closing/snapshots/2-TSESTree-Tokens.shot b/packages/ast-spec/src/jsx/JSXAttribute/fixtures/element-non-self-closing/snapshots/2-TSESTree-Tokens.shot index 52c93eab8644..1d0b129b61d1 100644 --- a/packages/ast-spec/src/jsx/JSXAttribute/fixtures/element-non-self-closing/snapshots/2-TSESTree-Tokens.shot +++ b/packages/ast-spec/src/jsx/JSXAttribute/fixtures/element-non-self-closing/snapshots/2-TSESTree-Tokens.shot @@ -81,21 +81,11 @@ }, Punctuator { type: "Punctuator", - value: "<", + value: " jsx > JSXAttribute > element-non-self-closing > AST Alignment - Token`] Snapshot Diff: -Compared values have no visual difference. +- TSESTree ++ Babel + + Array [ + Punctuator { + type: 'Punctuator', + value: '<', + + range: [0, 1], + loc: { + start: { column: 0, line: 1 }, + end: { column: 1, line: 1 }, + }, + }, + JSXIdentifier { + type: 'JSXIdentifier', + value: 'App', + + range: [1, 4], + loc: { + start: { column: 1, line: 1 }, + end: { column: 4, line: 1 }, + }, + }, + JSXIdentifier { + type: 'JSXIdentifier', + value: 'foo', + + range: [5, 8], + loc: { + start: { column: 5, line: 1 }, + end: { column: 8, line: 1 }, + }, + }, + Punctuator { + type: 'Punctuator', + value: '=', + + range: [8, 9], + loc: { + start: { column: 8, line: 1 }, + end: { column: 9, line: 1 }, + }, + }, + Punctuator { + type: 'Punctuator', + value: '<', + + range: [9, 10], + loc: { + start: { column: 9, line: 1 }, + end: { column: 10, line: 1 }, + }, + }, + JSXIdentifier { + type: 'JSXIdentifier', + value: 'div', + + range: [10, 13], + loc: { + start: { column: 10, line: 1 }, + end: { column: 13, line: 1 }, + }, + }, + Punctuator { + type: 'Punctuator', + value: '>', + + range: [13, 14], + loc: { + start: { column: 13, line: 1 }, + end: { column: 14, line: 1 }, + }, + }, + JSXText { + type: 'JSXText', + value: 'bar', + + range: [14, 17], + loc: { + start: { column: 14, line: 1 }, + end: { column: 17, line: 1 }, + }, + }, + Punctuator { + type: 'Punctuator', +- value: '', + + range: [22, 23], + loc: { + start: { column: 22, line: 1 }, + end: { column: 23, line: 1 }, + }, + }, + Punctuator { + type: 'Punctuator', + value: '/', + + range: [24, 25], + loc: { + start: { column: 24, line: 1 }, + end: { column: 25, line: 1 }, + }, + }, + Punctuator { + type: 'Punctuator', + value: '>', + + range: [25, 26], + loc: { + start: { column: 25, line: 1 }, + end: { column: 26, line: 1 }, + }, + }, + Punctuator { + type: 'Punctuator', + value: ';', + + range: [26, 27], + loc: { + start: { column: 26, line: 1 }, + end: { column: 27, line: 1 }, + }, + }, + ] diff --git a/packages/ast-spec/src/jsx/JSXNamespacedName/fixtures/component/snapshots/2-TSESTree-Tokens.shot b/packages/ast-spec/src/jsx/JSXNamespacedName/fixtures/component/snapshots/2-TSESTree-Tokens.shot index 4b048a6998fe..559bb0197281 100644 --- a/packages/ast-spec/src/jsx/JSXNamespacedName/fixtures/component/snapshots/2-TSESTree-Tokens.shot +++ b/packages/ast-spec/src/jsx/JSXNamespacedName/fixtures/component/snapshots/2-TSESTree-Tokens.shot @@ -521,21 +521,11 @@ }, Punctuator { type: "Punctuator", - value: "<", + value: " List fixtures with Token differences`] "element/AccessorProperty/fixtures/modifier-private/fixture.ts", "element/AccessorProperty/fixtures/modifier-protected/fixture.ts", "element/AccessorProperty/fixtures/modifier-public/fixture.ts", + "jsx/JSXAttribute/fixtures/element-non-self-closing/fixture.tsx", "jsx/JSXNamespacedName/fixtures/component-dashed/fixture.tsx", "jsx/JSXNamespacedName/fixtures/component/fixture.tsx", "legacy-fixtures/basics/fixtures/abstract-class-with-abstract-readonly-property/fixture.ts", diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 414b1934c311..5fe8658bcb1c 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -94,7 +94,7 @@ "peerDependencies": { "@typescript-eslint/parser": "^8.38.0", "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" }, "funding": { "type": "opencollective", diff --git a/packages/parser/package.json b/packages/parser/package.json index 83d0fe1499f8..907ac8d98418 100644 --- a/packages/parser/package.json +++ b/packages/parser/package.json @@ -48,7 +48,7 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" }, "dependencies": { "@typescript-eslint/scope-manager": "8.38.0", diff --git a/packages/project-service/package.json b/packages/project-service/package.json index c74ab6d96c3e..817ec14ea73f 100644 --- a/packages/project-service/package.json +++ b/packages/project-service/package.json @@ -46,7 +46,7 @@ "typecheck": "yarn run -BT nx typecheck" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" }, "dependencies": { "@typescript-eslint/tsconfig-utils": "^8.38.0", diff --git a/packages/scope-manager/src/lib/dom.iterable.ts b/packages/scope-manager/src/lib/dom.iterable.ts index 2ccd538bc593..e5109bdf2d4b 100644 --- a/packages/scope-manager/src/lib/dom.iterable.ts +++ b/packages/scope-manager/src/lib/dom.iterable.ts @@ -22,6 +22,7 @@ export const dom_iterable: LibDefinition = { ['Cache', TYPE], ['CanvasPath', TYPE], ['CanvasPathDrawingStyles', TYPE], + ['CookieStoreManager', TYPE], ['CustomStateSet', TYPE], ['DOMRectList', TYPE], ['DOMStringList', TYPE], diff --git a/packages/scope-manager/src/lib/dom.ts b/packages/scope-manager/src/lib/dom.ts index 469c43a48f7c..c6d054c1b6bc 100644 --- a/packages/scope-manager/src/lib/dom.ts +++ b/packages/scope-manager/src/lib/dom.ts @@ -42,9 +42,14 @@ export const dom: LibDefinition = { ['AuthenticationExtensionsClientInputs', TYPE], ['AuthenticationExtensionsClientInputsJSON', TYPE], ['AuthenticationExtensionsClientOutputs', TYPE], + ['AuthenticationExtensionsLargeBlobInputs', TYPE], + ['AuthenticationExtensionsLargeBlobInputsJSON', TYPE], + ['AuthenticationExtensionsLargeBlobOutputs', TYPE], ['AuthenticationExtensionsPRFInputs', TYPE], + ['AuthenticationExtensionsPRFInputsJSON', TYPE], ['AuthenticationExtensionsPRFOutputs', TYPE], ['AuthenticationExtensionsPRFValues', TYPE], + ['AuthenticationExtensionsPRFValuesJSON', TYPE], ['AuthenticatorSelectionCriteria', TYPE], ['AvcEncoderConfig', TYPE], ['BiquadFilterOptions', TYPE], @@ -73,6 +78,11 @@ export const dom: LibDefinition = { ['ConstrainULongRange', TYPE], ['ContentVisibilityAutoStateChangeEventInit', TYPE], ['ConvolverOptions', TYPE], + ['CookieChangeEventInit', TYPE], + ['CookieInit', TYPE], + ['CookieListItem', TYPE], + ['CookieStoreDeleteOptions', TYPE], + ['CookieStoreGetOptions', TYPE], ['CredentialCreationOptions', TYPE], ['CredentialPropertiesOutput', TYPE], ['CredentialRequestOptions', TYPE], @@ -126,6 +136,7 @@ export const dom: LibDefinition = { ['GamepadEffectParameters', TYPE], ['GamepadEventInit', TYPE], ['GetAnimationsOptions', TYPE], + ['GetComposedRangesOptions', TYPE], ['GetHTMLOptions', TYPE], ['GetNotificationOptions', TYPE], ['GetRootNodeOptions', TYPE], @@ -148,10 +159,12 @@ export const dom: LibDefinition = { ['ImageDecodeResult', TYPE], ['ImageDecoderInit', TYPE], ['ImageEncodeOptions', TYPE], + ['ImportNodeOptions', TYPE], ['InputEventInit', TYPE], ['IntersectionObserverInit', TYPE], ['JsonWebKey', TYPE], ['KeyAlgorithm', TYPE], + ['KeySystemTrackConfiguration', TYPE], ['KeyboardEventInit', TYPE], ['Keyframe', TYPE], ['KeyframeAnimationOptions', TYPE], @@ -165,6 +178,7 @@ export const dom: LibDefinition = { ['MediaCapabilitiesDecodingInfo', TYPE], ['MediaCapabilitiesEncodingInfo', TYPE], ['MediaCapabilitiesInfo', TYPE], + ['MediaCapabilitiesKeySystemConfiguration', TYPE], ['MediaConfiguration', TYPE], ['MediaDecodingConfiguration', TYPE], ['MediaElementAudioSourceOptions', TYPE], @@ -180,6 +194,7 @@ export const dom: LibDefinition = { ['MediaQueryListEventInit', TYPE], ['MediaRecorderOptions', TYPE], ['MediaSessionActionDetails', TYPE], + ['MediaSettingsRange', TYPE], ['MediaStreamAudioSourceOptions', TYPE], ['MediaStreamConstraints', TYPE], ['MediaStreamTrackEventInit', TYPE], @@ -223,6 +238,8 @@ export const dom: LibDefinition = { ['PeriodicWaveConstraints', TYPE], ['PeriodicWaveOptions', TYPE], ['PermissionDescriptor', TYPE], + ['PhotoCapabilities', TYPE], + ['PhotoSettings', TYPE], ['PictureInPictureEventInit', TYPE], ['PlaneLayout', TYPE], ['PointerEventInit', TYPE], @@ -256,6 +273,7 @@ export const dom: LibDefinition = { ['RTCDataChannelInit', TYPE], ['RTCDtlsFingerprint', TYPE], ['RTCEncodedAudioFrameMetadata', TYPE], + ['RTCEncodedFrameMetadata', TYPE], ['RTCEncodedVideoFrameMetadata', TYPE], ['RTCErrorEventInit', TYPE], ['RTCErrorInit', TYPE], @@ -263,6 +281,7 @@ export const dom: LibDefinition = { ['RTCIceCandidatePairStats', TYPE], ['RTCIceServer', TYPE], ['RTCInboundRtpStreamStats', TYPE], + ['RTCLocalIceCandidateInit', TYPE], ['RTCLocalSessionDescriptionInit', TYPE], ['RTCOfferAnswerOptions', TYPE], ['RTCOfferOptions', TYPE], @@ -318,6 +337,7 @@ export const dom: LibDefinition = { ['ShareData', TYPE], ['SpeechSynthesisErrorEventInit', TYPE], ['SpeechSynthesisEventInit', TYPE], + ['StartViewTransitionOptions', TYPE], ['StaticRangeInit', TYPE], ['StereoPannerOptions', TYPE], ['StorageEstimate', TYPE], @@ -362,6 +382,7 @@ export const dom: LibDefinition = { ['WebTransportErrorOptions', TYPE], ['WebTransportHash', TYPE], ['WebTransportOptions', TYPE], + ['WebTransportSendOptions', TYPE], ['WebTransportSendStreamOptions', TYPE], ['WheelEventInit', TYPE], ['WindowPostMessageOptions', TYPE], @@ -422,6 +443,7 @@ export const dom: LibDefinition = { ['BroadcastChannel', TYPE_VALUE], ['ByteLengthQueuingStrategy', TYPE_VALUE], ['CDATASection', TYPE_VALUE], + ['CSPViolationReportBody', TYPE_VALUE], ['CSSAnimation', TYPE_VALUE], ['CSSConditionRule', TYPE_VALUE], ['CSSContainerRule', TYPE_VALUE], @@ -515,6 +537,10 @@ export const dom: LibDefinition = { ['ConstantSourceNode', TYPE_VALUE], ['ContentVisibilityAutoStateChangeEvent', TYPE_VALUE], ['ConvolverNode', TYPE_VALUE], + ['CookieChangeEvent', TYPE_VALUE], + ['CookieStoreEventMap', TYPE], + ['CookieStore', TYPE_VALUE], + ['CookieStoreManager', TYPE_VALUE], ['CountQueuingStrategy', TYPE_VALUE], ['Credential', TYPE_VALUE], ['CredentialsContainer', TYPE_VALUE], @@ -731,6 +757,7 @@ export const dom: LibDefinition = { ['IdleDeadline', TYPE_VALUE], ['ImageBitmap', TYPE_VALUE], ['ImageBitmapRenderingContext', TYPE_VALUE], + ['ImageCapture', TYPE_VALUE], ['ImageData', TYPE_VALUE], ['ImageDecoder', TYPE_VALUE], ['ImageTrack', TYPE_VALUE], @@ -817,6 +844,7 @@ export const dom: LibDefinition = { ['NavigatorID', TYPE], ['NavigatorLanguage', TYPE], ['NavigatorLocks', TYPE], + ['NavigatorLogin', TYPE_VALUE], ['NavigatorOnLine', TYPE], ['NavigatorPlugins', TYPE], ['NavigatorStorage', TYPE], @@ -1201,9 +1229,9 @@ export const dom: LibDefinition = { ['XPathExpression', TYPE_VALUE], ['XPathResult', TYPE_VALUE], ['XSLTProcessor', TYPE_VALUE], - ['Console', TYPE], ['CSS', TYPE_VALUE], ['WebAssembly', TYPE_VALUE], + ['Console', TYPE], ['AudioDataOutputCallback', TYPE], ['BlobCallback', TYPE], ['CustomElementConstructor', TYPE], @@ -1276,6 +1304,7 @@ export const dom: LibDefinition = { ['ConstrainDOMString', TYPE], ['ConstrainDouble', TYPE], ['ConstrainULong', TYPE], + ['CookieList', TYPE], ['DOMHighResTimeStamp', TYPE], ['EpochTimeStamp', TYPE], ['EventListenerOrEventListenerObject', TYPE], @@ -1301,6 +1330,7 @@ export const dom: LibDefinition = { ['IDBValidKey', TYPE], ['ImageBitmapSource', TYPE], ['ImageBufferSource', TYPE], + ['ImageDataArray', TYPE], ['Int32List', TYPE], ['LineAndPositionSetting', TYPE], ['MediaProvider', TYPE], @@ -1374,6 +1404,7 @@ export const dom: LibDefinition = { ['CompositeOperation', TYPE], ['CompositeOperationOrAuto', TYPE], ['CompressionFormat', TYPE], + ['CookieSameSite', TYPE], ['CredentialMediationRequirement', TYPE], ['DOMParserSupportedType', TYPE], ['DirectionSetting', TYPE], @@ -1386,6 +1417,7 @@ export const dom: LibDefinition = { ['EndOfStreamError', TYPE], ['EndingType', TYPE], ['FileSystemHandleKind', TYPE], + ['FillLightMode', TYPE], ['FillMode', TYPE], ['FontDisplay', TYPE], ['FontFaceLoadStatus', TYPE], @@ -1412,6 +1444,7 @@ export const dom: LibDefinition = { ['LatencyMode', TYPE], ['LineAlignSetting', TYPE], ['LockMode', TYPE], + ['LoginStatus', TYPE], ['MIDIPortConnectionState', TYPE], ['MIDIPortDeviceState', TYPE], ['MIDIPortType', TYPE], @@ -1478,6 +1511,7 @@ export const dom: LibDefinition = { ['ReadableStreamType', TYPE], ['ReadyState', TYPE], ['RecordingState', TYPE], + ['RedEyeReduction', TYPE], ['ReferrerPolicy', TYPE], ['RemotePlaybackState', TYPE], ['RequestCache', TYPE], diff --git a/packages/scope-manager/src/lib/esnext.error.ts b/packages/scope-manager/src/lib/esnext.error.ts new file mode 100644 index 000000000000..fdf38f4d7120 --- /dev/null +++ b/packages/scope-manager/src/lib/esnext.error.ts @@ -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 repo + +import type { LibDefinition } from '../variable'; + +import { TYPE } from './base-config'; + +export const esnext_error: LibDefinition = { + libs: [], + variables: [['ErrorConstructor', TYPE]], +}; diff --git a/packages/scope-manager/src/lib/esnext.sharedmemory.ts b/packages/scope-manager/src/lib/esnext.sharedmemory.ts new file mode 100644 index 000000000000..05c530843e70 --- /dev/null +++ b/packages/scope-manager/src/lib/esnext.sharedmemory.ts @@ -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 repo + +import type { LibDefinition } from '../variable'; + +import { TYPE } from './base-config'; + +export const esnext_sharedmemory: LibDefinition = { + libs: [], + variables: [['Atomics', TYPE]], +}; diff --git a/packages/scope-manager/src/lib/esnext.ts b/packages/scope-manager/src/lib/esnext.ts index 8288f8c9308c..4caeb5d5de7f 100644 --- a/packages/scope-manager/src/lib/esnext.ts +++ b/packages/scope-manager/src/lib/esnext.ts @@ -10,10 +10,12 @@ import { esnext_array } from './esnext.array'; import { esnext_collection } from './esnext.collection'; import { esnext_decorators } from './esnext.decorators'; import { esnext_disposable } from './esnext.disposable'; +import { esnext_error } from './esnext.error'; import { esnext_float16 } from './esnext.float16'; import { esnext_intl } from './esnext.intl'; import { esnext_iterator } from './esnext.iterator'; import { esnext_promise } from './esnext.promise'; +import { esnext_sharedmemory } from './esnext.sharedmemory'; export const esnext: LibDefinition = { libs: [ @@ -26,6 +28,8 @@ export const esnext: LibDefinition = { esnext_iterator, esnext_promise, esnext_float16, + esnext_error, + esnext_sharedmemory, ], variables: [], }; diff --git a/packages/scope-manager/src/lib/index.ts b/packages/scope-manager/src/lib/index.ts index 2b51fe7b2335..b3baf6d6fede 100644 --- a/packages/scope-manager/src/lib/index.ts +++ b/packages/scope-manager/src/lib/index.ts @@ -95,6 +95,7 @@ import { esnext_bigint } from './esnext.bigint'; import { esnext_collection } from './esnext.collection'; import { esnext_decorators } from './esnext.decorators'; import { esnext_disposable } from './esnext.disposable'; +import { esnext_error } from './esnext.error'; import { esnext_float16 } from './esnext.float16'; import { esnext_full } from './esnext.full'; import { esnext_intl } from './esnext.intl'; @@ -102,6 +103,7 @@ import { esnext_iterator } from './esnext.iterator'; import { esnext_object } from './esnext.object'; import { esnext_promise } from './esnext.promise'; import { esnext_regexp } from './esnext.regexp'; +import { esnext_sharedmemory } from './esnext.sharedmemory'; import { esnext_string } from './esnext.string'; import { esnext_symbol } from './esnext.symbol'; import { esnext_weakref } from './esnext.weakref'; @@ -209,6 +211,8 @@ export const lib: ReadonlyMap = new Map< ['esnext.regexp', esnext_regexp], ['esnext.iterator', esnext_iterator], ['esnext.float16', esnext_float16], + ['esnext.error', esnext_error], + ['esnext.sharedmemory', esnext_sharedmemory], ['decorators', decorators], ['decorators.legacy', decorators_legacy], ['es2016.full', es2016_full], diff --git a/packages/scope-manager/src/lib/webworker.iterable.ts b/packages/scope-manager/src/lib/webworker.iterable.ts index 1e02a18e42bf..e42417f0d48e 100644 --- a/packages/scope-manager/src/lib/webworker.iterable.ts +++ b/packages/scope-manager/src/lib/webworker.iterable.ts @@ -16,6 +16,7 @@ export const webworker_iterable: LibDefinition = { ['Cache', TYPE], ['CanvasPath', TYPE], ['CanvasPathDrawingStyles', TYPE], + ['CookieStoreManager', TYPE], ['DOMStringList', TYPE], ['FileList', TYPE], ['FontFaceSet', TYPE], diff --git a/packages/scope-manager/src/lib/webworker.ts b/packages/scope-manager/src/lib/webworker.ts index 17df7198988e..d0c8891975de 100644 --- a/packages/scope-manager/src/lib/webworker.ts +++ b/packages/scope-manager/src/lib/webworker.ts @@ -34,6 +34,10 @@ export const webworker: LibDefinition = { ['CacheQueryOptions', TYPE], ['ClientQueryOptions', TYPE], ['CloseEventInit', TYPE], + ['CookieInit', TYPE], + ['CookieListItem', TYPE], + ['CookieStoreDeleteOptions', TYPE], + ['CookieStoreGetOptions', TYPE], ['CryptoKeyPair', TYPE], ['CustomEventInit', TYPE], ['DOMMatrix2DInit', TYPE], @@ -53,6 +57,7 @@ export const webworker: LibDefinition = { ['EventInit', TYPE], ['EventListenerOptions', TYPE], ['EventSourceInit', TYPE], + ['ExtendableCookieChangeEventInit', TYPE], ['ExtendableEventInit', TYPE], ['ExtendableMessageEventInit', TYPE], ['FetchEventInit', TYPE], @@ -82,12 +87,14 @@ export const webworker: LibDefinition = { ['ImageEncodeOptions', TYPE], ['JsonWebKey', TYPE], ['KeyAlgorithm', TYPE], + ['KeySystemTrackConfiguration', TYPE], ['LockInfo', TYPE], ['LockManagerSnapshot', TYPE], ['LockOptions', TYPE], ['MediaCapabilitiesDecodingInfo', TYPE], ['MediaCapabilitiesEncodingInfo', TYPE], ['MediaCapabilitiesInfo', TYPE], + ['MediaCapabilitiesKeySystemConfiguration', TYPE], ['MediaConfiguration', TYPE], ['MediaDecodingConfiguration', TYPE], ['MediaEncodingConfiguration', TYPE], @@ -107,11 +114,13 @@ export const webworker: LibDefinition = { ['ProgressEventInit', TYPE], ['PromiseRejectionEventInit', TYPE], ['PushEventInit', TYPE], + ['PushSubscriptionChangeEventInit', TYPE], ['PushSubscriptionJSON', TYPE], ['PushSubscriptionOptionsInit', TYPE], ['QueuingStrategy', TYPE], ['QueuingStrategyInit', TYPE], ['RTCEncodedAudioFrameMetadata', TYPE], + ['RTCEncodedFrameMetadata', TYPE], ['RTCEncodedVideoFrameMetadata', TYPE], ['ReadableStreamGetReaderOptions', TYPE], ['ReadableStreamIteratorOptions', TYPE], @@ -159,6 +168,7 @@ export const webworker: LibDefinition = { ['WebTransportErrorOptions', TYPE], ['WebTransportHash', TYPE], ['WebTransportOptions', TYPE], + ['WebTransportSendOptions', TYPE], ['WebTransportSendStreamOptions', TYPE], ['WorkerOptions', TYPE], ['WriteParams', TYPE], @@ -228,6 +238,8 @@ export const webworker: LibDefinition = { ['Clients', TYPE_VALUE], ['CloseEvent', TYPE_VALUE], ['CompressionStream', TYPE_VALUE], + ['CookieStore', TYPE_VALUE], + ['CookieStoreManager', TYPE_VALUE], ['CountQueuingStrategy', TYPE_VALUE], ['Crypto', TYPE_VALUE], ['CryptoKey', TYPE_VALUE], @@ -264,6 +276,7 @@ export const webworker: LibDefinition = { ['EventSourceEventMap', TYPE], ['EventSource', TYPE_VALUE], ['EventTarget', TYPE_VALUE], + ['ExtendableCookieChangeEvent', TYPE_VALUE], ['ExtendableEvent', TYPE_VALUE], ['ExtendableMessageEvent', TYPE_VALUE], ['FetchEvent', TYPE_VALUE], @@ -363,6 +376,7 @@ export const webworker: LibDefinition = { ['PushManager', TYPE_VALUE], ['PushMessageData', TYPE_VALUE], ['PushSubscription', TYPE_VALUE], + ['PushSubscriptionChangeEvent', TYPE_VALUE], ['PushSubscriptionOptions', TYPE_VALUE], ['RTCDataChannelEventMap', TYPE], ['RTCDataChannel', TYPE_VALUE], @@ -470,8 +484,8 @@ export const webworker: LibDefinition = { ['XMLHttpRequestEventTargetEventMap', TYPE], ['XMLHttpRequestEventTarget', TYPE_VALUE], ['XMLHttpRequestUpload', TYPE_VALUE], - ['Console', TYPE], ['WebAssembly', TYPE_VALUE], + ['Console', TYPE], ['AudioDataOutputCallback', TYPE], ['EncodedAudioChunkOutputCallback', TYPE], ['EncodedVideoChunkOutputCallback', TYPE], @@ -505,6 +519,7 @@ export const webworker: LibDefinition = { ['CSSPerspectiveValue', TYPE], ['CSSUnparsedSegment', TYPE], ['CanvasImageSource', TYPE], + ['CookieList', TYPE], ['DOMHighResTimeStamp', TYPE], ['EpochTimeStamp', TYPE], ['EventListenerOrEventListenerObject', TYPE], @@ -528,6 +543,7 @@ export const webworker: LibDefinition = { ['IDBValidKey', TYPE], ['ImageBitmapSource', TYPE], ['ImageBufferSource', TYPE], + ['ImageDataArray', TYPE], ['Int32List', TYPE], ['MessageEventSource', TYPE], ['NamedCurve', TYPE], @@ -567,6 +583,7 @@ export const webworker: LibDefinition = { ['ColorGamut', TYPE], ['ColorSpaceConversion', TYPE], ['CompressionFormat', TYPE], + ['CookieSameSite', TYPE], ['DocumentVisibilityState', TYPE], ['EncodedAudioChunkType', TYPE], ['EncodedVideoChunkType', TYPE], @@ -592,6 +609,7 @@ export const webworker: LibDefinition = { ['LockMode', TYPE], ['MediaDecodingType', TYPE], ['MediaEncodingType', TYPE], + ['MediaKeysRequirement', TYPE], ['NotificationDirection', TYPE], ['NotificationPermission', TYPE], ['OffscreenRenderingContextId', TYPE], diff --git a/packages/tsconfig-utils/package.json b/packages/tsconfig-utils/package.json index 4ffee83ef6bc..6d83c9c81356 100644 --- a/packages/tsconfig-utils/package.json +++ b/packages/tsconfig-utils/package.json @@ -45,7 +45,7 @@ "typecheck": "yarn run -BT nx typecheck" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" }, "devDependencies": { "@vitest/coverage-v8": "^3.1.3", diff --git a/packages/type-utils/package.json b/packages/type-utils/package.json index 519a9c639b8b..c50de2984845 100644 --- a/packages/type-utils/package.json +++ b/packages/type-utils/package.json @@ -52,7 +52,7 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" }, "devDependencies": { "@typescript-eslint/parser": "8.38.0", diff --git a/packages/types/src/lib.ts b/packages/types/src/lib.ts index 73ca1fe943fc..d68fd407c1d4 100644 --- a/packages/types/src/lib.ts +++ b/packages/types/src/lib.ts @@ -94,6 +94,7 @@ export type Lib = | 'esnext.collection' | 'esnext.decorators' | 'esnext.disposable' + | 'esnext.error' | 'esnext.float16' | 'esnext.full' | 'esnext.intl' @@ -101,6 +102,7 @@ export type Lib = | 'esnext.object' | 'esnext.promise' | 'esnext.regexp' + | 'esnext.sharedmemory' | 'esnext.string' | 'esnext.symbol' | 'esnext.weakref' diff --git a/packages/typescript-eslint/package.json b/packages/typescript-eslint/package.json index 7396e05a7644..cff903394e31 100644 --- a/packages/typescript-eslint/package.json +++ b/packages/typescript-eslint/package.json @@ -57,7 +57,7 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" }, "devDependencies": { "@vitest/coverage-v8": "^3.1.3", diff --git a/packages/typescript-estree/package.json b/packages/typescript-estree/package.json index ce6d4b54e5b3..d7917b5903ee 100644 --- a/packages/typescript-estree/package.json +++ b/packages/typescript-estree/package.json @@ -73,7 +73,7 @@ "vitest": "^3.1.3" }, "peerDependencies": { - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" }, "funding": { "type": "opencollective", diff --git a/packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts b/packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts index 8ac2801476bd..2d8f42d52540 100644 --- a/packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts +++ b/packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts @@ -8,7 +8,7 @@ import { version as TYPESCRIPT_ESTREE_VERSION } from '../version'; /** * This needs to be kept in sync with package.json in the typescript-eslint monorepo */ -export const SUPPORTED_TYPESCRIPT_VERSIONS = '>=4.8.4 <5.9.0'; +export const SUPPORTED_TYPESCRIPT_VERSIONS = '>=4.8.4 <6.0.0'; /* * The semver package will ignore prerelease ranges, and we don't want to explicitly document every one diff --git a/packages/typescript-estree/tests/lib/__snapshots__/convert.test.ts.snap b/packages/typescript-estree/tests/lib/__snapshots__/convert.test.ts.snap index 88b6ecabdead..e1699f2c49ec 100644 --- a/packages/typescript-estree/tests/lib/__snapshots__/convert.test.ts.snap +++ b/packages/typescript-estree/tests/lib/__snapshots__/convert.test.ts.snap @@ -274,7 +274,7 @@ exports[`convert > deeplyCopy > should convert node correctly 1`] = ` "imports": undefined, "isDeclarationFile": false, "jsDocParsingMode": 0, - "kind": 307, + "kind": 308, "languageVariant": 1, "languageVersion": 99, "libReferenceDirectives": [], diff --git a/packages/utils/package.json b/packages/utils/package.json index 06f8448a8cdb..4b6743382deb 100644 --- a/packages/utils/package.json +++ b/packages/utils/package.json @@ -68,7 +68,7 @@ }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", - "typescript": ">=4.8.4 <5.9.0" + "typescript": ">=4.8.4 <6.0.0" }, "devDependencies": { "@vitest/coverage-v8": "^3.1.3", diff --git a/tools/scripts/generate-lib.mts b/tools/scripts/generate-lib.mts index 817d25c2a2f8..59e58c0ec4a6 100644 --- a/tools/scripts/generate-lib.mts +++ b/tools/scripts/generate-lib.mts @@ -14,7 +14,7 @@ import fs from 'node:fs'; import path from 'node:path'; import prettier from 'prettier'; import { rimraf } from 'rimraf'; -import ts from 'typescript'; +import * as ts from 'typescript'; import { PACKAGES_SCOPE_MANAGER, @@ -37,9 +37,11 @@ function parseAndAnalyze( return { ast, scopeManager }; } -const libMap = new Map(ts.libMap); +// @ts-expect-error - libMap is private and not typed +const tsLibMap: Map = ts.libMap; +const libMap = new Map(tsLibMap); // add the "full" libs as well - these are used by the default config resolution system -for (const [lib] of ts.libMap) { +for (const [lib] of tsLibMap) { if ( (/^es2\d{3}$/.test(lib) || lib === 'esnext') && // there's no "full" lib for es2015 diff --git a/tools/scripts/typings/typescript.d.ts b/tools/scripts/typings/typescript.d.ts deleted file mode 100644 index 354cbeefda46..000000000000 --- a/tools/scripts/typings/typescript.d.ts +++ /dev/null @@ -1,13 +0,0 @@ -import 'typescript'; - -// aliasing because the TS namespace annoyingly declares its own Map type -type StringMap = Map; -declare module 'typescript' { - /** - * Map of available libraries - * - * The key is the key used in compilerOptions.lib - * The value is the file name - */ - const libMap: StringMap; -} diff --git a/yarn.lock b/yarn.lock index 5557a5f5f1f4..72fb30f201d4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5992,7 +5992,7 @@ __metadata: peerDependencies: "@typescript-eslint/parser": ^8.38.0 eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.9.0" + typescript: ">=4.8.4 <6.0.0" languageName: unknown linkType: soft @@ -6023,7 +6023,7 @@ __metadata: vitest: ^3.1.3 peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.9.0" + typescript: ">=4.8.4 <6.0.0" languageName: unknown linkType: soft @@ -6039,7 +6039,7 @@ __metadata: typescript: "*" vitest: ^3.1.3 peerDependencies: - typescript: ">=4.8.4 <5.9.0" + typescript: ">=4.8.4 <6.0.0" languageName: unknown linkType: soft @@ -6108,7 +6108,7 @@ __metadata: typescript: "*" vitest: ^3.1.3 peerDependencies: - typescript: ">=4.8.4 <5.9.0" + typescript: ">=4.8.4 <6.0.0" languageName: unknown linkType: soft @@ -6130,7 +6130,7 @@ __metadata: vitest: ^3.1.3 peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.9.0" + typescript: ">=4.8.4 <6.0.0" languageName: unknown linkType: soft @@ -6199,7 +6199,7 @@ __metadata: rimraf: ^5.0.5 semver: 7.7.0 tsx: "*" - typescript: ">=4.8.4 <5.9.0" + typescript: ">=4.8.4 <6.0.0" typescript-eslint: "workspace:^" vite: ^6.3.5 vitest: ^3.1.3 @@ -6229,7 +6229,7 @@ __metadata: typescript: "*" vitest: ^3.1.3 peerDependencies: - typescript: ">=4.8.4 <5.9.0" + typescript: ">=4.8.4 <6.0.0" languageName: unknown linkType: soft @@ -6248,7 +6248,7 @@ __metadata: vitest: ^3.1.3 peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.9.0" + typescript: ">=4.8.4 <6.0.0" languageName: unknown linkType: soft @@ -19812,27 +19812,27 @@ __metadata: vitest: ^3.1.3 peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: ">=4.8.4 <5.9.0" + typescript: ">=4.8.4 <6.0.0" languageName: unknown linkType: soft -"typescript@npm:5.8.2": - version: 5.8.2 - resolution: "typescript@npm:5.8.2" +"typescript@npm:5.9.2": + version: 5.9.2 + resolution: "typescript@npm:5.9.2" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: 7f9e3d7ac15da6df713e439e785e51facd65d6450d5f51fab3e8d2f2e3f4eb317080d895480b8e305450cdbcb37e17383e8bf521e7395f8b556e2f2a4730ed86 + checksum: f619cf6773cfe31409279711afd68cdf0859780006c50bc2a7a0c3227f85dea89a3b97248846326f3a17dad72ea90ec27cf61a8387772c680b2252fd02d8497b languageName: node linkType: hard -"typescript@patch:typescript@npm%3A5.8.2#~builtin": - version: 5.8.2 - resolution: "typescript@patch:typescript@npm%3A5.8.2#~builtin::version=5.8.2&hash=b45daf" +"typescript@patch:typescript@npm%3A5.9.2#~builtin": + version: 5.9.2 + resolution: "typescript@patch:typescript@npm%3A5.9.2#~builtin::version=5.9.2&hash=b45daf" bin: tsc: bin/tsc tsserver: bin/tsserver - checksum: a58d19ff9811c1764a299dd83ca20ed8020f0ab642906dafc880121b710751227201531fdc99878158205c356ac79679b0b61ac5b42eda0e28bfb180947a258d + checksum: e42a701947325500008334622321a6ad073f842f5e7d5e7b588a6346b31fdf51d56082b9ce5cef24312ecd3e48d6c0d4d44da7555f65e2feec18cf62ec540385 languageName: node linkType: hard From 42911d95831533f153a06129a392acda870e3cda Mon Sep 17 00:00:00 2001 From: bradzacher Date: Sun, 3 Aug 2025 09:40:04 +0930 Subject: [PATCH 2/2] fix lints --- packages/typescript-estree/src/convert.ts | 3 +++ tools/scripts/generate-lib.mts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/typescript-estree/src/convert.ts b/packages/typescript-estree/src/convert.ts index 7ebc034afdec..e4564c92aa72 100644 --- a/packages/typescript-estree/src/convert.ts +++ b/packages/typescript-estree/src/convert.ts @@ -2181,6 +2181,9 @@ export class Converter { ); if (node.importClause) { + // TODO(bradzacher) swap to `phaseModifier` once we add support for `import defer` + // https://github.com/estree/estree/issues/328 + // eslint-disable-next-line @typescript-eslint/no-deprecated if (node.importClause.isTypeOnly) { result.importKind = 'type'; } diff --git a/tools/scripts/generate-lib.mts b/tools/scripts/generate-lib.mts index 59e58c0ec4a6..7efbb6e536e3 100644 --- a/tools/scripts/generate-lib.mts +++ b/tools/scripts/generate-lib.mts @@ -38,7 +38,7 @@ function parseAndAnalyze( } // @ts-expect-error - libMap is private and not typed -const tsLibMap: Map = ts.libMap; +const tsLibMap = ts.libMap as Map; const libMap = new Map(tsLibMap); // add the "full" libs as well - these are used by the default config resolution system for (const [lib] of tsLibMap) { pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy