Skip to content

Commit 5bf44ac

Browse files
committed
Accept new error codes
1 parent a092fd3 commit 5bf44ac

5 files changed

+50
-50
lines changed

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

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
tests/cases/conformance/node/index.cts(2,21): error TS1445: 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.
2-
tests/cases/conformance/node/index.cts(3,21): error TS1445: 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.
3-
tests/cases/conformance/node/index.cts(6,21): error TS1445: 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.
4-
tests/cases/conformance/node/index.cts(9,21): error TS1445: Module './subfolder2/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.
5-
tests/cases/conformance/node/index.cts(11,22): error TS1445: Module './subfolder2/another/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.
6-
tests/cases/conformance/node/index.cts(12,22): error TS1445: Module './subfolder2/another/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.
1+
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.
2+
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.
3+
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.
4+
tests/cases/conformance/node/index.cts(9,21): error TS1471: Module './subfolder2/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.
5+
tests/cases/conformance/node/index.cts(11,22): error TS1471: Module './subfolder2/another/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.
6+
tests/cases/conformance/node/index.cts(12,22): error TS1471: Module './subfolder2/another/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.
77

88

99
==== tests/cases/conformance/node/subfolder/index.ts (0 errors) ====
@@ -74,27 +74,27 @@ tests/cases/conformance/node/index.cts(12,22): error TS1445: Module './subfolder
7474
// ESM-format imports below should issue errors
7575
import * as m1 from "./index.js";
7676
~~~~~~~~~~~~
77-
!!! error TS1445: 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.
77+
!!! 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.
7878
import * as m2 from "./index.mjs";
7979
~~~~~~~~~~~~~
80-
!!! error TS1445: 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.
80+
!!! 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.
8181
import * as m3 from "./index.cjs";
8282
import * as m4 from "./subfolder/index.js";
8383
import * as m5 from "./subfolder/index.mjs";
8484
~~~~~~~~~~~~~~~~~~~~~~~
85-
!!! error TS1445: 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.
85+
!!! 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.
8686
import * as m6 from "./subfolder/index.cjs";
8787
import * as m7 from "./subfolder2/index.js";
8888
import * as m8 from "./subfolder2/index.mjs";
8989
~~~~~~~~~~~~~~~~~~~~~~~~
90-
!!! error TS1445: Module './subfolder2/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.
90+
!!! error TS1471: Module './subfolder2/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.
9191
import * as m9 from "./subfolder2/index.cjs";
9292
import * as m10 from "./subfolder2/another/index.js";
9393
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94-
!!! error TS1445: Module './subfolder2/another/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.
94+
!!! error TS1471: Module './subfolder2/another/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.
9595
import * as m11 from "./subfolder2/another/index.mjs";
9696
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97-
!!! error TS1445: Module './subfolder2/another/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.
97+
!!! error TS1471: Module './subfolder2/another/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.
9898
import * as m12 from "./subfolder2/another/index.cjs";
9999
void m1;
100100
void m2;

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

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
tests/cases/conformance/node/index.cts(2,21): error TS1445: 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.
2-
tests/cases/conformance/node/index.cts(3,21): error TS1445: 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.
3-
tests/cases/conformance/node/index.cts(6,21): error TS1445: 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.
4-
tests/cases/conformance/node/index.cts(9,21): error TS1445: Module './subfolder2/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.
5-
tests/cases/conformance/node/index.cts(11,22): error TS1445: Module './subfolder2/another/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.
6-
tests/cases/conformance/node/index.cts(12,22): error TS1445: Module './subfolder2/another/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.
1+
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.
2+
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.
3+
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.
4+
tests/cases/conformance/node/index.cts(9,21): error TS1471: Module './subfolder2/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.
5+
tests/cases/conformance/node/index.cts(11,22): error TS1471: Module './subfolder2/another/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.
6+
tests/cases/conformance/node/index.cts(12,22): error TS1471: Module './subfolder2/another/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.
77

88

