From 479f9f6c053874bd584220edf594ec56d6b0b71a Mon Sep 17 00:00:00 2001 From: SUZUKI Sosuke Date: Sun, 13 Aug 2023 17:53:09 +0900 Subject: [PATCH] feat: update to lib types for TS 5.2 RC (#7451) --- package.json | 4 +- packages/scope-manager/src/lib/decorators.ts | 2 + .../scope-manager/src/lib/dom.iterable.ts | 4 + packages/scope-manager/src/lib/dom.ts | 121 +++++++++++++++++- packages/scope-manager/src/lib/es2017.date.ts | 11 ++ packages/scope-manager/src/lib/es2017.ts | 2 + .../src/lib/es2023.collection.ts | 11 ++ packages/scope-manager/src/lib/es2023.ts | 2 + packages/scope-manager/src/lib/es5.ts | 2 + .../src/lib/esnext.collection.ts | 11 ++ .../src/lib/esnext.decorators.ts | 16 +++ .../src/lib/esnext.disposable.ts | 21 +++ packages/scope-manager/src/lib/esnext.ts | 4 + packages/scope-manager/src/lib/index.ts | 10 ++ .../src/lib/webworker.iterable.ts | 4 + packages/scope-manager/src/lib/webworker.ts | 94 ++++++++++++++ packages/scope-manager/tsconfig.spec.json | 2 +- packages/types/src/lib.ts | 83 ++++++------ .../src/parseSettings/warnAboutTSVersion.ts | 2 +- .../typescript-estree/src/version-check.ts | 2 + ...+5.1.6.patch => typescript+5.2.1-rc.patch} | 30 ++--- yarn.lock | 65 ++++++---- 22 files changed, 421 insertions(+), 82 deletions(-) create mode 100644 packages/scope-manager/src/lib/es2017.date.ts create mode 100644 packages/scope-manager/src/lib/es2023.collection.ts create mode 100644 packages/scope-manager/src/lib/esnext.collection.ts create mode 100644 packages/scope-manager/src/lib/esnext.decorators.ts create mode 100644 packages/scope-manager/src/lib/esnext.disposable.ts rename patches/{typescript+5.1.6.patch => typescript+5.2.1-rc.patch} (88%) diff --git a/package.json b/package.json index 8a939290026..a15cc183f7f 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,7 @@ "ts-node": "10.7.0", "tslint": "^6.1.3", "tsx": "^3.12.7", - "typescript": ">=4.3.5 <5.2.0" + "typescript": ">=4.3.5 <5.2.0 || 5.2.1-rc" }, "resolutions": { "@jest/create-cache-key-function": "^29", @@ -143,7 +143,7 @@ "jest-util": "^29", "pretty-format": "^29", "tsx": "^3.12.7", - "typescript": "5.1.6" + "typescript": "5.2.1-rc" }, "packageManager": "yarn@1.22.19" } diff --git a/packages/scope-manager/src/lib/decorators.ts b/packages/scope-manager/src/lib/decorators.ts index cbeb41eba29..958281bea4c 100644 --- a/packages/scope-manager/src/lib/decorators.ts +++ b/packages/scope-manager/src/lib/decorators.ts @@ -9,6 +9,8 @@ import { TYPE } from './base-config'; export const decorators = { ClassMemberDecoratorContext: TYPE, DecoratorContext: TYPE, + DecoratorMetadataObject: TYPE, + DecoratorMetadata: TYPE, ClassDecoratorContext: TYPE, ClassMethodDecoratorContext: TYPE, ClassGetterDecoratorContext: TYPE, diff --git a/packages/scope-manager/src/lib/dom.iterable.ts b/packages/scope-manager/src/lib/dom.iterable.ts index 10c5d0eada1..594de3c38f1 100644 --- a/packages/scope-manager/src/lib/dom.iterable.ts +++ b/packages/scope-manager/src/lib/dom.iterable.ts @@ -11,8 +11,11 @@ export const dom_iterable = { AudioParamMap: TYPE, BaseAudioContext: TYPE, CSSKeyframesRule: TYPE, + CSSNumericArray: TYPE, CSSRuleList: TYPE, CSSStyleDeclaration: TYPE, + CSSTransformValue: TYPE, + CSSUnparsedValue: TYPE, Cache: TYPE, CanvasPath: TYPE, CanvasPathDrawingStyles: TYPE, @@ -55,6 +58,7 @@ export const dom_iterable = { SourceBufferList: TYPE, SpeechRecognitionResult: TYPE, SpeechRecognitionResultList: TYPE, + StylePropertyMapReadOnly: TYPE, StyleSheetList: TYPE, SubtleCrypto: TYPE, TextTrackCueList: TYPE, diff --git a/packages/scope-manager/src/lib/dom.ts b/packages/scope-manager/src/lib/dom.ts index 5976f879492..462c9249866 100644 --- a/packages/scope-manager/src/lib/dom.ts +++ b/packages/scope-manager/src/lib/dom.ts @@ -30,9 +30,12 @@ export const dom = { AuthenticationExtensionsClientInputs: TYPE, AuthenticationExtensionsClientOutputs: TYPE, AuthenticatorSelectionCriteria: TYPE, + AvcEncoderConfig: TYPE, BiquadFilterOptions: TYPE, BlobEventInit: TYPE, BlobPropertyBag: TYPE, + CSSMatrixComponentOptions: TYPE, + CSSNumericType: TYPE, CSSStyleSheetInit: TYPE, CacheQueryOptions: TYPE, CanvasRenderingContext2DSettings: TYPE, @@ -80,12 +83,15 @@ export const dom = { EffectTiming: TYPE, ElementCreationOptions: TYPE, ElementDefinitionOptions: TYPE, + EncodedVideoChunkInit: TYPE, + EncodedVideoChunkMetadata: TYPE, ErrorEventInit: TYPE, EventInit: TYPE, EventListenerOptions: TYPE, EventModifierInit: TYPE, EventSourceInit: TYPE, FilePropertyBag: TYPE, + FileSystemCreateWritableOptions: TYPE, FileSystemFlags: TYPE, FileSystemGetDirectoryOptions: TYPE, FileSystemGetFileOptions: TYPE, @@ -97,6 +103,7 @@ export const dom = { FormDataEventInit: TYPE, FullscreenOptions: TYPE, GainOptions: TYPE, + GamepadEffectParameters: TYPE, GamepadEventInit: TYPE, GetAnimationsOptions: TYPE, GetNotificationOptions: TYPE, @@ -189,11 +196,13 @@ export const dom = { PeriodicWaveOptions: TYPE, PermissionDescriptor: TYPE, PictureInPictureEventInit: TYPE, + PlaneLayout: TYPE, PointerEventInit: TYPE, PopStateEventInit: TYPE, PositionOptions: TYPE, ProgressEventInit: TYPE, PromiseRejectionEventInit: TYPE, + PropertyDefinition: TYPE, PropertyIndexedKeyframes: TYPE, PublicKeyCredentialCreationOptions: TYPE, PublicKeyCredentialDescriptor: TYPE, @@ -218,6 +227,7 @@ export const dom = { RTCErrorEventInit: TYPE, RTCErrorInit: TYPE, RTCIceCandidateInit: TYPE, + RTCIceCandidatePair: TYPE, RTCIceCandidatePairStats: TYPE, RTCIceServer: TYPE, RTCInboundRtpStreamStats: TYPE, @@ -230,6 +240,7 @@ export const dom = { RTCReceivedRtpStreamStats: TYPE, RTCRtcpParameters: TYPE, RTCRtpCapabilities: TYPE, + RTCRtpCodec: TYPE, RTCRtpCodecCapability: TYPE, RTCRtpCodecParameters: TYPE, RTCRtpCodingParameters: TYPE, @@ -253,6 +264,7 @@ export const dom = { ReadableStreamReadValueResult: TYPE, ReadableWritablePair: TYPE, RegistrationOptions: TYPE, + ReportingObserverOptions: TYPE, RequestInit: TYPE, ResizeObserverOptions: TYPE, ResponseInit: TYPE, @@ -283,6 +295,7 @@ export const dom = { TextDecodeOptions: TYPE, TextDecoderOptions: TYPE, TextEncoderEncodeIntoResult: TYPE, + ToggleEventInit: TYPE, TouchEventInit: TYPE, TouchInit: TYPE, TrackEventInit: TYPE, @@ -297,14 +310,30 @@ export const dom = { ValidityStateFlags: TYPE, VideoColorSpaceInit: TYPE, VideoConfiguration: TYPE, + VideoDecoderConfig: TYPE, + VideoDecoderInit: TYPE, + VideoDecoderSupport: TYPE, + VideoEncoderConfig: TYPE, + VideoEncoderEncodeOptions: TYPE, + VideoEncoderInit: TYPE, + VideoEncoderSupport: TYPE, + VideoFrameBufferInit: TYPE, VideoFrameCallbackMetadata: TYPE, + VideoFrameCopyToOptions: TYPE, + VideoFrameInit: TYPE, WaveShaperOptions: TYPE, WebGLContextAttributes: TYPE, WebGLContextEventInit: TYPE, + WebTransportCloseInfo: TYPE, + WebTransportErrorOptions: TYPE, + WebTransportHash: TYPE, + WebTransportOptions: TYPE, + WebTransportSendStreamOptions: TYPE, WheelEventInit: TYPE, WindowPostMessageOptions: TYPE, WorkerOptions: TYPE, WorkletOptions: TYPE, + WriteParams: TYPE, NodeFilter: TYPE_VALUE, XPathNSResolver: TYPE, ANGLE_instanced_arrays: TYPE, @@ -362,21 +391,48 @@ export const dom = { CSSFontFeatureValuesRule: TYPE_VALUE, CSSFontPaletteValuesRule: TYPE_VALUE, CSSGroupingRule: TYPE_VALUE, + CSSImageValue: TYPE_VALUE, CSSImportRule: TYPE_VALUE, CSSKeyframeRule: TYPE_VALUE, CSSKeyframesRule: TYPE_VALUE, + CSSKeywordValue: TYPE_VALUE, CSSLayerBlockRule: TYPE_VALUE, CSSLayerStatementRule: TYPE_VALUE, + CSSMathClamp: TYPE_VALUE, + CSSMathInvert: TYPE_VALUE, + CSSMathMax: TYPE_VALUE, + CSSMathMin: TYPE_VALUE, + CSSMathNegate: TYPE_VALUE, + CSSMathProduct: TYPE_VALUE, + CSSMathSum: TYPE_VALUE, + CSSMathValue: TYPE_VALUE, + CSSMatrixComponent: TYPE_VALUE, CSSMediaRule: TYPE_VALUE, CSSNamespaceRule: TYPE_VALUE, + CSSNumericArray: TYPE_VALUE, + CSSNumericValue: TYPE_VALUE, CSSPageRule: TYPE_VALUE, + CSSPerspective: TYPE_VALUE, + CSSPropertyRule: TYPE_VALUE, + CSSRotate: TYPE_VALUE, CSSRule: TYPE_VALUE, CSSRuleList: TYPE_VALUE, + CSSScale: TYPE_VALUE, + CSSSkew: TYPE_VALUE, + CSSSkewX: TYPE_VALUE, + CSSSkewY: TYPE_VALUE, CSSStyleDeclaration: TYPE_VALUE, CSSStyleRule: TYPE_VALUE, CSSStyleSheet: TYPE_VALUE, + CSSStyleValue: TYPE_VALUE, CSSSupportsRule: TYPE_VALUE, + CSSTransformComponent: TYPE_VALUE, + CSSTransformValue: TYPE_VALUE, CSSTransition: TYPE_VALUE, + CSSTranslate: TYPE_VALUE, + CSSUnitValue: TYPE_VALUE, + CSSUnparsedValue: TYPE_VALUE, + CSSVariableReferenceValue: TYPE_VALUE, Cache: TYPE_VALUE, CacheStorage: TYPE_VALUE, CanvasCaptureMediaStreamTrack: TYPE_VALUE, @@ -410,6 +466,7 @@ export const dom = { CloseEvent: TYPE_VALUE, Comment: TYPE_VALUE, CompositionEvent: TYPE_VALUE, + CompressionStream: TYPE_VALUE, ConstantSourceNode: TYPE_VALUE, ConvolverNode: TYPE_VALUE, CountQueuingStrategy: TYPE_VALUE, @@ -440,6 +497,7 @@ export const dom = { DataTransfer: TYPE_VALUE, DataTransferItem: TYPE_VALUE, DataTransferItemList: TYPE_VALUE, + DecompressionStream: TYPE_VALUE, DelayNode: TYPE_VALUE, DeviceMotionEvent: TYPE_VALUE, DeviceMotionEventAcceleration: TYPE, @@ -469,6 +527,7 @@ export const dom = { ElementCSSInlineStyle: TYPE, ElementContentEditable: TYPE, ElementInternals: TYPE_VALUE, + EncodedVideoChunk: TYPE_VALUE, ErrorEvent: TYPE_VALUE, Event: TYPE_VALUE, EventCounts: TYPE_VALUE, @@ -490,6 +549,7 @@ export const dom = { FileSystemFileEntry: TYPE_VALUE, FileSystemFileHandle: TYPE_VALUE, FileSystemHandle: TYPE_VALUE, + FileSystemWritableFileStream: TYPE_VALUE, FocusEvent: TYPE_VALUE, FontFace: TYPE_VALUE, FontFaceSetEventMap: TYPE, @@ -689,6 +749,7 @@ export const dom = { NavigationPreloadManager: TYPE_VALUE, Navigator: TYPE_VALUE, NavigatorAutomationInformation: TYPE, + NavigatorBadge: TYPE, NavigatorConcurrentHardware: TYPE, NavigatorContentUtils: TYPE, NavigatorCookies: TYPE, @@ -758,6 +819,7 @@ export const dom = { PluginArray: TYPE_VALUE, PointerEvent: TYPE_VALUE, PopStateEvent: TYPE_VALUE, + PopoverInvokerElement: TYPE, ProcessingInstruction: TYPE_VALUE, ProgressEvent: TYPE_VALUE, PromiseRejectionEvent: TYPE_VALUE, @@ -804,6 +866,9 @@ export const dom = { ReadableStreamGenericReader: TYPE, RemotePlaybackEventMap: TYPE, RemotePlayback: TYPE_VALUE, + Report: TYPE_VALUE, + ReportBody: TYPE_VALUE, + ReportingObserver: TYPE_VALUE, Request: TYPE_VALUE, ResizeObserver: TYPE_VALUE, ResizeObserverEntry: TYPE_VALUE, @@ -947,6 +1012,8 @@ export const dom = { StorageEvent: TYPE_VALUE, StorageManager: TYPE_VALUE, StyleMedia: TYPE, + StylePropertyMap: TYPE_VALUE, + StylePropertyMapReadOnly: TYPE_VALUE, StyleSheet: TYPE_VALUE, StyleSheetList: TYPE_VALUE, SubmitEvent: TYPE_VALUE, @@ -967,6 +1034,7 @@ export const dom = { TextTrackListEventMap: TYPE, TextTrackList: TYPE_VALUE, TimeRanges: TYPE_VALUE, + ToggleEvent: TYPE_VALUE, Touch: TYPE_VALUE, TouchEvent: TYPE_VALUE, TouchList: TYPE_VALUE, @@ -979,10 +1047,16 @@ export const dom = { URL: TYPE_VALUE, webkitURL: TYPE_VALUE, URLSearchParams: TYPE_VALUE, + UserActivation: TYPE_VALUE, VTTCue: TYPE_VALUE, VTTRegion: TYPE_VALUE, ValidityState: TYPE_VALUE, VideoColorSpace: TYPE_VALUE, + VideoDecoderEventMap: TYPE, + VideoDecoder: TYPE_VALUE, + VideoEncoderEventMap: TYPE, + VideoEncoder: TYPE_VALUE, + VideoFrame: TYPE_VALUE, VideoPlaybackQuality: TYPE_VALUE, VisualViewportEventMap: TYPE, VisualViewport: TYPE_VALUE, @@ -990,6 +1064,7 @@ export const dom = { WEBGL_compressed_texture_astc: TYPE, WEBGL_compressed_texture_etc: TYPE, WEBGL_compressed_texture_etc1: TYPE, + WEBGL_compressed_texture_pvrtc: TYPE, WEBGL_compressed_texture_s3tc: TYPE, WEBGL_compressed_texture_s3tc_srgb: TYPE, WEBGL_debug_renderer_info: TYPE, @@ -998,6 +1073,9 @@ export const dom = { WEBGL_draw_buffers: TYPE, WEBGL_lose_context: TYPE, WEBGL_multi_draw: TYPE, + WakeLock: TYPE_VALUE, + WakeLockSentinelEventMap: TYPE, + WakeLockSentinel: TYPE_VALUE, WaveShaperNode: TYPE_VALUE, WebGL2RenderingContext: TYPE_VALUE, WebGL2RenderingContextBase: TYPE, @@ -1023,6 +1101,10 @@ export const dom = { WebGLVertexArrayObjectOES: TYPE, WebSocketEventMap: TYPE, WebSocket: TYPE_VALUE, + WebTransport: TYPE_VALUE, + WebTransportBidirectionalStream: TYPE_VALUE, + WebTransportDatagramDuplexStream: TYPE_VALUE, + WebTransportError: TYPE_VALUE, WheelEvent: TYPE_VALUE, WindowEventMap: TYPE, Window: TYPE_VALUE, @@ -1056,6 +1138,7 @@ export const dom = { CustomElementConstructor: TYPE, DecodeErrorCallback: TYPE, DecodeSuccessCallback: TYPE, + EncodedVideoChunkOutputCallback: TYPE, ErrorCallback: TYPE, FileCallback: TYPE, FileSystemEntriesCallback: TYPE, @@ -1077,6 +1160,7 @@ export const dom = { RTCPeerConnectionErrorCallback: TYPE, RTCSessionDescriptionCallback: TYPE, RemotePlaybackAvailabilityCallback: TYPE, + ReportingObserverCallback: TYPE, ResizeObserverCallback: TYPE, TransformerFlushCallback: TYPE, TransformerStartCallback: TYPE, @@ -1088,21 +1172,30 @@ export const dom = { UnderlyingSourceCancelCallback: TYPE, UnderlyingSourcePullCallback: TYPE, UnderlyingSourceStartCallback: TYPE, + VideoFrameOutputCallback: TYPE, VideoFrameRequestCallback: TYPE, VoidFunction: TYPE, + WebCodecsErrorCallback: TYPE, HTMLElementTagNameMap: TYPE, HTMLElementDeprecatedTagNameMap: TYPE, SVGElementTagNameMap: TYPE, MathMLElementTagNameMap: TYPE, ElementTagNameMap: TYPE, AlgorithmIdentifier: TYPE, + AllowSharedBufferSource: TYPE, + AutoFill: TYPE, + AutoFillField: TYPE, + AutoFillSection: TYPE, BigInteger: TYPE, BinaryData: TYPE, BlobPart: TYPE, BodyInit: TYPE, BufferSource: TYPE, COSEAlgorithmIdentifier: TYPE, + CSSKeywordish: TYPE, CSSNumberish: TYPE, + CSSPerspectiveValue: TYPE, + CSSUnparsedSegment: TYPE, CanvasImageSource: TYPE, ClipboardItemData: TYPE, ClipboardItems: TYPE, @@ -1113,6 +1206,7 @@ export const dom = { DOMHighResTimeStamp: TYPE, EpochTimeStamp: TYPE, EventListenerOrEventListenerObject: TYPE, + FileSystemWriteChunkType: TYPE, Float32List: TYPE, FormDataEntryValue: TYPE, GLbitfield: TYPE, @@ -1142,11 +1236,14 @@ export const dom = { OffscreenRenderingContext: TYPE, OnBeforeUnloadEventHandler: TYPE, OnErrorEventHandler: TYPE, + OptionalPostfixToken: TYPE, + OptionalPrefixToken: TYPE, PerformanceEntryList: TYPE, ReadableStreamController: TYPE, ReadableStreamReadResult: TYPE, ReadableStreamReader: TYPE, RenderingContext: TYPE, + ReportList: TYPE, RequestInfo: TYPE, TexImageSource: TYPE, TimerHandler: TYPE, @@ -1156,6 +1253,7 @@ export const dom = { WindowProxy: TYPE, XMLHttpRequestBodyInit: TYPE, AlignSetting: TYPE, + AlphaOption: TYPE, AnimationPlayState: TYPE, AnimationReplaceState: TYPE, AppendMode: TYPE, @@ -1164,10 +1262,19 @@ export const dom = { AudioContextState: TYPE, AuthenticatorAttachment: TYPE, AuthenticatorTransport: TYPE, + AutoFillAddressKind: TYPE, + AutoFillBase: TYPE, + AutoFillContactField: TYPE, + AutoFillContactKind: TYPE, + AutoFillCredentialField: TYPE, + AutoFillNormalField: TYPE, AutoKeyword: TYPE, AutomationRate: TYPE, + AvcBitstreamFormat: TYPE, BinaryType: TYPE, BiquadFilterType: TYPE, + CSSMathOperator: TYPE, + CSSNumericBaseType: TYPE, CanPlayTypeResult: TYPE, CanvasDirection: TYPE, CanvasFillRule: TYPE, @@ -1182,10 +1289,12 @@ export const dom = { ChannelCountMode: TYPE, ChannelInterpretation: TYPE, ClientTypes: TYPE, + CodecState: TYPE, ColorGamut: TYPE, ColorSpaceConversion: TYPE, CompositeOperation: TYPE, CompositeOperationOrAuto: TYPE, + CompressionFormat: TYPE, CredentialMediationRequirement: TYPE, DOMParserSupportedType: TYPE, DirectionSetting: TYPE, @@ -1193,6 +1302,7 @@ export const dom = { DistanceModelType: TYPE, DocumentReadyState: TYPE, DocumentVisibilityState: TYPE, + EncodedVideoChunkType: TYPE, EndOfStreamError: TYPE, EndingType: TYPE, FileSystemHandleKind: TYPE, @@ -1202,8 +1312,11 @@ export const dom = { FontFaceSetLoadStatus: TYPE, FullscreenNavigationUI: TYPE, GamepadHapticActuatorType: TYPE, + GamepadHapticEffectType: TYPE, + GamepadHapticsResult: TYPE, GamepadMappingType: TYPE, GlobalCompositeOperation: TYPE, + HardwareAcceleration: TYPE, HdrMetadataType: TYPE, IDBCursorDirection: TYPE, IDBRequestReadyState: TYPE, @@ -1216,6 +1329,7 @@ export const dom = { KeyFormat: TYPE, KeyType: TYPE, KeyUsage: TYPE, + LatencyMode: TYPE, LineAlignSetting: TYPE, LockMode: TYPE, MIDIPortConnectionState: TYPE, @@ -1236,7 +1350,6 @@ export const dom = { NotificationDirection: TYPE, NotificationPermission: TYPE, OffscreenRenderingContextId: TYPE, - OrientationLockType: TYPE, OrientationType: TYPE, OscillatorType: TYPE, OverSampleType: TYPE, @@ -1307,10 +1420,16 @@ export const dom = { TransferFunction: TYPE, UserVerificationRequirement: TYPE, VideoColorPrimaries: TYPE, + VideoEncoderBitrateMode: TYPE, VideoFacingModeEnum: TYPE, VideoMatrixCoefficients: TYPE, + VideoPixelFormat: TYPE, VideoTransferCharacteristics: TYPE, + WakeLockType: TYPE, WebGLPowerPreference: TYPE, + WebTransportCongestionControl: TYPE, + WebTransportErrorSource: TYPE, WorkerType: TYPE, + WriteCommandType: TYPE, XMLHttpRequestResponseType: TYPE, } as Record; diff --git a/packages/scope-manager/src/lib/es2017.date.ts b/packages/scope-manager/src/lib/es2017.date.ts new file mode 100644 index 00000000000..031a79e51fc --- /dev/null +++ b/packages/scope-manager/src/lib/es2017.date.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/scope-manager + +import type { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; + +export const es2017_date = { + DateConstructor: TYPE, +} as Record; diff --git a/packages/scope-manager/src/lib/es2017.ts b/packages/scope-manager/src/lib/es2017.ts index 3cbafd35b16..ec07b52c5a4 100644 --- a/packages/scope-manager/src/lib/es2017.ts +++ b/packages/scope-manager/src/lib/es2017.ts @@ -5,6 +5,7 @@ import type { ImplicitLibVariableOptions } from '../variable'; import { es2016 } from './es2016'; +import { es2017_date } from './es2017.date'; import { es2017_intl } from './es2017.intl'; import { es2017_object } from './es2017.object'; import { es2017_sharedmemory } from './es2017.sharedmemory'; @@ -18,4 +19,5 @@ export const es2017 = { ...es2017_string, ...es2017_intl, ...es2017_typedarrays, + ...es2017_date, } as Record; diff --git a/packages/scope-manager/src/lib/es2023.collection.ts b/packages/scope-manager/src/lib/es2023.collection.ts new file mode 100644 index 00000000000..12ef36c331b --- /dev/null +++ b/packages/scope-manager/src/lib/es2023.collection.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/scope-manager + +import type { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; + +export const es2023_collection = { + WeakKeyTypes: TYPE, +} as Record; diff --git a/packages/scope-manager/src/lib/es2023.ts b/packages/scope-manager/src/lib/es2023.ts index 9e98d376611..a3da668dd59 100644 --- a/packages/scope-manager/src/lib/es2023.ts +++ b/packages/scope-manager/src/lib/es2023.ts @@ -6,8 +6,10 @@ import type { ImplicitLibVariableOptions } from '../variable'; import { es2022 } from './es2022'; import { es2023_array } from './es2023.array'; +import { es2023_collection } from './es2023.collection'; export const es2023 = { ...es2022, ...es2023_array, + ...es2023_collection, } as Record; diff --git a/packages/scope-manager/src/lib/es5.ts b/packages/scope-manager/src/lib/es5.ts index 94c6eff46d0..9be707e1ff0 100644 --- a/packages/scope-manager/src/lib/es5.ts +++ b/packages/scope-manager/src/lib/es5.ts @@ -84,6 +84,8 @@ export const es5 = { Capitalize: TYPE, Uncapitalize: TYPE, ThisType: TYPE, + WeakKeyTypes: TYPE, + WeakKey: TYPE, ArrayBuffer: TYPE_VALUE, ArrayBufferTypes: TYPE, ArrayBufferLike: TYPE, diff --git a/packages/scope-manager/src/lib/esnext.collection.ts b/packages/scope-manager/src/lib/esnext.collection.ts new file mode 100644 index 00000000000..2b5c49b7aeb --- /dev/null +++ b/packages/scope-manager/src/lib/esnext.collection.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/scope-manager + +import type { ImplicitLibVariableOptions } from '../variable'; +import { TYPE } from './base-config'; + +export const esnext_collection = { + WeakKeyTypes: TYPE, +} as Record; diff --git a/packages/scope-manager/src/lib/esnext.decorators.ts b/packages/scope-manager/src/lib/esnext.decorators.ts new file mode 100644 index 00000000000..5a5a5f93bc2 --- /dev/null +++ b/packages/scope-manager/src/lib/esnext.decorators.ts @@ -0,0 +1,16 @@ +// 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'; +import { decorators } from './decorators'; +import { es2015_symbol } from './es2015.symbol'; + +export const esnext_decorators = { + ...es2015_symbol, + ...decorators, + SymbolConstructor: TYPE, + Function: TYPE, +} as Record; diff --git a/packages/scope-manager/src/lib/esnext.disposable.ts b/packages/scope-manager/src/lib/esnext.disposable.ts new file mode 100644 index 00000000000..9bcaa62ec52 --- /dev/null +++ b/packages/scope-manager/src/lib/esnext.disposable.ts @@ -0,0 +1,21 @@ +// 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, TYPE_VALUE } from './base-config'; +import { es2015_symbol } from './es2015.symbol'; + +export const esnext_disposable = { + ...es2015_symbol, + SymbolConstructor: TYPE, + Disposable: TYPE, + AsyncDisposable: TYPE, + SuppressedError: TYPE_VALUE, + SuppressedErrorConstructor: TYPE, + DisposableStack: TYPE_VALUE, + DisposableStackConstructor: TYPE, + AsyncDisposableStack: TYPE_VALUE, + AsyncDisposableStackConstructor: TYPE, +} as Record; diff --git a/packages/scope-manager/src/lib/esnext.ts b/packages/scope-manager/src/lib/esnext.ts index 72089f282dc..a2498b34c5a 100644 --- a/packages/scope-manager/src/lib/esnext.ts +++ b/packages/scope-manager/src/lib/esnext.ts @@ -5,9 +5,13 @@ import type { ImplicitLibVariableOptions } from '../variable'; import { es2023 } from './es2023'; +import { esnext_decorators } from './esnext.decorators'; +import { esnext_disposable } from './esnext.disposable'; import { esnext_intl } from './esnext.intl'; export const esnext = { ...es2023, ...esnext_intl, + ...esnext_decorators, + ...esnext_disposable, } as Record; diff --git a/packages/scope-manager/src/lib/index.ts b/packages/scope-manager/src/lib/index.ts index a91568b6be6..b3d4ab1a78f 100644 --- a/packages/scope-manager/src/lib/index.ts +++ b/packages/scope-manager/src/lib/index.ts @@ -24,6 +24,7 @@ import { es2016 } from './es2016'; import { es2016_array_include } from './es2016.array.include'; import { es2016_full } from './es2016.full'; import { es2017 } from './es2017'; +import { es2017_date } from './es2017.date'; import { es2017_full } from './es2017.full'; import { es2017_intl } from './es2017.intl'; import { es2017_object } from './es2017.object'; @@ -71,11 +72,15 @@ import { es2022_sharedmemory } from './es2022.sharedmemory'; import { es2022_string } from './es2022.string'; import { es2023 } from './es2023'; import { es2023_array } from './es2023.array'; +import { es2023_collection } from './es2023.collection'; import { es2023_full } from './es2023.full'; import { esnext } from './esnext'; import { esnext_array } from './esnext.array'; import { esnext_asynciterable } from './esnext.asynciterable'; 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_full } from './esnext.full'; import { esnext_intl } from './esnext.intl'; import { esnext_promise } from './esnext.promise'; @@ -118,6 +123,7 @@ const lib = { 'es2015.symbol': es2015_symbol, 'es2015.symbol.wellknown': es2015_symbol_wellknown, 'es2016.array.include': es2016_array_include, + 'es2017.date': es2017_date, 'es2017.object': es2017_object, 'es2017.sharedmemory': es2017_sharedmemory, 'es2017.string': es2017_string, @@ -153,14 +159,18 @@ const lib = { 'es2022.string': es2022_string, 'es2022.regexp': es2022_regexp, 'es2023.array': es2023_array, + 'es2023.collection': es2023_collection, 'esnext.array': esnext_array, + 'esnext.collection': esnext_collection, 'esnext.symbol': esnext_symbol, 'esnext.asynciterable': esnext_asynciterable, 'esnext.intl': esnext_intl, + 'esnext.disposable': esnext_disposable, 'esnext.bigint': esnext_bigint, 'esnext.string': esnext_string, 'esnext.promise': esnext_promise, 'esnext.weakref': esnext_weakref, + 'esnext.decorators': esnext_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 5ff03255ece..7bdb8cf82a2 100644 --- a/packages/scope-manager/src/lib/webworker.iterable.ts +++ b/packages/scope-manager/src/lib/webworker.iterable.ts @@ -7,6 +7,9 @@ import type { ImplicitLibVariableOptions } from '../variable'; import { TYPE } from './base-config'; export const webworker_iterable = { + CSSNumericArray: TYPE, + CSSTransformValue: TYPE, + CSSUnparsedValue: TYPE, Cache: TYPE, CanvasPath: TYPE, CanvasPathDrawingStyles: TYPE, @@ -18,6 +21,7 @@ export const webworker_iterable = { IDBDatabase: TYPE, IDBObjectStore: TYPE, MessageEvent: TYPE, + StylePropertyMapReadOnly: TYPE, SubtleCrypto: TYPE, URLSearchParams: TYPE, WEBGL_draw_buffers: TYPE, diff --git a/packages/scope-manager/src/lib/webworker.ts b/packages/scope-manager/src/lib/webworker.ts index 5e2aaad12f4..bec9a0f3f3b 100644 --- a/packages/scope-manager/src/lib/webworker.ts +++ b/packages/scope-manager/src/lib/webworker.ts @@ -16,7 +16,10 @@ export const webworker = { AesKeyGenParams: TYPE, Algorithm: TYPE, AudioConfiguration: TYPE, + AvcEncoderConfig: TYPE, BlobPropertyBag: TYPE, + CSSMatrixComponentOptions: TYPE, + CSSNumericType: TYPE, CacheQueryOptions: TYPE, ClientQueryOptions: TYPE, CloseEventInit: TYPE, @@ -31,6 +34,8 @@ export const webworker = { EcKeyImportParams: TYPE, EcdhKeyDeriveParams: TYPE, EcdsaParams: TYPE, + EncodedVideoChunkInit: TYPE, + EncodedVideoChunkMetadata: TYPE, ErrorEventInit: TYPE, EventInit: TYPE, EventListenerOptions: TYPE, @@ -39,6 +44,7 @@ export const webworker = { ExtendableMessageEventInit: TYPE, FetchEventInit: TYPE, FilePropertyBag: TYPE, + FileSystemCreateWritableOptions: TYPE, FileSystemGetDirectoryOptions: TYPE, FileSystemGetFileOptions: TYPE, FileSystemReadWriteOptions: TYPE, @@ -81,6 +87,7 @@ export const webworker = { PerformanceMeasureOptions: TYPE, PerformanceObserverInit: TYPE, PermissionDescriptor: TYPE, + PlaneLayout: TYPE, ProgressEventInit: TYPE, PromiseRejectionEventInit: TYPE, PushEventInit: TYPE, @@ -95,6 +102,7 @@ export const webworker = { ReadableStreamReadValueResult: TYPE, ReadableWritablePair: TYPE, RegistrationOptions: TYPE, + ReportingObserverOptions: TYPE, RequestInit: TYPE, ResponseInit: TYPE, RsaHashedImportParams: TYPE, @@ -117,9 +125,25 @@ export const webworker = { UnderlyingSource: TYPE, VideoColorSpaceInit: TYPE, VideoConfiguration: TYPE, + VideoDecoderConfig: TYPE, + VideoDecoderInit: TYPE, + VideoDecoderSupport: TYPE, + VideoEncoderConfig: TYPE, + VideoEncoderEncodeOptions: TYPE, + VideoEncoderInit: TYPE, + VideoEncoderSupport: TYPE, + VideoFrameBufferInit: TYPE, + VideoFrameCopyToOptions: TYPE, + VideoFrameInit: TYPE, WebGLContextAttributes: TYPE, WebGLContextEventInit: TYPE, + WebTransportCloseInfo: TYPE, + WebTransportErrorOptions: TYPE, + WebTransportHash: TYPE, + WebTransportOptions: TYPE, + WebTransportSendStreamOptions: TYPE, WorkerOptions: TYPE, + WriteParams: TYPE, ANGLE_instanced_arrays: TYPE, AbortController: TYPE_VALUE, AbortSignalEventMap: TYPE, @@ -132,6 +156,32 @@ export const webworker = { BroadcastChannelEventMap: TYPE, BroadcastChannel: TYPE_VALUE, ByteLengthQueuingStrategy: TYPE_VALUE, + CSSImageValue: TYPE_VALUE, + CSSKeywordValue: TYPE_VALUE, + CSSMathClamp: TYPE_VALUE, + CSSMathInvert: TYPE_VALUE, + CSSMathMax: TYPE_VALUE, + CSSMathMin: TYPE_VALUE, + CSSMathNegate: TYPE_VALUE, + CSSMathProduct: TYPE_VALUE, + CSSMathSum: TYPE_VALUE, + CSSMathValue: TYPE_VALUE, + CSSMatrixComponent: TYPE_VALUE, + CSSNumericArray: TYPE_VALUE, + CSSNumericValue: TYPE_VALUE, + CSSPerspective: TYPE_VALUE, + CSSRotate: TYPE_VALUE, + CSSScale: TYPE_VALUE, + CSSSkew: TYPE_VALUE, + CSSSkewX: TYPE_VALUE, + CSSSkewY: TYPE_VALUE, + CSSStyleValue: TYPE_VALUE, + CSSTransformComponent: TYPE_VALUE, + CSSTransformValue: TYPE_VALUE, + CSSTranslate: TYPE_VALUE, + CSSUnitValue: TYPE_VALUE, + CSSUnparsedValue: TYPE_VALUE, + CSSVariableReferenceValue: TYPE_VALUE, Cache: TYPE_VALUE, CacheStorage: TYPE_VALUE, CanvasCompositing: TYPE, @@ -154,6 +204,7 @@ export const webworker = { Client: TYPE_VALUE, Clients: TYPE_VALUE, CloseEvent: TYPE_VALUE, + CompressionStream: TYPE_VALUE, CountQueuingStrategy: TYPE_VALUE, Crypto: TYPE_VALUE, CryptoKey: TYPE_VALUE, @@ -167,6 +218,7 @@ export const webworker = { DOMRect: TYPE_VALUE, DOMRectReadOnly: TYPE_VALUE, DOMStringList: TYPE_VALUE, + DecompressionStream: TYPE_VALUE, DedicatedWorkerGlobalScopeEventMap: TYPE, DedicatedWorkerGlobalScope: TYPE_VALUE, EXT_blend_minmax: TYPE, @@ -180,6 +232,7 @@ export const webworker = { EXT_texture_compression_rgtc: TYPE, EXT_texture_filter_anisotropic: TYPE, EXT_texture_norm16: TYPE, + EncodedVideoChunk: TYPE_VALUE, ErrorEvent: TYPE_VALUE, Event: TYPE_VALUE, EventListener: TYPE, @@ -199,6 +252,7 @@ export const webworker = { FileSystemFileHandle: TYPE_VALUE, FileSystemHandle: TYPE_VALUE, FileSystemSyncAccessHandle: TYPE_VALUE, + FileSystemWritableFileStream: TYPE_VALUE, FontFace: TYPE_VALUE, FontFaceSetEventMap: TYPE, FontFaceSet: TYPE_VALUE, @@ -234,6 +288,7 @@ export const webworker = { MessagePortEventMap: TYPE, MessagePort: TYPE_VALUE, NavigationPreloadManager: TYPE_VALUE, + NavigatorBadge: TYPE, NavigatorConcurrentHardware: TYPE, NavigatorID: TYPE, NavigatorLanguage: TYPE, @@ -285,6 +340,9 @@ export const webworker = { ReadableStreamDefaultController: TYPE_VALUE, ReadableStreamDefaultReader: TYPE_VALUE, ReadableStreamGenericReader: TYPE, + Report: TYPE_VALUE, + ReportBody: TYPE_VALUE, + ReportingObserver: TYPE_VALUE, Request: TYPE_VALUE, Response: TYPE_VALUE, SecurityPolicyViolationEvent: TYPE_VALUE, @@ -299,6 +357,7 @@ export const webworker = { SharedWorkerGlobalScopeEventMap: TYPE, SharedWorkerGlobalScope: TYPE_VALUE, StorageManager: TYPE_VALUE, + StylePropertyMapReadOnly: TYPE_VALUE, SubtleCrypto: TYPE_VALUE, TextDecoder: TYPE_VALUE, TextDecoderCommon: TYPE, @@ -312,10 +371,16 @@ export const webworker = { URL: TYPE_VALUE, URLSearchParams: TYPE_VALUE, VideoColorSpace: TYPE_VALUE, + VideoDecoderEventMap: TYPE, + VideoDecoder: TYPE_VALUE, + VideoEncoderEventMap: TYPE, + VideoEncoder: TYPE_VALUE, + VideoFrame: TYPE_VALUE, WEBGL_color_buffer_float: TYPE, WEBGL_compressed_texture_astc: TYPE, WEBGL_compressed_texture_etc: TYPE, WEBGL_compressed_texture_etc1: TYPE, + WEBGL_compressed_texture_pvrtc: TYPE, WEBGL_compressed_texture_s3tc: TYPE, WEBGL_compressed_texture_s3tc_srgb: TYPE, WEBGL_debug_renderer_info: TYPE, @@ -348,6 +413,10 @@ export const webworker = { WebGLVertexArrayObjectOES: TYPE, WebSocketEventMap: TYPE, WebSocket: TYPE_VALUE, + WebTransport: TYPE_VALUE, + WebTransportBidirectionalStream: TYPE_VALUE, + WebTransportDatagramDuplexStream: TYPE_VALUE, + WebTransportError: TYPE_VALUE, WindowClient: TYPE_VALUE, WindowOrWorkerGlobalScope: TYPE, WorkerEventMap: TYPE, @@ -366,11 +435,13 @@ export const webworker = { XMLHttpRequestUpload: TYPE_VALUE, Console: TYPE, WebAssembly: TYPE_VALUE, + EncodedVideoChunkOutputCallback: TYPE, FrameRequestCallback: TYPE, LockGrantedCallback: TYPE, OnErrorEventHandlerNonNull: TYPE, PerformanceObserverCallback: TYPE, QueuingStrategySize: TYPE, + ReportingObserverCallback: TYPE, TransformerFlushCallback: TYPE, TransformerStartCallback: TYPE, TransformerTransformCallback: TYPE, @@ -381,17 +452,25 @@ export const webworker = { UnderlyingSourceCancelCallback: TYPE, UnderlyingSourcePullCallback: TYPE, UnderlyingSourceStartCallback: TYPE, + VideoFrameOutputCallback: TYPE, VoidFunction: TYPE, + WebCodecsErrorCallback: TYPE, AlgorithmIdentifier: TYPE, + AllowSharedBufferSource: TYPE, BigInteger: TYPE, BinaryData: TYPE, BlobPart: TYPE, BodyInit: TYPE, BufferSource: TYPE, + CSSKeywordish: TYPE, + CSSNumberish: TYPE, + CSSPerspectiveValue: TYPE, + CSSUnparsedSegment: TYPE, CanvasImageSource: TYPE, DOMHighResTimeStamp: TYPE, EpochTimeStamp: TYPE, EventListenerOrEventListenerObject: TYPE, + FileSystemWriteChunkType: TYPE, Float32List: TYPE, FormDataEntryValue: TYPE, GLbitfield: TYPE, @@ -420,6 +499,7 @@ export const webworker = { ReadableStreamController: TYPE, ReadableStreamReadResult: TYPE, ReadableStreamReader: TYPE, + ReportList: TYPE, RequestInfo: TYPE, TexImageSource: TYPE, TimerHandler: TYPE, @@ -427,7 +507,11 @@ export const webworker = { Uint32List: TYPE, VibratePattern: TYPE, XMLHttpRequestBodyInit: TYPE, + AlphaOption: TYPE, + AvcBitstreamFormat: TYPE, BinaryType: TYPE, + CSSMathOperator: TYPE, + CSSNumericBaseType: TYPE, CanvasDirection: TYPE, CanvasFillRule: TYPE, CanvasFontKerning: TYPE, @@ -439,9 +523,12 @@ export const webworker = { CanvasTextBaseline: TYPE, CanvasTextRendering: TYPE, ClientTypes: TYPE, + CodecState: TYPE, ColorGamut: TYPE, ColorSpaceConversion: TYPE, + CompressionFormat: TYPE, DocumentVisibilityState: TYPE, + EncodedVideoChunkType: TYPE, EndingType: TYPE, FileSystemHandleKind: TYPE, FontDisplay: TYPE, @@ -449,6 +536,7 @@ export const webworker = { FontFaceSetLoadStatus: TYPE, FrameType: TYPE, GlobalCompositeOperation: TYPE, + HardwareAcceleration: TYPE, HdrMetadataType: TYPE, IDBCursorDirection: TYPE, IDBRequestReadyState: TYPE, @@ -459,6 +547,7 @@ export const webworker = { KeyFormat: TYPE, KeyType: TYPE, KeyUsage: TYPE, + LatencyMode: TYPE, LockMode: TYPE, MediaDecodingType: TYPE, MediaEncodingType: TYPE, @@ -486,9 +575,14 @@ export const webworker = { ServiceWorkerUpdateViaCache: TYPE, TransferFunction: TYPE, VideoColorPrimaries: TYPE, + VideoEncoderBitrateMode: TYPE, VideoMatrixCoefficients: TYPE, + VideoPixelFormat: TYPE, VideoTransferCharacteristics: TYPE, WebGLPowerPreference: TYPE, + WebTransportCongestionControl: TYPE, + WebTransportErrorSource: TYPE, WorkerType: TYPE, + WriteCommandType: TYPE, XMLHttpRequestResponseType: TYPE, } as Record; diff --git a/packages/scope-manager/tsconfig.spec.json b/packages/scope-manager/tsconfig.spec.json index 6e379465148..46896b9eaf3 100644 --- a/packages/scope-manager/tsconfig.spec.json +++ b/packages/scope-manager/tsconfig.spec.json @@ -2,7 +2,7 @@ "extends": "./tsconfig.json", "compilerOptions": { "outDir": "../../dist/out-tsc", - "module": "commonjs", + "module": "Node16", "types": ["jest", "node"] }, "exclude": ["tests/fixtures"], diff --git a/packages/types/src/lib.ts b/packages/types/src/lib.ts index bdd8348d24e..6589a6b1a6e 100644 --- a/packages/types/src/lib.ts +++ b/packages/types/src/lib.ts @@ -4,89 +4,94 @@ // npx nx generate-lib @typescript-eslint/scope-manager type Lib = - | 'decorators.legacy' - | 'decorators' - | 'dom.iterable' - | 'dom' | 'es5' | 'es6' + | 'es2015' | 'es7' - | 'es2015.collection' + | 'es2016' + | 'es2017' + | 'es2018' + | 'es2019' + | 'es2020' + | 'es2021' + | 'es2022' + | 'es2023' + | 'esnext' + | 'dom' + | 'dom.iterable' + | 'webworker' + | 'webworker.importscripts' + | 'webworker.iterable' + | 'scripthost' | 'es2015.core' + | 'es2015.collection' | 'es2015.generator' | 'es2015.iterable' | 'es2015.promise' | 'es2015.proxy' | 'es2015.reflect' - | 'es2015.symbol.wellknown' | 'es2015.symbol' - | 'es2015' + | 'es2015.symbol.wellknown' | 'es2016.array.include' - | 'es2016.full' - | 'es2016' - | 'es2017.full' - | 'es2017.intl' + | 'es2017.date' | 'es2017.object' | 'es2017.sharedmemory' | 'es2017.string' + | 'es2017.intl' | 'es2017.typedarrays' - | 'es2017' | 'es2018.asyncgenerator' | 'es2018.asynciterable' - | 'es2018.full' | 'es2018.intl' | 'es2018.promise' | 'es2018.regexp' - | 'es2018' | 'es2019.array' - | 'es2019.full' - | 'es2019.intl' | 'es2019.object' | 'es2019.string' | 'es2019.symbol' - | 'es2019' + | 'es2019.intl' | 'es2020.bigint' | 'es2020.date' - | 'es2020.full' - | 'es2020.intl' - | 'es2020.number' | 'es2020.promise' | 'es2020.sharedmemory' | 'es2020.string' | 'es2020.symbol.wellknown' - | 'es2020' - | 'es2021.full' - | 'es2021.intl' + | 'es2020.intl' + | 'es2020.number' | 'es2021.promise' | 'es2021.string' | 'es2021.weakref' - | 'es2021' + | 'es2021.intl' | 'es2022.array' | 'es2022.error' - | 'es2022.full' | 'es2022.intl' | 'es2022.object' - | 'es2022.regexp' | 'es2022.sharedmemory' | 'es2022.string' - | 'es2022' + | 'es2022.regexp' | 'es2023.array' - | 'es2023.full' - | 'es2023' + | 'es2023.collection' | 'esnext.array' + | 'esnext.collection' + | 'esnext.symbol' | 'esnext.asynciterable' - | 'esnext.bigint' - | 'esnext.full' | 'esnext.intl' - | 'esnext.promise' + | 'esnext.disposable' + | 'esnext.bigint' | 'esnext.string' - | 'esnext.symbol' + | 'esnext.promise' | 'esnext.weakref' - | 'esnext' - | 'lib' - | 'scripthost' - | 'webworker.importscripts' - | 'webworker.iterable' - | 'webworker'; + | 'esnext.decorators' + | 'decorators' + | 'decorators.legacy' + | 'es2016.full' + | 'es2017.full' + | 'es2018.full' + | 'es2019.full' + | 'es2020.full' + | 'es2021.full' + | 'es2022.full' + | 'es2023.full' + | 'esnext.full' + | 'lib'; export { Lib }; diff --git a/packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts b/packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts index 57009bd0198..1bc33c89542 100644 --- a/packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts +++ b/packages/typescript-estree/src/parseSettings/warnAboutTSVersion.ts @@ -12,7 +12,7 @@ const SUPPORTED_TYPESCRIPT_VERSIONS = '>=4.3.5 <5.2.0'; * The semver package will ignore prerelease ranges, and we don't want to explicitly document every one * List them all separately here, so we can automatically create the full string */ -const SUPPORTED_PRERELEASE_RANGES: string[] = []; +const SUPPORTED_PRERELEASE_RANGES: string[] = ['5.2.1-rc']; const ACTIVE_TYPESCRIPT_VERSION = ts.version; const isRunningSupportedTypeScriptVersion = semver.satisfies( ACTIVE_TYPESCRIPT_VERSION, diff --git a/packages/typescript-estree/src/version-check.ts b/packages/typescript-estree/src/version-check.ts index b4bc633753f..03b664401a9 100644 --- a/packages/typescript-estree/src/version-check.ts +++ b/packages/typescript-estree/src/version-check.ts @@ -20,6 +20,8 @@ const versions = [ '4.8', '4.9', '5.0', + '5.1', + '5.2', ] as const; type Versions = typeof versions extends ArrayLike ? U : never; diff --git a/patches/typescript+5.1.6.patch b/patches/typescript+5.2.1-rc.patch similarity index 88% rename from patches/typescript+5.1.6.patch rename to patches/typescript+5.2.1-rc.patch index e5b64b9a625..765339eee26 100644 --- a/patches/typescript+5.1.6.patch +++ b/patches/typescript+5.2.1-rc.patch @@ -1,18 +1,18 @@ diff --git a/node_modules/typescript/lib/typescript.d.ts b/node_modules/typescript/lib/typescript.d.ts -index ff7896e..1b85a0b 100644 +index ead6d07..75b1757 100644 --- a/node_modules/typescript/lib/typescript.d.ts +++ b/node_modules/typescript/lib/typescript.d.ts -@@ -370,8 +370,8 @@ declare namespace ts { - JSDocFunctionType = 323, - JSDocVariadicType = 324, - JSDocNamepathType = 325, +@@ -371,8 +371,8 @@ declare namespace ts { + JSDocFunctionType = 324, + JSDocVariadicType = 325, + JSDocNamepathType = 326, + /** @deprecated This was only added in 4.7 */ - JSDoc = 326, + JSDoc = 327, - /** @deprecated Use SyntaxKind.JSDoc */ - JSDocComment = 326, - JSDocText = 327, - JSDocTypeLiteral = 328, -@@ -734,6 +734,8 @@ declare namespace ts { + JSDocComment = 327, + JSDocText = 328, + JSDocTypeLiteral = 329, +@@ -738,6 +738,8 @@ declare namespace ts { readonly name: PropertyName; readonly questionToken?: QuestionToken; readonly type?: TypeNode; @@ -21,7 +21,7 @@ index ff7896e..1b85a0b 100644 } interface PropertyDeclaration extends ClassElement, JSDocContainer { readonly kind: SyntaxKind.PropertyDeclaration; -@@ -759,6 +761,10 @@ declare namespace ts { +@@ -763,6 +765,10 @@ declare namespace ts { readonly parent: ObjectLiteralExpression; readonly name: PropertyName; readonly initializer: Expression; @@ -32,7 +32,7 @@ index ff7896e..1b85a0b 100644 } interface ShorthandPropertyAssignment extends ObjectLiteralElement, JSDocContainer { readonly kind: SyntaxKind.ShorthandPropertyAssignment; -@@ -766,6 +772,12 @@ declare namespace ts { +@@ -770,6 +776,12 @@ declare namespace ts { readonly name: Identifier; readonly equalsToken?: EqualsToken; readonly objectAssignmentInitializer?: Expression; @@ -45,7 +45,7 @@ index ff7896e..1b85a0b 100644 } interface SpreadAssignment extends ObjectLiteralElement, JSDocContainer { readonly kind: SyntaxKind.SpreadAssignment; -@@ -888,6 +900,8 @@ declare namespace ts { +@@ -892,6 +904,8 @@ declare namespace ts { } interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer { readonly kind: SyntaxKind.FunctionType; @@ -54,7 +54,7 @@ index ff7896e..1b85a0b 100644 } interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer { readonly kind: SyntaxKind.ConstructorType; -@@ -4570,7 +4584,13 @@ declare namespace ts { +@@ -4584,7 +4598,13 @@ declare namespace ts { function symbolName(symbol: Symbol): string; function getNameOfJSDocTypedef(declaration: JSDocTypedefTag): Identifier | PrivateIdentifier | undefined; function getNameOfDeclaration(declaration: Declaration | Expression | undefined): DeclarationName | undefined; @@ -68,7 +68,7 @@ index ff7896e..1b85a0b 100644 function getModifiers(node: HasModifiers): readonly Modifier[] | undefined; /** * Gets the JSDoc parameter tags for the node if present. -@@ -5096,7 +5116,13 @@ declare namespace ts { +@@ -5110,7 +5130,13 @@ declare namespace ts { function isModuleName(node: Node): node is ModuleName; function isBinaryOperatorToken(node: Node): node is BinaryOperatorToken; function setTextRange(range: T, location: TextRange | undefined): T; diff --git a/yarn.lock b/yarn.lock index 06401f92c8c..24b427f5feb 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3683,10 +3683,12 @@ "@svgr/plugin-svgo" "^6.2.0" "@swc/core-android-arm-eabi@link:./tools/dummypkg": - version "1.0.0" + version "0.0.0" + uid "" "@swc/core-android-arm64@link:./tools/dummypkg": - version "1.0.0" + version "0.0.0" + uid "" "@swc/core-darwin-arm64@1.3.76": version "1.3.76" @@ -3699,25 +3701,32 @@ integrity sha512-tcySTDqs0SHCebtW35sCdcLWsmTEo7bEwx0gNL/spetqVT9fpFi6qU8qcnt7i2KaZHbeNl9g1aadu+Yrni+GzA== "@swc/core-freebsd-x64@link:./tools/dummypkg": - version "1.0.0" + version "0.0.0" + uid "" "@swc/core-linux-arm-gnueabihf@1.3.76": - version "1.0.0" + version "0.0.0" + uid "" "@swc/core-linux-arm-gnueabihf@link:./tools/dummypkg": - version "1.0.0" + version "0.0.0" + uid "" "@swc/core-linux-arm64-gnu@1.3.76": - version "1.0.0" + version "0.0.0" + uid "" "@swc/core-linux-arm64-gnu@link:./tools/dummypkg": - version "1.0.0" + version "0.0.0" + uid "" "@swc/core-linux-arm64-musl@1.3.76": - version "1.0.0" + version "0.0.0" + uid "" "@swc/core-linux-arm64-musl@link:./tools/dummypkg": - version "1.0.0" + version "0.0.0" + uid "" "@swc/core-linux-x64-gnu@1.3.76": version "1.3.76" @@ -3730,16 +3739,20 @@ integrity sha512-a671g4tW8kyFeuICsgq4uB9ukQfiIyXJT4V6YSnmqhCTz5mazWuDxZ5wKnx/1g5nXTl+U5cWH2TZaCJatp4GKA== "@swc/core-win32-arm64-msvc@1.3.76": - version "1.0.0" + version "0.0.0" + uid "" "@swc/core-win32-arm64-msvc@link:./tools/dummypkg": - version "1.0.0" + version "0.0.0" + uid "" "@swc/core-win32-ia32-msvc@1.3.76": - version "1.0.0" + version "0.0.0" + uid "" "@swc/core-win32-ia32-msvc@link:./tools/dummypkg": - version "1.0.0" + version "0.0.0" + uid "" "@swc/core-win32-x64-msvc@1.3.76": version "1.3.76" @@ -3901,10 +3914,12 @@ "@types/ms" "*" "@types/eslint-scope@^3.7.3": - version "1.0.0" + version "0.0.0" + uid "" "@types/eslint-scope@link:./tools/dummypkg": - version "1.0.0" + version "0.0.0" + uid "" "@types/eslint-visitor-keys@*": version "3.3.0" @@ -3914,16 +3929,20 @@ eslint-visitor-keys "*" "@types/eslint@link:./tools/dummypkg": - version "1.0.0" + version "0.0.0" + uid "" "@types/estree@0.0.39": - version "1.0.0" + version "0.0.0" + uid "" "@types/estree@^1.0.0": - version "1.0.0" + version "0.0.0" + uid "" "@types/estree@link:./tools/dummypkg": - version "1.0.0" + version "0.0.0" + uid "" "@types/express-serve-static-core@*", "@types/express-serve-static-core@^4.17.18": version "4.17.28" @@ -14667,10 +14686,10 @@ typedarray@^0.0.6: resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777" integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c= -typescript@*, typescript@5.1.6, "typescript@>=3 < 6", "typescript@>=4.3.5 <5.2.0", typescript@next, typescript@~5.0.4: - version "5.1.6" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.1.6.tgz#02f8ac202b6dad2c0dd5e0913745b47a37998274" - integrity sha512-zaWCozRZ6DLEWAWFrVDz1H6FVXzUSfTy5FUMWsQlU8Ym5JP9eO4xkTIROFCQvhQf61z6O/G6ugw3SgAnvvm+HA== +typescript@*, typescript@5.2.1-rc, "typescript@>=3 < 6", "typescript@>=4.3.5 <5.2.0 || 5.2.1-rc", typescript@next, typescript@~5.0.4: + version "5.2.1-rc" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.1-rc.tgz#9cf33ff6bc39ba9e1fa59761124f596ecf5e0c07" + integrity sha512-gsOdmedQZEWLrYhNqHuzPmcV+4wX7UujzYqszDC5mVMjcN6Nm7lN2eAtndmjWl24aGdAwJqL2ooywkxpaTx8QQ== ua-parser-js@^0.7.30: version "0.7.31"