Skip to content

Commit 00b5ca2

Browse files
committed
Revert "bring back main/types for ancient outdated node versions"
This reverts commit 7d7b115. The problem is that anyone who isn't setting `moduleResolution` such that exports can be parsed, will be trying to load ESM types as if they were CommonJS, which is the whole reason for removing top level main/types in the first place. There seems to be no way to make this work that is both correct for contemporary tooling, and compatible with node versions that have been dead for years. We must choose the future. Fix: #559
1 parent a637273 commit 00b5ca2

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

package.json

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,6 @@
88
"type": "git",
99
"url": "git://github.com/isaacs/node-glob.git"
1010
},
11-
"type": "module",
12-
"main": "./dist/esm/index.js",
13-
"types": "./dist/esm/index.d.ts",
14-
"tshy": {
15-
"main": "esm",
16-
"exports": {
17-
"./package.json": "./package.json",
18-
".": "./src/index.ts"
19-
}
20-
},
2111
"exports": {
2212
"./package.json": "./package.json",
2313
".": {
@@ -93,5 +83,12 @@
9383
},
9484
"engines": {
9585
"node": ">=16 || 14 >=14.17"
86+
},
87+
"type": "module",
88+
"tshy": {
89+
"exports": {
90+
"./package.json": "./package.json",
91+
".": "./src/index.ts"
92+
}
9693
}
9794
}

0 commit comments

Comments
 (0)