99
==== tests/cases/conformance/node/subfolder/index.ts (0 errors) ====
@@ -74,27 +74,27 @@ tests/cases/conformance/node/index.cts(12,22): error TS1445: Module './subfolder
7474
// ESM-format imports below should issue errors
7575
import * as m1 from "./index.js";
7676
~~~~~~~~~~~~
77-
!!! error TS1445: 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.
77+
!!! 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.
7878
import * as m2 from "./index.mjs";
7979
~~~~~~~~~~~~~
80-
!!! error TS1445: 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.
80+
!!! 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.
8181
import * as m3 from "./index.cjs";
8282
import * as m4 from "./subfolder/index.js";
8383
import * as m5 from "./subfolder/index.mjs";
8484
~~~~~~~~~~~~~~~~~~~~~~~
85-
!!! error TS1445: 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.
85+
!!! 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.
8686
import * as m6 from "./subfolder/index.cjs";
8787
import * as m7 from "./subfolder2/index.js";
8888
import * as m8 from "./subfolder2/index.mjs";
8989
~~~~~~~~~~~~~~~~~~~~~~~~
90-
!!! error TS1445: Module './subfolder2/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.
90+
!!! error TS1471: Module './subfolder2/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.
9191
import * as m9 from "./subfolder2/index.cjs";
9292
import * as m10 from "./subfolder2/another/index.js";
9393
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94-
!!! error TS1445: Module './subfolder2/another/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.
94+
!!! error TS1471: Module './subfolder2/another/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.
9595
import * as m11 from "./subfolder2/another/index.mjs";
9696
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97-
!!! error TS1445: Module './subfolder2/another/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.
97+
!!! error TS1471: Module './subfolder2/another/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.
9898
import * as m12 from "./subfolder2/another/index.cjs";
9999
void m1;
100100
void m2;

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

+12-12
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
tests/cases/conformance/node/allowJs/index.cjs(2,21): error TS1445: 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.
2-
tests/cases/conformance/node/allowJs/index.cjs(3,21): error TS1445: 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.
3-
tests/cases/conformance/node/allowJs/index.cjs(6,21): error TS1445: 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.
4-
tests/cases/conformance/node/allowJs/index.cjs(9,21): error TS1445: Module './subfolder2/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.
5-
tests/cases/conformance/node/allowJs/index.cjs(11,22): error TS1445: Module './subfolder2/another/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.
6-
tests/cases/conformance/node/allowJs/index.cjs(12,22): error TS1445: Module './subfolder2/another/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.
1+
tests/cases/conformance/node/allowJs/index.cjs(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.
2+
tests/cases/conformance/node/allowJs/index.cjs(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.
3+
tests/cases/conformance/node/allowJs/index.cjs(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.
4+
tests/cases/conformance/node/allowJs/index.cjs(9,21): error TS1471: Module './subfolder2/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.
5+
tests/cases/conformance/node/allowJs/index.cjs(11,22): error TS1471: Module './subfolder2/another/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.
6+
tests/cases/conformance/node/allowJs/index.cjs(12,22): error TS1471: Module './subfolder2/another/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.
77

88

99
==== tests/cases/conformance/node/allowJs/subfolder/index.js (0 errors) ====
@@ -74,27 +74,27 @@ tests/cases/conformance/node/allowJs/index.cjs(12,22): error TS1445: Module './s
7474
// ESM format imports below should error
7575
import * as m1 from "./index.js";
7676
~~~~~~~~~~~~
77-
!!! error TS1445: 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.
77+
!!! 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.
7878
import * as m2 from "./index.mjs";
7979
~~~~~~~~~~~~~
80-
!!! error TS1445: 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.
80+
!!! 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.
8181
import * as m3 from "./index.cjs";
8282
import * as m4 from "./subfolder/index.js";
8383
import * as m5 from "./subfolder/index.mjs";
8484
~~~~~~~~~~~~~~~~~~~~~~~
85-
!!! error TS1445: 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.
85+
!!! 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.
8686
import * as m6 from "./subfolder/index.cjs";
8787
import * as m7 from "./subfolder2/index.js";
8888
import * as m8 from "./subfolder2/index.mjs";
8989
~~~~~~~~~~~~~~~~~~~~~~~~
90-
!!! error TS1445: Module './subfolder2/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.
90+
!!! error TS1471: Module './subfolder2/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.
9191
import * as m9 from "./subfolder2/index.cjs";
9292
import * as m10 from "./subfolder2/another/index.js";
9393
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94-
!!! error TS1445: Module './subfolder2/another/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.
94+
!!! error TS1471: Module './subfolder2/another/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.
9595
import * as m11 from "./subfolder2/another/index.mjs";
9696
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97-
!!! error TS1445: Module './subfolder2/another/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.
97+
!!! error TS1471: Module './subfolder2/another/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.
9898
import * as m12 from "./subfolder2/another/index.cjs";
9999
void m1;
100100
void m2;

0 commit comments

Comments
 (0)