Skip to content

Commit 4fba3aa

Browse files
committed
Split nodenext tests into node18,nodenext
1 parent 90d35e2 commit 4fba3aa

File tree

877 files changed

+56551
-215
lines changed

Some content is hidden

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

877 files changed

+56551
-215
lines changed
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
2+
error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node18'.
3+
4+
5+
!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
6+
!!! error TS5109: Option 'moduleResolution' must be set to 'Node16' (or left unspecified) when option 'module' is set to 'Node18'.
7+
==== /app/test.ts (0 errors) ====
8+
import { test } from '../lib';
9+
10+
==== /lib/package.json (0 errors) ====
11+
{
12+
"main": "./cjs/index.js"
13+
}
14+
15+
==== /lib/cjs/index.js (0 errors) ====
16+
export function test() {}
17+
18+
==== /lib/cjs/index.d.ts (0 errors) ====
19+
export function test(): void;
20+

tests/baselines/reference/bundlerDirectoryModule(module=node18,moduleresolution=bundler).trace.json

Lines changed: 827 additions & 0 deletions
Large diffs are not rendered by default.

tests/baselines/reference/bundlerDirectoryModule(module=node18,moduleresolution=nodenext).trace.json

Lines changed: 957 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
2+
error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'.
3+
4+
5+
!!! error TS5095: Option 'bundler' can only be used when 'module' is set to 'preserve' or to 'es2015' or later.
6+
!!! error TS5109: Option 'moduleResolution' must be set to 'NodeNext' (or left unspecified) when option 'module' is set to 'NodeNext'.
7+
==== /app/test.ts (0 errors) ====
8+
import { test } from '../lib';
9+
10+
==== /lib/package.json (0 errors) ====
11+
{
12+
"main": "./cjs/index.js"
13+
}
14+
15+
==== /lib/cjs/index.js (0 errors) ====
16+
export function test() {}
17+
18+
==== /lib/cjs/index.d.ts (0 errors) ====
19+
export function test(): void;
20+

tests/baselines/reference/bundlerDirectoryModule(module=nodenext,moduleresolution=bundler).trace.json

Lines changed: 1087 additions & 0 deletions
Large diffs are not rendered by default.

tests/baselines/reference/bundlerDirectoryModule(module=nodenext,moduleresolution=nodenext).trace.json

Lines changed: 1257 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
index.ts(1,22): error TS2876: This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "./foo.ts/index.ts".
2+
3+
4+
==== index.ts (1 errors) ====
5+
import foo = require("./foo.ts"); // Error
6+
~~~~~~~~~~
7+
!!! error TS2876: This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "./foo.ts/index.ts".
8+
import type _foo = require("./foo.ts"); // Ok
9+
10+
==== foo.ts/index.ts (0 errors) ====
11+
export = {};
12+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//// [tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/cjsErrors.ts] ////
2+
3+
//// [index.ts]
4+
export = {};
5+
6+
//// [index.ts]
7+
import foo = require("./foo.ts"); // Error
8+
import type _foo = require("./foo.ts"); // Ok
9+
10+
11+
//// [index.js]
12+
"use strict";
13+
module.exports = {};
14+
//// [index.js]
15+
"use strict";
16+
Object.defineProperty(exports, "__esModule", { value: true });
17+
const foo = require("./foo.js"); // Error
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
index.ts(1,22): error TS2876: This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "./foo.ts/index.ts".
2+
3+
4+
==== index.ts (1 errors) ====
5+
import foo = require("./foo.ts"); // Error
6+
~~~~~~~~~~
7+
!!! error TS2876: This relative import path is unsafe to rewrite because it looks like a file name, but actually resolves to "./foo.ts/index.ts".
8+
import type _foo = require("./foo.ts"); // Ok
9+
10+
==== foo.ts/index.ts (0 errors) ====
11+
export = {};
12+
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//// [tests/cases/conformance/externalModules/rewriteRelativeImportExtensions/cjsErrors.ts] ////
2+
3+
//// [index.ts]
4+
export = {};
5+
6+
//// [index.ts]
7+
import foo = require("./foo.ts"); // Error
8+
import type _foo = require("./foo.ts"); // Ok
9+
10+
11+
//// [index.js]
12+
"use strict";
13+
module.exports = {};
14+
//// [index.js]
15+
"use strict";
16+
Object.defineProperty(exports, "__esModule", { value: true });
17+
const foo = require("./foo.js"); // Error

0 commit comments

Comments
 (0)