Skip to content

Commit ad65b32

Browse files
committed
Temporarily change version to demonstrate errors
1 parent ce44e93 commit ad65b32

18 files changed

+278
-75
lines changed

src/compiler/corePublic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace ts {
55
// The following is baselined as a literal template type without intervention
66
/** The version of the TypeScript compiler release */
77
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
8-
export const version: string = `${versionMajorMinor}.0-dev`;
8+
export const version: string = `${versionMajorMinor}.0`;
99

1010
/**
1111
* Type of objects whose values are all of the same type.

tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports.js

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,112 @@ export declare const d: Promise<{
169169
cjsNonmain: true;
170170
}>;
171171
export declare const e: Promise<typeof import("inner/mjs", { assert: { "resolution-mode": "import" } })>;
172+
173+
174+
//// [DtsFileErrors]
175+
176+
177+
tests/cases/conformance/node/other.d.cts(4,72): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
178+
tests/cases/conformance/node/other.d.cts(5,71): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
179+
tests/cases/conformance/node/other2.d.cts(5,70): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
180+
181+
182+
==== tests/cases/conformance/node/index.d.ts (0 errors) ====
183+
export {};
184+
185+
==== tests/cases/conformance/node/index.d.mts (0 errors) ====
186+
export {};
187+
188+
==== tests/cases/conformance/node/index.d.cts (0 errors) ====
189+
export {};
190+
191+
==== tests/cases/conformance/node/other.d.ts (0 errors) ====
192+
export declare const a: {
193+
default: typeof import("package/cjs");
194+
};
195+
export declare const b: typeof import("package/mjs");
196+
export declare const c: typeof import("package");
197+
export declare const f: {
198+
default: typeof import("inner");
199+
cjsMain: true;
200+
};
201+
202+
==== tests/cases/conformance/node/other2.d.ts (0 errors) ====
203+
export declare const d: {
204+
default: typeof import("inner/cjs");
205+
cjsNonmain: true;
206+
};
207+
export declare const e: typeof import("inner/mjs");
208+
209+
==== tests/cases/conformance/node/other.d.mts (0 errors) ====
210+
export declare const a: {
211+
default: typeof import("package/cjs");
212+
};
213+
export declare const b: typeof import("package/mjs");
214+
export declare const c: typeof import("package");
215+
export declare const f: {
216+
default: typeof import("inner");
217+
cjsMain: true;
218+
};
219+
220+
==== tests/cases/conformance/node/other2.d.mts (0 errors) ====
221+
export declare const d: {
222+
default: typeof import("inner/cjs");
223+
cjsNonmain: true;
224+
};
225+
export declare const e: typeof import("inner/mjs");
226+
227+
==== tests/cases/conformance/node/other.d.cts (2 errors) ====
228+
export declare const a: Promise<{
229+
default: typeof import("./index.cjs");
230+
}>;
231+
export declare const b: Promise<typeof import("./index.mjs", { assert: { "resolution-mode": "import" } })>;
232+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
233+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
234+
export declare const c: Promise<typeof import("./index.js", { assert: { "resolution-mode": "import" } })>;
235+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
236+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
237+
export declare const f: Promise<{
238+
default: typeof import("inner");
239+
cjsMain: true;
240+
}>;
241+
242+
==== tests/cases/conformance/node/other2.d.cts (1 errors) ====
243+
export declare const d: Promise<{
244+
default: typeof import("inner/cjs");
245+
cjsNonmain: true;
246+
}>;
247+
export declare const e: Promise<typeof import("inner/mjs", { assert: { "resolution-mode": "import" } })>;
248+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
249+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
250+
251+
==== tests/cases/conformance/node/node_modules/inner/index.d.ts (0 errors) ====
252+
// cjs format file
253+
export const cjsMain = true;
254+
==== tests/cases/conformance/node/node_modules/inner/index.d.mts (0 errors) ====
255+
// esm format file
256+
export const esm = true;
257+
==== tests/cases/conformance/node/node_modules/inner/index.d.cts (0 errors) ====
258+
// cjs format file
259+
export const cjsNonmain = true;
260+
==== tests/cases/conformance/node/package.json (0 errors) ====
261+
{
262+
"name": "package",
263+
"private": true,
264+
"type": "module",
265+
"exports": {
266+
"./cjs": "./index.cjs",
267+
"./mjs": "./index.mjs",
268+
".": "./index.js"
269+
}
270+
}
271+
==== tests/cases/conformance/node/node_modules/inner/package.json (0 errors) ====
272+
{
273+
"name": "inner",
274+
"private": true,
275+
"exports": {
276+
"./cjs": "./index.cjs",
277+
"./mjs": "./index.mjs",
278+
".": "./index.js"
279+
}
280+
}

tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node16).errors.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,44 @@
1+
/index.ts(1,45): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2+
/index.ts(2,44): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
13
/index.ts(6,50): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
4+
/index.ts(6,50): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
25
/index.ts(7,14): error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
36
/index.ts(7,49): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
7+
/index.ts(7,49): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
8+
/index.ts(10,45): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
9+
/index.ts(11,44): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
410

511

6-
==== /index.ts (3 errors) ====
12+
==== /index.ts (9 errors) ====
713
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
14+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
816
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
17+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
919

1020
export interface LocalInterface extends RequireInterface, ImportInterface {}
1121

1222
import {type RequireInterface as Req} from "pkg" assert { "resolution-mode": "require" };
1323
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1424
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
25+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
1527
import {type ImportInterface as Imp} from "pkg" assert { "resolution-mode": "import" };
1628
~~~~~~~~~~~~~~~
1729
!!! error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
1830
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1931
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
32+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2034
export interface Loc extends Req, Imp {}
2135

2236
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
37+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
38+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2339
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
40+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2442

2543
==== /node_modules/pkg/package.json (0 errors) ====
2644
{

tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node16).js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,3 @@ export type { ImportInterface } from "pkg" assert { "resolution-mode": "import"
3030
//// [index.js]
3131
"use strict";
3232
Object.defineProperty(exports, "__esModule", { value: true });
33-
34-
35-
//// [index.d.ts]
36-
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
37-
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
38-
export interface LocalInterface extends RequireInterface, ImportInterface {
39-
}
40-
import { type RequireInterface as Req } from "pkg" assert { "resolution-mode": "require" };
41-
import { type ImportInterface as Imp } from "pkg" assert { "resolution-mode": "import" };
42-
export interface Loc extends Req, Imp {
43-
}
44-
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
45-
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };

tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=nodenext).errors.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,44 @@
1+
/index.ts(1,45): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2+
/index.ts(2,44): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
13
/index.ts(6,50): error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
4+
/index.ts(6,50): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
25
/index.ts(7,14): error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
36
/index.ts(7,49): error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
7+
/index.ts(7,49): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
8+
/index.ts(10,45): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
9+
/index.ts(11,44): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
410

511

6-
==== /index.ts (3 errors) ====
12+
==== /index.ts (9 errors) ====
713
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
14+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
816
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
17+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
919

1020
export interface LocalInterface extends RequireInterface, ImportInterface {}
1121

1222
import {type RequireInterface as Req} from "pkg" assert { "resolution-mode": "require" };
1323
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1424
!!! error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
25+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
1527
import {type ImportInterface as Imp} from "pkg" assert { "resolution-mode": "import" };
1628
~~~~~~~~~~~~~~~
1729
!!! error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
1830
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1931
!!! error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
32+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2034
export interface Loc extends Req, Imp {}
2135

2236
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
37+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
38+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2339
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
40+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2442

2543
==== /node_modules/pkg/package.json (0 errors) ====
2644
{

tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=nodenext).js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,3 @@ export type { ImportInterface } from "pkg" assert { "resolution-mode": "import"
3030
//// [index.js]
3131
"use strict";
3232
Object.defineProperty(exports, "__esModule", { value: true });
33-
34-
35-
//// [index.d.ts]
36-
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
37-
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
38-
export interface LocalInterface extends RequireInterface, ImportInterface {
39-
}
40-
import { type RequireInterface as Req } from "pkg" assert { "resolution-mode": "require" };
41-
import { type ImportInterface as Imp } from "pkg" assert { "resolution-mode": "import" };
42-
export interface Loc extends Req, Imp {
43-
}
44-
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
45-
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };

tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=node16).errors.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,21 @@
1+
/index.ts(1,45): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2+
/index.ts(2,44): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
13
/index.ts(6,14): error TS2305: Module '"pkg"' has no exported member 'RequireInterface'.
24
/index.ts(6,50): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
5+
/index.ts(6,50): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
36
/index.ts(7,49): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
7+
/index.ts(7,49): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
8+
/index.ts(10,45): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
9+
/index.ts(11,44): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
410

511

6-
==== /index.ts (3 errors) ====
12+
==== /index.ts (9 errors) ====
713
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
14+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
816
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
17+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
919

1020
export interface LocalInterface extends RequireInterface, ImportInterface {}
1121

@@ -14,13 +24,21 @@
1424
!!! error TS2305: Module '"pkg"' has no exported member 'RequireInterface'.
1525
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1626
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
27+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
28+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
1729
import {type ImportInterface as Imp} from "pkg" assert { "resolution-mode": "import" };
1830
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1931
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
32+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
33+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2034
export interface Loc extends Req, Imp {}
2135

2236
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
37+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
38+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2339
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
40+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
41+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2442

2543
==== /node_modules/pkg/package.json (0 errors) ====
2644
{

0 commit comments

Comments
 (0)