Skip to content

Commit 1308818

Browse files
committed
update package.json to correct paths for module exports, cleanup
1 parent da5bfb8 commit 1308818

File tree

2 files changed

+3
-28
lines changed

2 files changed

+3
-28
lines changed

jest.config.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,3 @@
1-
const _ = process;
2-
3-
// @ts-expect-error we need to put this inside jest.config.js,
4-
// since it's being read before the process object is replaced by the jest runner.
5-
// More info:
6-
// https://johann.pardanaud.com/blog/how-to-assert-unhandled-rejection-and-uncaught-exception-with-jest/
7-
// https://github.com/jestjs/jest/issues/5620
8-
// https://github.com/jestjs/jest/issues/11165
9-
// https://codesandbox.io/p/devbox/z9qdp4?migrateFrom=zzjfzz
10-
global._onUnhandledRejection = handler => {
11-
_.on('unhandledRejection', handler);
12-
};
13-
141
import { createDefaultEsmPreset } from 'ts-jest/dist/presets/create-jest-preset.js';
152

163
const tsJestTransformCfg = createDefaultEsmPreset().transform;

package.json

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
"url": "http://github.com/graphql/dataloader.git"
1818
},
1919
"type": "module",
20-
"main": "dist/index.cjs",
21-
"module": "dist/index.js",
22-
"typings": "dist/index.d.ts",
20+
"main": "dist/cjs/index.js",
21+
"module": "dist/esm/index.js",
22+
"typings": "dist/esm/index.d.ts",
2323
"scripts": {
2424
"test": "npm run lint && npm run check && npm run testonly",
2525
"test:ci": "npm run lint && npm run check && npm run testonly -- --coverage",
@@ -69,17 +69,5 @@
6969
"files": "src/**/*.ts"
7070
}
7171
]
72-
},
73-
"tsdown": {
74-
"entry": [
75-
"src/index.ts"
76-
],
77-
"format": [
78-
"cjs",
79-
"esm"
80-
],
81-
"dts": true,
82-
"sourcemap": true,
83-
"clean": true
8472
}
8573
}

0 commit comments

Comments
 (0)