Skip to content

Commit

Permalink
🤖 Pick PR #60622 (Fix library inclusions for ES2024 t...) into releas…
Browse files Browse the repository at this point in the history
…e-5.7 (#60681)

Co-authored-by: Billy Janitsch <[email protected]>
  • Loading branch information
typescript-bot and billyjanitsch authored Dec 6, 2024
1 parent 68b84f0 commit c765dce
Show file tree
Hide file tree
Showing 54 changed files with 803 additions and 797 deletions.
4 changes: 2 additions & 2 deletions src/compiler/commandLineParser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,8 @@ export const inverseJsxOptionMap: Map<string, string> = new Map(mapIterator(jsxO
// augmented in another lib.
// NOTE: We must reevaluate the target for upcoming features when each successive TC39 edition is ratified in
// June of each year. This includes changes to `LanguageFeatureMinimumTarget`, `ScriptTarget`,
// `ScriptTargetFeatures` transformers/esnext.ts, compiler/commandLineParser.ts and the contents of each
// lib/esnext.*.d.ts file.
// `ScriptTargetFeatures` transformers/esnext.ts, compiler/commandLineParser.ts,
// compiler/utilitiesPublic.ts, and the contents of each lib/esnext.*.d.ts file.
const libEntries: [string, string][] = [
// JavaScript only
["es5", "lib.es5.d.ts"],
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/transformers/esnext.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ const enum UsingKind {
export function transformESNext(context: TransformationContext): (x: SourceFile | Bundle) => SourceFile | Bundle {
// NOTE: We must reevaluate the target for upcoming features when each successive TC39 edition is ratified in
// June of each year. This includes changes to `LanguageFeatureMinimumTarget`, `ScriptTarget`,
// `ScriptTargetFeatures` transformers/esnext.ts, compiler/commandLineParser.ts and the contents of each
// lib/esnext.*.d.ts file.
// `ScriptTargetFeatures` transformers/esnext.ts, compiler/commandLineParser.ts,
// compiler/utilitiesPublic.ts, and the contents of each lib/esnext.*.d.ts file.

const {
factory,
Expand Down
8 changes: 4 additions & 4 deletions src/compiler/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7581,8 +7581,8 @@ export const enum ScriptKind {

// NOTE: We must reevaluate the target for upcoming features when each successive TC39 edition is ratified in
// June of each year. This includes changes to `LanguageFeatureMinimumTarget`, `ScriptTarget`,
// `ScriptTargetFeatures` transformers/esnext.ts, compiler/commandLineParser.ts and the contents of each
// lib/esnext.*.d.ts file.
// `ScriptTargetFeatures` transformers/esnext.ts, compiler/commandLineParser.ts,
// compiler/utilitiesPublic.ts, and the contents of each lib/esnext.*.d.ts file.
export const enum ScriptTarget {
/** @deprecated */
ES3 = 0,
Expand Down Expand Up @@ -8390,8 +8390,8 @@ export type LanugageFeatures =
// Upcoming Features
// NOTE: We must reevaluate the target for upcoming features when each successive TC39 edition is ratified in
// June of each year. This includes changes to `LanguageFeatureMinimumTarget`, `ScriptTarget`,
// `ScriptTargetFeatures` transformers/esnext.ts, compiler/commandLineParser.ts and the contents of each
// lib/esnext.*.d.ts file.
// `ScriptTargetFeatures` transformers/esnext.ts, compiler/commandLineParser.ts,
// compiler/utilitiesPublic.ts, and the contents of each lib/esnext.*.d.ts file.
| "UsingAndAwaitUsing" // `using x = y`, `await using x = y`
| "ClassAndClassElementDecorators" // `@dec class C {}`, `class C { @dec m() {} }`
;
Expand Down
4 changes: 2 additions & 2 deletions src/compiler/utilities.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1374,8 +1374,8 @@ export type ScriptTargetFeatures = ReadonlyMap<string, ReadonlyMap<string, strin

// NOTE: We must reevaluate the target for upcoming features when each successive TC39 edition is ratified in
// June of each year. This includes changes to `LanguageFeatureMinimumTarget`, `ScriptTarget`,
// `ScriptTargetFeatures` transformers/esnext.ts, compiler/commandLineParser.ts and the contents of each
// lib/esnext.*.d.ts file.
// `ScriptTargetFeatures` transformers/esnext.ts, compiler/commandLineParser.ts,
// compiler/utilitiesPublic.ts, and the contents of each lib/esnext.*.d.ts file.
/** @internal */
export const getScriptTargetFeatures: () => ScriptTargetFeatures = /* @__PURE__ */ memoize((): ScriptTargetFeatures =>
new Map(Object.entries({
Expand Down
6 changes: 6 additions & 0 deletions src/compiler/utilitiesPublic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,8 +305,13 @@ export function sortAndDeduplicateDiagnostics<T extends Diagnostic>(diagnostics:
}

/** @internal */
// NOTE: We must reevaluate the target for upcoming features when each successive TC39 edition is ratified in
// June of each year. This includes changes to `LanguageFeatureMinimumTarget`, `ScriptTarget`,
// `ScriptTargetFeatures` transformers/esnext.ts, compiler/commandLineParser.ts,
// compiler/utilitiesPublic.ts, and the contents of each lib/esnext.*.d.ts file.
export const targetToLibMap: Map<ScriptTarget, string> = new Map([
[ScriptTarget.ESNext, "lib.esnext.full.d.ts"],
[ScriptTarget.ES2024, "lib.es2024.full.d.ts"],
[ScriptTarget.ES2023, "lib.es2023.full.d.ts"],
[ScriptTarget.ES2022, "lib.es2022.full.d.ts"],
[ScriptTarget.ES2021, "lib.es2021.full.d.ts"],
Expand All @@ -322,6 +327,7 @@ export function getDefaultLibFileName(options: CompilerOptions): string {
const target = getEmitScriptTarget(options);
switch (target) {
case ScriptTarget.ESNext:
case ScriptTarget.ES2024:
case ScriptTarget.ES2023:
case ScriptTarget.ES2022:
case ScriptTarget.ES2021:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,14 @@ DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/packag
Elapsed:: *ms DirectoryWatcher:: Added:: WatchInfo: /home/src/projects/project/packages/package2 1 undefined Wild card directory
//// [/home/src/tslibs/TS/Lib/lib.es2016.full.d.ts] *Lib* Inode:: 30
//// [/home/src/tslibs/TS/Lib/lib.es2016.full.d.ts] *Lib* Inode:: 31
//// [/home/src/projects/project/packages/package2/dist/index.js] Inode:: 117
//// [/home/src/projects/project/packages/package2/dist/index.js] Inode:: 118
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//// [/home/src/projects/project/packages/package2/dist/index.d.ts] Inode:: 118
//// [/home/src/projects/project/packages/package2/dist/index.d.ts] Inode:: 119
export {};
Expand Down Expand Up @@ -242,15 +242,15 @@ FsWatches::
/home/src/projects/project/packages/package2: *new*
{"inode":11}
/home/src/projects/project/packages/package2/dist: *new*
{"inode":116}
{"inode":117}
/home/src/projects/project/packages/package2/src: *new*
{"inode":14}
/home/src/projects/project/packages/package2/src/index.ts: *new*
{"inode":15}
/home/src/projects/project/packages/package2/tsconfig.json: *new*
{"inode":13}
/home/src/tslibs/TS/Lib/lib.es2016.full.d.ts: *new*
{"inode":30}
{"inode":31}
Program root files: [
"/home/src/projects/project/packages/package2/src/index.ts"
Expand Down Expand Up @@ -290,20 +290,20 @@ exitCode:: ExitStatus.undefined
Change:: Build dependencies
Input::
//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 120
//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 121
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 121
//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 122
export type FooType = "foo";
export type BarType = "bar";
//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] Inode:: 122
//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] Inode:: 123
{"root":["./src/index.ts"],"version":"FakeTSVersion"}
//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 123
//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] Inode:: 124
{
"root": [
"./src/index.ts"
Expand Down Expand Up @@ -355,23 +355,23 @@ FsWatches::
/home/src/projects/project/packages/package1:
{"inode":6}
/home/src/projects/project/packages/package1/dist: *new*
{"inode":119}
{"inode":120}
/home/src/projects/project/packages/package1/package.json:
{"inode":7}
/home/src/projects/project/packages/package1/src:
{"inode":9}
/home/src/projects/project/packages/package2:
{"inode":11}
/home/src/projects/project/packages/package2/dist:
{"inode":116}
{"inode":117}
/home/src/projects/project/packages/package2/src:
{"inode":14}
/home/src/projects/project/packages/package2/src/index.ts:
{"inode":15}
/home/src/projects/project/packages/package2/tsconfig.json:
{"inode":13}
/home/src/tslibs/TS/Lib/lib.es2016.full.d.ts:
{"inode":30}
{"inode":31}
Timeout callback:: count: 1
8: timerToInvalidateFailedLookupResolutions *new*
Expand Down Expand Up @@ -436,8 +436,8 @@ packages/package2/src/index.ts



//// [/home/src/projects/project/packages/package2/dist/index.js] file written with same contents Inode:: 117
//// [/home/src/projects/project/packages/package2/dist/index.d.ts] file written with same contents Inode:: 118
//// [/home/src/projects/project/packages/package2/dist/index.js] file written with same contents Inode:: 118
//// [/home/src/projects/project/packages/package2/dist/index.d.ts] file written with same contents Inode:: 119

PolledWatches::
/home/src/projects/node_modules/@types:
Expand Down Expand Up @@ -465,25 +465,25 @@ FsWatches::
/home/src/projects/project/packages/package1:
{"inode":6}
/home/src/projects/project/packages/package1/dist:
{"inode":119}
{"inode":120}
/home/src/projects/project/packages/package1/dist/index.d.ts: *new*
{"inode":121}
{"inode":122}
/home/src/projects/project/packages/package1/package.json:
{"inode":7}
/home/src/projects/project/packages/package1/src:
{"inode":9}
/home/src/projects/project/packages/package2:
{"inode":11}
/home/src/projects/project/packages/package2/dist:
{"inode":116}
{"inode":117}
/home/src/projects/project/packages/package2/src:
{"inode":14}
/home/src/projects/project/packages/package2/src/index.ts:
{"inode":15}
/home/src/projects/project/packages/package2/tsconfig.json:
{"inode":13}
/home/src/tslibs/TS/Lib/lib.es2016.full.d.ts:
{"inode":30}
{"inode":31}


Program root files: [
Expand Down Expand Up @@ -568,21 +568,21 @@ FsWatches::
/home/src/projects/project/packages/package2:
{"inode":11}
/home/src/projects/project/packages/package2/dist:
{"inode":116}
{"inode":117}
/home/src/projects/project/packages/package2/src:
{"inode":14}
/home/src/projects/project/packages/package2/src/index.ts:
{"inode":15}
/home/src/projects/project/packages/package2/tsconfig.json:
{"inode":13}
/home/src/tslibs/TS/Lib/lib.es2016.full.d.ts:
{"inode":30}
{"inode":31}

FsWatches *deleted*::
/home/src/projects/project/packages/package1/dist:
{"inode":119}
{"inode":120}
/home/src/projects/project/packages/package1/dist/index.d.ts:
{"inode":121}
{"inode":122}

Timeout callback:: count: 2
10: timerToUpdateProgram *new*
Expand Down Expand Up @@ -690,8 +690,8 @@ Scheduling invalidateFailedLookup, Cancelled earlier one
Elapsed:: *ms DirectoryWatcher:: Triggered with /home/src/projects/project/node_modules/package1 :: WatchInfo: /home/src/projects/project/node_modules/package1 1 undefined Failed Lookup Locations


//// [/home/src/projects/project/packages/package2/dist/index.js] file written with same contents Inode:: 117
//// [/home/src/projects/project/packages/package2/dist/index.d.ts] file written with same contents Inode:: 118
//// [/home/src/projects/project/packages/package2/dist/index.js] file written with same contents Inode:: 118
//// [/home/src/projects/project/packages/package2/dist/index.d.ts] file written with same contents Inode:: 119

PolledWatches::
/home/src/projects/node_modules: *new*
Expand Down Expand Up @@ -729,15 +729,15 @@ FsWatches::
/home/src/projects/project/packages/package2:
{"inode":11}
/home/src/projects/project/packages/package2/dist:
{"inode":116}
{"inode":117}
/home/src/projects/project/packages/package2/src:
{"inode":14}
/home/src/projects/project/packages/package2/src/index.ts:
{"inode":15}
/home/src/projects/project/packages/package2/tsconfig.json:
{"inode":13}
/home/src/tslibs/TS/Lib/lib.es2016.full.d.ts:
{"inode":30}
{"inode":31}

Timeout callback:: count: 1
16: timerToInvalidateFailedLookupResolutions *new*
Expand Down Expand Up @@ -927,14 +927,14 @@ exitCode:: ExitStatus.undefined
Change:: Build dependencies

Input::
//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] file written with same contents Inode:: 122
//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents Inode:: 123
//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 125
//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo] file written with same contents Inode:: 123
//// [/home/src/projects/project/packages/package1/tsconfig.tsbuildinfo.readable.baseline.txt] file written with same contents Inode:: 124
//// [/home/src/projects/project/packages/package1/dist/index.js] Inode:: 126
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });


//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 126
//// [/home/src/projects/project/packages/package1/dist/index.d.ts] Inode:: 127
export type FooType = "foo";
export type BarType = "bar";

Expand Down Expand Up @@ -981,23 +981,23 @@ FsWatches::
/home/src/projects/project/packages/package1:
{"inode":6}
/home/src/projects/project/packages/package1/dist: *new*
{"inode":124}
{"inode":125}
/home/src/projects/project/packages/package1/package.json:
{"inode":7}
/home/src/projects/project/packages/package1/src:
{"inode":9}
/home/src/projects/project/packages/package2:
{"inode":11}
/home/src/projects/project/packages/package2/dist:
{"inode":116}
{"inode":117}
/home/src/projects/project/packages/package2/src:
{"inode":14}
/home/src/projects/project/packages/package2/src/index.ts:
{"inode":15}
/home/src/projects/project/packages/package2/tsconfig.json:
{"inode":13}
/home/src/tslibs/TS/Lib/lib.es2016.full.d.ts:
{"inode":30}
{"inode":31}

Timeout callback:: count: 1
21: timerToInvalidateFailedLookupResolutions *new*
Expand Down Expand Up @@ -1062,8 +1062,8 @@ packages/package2/src/index.ts



//// [/home/src/projects/project/packages/package2/dist/index.js] file written with same contents Inode:: 117
//// [/home/src/projects/project/packages/package2/dist/index.d.ts] file written with same contents Inode:: 118
//// [/home/src/projects/project/packages/package2/dist/index.js] file written with same contents Inode:: 118
//// [/home/src/projects/project/packages/package2/dist/index.d.ts] file written with same contents Inode:: 119

PolledWatches::
/home/src/projects/node_modules/@types:
Expand Down Expand Up @@ -1091,25 +1091,25 @@ FsWatches::
/home/src/projects/project/packages/package1:
{"inode":6}
/home/src/projects/project/packages/package1/dist:
{"inode":124}
{"inode":125}
/home/src/projects/project/packages/package1/dist/index.d.ts: *new*
{"inode":126}
{"inode":127}
/home/src/projects/project/packages/package1/package.json:
{"inode":7}
/home/src/projects/project/packages/package1/src:
{"inode":9}
/home/src/projects/project/packages/package2:
{"inode":11}
/home/src/projects/project/packages/package2/dist:
{"inode":116}
{"inode":117}
/home/src/projects/project/packages/package2/src:
{"inode":14}
/home/src/projects/project/packages/package2/src/index.ts:
{"inode":15}
/home/src/projects/project/packages/package2/tsconfig.json:
{"inode":13}
/home/src/tslibs/TS/Lib/lib.es2016.full.d.ts:
{"inode":30}
{"inode":31}


Program root files: [
Expand Down
Loading

0 comments on commit c765dce

Please sign in to comment.