Skip to content

Commit

Permalink
Revert "bring back main/types for ancient outdated node versions"
Browse files Browse the repository at this point in the history
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
  • Loading branch information
isaacs committed Sep 26, 2023
1 parent a637273 commit 00b5ca2
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,6 @@
"type": "git",
"url": "git://github.com/isaacs/node-glob.git"
},
"type": "module",
"main": "./dist/esm/index.js",
"types": "./dist/esm/index.d.ts",
"tshy": {
"main": "esm",
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
},
"exports": {
"./package.json": "./package.json",
".": {
Expand Down Expand Up @@ -93,5 +83,12 @@
},
"engines": {
"node": ">=16 || 14 >=14.17"
},
"type": "module",
"tshy": {
"exports": {
"./package.json": "./package.json",
".": "./src/index.ts"
}
}
}

0 comments on commit 00b5ca2

Please sign in to comment.