Skip to content

Commit

Permalink
Fix package.json exports for ts-node/register
Browse files Browse the repository at this point in the history
Commit f6cd5d4 broke `require('ts-node/register')` because
`exports:` provides an *exclusive* list of possible entry points,
and makes importing through other entry points impossible.

In particular, this breaks node-tap with TypeScript support.

Refs: https://medium.com/@forbeslindesay/is-promise-post-mortem-cab807f18dcc
  • Loading branch information
addaleax committed May 3, 2020
1 parent 6fc4298 commit 5806ede
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion package.json
Expand Up @@ -5,7 +5,12 @@
"main": "dist/index.js",
"exports": {
".": "./dist/index.js",
"./esm": "./esm.mjs"
"./esm": "./esm.mjs",
"./register": "./register/index.js",
"./register/index": "./register/index.js",
"./register/files": "./register/files.js",
"./register/transpile-only": "./register/transpile-only.js",
"./register/type-check": "./register/type-check.js"
},
"types": "dist/index.d.ts",
"bin": {
Expand Down

0 comments on commit 5806ede

Please sign in to comment.