Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'package.json'. Supply the `rootDir` compiler option to disambiguate.
index.cjs(3,22): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package/mjs")' call instead.
index.cjs(4,23): error TS1479: The current file is a CommonJS module whose imports will produce 'require' calls; however, the referenced file is an ECMAScript module and cannot be imported with 'require'. Consider writing a dynamic 'import("package")' call instead.
node_modules/inner/index.d.mts(2,13): error TS2303: Circular definition of import alias 'cjs'.
node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import alias 'cjs'.


!!! error TS2209: The project root is ambiguous, but is required to resolve export map entry '.' in file 'package.json'. Supply the `rootDir` compiler option to disambiguate.
Expand Down Expand Up @@ -58,33 +56,36 @@ node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import
mjsi.cjsSource;
typei.implicitCjsSource;
ts.cjsSource;
==== node_modules/inner/index.d.ts (1 errors) ====
==== node_modules/inner/index.d.ts (0 errors) ====
// cjs format file
export const implicitCjsSource = true;
==== node_modules/inner/test.d.ts (0 errors) ====
// cjs format file
import * as cjs from "inner/a";
~~~
!!! error TS2303: Circular definition of import alias 'cjs'.
import * as mjs from "inner/b";
import * as type from "inner";
import * as ts from "inner/types";
export { cjs };
export { mjs };
export { type };
export { ts };
export const implicitCjsSource = true;
==== node_modules/inner/index.d.mts (1 errors) ====
==== node_modules/inner/index.d.mts (0 errors) ====
// esm format file
export const mjsSource = true;
==== node_modules/inner/test.d.mts (0 errors) ====
// esm format file
import * as cjs from "inner/a";
~~~
!!! error TS2303: Circular definition of import alias 'cjs'.
import * as mjs from "inner/b";
import * as type from "inner";
import * as ts from "inner/types";
export { cjs };
export { mjs };
export { type };
export { ts };
export const mjsSource = true;
==== node_modules/inner/index.d.cts (0 errors) ====
// cjs format file
export const cjsSource = true;
==== node_modules/inner/test.d.cts (0 errors) ====
// cjs format file
import * as cjs from "inner/a";
import * as mjs from "inner/b";
Expand All @@ -94,7 +95,6 @@ node_modules/inner/index.d.ts(2,13): error TS2303: Circular definition of import
export { mjs };
export { type };
export { ts };
export const cjsSource = true;
==== package.json (0 errors) ====
{
"name": "package",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,37 +50,43 @@ typei.implicitCjsSource;
ts.cjsSource;
//// [index.d.ts]
// cjs format file
export const implicitCjsSource = true;
//// [test.d.ts]
// cjs format file
import * as cjs from "inner/a";
import * as mjs from "inner/b";
import * as type from "inner";
import * as ts from "inner/types";
export { cjs };
export { mjs };
export { type };
export { ts };
export const implicitCjsSource = true;
export { ts };
//// [index.d.mts]
// esm format file
export const mjsSource = true;
//// [test.d.mts]
// esm format file
import * as cjs from "inner/a";
import * as mjs from "inner/b";
import * as type from "inner";
import * as ts from "inner/types";
export { cjs };
export { mjs };
export { type };
export { ts };
export const mjsSource = true;
export { ts };
//// [index.d.cts]
// cjs format file
export const cjsSource = true;
//// [test.d.cts]
// cjs format file
import * as cjs from "inner/a";
import * as mjs from "inner/b";
import * as type from "inner";
import * as ts from "inner/types";
export { cjs };
export { mjs };
export { type };
export { ts };
export const cjsSource = true;
export { ts };
//// [package.json]
{
"name": "package",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,24 +33,24 @@ import * as ts from "inner/types";
>ts : Symbol(ts, Decl(index.js, 10, 6))

cjsi.mjsSource;
>cjsi.mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 9, 12))
>cjsi.mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 1, 12))
>cjsi : Symbol(cjsi, Decl(index.js, 7, 6))
>mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 9, 12))
>mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 1, 12))

mjsi.mjsSource;
>mjsi.mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 9, 12))
>mjsi.mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 1, 12))
>mjsi : Symbol(mjsi, Decl(index.js, 8, 6))
>mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 9, 12))
>mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 1, 12))

typei.mjsSource;
>typei.mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 9, 12))
>typei.mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 1, 12))
>typei : Symbol(typei, Decl(index.js, 9, 6))
>mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 9, 12))
>mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 1, 12))

ts.mjsSource;
>ts.mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 9, 12))
>ts.mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 1, 12))
>ts : Symbol(ts, Decl(index.js, 10, 6))
>mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 9, 12))
>mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 1, 12))

