Skip to content

Commit ff0e67c

Browse files
committed
fix: getDefaultLibFileName
1 parent c3e2e60 commit ff0e67c

File tree

1,928 files changed

+34242
-30319
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,928 files changed

+34242
-30319
lines changed

src/compiler/utilitiesPublic.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,7 @@ export function getDefaultLibFileName(options: CompilerOptions): string {
328328
const target = getEmitScriptTarget(options);
329329
switch (target) {
330330
case ScriptTarget.ESNext:
331+
case ScriptTarget.ES2025:
331332
case ScriptTarget.ES2024:
332333
case ScriptTarget.ES2023:
333334
case ScriptTarget.ES2022:

tests/baselines/reference/controlFlowForFunctionLike1.symbols

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ function test3(a: number | string) {
6161
>a : Symbol(a, Decl(controlFlowForFunctionLike1.ts, 22, 15))
6262
}
6363
throw new Error("");
64-
>Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
64+
>Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2022.error.d.ts, --, --))
6565
}
6666

6767
test3(1)(100);
@@ -81,15 +81,15 @@ function test4(a: number | string) {
8181

8282
if (Math.random() && typeof a === "number") {
8383
>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
84-
>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
84+
>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2025.float16.d.ts, --, --))
8585
>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
8686
>a : Symbol(a, Decl(controlFlowForFunctionLike1.ts, 32, 15))
8787

8888
return fn;
8989
>fn : Symbol(fn, Decl(controlFlowForFunctionLike1.ts, 33, 5))
9090
}
9191
throw new Error("");
92-
>Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --))
92+
>Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2022.error.d.ts, --, --))
9393
}
9494

9595
test4(1)?.(100);

tests/baselines/reference/controlFlowFunctionLikeCircular1.symbols

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const unionOfDifferentReturnType1: { (a: any): number; } | { (a: number): typeof
88
>unionOfDifferentReturnType1 : Symbol(unionOfDifferentReturnType1, Decl(controlFlowFunctionLikeCircular_1.ts, 1, 5))
99
>a : Symbol(a, Decl(controlFlowFunctionLikeCircular_1.ts, 1, 38))
1010
>a : Symbol(a, Decl(controlFlowFunctionLikeCircular_1.ts, 1, 62))
11-
>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
11+
>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more)
1212

1313
=== controlFlowFunctionLikeCircular_2.ts ===
1414
unionOfDifferentReturnType1(true);
@@ -17,11 +17,11 @@ unionOfDifferentReturnType1(true);
1717
const unionOfDifferentReturnType1 = Math.random() ? (a: any) => 1 : (a: number) => ({}) as typeof Date;
1818
>unionOfDifferentReturnType1 : Symbol(unionOfDifferentReturnType1, Decl(controlFlowFunctionLikeCircular_2.ts, 1, 5))
1919
>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
20-
>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
20+
>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2025.float16.d.ts, --, --))
2121
>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
2222
>a : Symbol(a, Decl(controlFlowFunctionLikeCircular_2.ts, 1, 53))
2323
>a : Symbol(a, Decl(controlFlowFunctionLikeCircular_2.ts, 1, 69))
24-
>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
24+
>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more)
2525

2626
=== controlFlowFunctionLikeCircular_3.ts ===
2727
function test(arg: () => string) {
@@ -35,7 +35,7 @@ function test(arg: () => string) {
3535
>fn : Symbol(fn, Decl(controlFlowFunctionLikeCircular_3.ts, 2, 7))
3636
>fn : Symbol(fn, Decl(controlFlowFunctionLikeCircular_3.ts, 2, 7))
3737
>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
38-
>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
38+
>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2025.float16.d.ts, --, --))
3939
>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
4040
>arg : Symbol(arg, Decl(controlFlowFunctionLikeCircular_3.ts, 0, 14))
4141
>arg : Symbol(arg)
@@ -52,7 +52,7 @@ function test(arg: () => string) {
5252
const fn = Math.random() ? arg : (): (() => arg) => {};
5353
>fn : Symbol(fn, Decl(controlFlowFunctionLikeCircular_4.ts, 2, 7))
5454
>Math.random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
55-
>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
55+
>Math : Symbol(Math, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es2015.core.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --), Decl(lib.es2025.float16.d.ts, --, --))
5656
>random : Symbol(Math.random, Decl(lib.es5.d.ts, --, --))
5757
>arg : Symbol(arg, Decl(controlFlowFunctionLikeCircular_4.ts, 0, 14))
5858
>arg : Symbol(arg)
@@ -180,7 +180,7 @@ function test(arg: string | number, whatever: any) {
180180
>k : Symbol(k, Decl(controlFlowFunctionLikeCircular_9.ts, 3, 16))
181181
>arg : Symbol(arg, Decl(controlFlowFunctionLikeCircular_9.ts, 0, 14))
182182
>x : Symbol(x, Decl(controlFlowFunctionLikeCircular_9.ts, 3, 45))
183-
>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --))
183+
>Date : Symbol(Date, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.scripthost.d.ts, --, --), Decl(lib.es2015.symbol.wellknown.d.ts, --, --) ... and 1 more)
184184
>whatever : Symbol(whatever, Decl(controlFlowFunctionLikeCircular_9.ts, 0, 35))
185185

186186
return o.x;

tests/baselines/reference/tsbuild/clean/tsx-with-dts-emit.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,14 @@ Output::
3838

