File tree 3 files changed +15
-5
lines changed
3 files changed +15
-5
lines changed Original file line number Diff line number Diff line change 24
24
"engines" : {
25
25
"node" : " >=18.0.0"
26
26
},
27
+ "sideEffects" : false ,
27
28
"main" : " ./dist/index.js" ,
28
29
"typings" : " ./dist/index.d.ts" ,
30
+ "exports" : {
31
+ "." : {
32
+ "types" : " ./dist/index.d.ts" ,
33
+ "import" : " ./dist/index.mjs" ,
34
+ "default" : " ./dist/index.js"
35
+ },
36
+ "./package.json" : " ./package.json"
37
+ },
29
38
"files" : [
30
39
" LICENSE" ,
31
40
" README.md" ,
32
41
" CHANGELOG.md" ,
33
- " dist/index.js" ,
34
- " dist/index.d.ts"
42
+ " dist"
35
43
],
36
44
"scripts" : {
37
45
"pretest" : " npm run lint" ,
41
49
"lint:prettier" : " prettier --check ." ,
42
50
"format" : " prettier --write ." ,
43
51
"clean" : " rm -rf dist" ,
44
- "build" : " npm run clean && tsc" ,
52
+ "build" : " npm run clean && tsc && npm run build:esm" ,
53
+ "build:esm" : " sed 's/module.exports =/export default/' dist/index.js > dist/index.mjs" ,
45
54
"test" : " ts-node test.ts"
46
55
},
47
56
"devDependencies" : {
Original file line number Diff line number Diff line change 1
- import assert = require ( "node:assert/strict" ) ;
2
- import builder = require ( "./index" ) ;
1
+ import assert from "node:assert/strict" ;
2
+ import builder from "./index" ;
3
3
4
4
const test = (
5
5
message : string ,
Original file line number Diff line number Diff line change 1
1
{
2
+ "include" : [" index.ts" ],
2
3
"compilerOptions" : {
3
4
"declaration" : true ,
4
5
"esModuleInterop" : true ,
You can’t perform that action at this time.
0 commit comments