Skip to content

Commit 40c4fac

Browse files
Bump version to 4.6.0-beta, accept baselines, and LKG.
1 parent 5e09e86 commit 40c4fac

File tree

128 files changed

+868
-896
lines changed

Some content is hidden

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

128 files changed

+868
-896
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "typescript",
33
"author": "Microsoft Corp.",
44
"homepage": "https://www.typescriptlang.org/",
5-
"version": "4.6.0",
5+
"version": "4.6.0-beta",
66
"license": "Apache-2.0",
77
"description": "TypeScript is a language for application scale JavaScript development",
88
"keywords": [

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 = `${versionMajorMinor}.0-beta`;
99

1010
/**
1111
* Type of objects whose values are all of the same type.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2+
3+
4+
!!! error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
5+
==== tests/cases/compiler/a.ts (0 errors) ====
6+
declare var dec: any, __decorate: any;
7+
@dec export class A {
8+
}
9+
10+
const o = { a: 1 };
11+
const y = { ...o };
12+
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
error TS4124: Compiler option 'module' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2+
3+
4+
!!! error TS4124: Compiler option 'module' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
5+
==== tests/cases/compiler/a.ts (0 errors) ====
6+
declare var dec: any, __decorate: any;
7+
@dec export class A {
8+
}
9+
10+
const o = { a: 1 };
11+
const y = { ...o };
12+

tests/baselines/reference/importAssertionNonstring.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
error TS4124: Compiler option 'module' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
12
tests/cases/compiler/mod.mts(1,52): error TS2837: Import assertion values must be string literal expressions.
23
tests/cases/compiler/mod.mts(3,52): error TS2837: Import assertion values must be string literal expressions.
34
tests/cases/compiler/mod.mts(5,52): error TS2837: Import assertion values must be string literal expressions.
@@ -6,6 +7,7 @@ tests/cases/compiler/mod.mts(9,52): error TS2837: Import assertion values must b
67
tests/cases/compiler/mod.mts(11,66): error TS2837: Import assertion values must be string literal expressions.
78

89

10+
!!! error TS4124: Compiler option 'module' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
911
==== tests/cases/compiler/mod.mts (6 errors) ====
1012
import * as thing1 from "./mod.mjs" assert {field: 0};
1113
~
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
error TS4124: Compiler option 'moduleResolution' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2+
3+
4+
!!! error TS4124: Compiler option 'moduleResolution' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
5+
==== tests/cases/compiler/node_modules/pkg/package.json (0 errors) ====
6+
{
7+
"name": "pkg",
8+
"version": "0.0.1",
9+
"exports": "./entrypoint.js"
10+
}
11+
==== tests/cases/compiler/node_modules/pkg/entrypoint.d.ts (0 errors) ====
12+
export declare function thing(): void;
13+
==== tests/cases/compiler/index.ts (0 errors) ====
14+
import * as p from "pkg";
15+
p.thing();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
error TS4124: Compiler option 'moduleResolution' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2+
3+
4+
!!! error TS4124: Compiler option 'moduleResolution' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
5+
==== tests/cases/compiler/node_modules/pkg/package.json (0 errors) ====
6+
{
7+
"name": "pkg",
8+
"version": "0.0.1",
9+
"exports": "./entrypoint.js"
10+
}
11+
==== tests/cases/compiler/node_modules/pkg/entrypoint.d.ts (0 errors) ====
12+
export declare function thing(): void;
13+
==== tests/cases/compiler/index.ts (0 errors) ====
14+
import * as p from "pkg";
15+
p.thing();

tests/baselines/reference/moduleResolutionWithModule(module=node12,moduleresolution=node).errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
12
tests/cases/compiler/index.ts(1,20): error TS2307: Cannot find module 'pkg' or its corresponding type declarations.
23

34

5+
!!! error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
46
==== tests/cases/compiler/node_modules/pkg/package.json (0 errors) ====
57
{
68
"name": "pkg",
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2+
3+
4+
!!! error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
5+
==== tests/cases/compiler/node_modules/pkg/package.json (0 errors) ====
6+
{
7+
"name": "pkg",
8+
"version": "0.0.1",
9+
"exports": "./entrypoint.js"
10+
}
11+
==== tests/cases/compiler/node_modules/pkg/entrypoint.d.ts (0 errors) ====
12+
export declare function thing(): void;
13+
==== tests/cases/compiler/index.ts (0 errors) ====
14+
import * as p from "pkg";
15+
p.thing();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2+
3+
4+
!!! error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
5+
==== tests/cases/compiler/node_modules/pkg/package.json (0 errors) ====
6+
{
7+
"name": "pkg",
8+
"version": "0.0.1",
9+
"exports": "./entrypoint.js"
10+
}
11+
==== tests/cases/compiler/node_modules/pkg/entrypoint.d.ts (0 errors) ====
12+
export declare function thing(): void;
13+
==== tests/cases/compiler/index.ts (0 errors) ====
14+
import * as p from "pkg";
15+
p.thing();

tests/baselines/reference/moduleResolutionWithModule(module=nodenext,moduleresolution=node).errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
error TS4124: Compiler option 'module' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
12
tests/cases/compiler/index.ts(1,20): error TS2307: Cannot find module 'pkg' or its corresponding type declarations.
23

34

5+
!!! error TS4124: Compiler option 'module' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
46
==== tests/cases/compiler/node_modules/pkg/package.json (0 errors) ====
57
{
68
"name": "pkg",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
error TS4124: Compiler option 'module' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2+
3+
4+
!!! error TS4124: Compiler option 'module' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
5+
==== tests/cases/compiler/node_modules/pkg/package.json (0 errors) ====
6+
{
7+
"name": "pkg",
8+
"version": "0.0.1",
9+
"exports": "./entrypoint.js"
10+
}
11+
==== tests/cases/compiler/node_modules/pkg/entrypoint.d.ts (0 errors) ====
12+
export declare function thing(): void;
13+
==== tests/cases/compiler/index.ts (0 errors) ====
14+
import * as p from "pkg";
15+
p.thing();
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
error TS4124: Compiler option 'module' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2+
3+
4+
!!! error TS4124: Compiler option 'module' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
5+
==== tests/cases/compiler/node_modules/pkg/package.json (0 errors) ====
6+
{
7+
"name": "pkg",
8+
"version": "0.0.1",
9+
"exports": "./entrypoint.js"
10+
}
11+
==== tests/cases/compiler/node_modules/pkg/entrypoint.d.ts (0 errors) ====
12+
export declare function thing(): void;
13+
==== tests/cases/compiler/index.ts (0 errors) ====
14+
import * as p from "pkg";
15+
p.thing();

tests/baselines/reference/moduleResolutionWithoutExtension1.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
1+
error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
12
/src/bar.mts(2,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './foo.mjs'?
23
/src/bar.mts(3,21): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.
34

45

6+
!!! error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
57
==== /src/foo.mts (0 errors) ====
68
export function foo() {
79
return "";

tests/baselines/reference/moduleResolutionWithoutExtension2.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
12
/src/buzz.mts(2,22): error TS2307: Cannot find module './foo' or its corresponding type declarations.
23

34

5+
!!! error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
46
==== /src/buzz.mts (1 errors) ====
57
// Extensionless relative path cjs import in an ES module
68
import foo = require("./foo"); // should error, should not ask for extension

tests/baselines/reference/moduleResolutionWithoutExtension3.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
error TS4124: Compiler option 'module' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
12
/src/bar.mts(2,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './foo.jsx'?
23

34

5+
!!! error TS4124: Compiler option 'module' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
46
==== /src/foo.tsx (0 errors) ====
57
export function foo() {
68
return "";

tests/baselines/reference/moduleResolutionWithoutExtension4.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
error TS4124: Compiler option 'module' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
12
/src/bar.mts(2,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './foo.js'?
23

34

5+
!!! error TS4124: Compiler option 'module' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
46
==== /src/foo.tsx (0 errors) ====
57
export function foo() {
68
return "";

tests/baselines/reference/moduleResolutionWithoutExtension5.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
12
/src/buzz.mts(2,8): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.
23

34

5+
!!! error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
46
==== /src/buzz.mts (1 errors) ====
57
// Extensionless relative path dynamic import in an ES module
68
import("./foo").then(x => x); // should error, ask for extension

tests/baselines/reference/moduleResolutionWithoutExtension6.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
12
/src/bar.cts(4,21): error TS2307: Cannot find module './foo' or its corresponding type declarations.
23

34

5+
!!! error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
46
==== /src/bar.cts (1 errors) ====
57
// Extensionless relative path import statement in a cjs module
68
// Import statements are not allowed in cjs files,

tests/baselines/reference/moduleResolutionWithoutExtension7.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
12
/src/bar.cts(2,22): error TS2307: Cannot find module './foo' or its corresponding type declarations.
23

34

5+
!!! error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
46
==== /src/bar.cts (1 errors) ====
57
// Extensionless relative path cjs import in a cjs module
68
import foo = require("./foo"); // should error, should not ask for extension

tests/baselines/reference/moduleResolutionWithoutExtension8.errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
12
/src/bar.cts(2,8): error TS2834: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Consider adding an extension to the import path.
23

34

5+
!!! error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
46
==== /src/bar.cts (1 errors) ====
57
// Extensionless relative path dynamic import in a cjs module
68
import("./foo").then(x => x); // should error, ask for extension

tests/baselines/reference/nodeAllowJsPackageSelfName(module=node12).errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
12
tests/cases/conformance/node/allowJs/index.cjs(2,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
23

34

5+
!!! error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
46
==== tests/cases/conformance/node/allowJs/index.js (0 errors) ====
57
// esm format file
68
import * as self from "package";

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
error TS4124: Compiler option 'module' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
12
tests/cases/conformance/node/allowJs/index.cjs(2,23): error TS1471: Module 'package' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
23

34

5+
!!! error TS4124: Compiler option 'module' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
46
==== tests/cases/conformance/node/allowJs/index.js (0 errors) ====
57
// esm format file
68
import * as self from "package";

tests/baselines/reference/nodeModules1(module=node12).errors.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
12
tests/cases/conformance/node/index.cts(2,21): error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
23
tests/cases/conformance/node/index.cts(3,21): error TS1471: Module './index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
34
tests/cases/conformance/node/index.cts(6,21): error TS1471: Module './subfolder/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
@@ -81,6 +82,7 @@ tests/cases/conformance/node/index.ts(83,21): error TS2834: Relative import path
8182
tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'?
8283

8384

85+
!!! error TS4124: Compiler option 'module' of value 'node12' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
8486
==== tests/cases/conformance/node/subfolder/index.ts (0 errors) ====
8587
// cjs format file
8688
const x = 1;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
error TS4124: Compiler option 'module' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
12
tests/cases/conformance/node/index.cts(2,21): error TS1471: Module './index.js' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
23
tests/cases/conformance/node/index.cts(3,21): error TS1471: Module './index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
34
tests/cases/conformance/node/index.cts(6,21): error TS1471: Module './subfolder/index.mjs' cannot be imported using this construct. The specifier only resolves to an ES module, which cannot be imported synchronously. Use dynamic import instead.
@@ -81,6 +82,7 @@ tests/cases/conformance/node/index.ts(83,21): error TS2834: Relative import path
8182
tests/cases/conformance/node/index.ts(84,21): error TS2835: Relative import paths need explicit file extensions in EcmaScript imports when '--moduleResolution' is 'node12' or 'nodenext'. Did you mean './subfolder2/another/index.mjs'?
8283

8384

85+
!!! error TS4124: Compiler option 'module' of value 'nodenext' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
8486
==== tests/cases/conformance/node/subfolder/index.ts (0 errors) ====
8587
// cjs format file
8688
const x = 1;

0 commit comments

Comments
 (0)