Skip to content

Commit e158d6c

Browse files
committed
Revert "Temporarily change version to demonstrate errors"
This reverts commit 40c2469.
1 parent 40c2469 commit e158d6c

File tree

23 files changed

+121
-289
lines changed

23 files changed

+121
-289
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`;
8+
export const version: string = `${versionMajorMinor}.0-dev`;
99

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

tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports.errors.txt

Lines changed: 0 additions & 80 deletions
This file was deleted.

tests/baselines/reference/nodeModulesDeclarationEmitDynamicImportWithPackageExports.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,19 @@ export declare const d: {
153153
cjsNonmain: true;
154154
};
155155
export declare const e: typeof import("inner/mjs");
156+
//// [other.d.cts]
157+
export declare const a: Promise<{
158+
default: typeof import("./index.cjs");
159+
}>;
160+
export declare const b: Promise<typeof import("./index.mjs", { assert: { "resolution-mode": "import" } })>;
161+
export declare const c: Promise<typeof import("./index.js", { assert: { "resolution-mode": "import" } })>;
162+
export declare const f: Promise<{
163+
default: typeof import("inner");
164+
cjsMain: true;
165+
}>;
166+
//// [other2.d.cts]
167+
export declare const d: Promise<{
168+
default: typeof import("inner/cjs");
169+
cjsNonmain: true;
170+
}>;
171+
export declare const e: Promise<typeof import("inner/mjs", { assert: { "resolution-mode": "import" } })>;

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

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,26 @@
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'.
31
/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'.
52
/index.ts(7,14): error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
63
/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'.
104

115

12-
==== /index.ts (9 errors) ====
6+
==== /index.ts (3 errors) ====
137
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'.
168
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'.
199

2010
export interface LocalInterface extends RequireInterface, ImportInterface {}
2111

2212
import {type RequireInterface as Req} from "pkg" assert { "resolution-mode": "require" };
2313
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2414
!!! 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'.
2715
import {type ImportInterface as Imp} from "pkg" assert { "resolution-mode": "import" };
2816
~~~~~~~~~~~~~~~
2917
!!! error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
3018
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3119
!!! 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'.
3420
export interface Loc extends Req, Imp {}
3521

3622
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'.
3923
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'.
4224

4325
==== /node_modules/pkg/package.json (0 errors) ====
4426
{

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,16 @@ 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: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,26 @@
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'.
31
/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'.
52
/index.ts(7,14): error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
63
/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'.
104

115

12-
==== /index.ts (9 errors) ====
6+
==== /index.ts (3 errors) ====
137
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'.
168
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'.
199

2010
export interface LocalInterface extends RequireInterface, ImportInterface {}
2111

2212
import {type RequireInterface as Req} from "pkg" assert { "resolution-mode": "require" };
2313
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2414
!!! 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'.
2715
import {type ImportInterface as Imp} from "pkg" assert { "resolution-mode": "import" };
2816
~~~~~~~~~~~~~~~
2917
!!! error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
3018
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3119
!!! 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'.
3420
export interface Loc extends Req, Imp {}
3521

3622
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'.
3923
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'.
4224

4325
==== /node_modules/pkg/package.json (0 errors) ====
4426
{

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,16 @@ 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: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,11 @@
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'.
31
/index.ts(6,14): error TS2305: Module '"pkg"' has no exported member 'RequireInterface'.
42
/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'.
63
/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'.
104

115

12-
==== /index.ts (9 errors) ====
6+
==== /index.ts (3 errors) ====
137
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'.
168
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'.
199

2010
export interface LocalInterface extends RequireInterface, ImportInterface {}
2111

@@ -24,21 +14,13 @@
2414
!!! error TS2305: Module '"pkg"' has no exported member 'RequireInterface'.
2515
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2616
!!! 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'.
2917
import {type ImportInterface as Imp} from "pkg" assert { "resolution-mode": "import" };
3018
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3119
!!! 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'.
3420
export interface Loc extends Req, Imp {}
3521

3622
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'.
3923
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'.
4224

4325
==== /node_modules/pkg/package.json (0 errors) ====
4426
{

0 commit comments

Comments
 (0)