Skip to content

Commit 1ab7927

Browse files
committed
Add CLI snapshots
1 parent 8865fec commit 1ab7927

10 files changed

+271
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
3+
```
4+
5+
6+
7+
❗️ The types resolved at the package use `export default` where the implementation appears to use `module.exports =`.
8+
Node treats a default import of these constructs from an ES module differently, so these types will make TypeScript under the `node16` resolution mode think an extra `.default` property access is required, but that will likely fail at runtime in Node.
9+
These types should use `export =` instead of `export default`.
10+
11+
┌────────────────────┬───────────────────────────────────┐
12+
│ │ "ajv" │
13+
├────────────────────┼───────────────────────────────────┤
14+
│ node10 │ 🟢 │
15+
├────────────────────┼───────────────────────────────────┤
16+
│ node16 (from CJS) │ 🟢 (CJS) │
17+
├────────────────────┼───────────────────────────────────┤
18+
│ node16 (from ESM) │ ❗️ Incorrect default export │
19+
├────────────────────┼───────────────────────────────────┤
20+
│ bundler │ 🟢 │
21+
└────────────────────┴───────────────────────────────────┘
22+
23+
24+
```
25+
26+
Exit code: 1
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
2+
3+
```
4+
5+
6+
7+
🎭 Imports of the package under the `node16` module resolution setting when the importing module is ESM (its extension is `.mts` or `.mjs`, or it has a `.ts` or `.js` extension and is in scope of a `package.json` that contains `"type": "module"`) resolved to CJS types, but ESM implementations.
8+
9+
┌────────────────────┬───────────────────────────────────┐
10+
│ │ "astring" │
11+
├────────────────────┼───────────────────────────────────┤
12+
│ node10 │ 🟢 │
13+
├────────────────────┼───────────────────────────────────┤
14+
│ node16 (from CJS) │ 🟢 (CJS) │
15+
├────────────────────┼───────────────────────────────────┤
16+
│ node16 (from ESM) │ 🎭 Masquerading as CJS │
17+
├────────────────────┼───────────────────────────────────┤
18+
│ bundler │ 🟢 │
19+
└────────────────────┴───────────────────────────────────┘
20+
21+
22+
```
23+
24+
Exit code: 1
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
2+
3+
```
4+
5+
6+
7+
❓ Wildcards cannot yet be analyzed by this tool.
8+
9+
💀 Imports of multiple entrypoints under the `node10` module resolution setting failed to resolve.
10+
11+
🚫 Imports of multiple entrypoints under the `node16` module resolution setting when the importing module is CJS (its extension is `.cts` or `.cjs`, or it has a `.ts` or `.js` extension and is in scope of a `package.json` that does not contain `"type": "module"`) resolved to JavaScript files, but no types.
12+
🚫 Imports of multiple entrypoints under the `node16` module resolution setting when the importing module is ESM (its extension is `.mts` or `.mjs`, or it has a `.ts` or `.js` extension and is in scope of a `package.json` that contains `"type": "module"`) resolved to JavaScript files, but no types.
13+
🚫 Imports of multiple entrypoints under the `bundler` module resolution setting resolved to JavaScript files, but no types.
14+
15+
⚠️ Imports of multiple entrypoints resolved to ES modules from a CJS importing module.
16+
CJS modules in Node will only be able to access this entrypoint with a dynamic import.
17+
18+
┌────────────────────┬───────────────────────────────────┬───────────────────────────────────┬───────────────────────────────────┬───────────────────────────────────┬───────────────────────────────────┬───────────────────────────────────┬───────────────────────────────────┬───────────────────────────────────┬───────────────────────────────────┬───────────────────────────────────┬───────────────────────────────────┐
19+
│ │ "axios" │ "axios/unsafe/*" │ "axios/unsafe/core/settle.js" │ "axios/unsafe/core/buildFullPath… │ "axios/unsafe/helpers/isAbsolute… │ "axios/unsafe/helpers/buildURL.j… │ "axios/unsafe/helpers/combineURL… │ "axios/unsafe/adapters/http.js" │ "axios/unsafe/adapters/xhr.js" │ "axios/unsafe/utils.js" │ "axios/package.json" │
20+
├────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┤
21+
│ node10 │ 🟢 │ ❓ Unable to check │ 💀 Failed to resolve │ 💀 Failed to resolve │ 💀 Failed to resolve │ 💀 Failed to resolve │ 💀 Failed to resolve │ 💀 Failed to resolve │ 💀 Failed to resolve │ 💀 Failed to resolve │ 🟢 (JSON) │
22+
├────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┤
23+
│ node16 (from CJS) │ 🟢 (CJS) │ ❓ Unable to check │ 🚫 No types │ 🚫 No types │ 🚫 No types │ 🚫 No types │ 🚫 No types │ 🚫 No types │ 🚫 No types │ 🚫 No types │ 🟢 (JSON) │
24+
│ │ │ │ ⚠️ ESM (dynamic import only) │ ⚠️ ESM (dynamic import only) │ ⚠️ ESM (dynamic import only) │ ⚠️ ESM (dynamic import only) │ ⚠️ ESM (dynamic import only) │ ⚠️ ESM (dynamic import only) │ ⚠️ ESM (dynamic import only) │ ⚠️ ESM (dynamic import only) │ │
25+
├────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┤
26+
│ node16 (from ESM) │ 🟢 (ESM) │ ❓ Unable to check │ 🚫 No types │ 🚫 No types │ 🚫 No types │ 🚫 No types │ 🚫 No types │ 🚫 No types │ 🚫 No types │ 🚫 No types │ 🟢 (JSON) │
27+
├────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────────────────────────────────┼───────�
28+
29+
```
30+
31+
Exit code: 1
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
2+
3+
```
4+
5+
6+
7+
🎭 Imports of `"commander"` under the `node16` module resolution setting when the importing module is ESM (its extension is `.mts` or `.mjs`, or it has a `.ts` or `.js` extension and is in scope of a `package.json` that contains `"type": "module"`) resolved to CJS types, but ESM implementations.
8+
9+
🚫 Imports of `"commander/esm.mjs"` under all module resolution settings resolved to JavaScript files, but no types.
10+
11+
⚠️ Imports of `"commander/esm.mjs"` resolved to ES modules from a CJS importing module.
12+
CJS modules in Node will only be able to access this entrypoint with a dynamic import.
13+
14+
┌────────────────────┬───────────────────────────────────┬───────────────────────────────────┐
15+
│ │ "commander" │ "commander/esm.mjs" │
16+
├────────────────────┼───────────────────────────────────┼───────────────────────────────────┤
17+
│ node10 │ 🟢 │ 🚫 No types │
18+
├────────────────────┼───────────────────────────────────┼───────────────────────────────────┤
19+
│ node16 (from CJS) │ 🟢 (CJS) │ 🚫 No types │
20+
│ │ │ ⚠️ ESM (dynamic import only) │
21+
├────────────────────┼───────────────────────────────────┼───────────────────────────────────┤
22+
│ node16 (from ESM) │ 🎭 Masquerading as CJS │ 🚫 No types │
23+
├────────────────────┼───────────────────────────────────┼───────────────────────────────────┤
24+
│ bundler │ 🟢 │ 🚫 No types │
25+
└────────────────────┴───────────────────────────────────┴───────────────────────────────────┘
26+
27+
28+
```
29+
30+
Exit code: 1
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
3+
```
4+
5+
6+
7+
❗️ The types resolved at the package use `export default` where the implementation appears to use `module.exports =`.
8+
Node treats a default import of these constructs from an ES module differently, so these types will make TypeScript under the `node16` resolution mode think an extra `.default` property access is required, but that will likely fail at runtime in Node.
9+
These types should use `export =` instead of `export default`.
10+
11+
┌────────────────────┬───────────────────────────────────┐
12+
│ │ "hexoid" │
13+
├────────────────────┼───────────────────────────────────┤
14+
│ node10 │ 🟢 │
15+
├────────────────────┼───────────────────────────────────┤
16+
│ node16 (from CJS) │ 🟢 (CJS) │
17+
├────────────────────┼───────────────────────────────────┤
18+
│ node16 (from ESM) │ ❗️ Incorrect default export │
19+
├────────────────────┼───────────────────────────────────┤
20+
│ bundler │ 🟢 │
21+
└────────────────────┴───────────────────────────────────┘
22+
23+
24+
```
25+
26+
Exit code: 1

0 commit comments

Comments
 (0)