3939
[HH:MM:SS AM] Building project '/home/src/workspaces/solution/project/tsconfig.json'...
4040

41-
../../tslibs/TS/Lib/lib.d.ts
41+
../../tslibs/TS/Lib/lib.es2025.full.d.ts
4242
Default library
4343
project/src/main.tsx
4444
Matched by include pattern 'src/**/*.tsx' in 'project/tsconfig.json'
4545

4646

47+
//// [/home/src/tslibs/TS/Lib/lib.es2025.full.d.ts] *Lib*
48+
4749
//// [/home/src/workspaces/solution/project/src/main.js]
4850
export const x = 10;
4951

tests/baselines/reference/tsbuild/commandLine/multiFile/different-options-discrepancies.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ TsBuild info text without affectedFilesPendingEmit:: /home/src/workspaces/projec
55
CleanBuild:
66
{
77
"fileInfos": {
8-
"../../tslibs/ts/lib/lib.d.ts": {
8+
"../../tslibs/ts/lib/lib.es2025.full.d.ts": {
99
"version": "-25093698414-interface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };",
1010
"affectsGlobalScope": true
1111
},
@@ -54,7 +54,7 @@ CleanBuild:
5454
IncrementalBuild:
5555
{
5656
"fileInfos": {
57-
"../../tslibs/ts/lib/lib.d.ts": {
57+
"../../tslibs/ts/lib/lib.es2025.full.d.ts": {
5858
"version": "-25093698414-interface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };",
5959
"affectsGlobalScope": true
6060
},
@@ -106,7 +106,7 @@ TsBuild info text without affectedFilesPendingEmit:: /home/src/workspaces/projec
106106
CleanBuild:
107107
{
108108
"fileInfos": {
109-
"../../tslibs/ts/lib/lib.d.ts": {
109+
"../../tslibs/ts/lib/lib.es2025.full.d.ts": {
110110
"version": "-25093698414-interface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };",
111111
"affectsGlobalScope": true
112112
},
@@ -155,7 +155,7 @@ CleanBuild:
155155
IncrementalBuild:
156156
{
157157
"fileInfos": {
158-
"../../tslibs/ts/lib/lib.d.ts": {
158+
"../../tslibs/ts/lib/lib.es2025.full.d.ts": {
159159
"version": "-25093698414-interface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };",
160160
"affectsGlobalScope": true
161161
},
@@ -207,7 +207,7 @@ TsBuild info text without affectedFilesPendingEmit:: /home/src/workspaces/projec
207207
CleanBuild:
208208
{
209209
"fileInfos": {
210-
"../../tslibs/ts/lib/lib.d.ts": {
210+
"../../tslibs/ts/lib/lib.es2025.full.d.ts": {
211211
"version": "-25093698414-interface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };",
212212
"affectsGlobalScope": true
213213
},
@@ -256,7 +256,7 @@ CleanBuild:
256256
IncrementalBuild:
257257
{
258258
"fileInfos": {
259-
"../../tslibs/ts/lib/lib.d.ts": {
259+
"../../tslibs/ts/lib/lib.es2025.full.d.ts": {
260260
"version": "-25093698414-interface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };",
261261
"affectsGlobalScope": true
262262
},

tests/baselines/reference/tsbuild/commandLine/multiFile/different-options-with-incremental-discrepancies.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ TsBuild info text without affectedFilesPendingEmit:: /home/src/workspaces/projec
55
CleanBuild:
66
{
77
"fileInfos": {
8-
"../../tslibs/ts/lib/lib.d.ts": {
8+
"../../tslibs/ts/lib/lib.es2025.full.d.ts": {
99
"version": "-25093698414-interface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };",
1010
"affectsGlobalScope": true
1111
},
@@ -49,7 +49,7 @@ CleanBuild:
4949
IncrementalBuild:
5050
{
5151
"fileInfos": {
52-
"../../tslibs/ts/lib/lib.d.ts": {
52+
"../../tslibs/ts/lib/lib.es2025.full.d.ts": {
5353
"version": "-25093698414-interface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };",
5454
"affectsGlobalScope": true
5555
},
@@ -101,7 +101,7 @@ TsBuild info text without affectedFilesPendingEmit:: /home/src/workspaces/projec
101101
CleanBuild:
102102
{
103103
"fileInfos": {
104-
"../../tslibs/ts/lib/lib.d.ts": {
104+
"../../tslibs/ts/lib/lib.es2025.full.d.ts": {
105105
"version": "-25093698414-interface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };",
106106
"affectsGlobalScope": true
107107
},
@@ -145,7 +145,7 @@ CleanBuild:
145145
IncrementalBuild:
146146
{
147147
"fileInfos": {
148-
"../../tslibs/ts/lib/lib.d.ts": {
148+
"../../tslibs/ts/lib/lib.es2025.full.d.ts": {
149149
"version": "-25093698414-interface Boolean {}\ninterface Function {}\ninterface CallableFunction {}\ninterface NewableFunction {}\ninterface IArguments {}\ninterface Number { toExponential: any; }\ninterface Object {}\ninterface RegExp {}\ninterface String { charAt: any; }\ninterface Array<T> { length: number; [n: number]: T; }\ninterface ReadonlyArray<T> {}\ndeclare const console: { log(msg: any): void; };",
150150
"affectsGlobalScope": true
151151
},

0 commit comments

Comments
 (0)