=== index.mjs ===
// esm format file
Expand Down Expand Up @@ -85,24 +85,24 @@ import * as ts from "inner/types";
>ts : Symbol(ts, Decl(index.mjs, 10, 6))

cjsi.mjsSource;
>cjsi.mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 9, 12))
>cjsi.mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 1, 12))
>cjsi : Symbol(cjsi, Decl(index.mjs, 7, 6))
>mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 9, 12))
>mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 1, 12))

mjsi.mjsSource;
>mjsi.mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 9, 12))
>mjsi.mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 1, 12))
>mjsi : Symbol(mjsi, Decl(index.mjs, 8, 6))
>mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 9, 12))
>mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 1, 12))

typei.mjsSource;
>typei.mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 9, 12))
>typei.mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 1, 12))
>typei : Symbol(typei, Decl(index.mjs, 9, 6))
>mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 9, 12))
>mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 1, 12))

ts.mjsSource;
>ts.mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 9, 12))
>ts.mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 1, 12))
>ts : Symbol(ts, Decl(index.mjs, 10, 6))
>mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 9, 12))
>mjsSource : Symbol(cjsi.mjsSource, Decl(index.d.mts, 1, 12))

=== index.cjs ===
// cjs format file
Expand Down Expand Up @@ -137,109 +137,115 @@ import * as ts from "inner/types";
>ts : Symbol(ts, Decl(index.cjs, 10, 6))

cjsi.cjsSource;
>cjsi.cjsSource : Symbol(cjsi.cjsSource, Decl(index.d.cts, 9, 12))
>cjsi.cjsSource : Symbol(cjsi.cjsSource, Decl(index.d.cts, 1, 12))
>cjsi : Symbol(cjsi, Decl(index.cjs, 7, 6))
>cjsSource : Symbol(cjsi.cjsSource, Decl(index.d.cts, 9, 12))
>cjsSource : Symbol(cjsi.cjsSource, Decl(index.d.cts, 1, 12))

mjsi.cjsSource;
>mjsi.cjsSource : Symbol(cjsi.cjsSource, Decl(index.d.cts, 9, 12))
>mjsi.cjsSource : Symbol(cjsi.cjsSource, Decl(index.d.cts, 1, 12))
>mjsi : Symbol(mjsi, Decl(index.cjs, 8, 6))
>cjsSource : Symbol(cjsi.cjsSource, Decl(index.d.cts, 9, 12))
>cjsSource : Symbol(cjsi.cjsSource, Decl(index.d.cts, 1, 12))

typei.implicitCjsSource;
>typei.implicitCjsSource : Symbol(cjsi.type.implicitCjsSource, Decl(index.d.ts, 9, 12))
>typei.implicitCjsSource : Symbol(typei.implicitCjsSource, Decl(index.d.ts, 1, 12))
>typei : Symbol(typei, Decl(index.cjs, 9, 6))
>implicitCjsSource : Symbol(cjsi.type.implicitCjsSource, Decl(index.d.ts, 9, 12))
>implicitCjsSource : Symbol(typei.implicitCjsSource, Decl(index.d.ts, 1, 12))

ts.cjsSource;
>ts.cjsSource : Symbol(cjsi.cjsSource, Decl(index.d.cts, 9, 12))
>ts.cjsSource : Symbol(cjsi.cjsSource, Decl(index.d.cts, 1, 12))
>ts : Symbol(ts, Decl(index.cjs, 10, 6))
>cjsSource : Symbol(cjsi.cjsSource, Decl(index.d.cts, 9, 12))
>cjsSource : Symbol(cjsi.cjsSource, Decl(index.d.cts, 1, 12))

=== node_modules/inner/index.d.ts ===
// cjs format file
export const implicitCjsSource = true;
>implicitCjsSource : Symbol(implicitCjsSource, Decl(index.d.ts, 1, 12))

=== node_modules/inner/test.d.ts ===
// cjs format file
import * as cjs from "inner/a";
>cjs : Symbol(cjs, Decl(index.d.ts, 1, 6))
>cjs : Symbol(cjs, Decl(test.d.ts, 1, 6))

import * as mjs from "inner/b";
>mjs : Symbol(mjs, Decl(index.d.ts, 2, 6))
>mjs : Symbol(mjs, Decl(test.d.ts, 2, 6))

import * as type from "inner";
>type : Symbol(type, Decl(index.d.ts, 3, 6))
>type : Symbol(type, Decl(test.d.ts, 3, 6))

import * as ts from "inner/types";
>ts : Symbol(ts, Decl(index.d.ts, 4, 6))
>ts : Symbol(ts, Decl(test.d.ts, 4, 6))

