-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Component commits: fce9115 Use node's algorithm for calculating the longest matching export/import pattern Co-authored-by: Wesley Wigham <[email protected]>
- Loading branch information
Showing
19 changed files
with
2,847 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
123 changes: 123 additions & 0 deletions
123
...elines/reference/nodeModulesAllowJsPackagePatternExportsExclude(module=node16).errors.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
tests/cases/conformance/node/allowJs/index.cjs(2,23): error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations. | ||
tests/cases/conformance/node/allowJs/index.cjs(3,23): error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations. | ||
tests/cases/conformance/node/allowJs/index.cjs(4,24): error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations. | ||
tests/cases/conformance/node/allowJs/index.js(2,23): error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations. | ||
tests/cases/conformance/node/allowJs/index.js(3,23): error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations. | ||
tests/cases/conformance/node/allowJs/index.js(4,24): error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations. | ||
tests/cases/conformance/node/allowJs/index.mjs(2,23): error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations. | ||
tests/cases/conformance/node/allowJs/index.mjs(3,23): error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations. | ||
tests/cases/conformance/node/allowJs/index.mjs(4,24): error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations. | ||
tests/cases/conformance/node/allowJs/node_modules/inner/exclude/index.d.cts(2,22): error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations. | ||
tests/cases/conformance/node/allowJs/node_modules/inner/exclude/index.d.cts(3,22): error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations. | ||
tests/cases/conformance/node/allowJs/node_modules/inner/exclude/index.d.cts(4,23): error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations. | ||
tests/cases/conformance/node/allowJs/node_modules/inner/exclude/index.d.mts(2,22): error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations. | ||
tests/cases/conformance/node/allowJs/node_modules/inner/exclude/index.d.mts(3,22): error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations. | ||
tests/cases/conformance/node/allowJs/node_modules/inner/exclude/index.d.mts(4,23): error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations. | ||
tests/cases/conformance/node/allowJs/node_modules/inner/exclude/index.d.ts(2,22): error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations. | ||
tests/cases/conformance/node/allowJs/node_modules/inner/exclude/index.d.ts(3,22): error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations. | ||
tests/cases/conformance/node/allowJs/node_modules/inner/exclude/index.d.ts(4,23): error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations. | ||
|
||
|
||
==== tests/cases/conformance/node/allowJs/index.js (3 errors) ==== | ||
// esm format file | ||
import * as cjsi from "inner/cjs/exclude/index"; | ||
~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations. | ||
import * as mjsi from "inner/mjs/exclude/index"; | ||
~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations. | ||
import * as typei from "inner/js/exclude/index"; | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations. | ||
cjsi; | ||
mjsi; | ||
typei; | ||
==== tests/cases/conformance/node/allowJs/index.mjs (3 errors) ==== | ||
// esm format file | ||
import * as cjsi from "inner/cjs/exclude/index"; | ||
~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations. | ||
import * as mjsi from "inner/mjs/exclude/index"; | ||
~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations. | ||
import * as typei from "inner/js/exclude/index"; | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations. | ||
cjsi; | ||
mjsi; | ||
typei; | ||
==== tests/cases/conformance/node/allowJs/index.cjs (3 errors) ==== | ||
// cjs format file | ||
import * as cjsi from "inner/cjs/exclude/index"; | ||
~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations. | ||
import * as mjsi from "inner/mjs/exclude/index"; | ||
~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations. | ||
import * as typei from "inner/js/exclude/index"; | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations. | ||
cjsi; | ||
mjsi; | ||
typei; | ||
==== tests/cases/conformance/node/allowJs/node_modules/inner/exclude/index.d.ts (3 errors) ==== | ||
// cjs format file | ||
import * as cjs from "inner/cjs/exclude/index"; | ||
~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations. | ||
import * as mjs from "inner/mjs/exclude/index"; | ||
~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations. | ||
import * as type from "inner/js/exclude/index"; | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations. | ||
export { cjs }; | ||
export { mjs }; | ||
export { type }; | ||
==== tests/cases/conformance/node/allowJs/node_modules/inner/exclude/index.d.mts (3 errors) ==== | ||
// esm format file | ||
import * as cjs from "inner/cjs/exclude/index"; | ||
~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations. | ||
import * as mjs from "inner/mjs/exclude/index"; | ||
~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations. | ||
import * as type from "inner/js/exclude/index"; | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations. | ||
export { cjs }; | ||
export { mjs }; | ||
export { type }; | ||
==== tests/cases/conformance/node/allowJs/node_modules/inner/exclude/index.d.cts (3 errors) ==== | ||
// cjs format file | ||
import * as cjs from "inner/cjs/exclude/index"; | ||
~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS2307: Cannot find module 'inner/cjs/exclude/index' or its corresponding type declarations. | ||
import * as mjs from "inner/mjs/exclude/index"; | ||
~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS2307: Cannot find module 'inner/mjs/exclude/index' or its corresponding type declarations. | ||
import * as type from "inner/js/exclude/index"; | ||
~~~~~~~~~~~~~~~~~~~~~~~~ | ||
!!! error TS2307: Cannot find module 'inner/js/exclude/index' or its corresponding type declarations. | ||
export { cjs }; | ||
export { mjs }; | ||
export { type }; | ||
==== tests/cases/conformance/node/allowJs/package.json (0 errors) ==== | ||
{ | ||
"name": "package", | ||
"private": true, | ||
"type": "module" | ||
} | ||
==== tests/cases/conformance/node/allowJs/node_modules/inner/package.json (0 errors) ==== | ||
{ | ||
"name": "inner", | ||
"private": true, | ||
"exports": { | ||
"./cjs/*": "./*.cjs", | ||
"./cjs/exclude/*": null, | ||
"./mjs/*": "./*.mjs", | ||
"./mjs/exclude/*": null, | ||
"./js/*": "./*.js", | ||
"./js/exclude/*": null | ||
} | ||
} |
127 changes: 127 additions & 0 deletions
127
tests/baselines/reference/nodeModulesAllowJsPackagePatternExportsExclude(module=node16).js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,127 @@ | ||
//// [tests/cases/conformance/node/allowJs/nodeModulesAllowJsPackagePatternExportsExclude.ts] //// | ||
|
||
//// [index.js] | ||
// esm format file | ||
import * as cjsi from "inner/cjs/exclude/index"; | ||
import * as mjsi from "inner/mjs/exclude/index"; | ||
import * as typei from "inner/js/exclude/index"; | ||
cjsi; | ||
mjsi; | ||
typei; | ||
//// [index.mjs] | ||
// esm format file | ||
import * as cjsi from "inner/cjs/exclude/index"; | ||
import * as mjsi from "inner/mjs/exclude/index"; | ||
import * as typei from "inner/js/exclude/index"; | ||
cjsi; | ||
mjsi; | ||
typei; | ||
//// [index.cjs] | ||
// cjs format file | ||
import * as cjsi from "inner/cjs/exclude/index"; | ||
import * as mjsi from "inner/mjs/exclude/index"; | ||
import * as typei from "inner/js/exclude/index"; | ||
cjsi; | ||
mjsi; | ||
typei; | ||
//// [index.d.ts] | ||
// cjs format file | ||
import * as cjs from "inner/cjs/exclude/index"; | ||
import * as mjs from "inner/mjs/exclude/index"; | ||
import * as type from "inner/js/exclude/index"; | ||
export { cjs }; | ||
export { mjs }; | ||
export { type }; | ||
//// [index.d.mts] | ||
// esm format file | ||
import * as cjs from "inner/cjs/exclude/index"; | ||
import * as mjs from "inner/mjs/exclude/index"; | ||
import * as type from "inner/js/exclude/index"; | ||
export { cjs }; | ||
export { mjs }; | ||
export { type }; | ||
//// [index.d.cts] | ||
// cjs format file | ||
import * as cjs from "inner/cjs/exclude/index"; | ||
import * as mjs from "inner/mjs/exclude/index"; | ||
import * as type from "inner/js/exclude/index"; | ||
export { cjs }; | ||
export { mjs }; | ||
export { type }; | ||
//// [package.json] | ||
{ | ||
"name": "package", | ||
"private": true, | ||
"type": "module" | ||
} | ||
//// [package.json] | ||
{ | ||
"name": "inner", | ||
"private": true, | ||
"exports": { | ||
"./cjs/*": "./*.cjs", | ||
"./cjs/exclude/*": null, | ||
"./mjs/*": "./*.mjs", | ||
"./mjs/exclude/*": null, | ||
"./js/*": "./*.js", | ||
"./js/exclude/*": null | ||
} | ||
} | ||
|
||
//// [index.js] | ||
// esm format file | ||
import * as cjsi from "inner/cjs/exclude/index"; | ||
import * as mjsi from "inner/mjs/exclude/index"; | ||
import * as typei from "inner/js/exclude/index"; | ||
cjsi; | ||
mjsi; | ||
typei; | ||
//// [index.mjs] | ||
// esm format file | ||
import * as cjsi from "inner/cjs/exclude/index"; | ||
import * as mjsi from "inner/mjs/exclude/index"; | ||
import * as typei from "inner/js/exclude/index"; | ||
cjsi; | ||
mjsi; | ||
typei; | ||
//// [index.cjs] | ||
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
// cjs format file | ||
const cjsi = __importStar(require("inner/cjs/exclude/index")); | ||
const mjsi = __importStar(require("inner/mjs/exclude/index")); | ||
const typei = __importStar(require("inner/js/exclude/index")); | ||
cjsi; | ||
mjsi; | ||
typei; | ||
|
||
|
||
//// [index.d.ts] | ||
export {}; | ||
//// [index.d.mts] | ||
export {}; | ||
//// [index.d.cts] | ||
export {}; |
Oops, something went wrong.