export { cjs };
>cjs : Symbol(mjs.type.cjs, Decl(index.d.ts, 5, 8))
>cjs : Symbol(cjs, Decl(test.d.ts, 5, 8))

export { mjs };
>mjs : Symbol(mjs.type.mjs, Decl(index.d.ts, 6, 8))
>mjs : Symbol(mjs, Decl(test.d.ts, 6, 8))

export { type };
>type : Symbol(mjs.type.type, Decl(index.d.ts, 7, 8))
>type : Symbol(type, Decl(test.d.ts, 7, 8))

export { ts };
>ts : Symbol(mjs.type.ts, Decl(index.d.ts, 8, 8))

export const implicitCjsSource = true;
>implicitCjsSource : Symbol(mjs.type.implicitCjsSource, Decl(index.d.ts, 9, 12))
>ts : Symbol(ts, Decl(test.d.ts, 8, 8))

=== node_modules/inner/index.d.mts ===
// esm format file
export const mjsSource = true;
>mjsSource : Symbol(mjsSource, Decl(index.d.mts, 1, 12))

=== node_modules/inner/test.d.mts ===
// esm format file
import * as cjs from "inner/a";
>cjs : Symbol(cjs, Decl(index.d.mts, 1, 6))
>cjs : Symbol(cjs, Decl(test.d.mts, 1, 6))

import * as mjs from "inner/b";
>mjs : Symbol(mjs, Decl(index.d.mts, 2, 6))
>mjs : Symbol(mjs, Decl(test.d.mts, 2, 6))

import * as type from "inner";
>type : Symbol(type, Decl(index.d.mts, 3, 6))
>type : Symbol(type, Decl(test.d.mts, 3, 6))

import * as ts from "inner/types";
>ts : Symbol(ts, Decl(index.d.mts, 4, 6))
>ts : Symbol(ts, Decl(test.d.mts, 4, 6))

export { cjs };
>cjs : Symbol(mjs.cjs, Decl(index.d.mts, 5, 8))
>cjs : Symbol(cjs, Decl(test.d.mts, 5, 8))

export { mjs };
>mjs : Symbol(mjs.mjs, Decl(index.d.mts, 6, 8))
>mjs : Symbol(mjs, Decl(test.d.mts, 6, 8))

export { type };
>type : Symbol(mjs.type, Decl(index.d.mts, 7, 8))
>type : Symbol(type, Decl(test.d.mts, 7, 8))

export { ts };
>ts : Symbol(mjs.ts, Decl(index.d.mts, 8, 8))

export const mjsSource = true;
>mjsSource : Symbol(mjs.mjsSource, Decl(index.d.mts, 9, 12))
>ts : Symbol(ts, Decl(test.d.mts, 8, 8))

=== node_modules/inner/index.d.cts ===
// cjs format file
export const cjsSource = true;
>cjsSource : Symbol(cjsSource, Decl(index.d.cts, 1, 12))

=== node_modules/inner/test.d.cts ===
// cjs format file
import * as cjs from "inner/a";
>cjs : Symbol(cjs, Decl(index.d.cts, 1, 6))
>cjs : Symbol(cjs, Decl(test.d.cts, 1, 6))

import * as mjs from "inner/b";
>mjs : Symbol(mjs, Decl(index.d.cts, 2, 6))
>mjs : Symbol(mjs, Decl(test.d.cts, 2, 6))

import * as type from "inner";
>type : Symbol(type, Decl(index.d.cts, 3, 6))
>type : Symbol(type, Decl(test.d.cts, 3, 6))

import * as ts from "inner/types";
>ts : Symbol(ts, Decl(index.d.cts, 4, 6))
>ts : Symbol(ts, Decl(test.d.cts, 4, 6))

export { cjs };
>cjs : Symbol(cjs.cjs, Decl(index.d.cts, 5, 8))
>cjs : Symbol(cjs, Decl(test.d.cts, 5, 8))

export { mjs };
>mjs : Symbol(cjs.mjs, Decl(index.d.cts, 6, 8))
>mjs : Symbol(mjs, Decl(test.d.cts, 6, 8))

export { type };
>type : Symbol(cjs.type, Decl(index.d.cts, 7, 8))
>type : Symbol(type, Decl(test.d.cts, 7, 8))

export { ts };
>ts : Symbol(cjs.ts, Decl(index.d.cts, 8, 8))

export const cjsSource = true;
>cjsSource : Symbol(cjs.cjsSource, Decl(index.d.cts, 9, 12))
>ts : Symbol(ts, Decl(test.d.cts, 8, 8))

Loading