Skip to content

Commit 12f6518

Browse files
authored
fix: resolution of types from CommonJS (#1350)
1 parent f32d2c5 commit 12f6518

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ config.json
55
/dist-cjs/
66
.vscode/*
77
.DS_Store
8+
*.tgz

Diff for: package.json

+8-2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
"access": "public"
1515
},
1616
"type": "module",
17+
"module": "dist-esm/lib/index.js",
18+
"main": "dist-cjs/lib/index.js",
19+
"types": "dist-cjs/lib/index.d.ts",
1720
"bin": {
1821
"zwave-server": "dist-esm/bin/server.js",
1922
"zwave-client": "dist-esm/bin/client.js"
@@ -25,15 +28,18 @@
2528
},
2629
"./package.json": "./package.json"
2730
},
31+
"files": [
32+
"dist-esm",
33+
"dist-cjs"
34+
],
2835
"scripts": {
2936
"lint": "eslint",
3037
"lint:fix": "eslint --fix && prettier -w .",
3138
"test": "prettier --check src && tsc --noEmit && npm run lint && tsx src/test/integration.ts",
3239
"build": "tsc -p .",
3340
"postbuild": "esm2cjs --in dist-esm --out dist-cjs -l error -t node18",
3441
"prepare": "npm run build",
35-
"prepublishOnly": "rm -rf dist && npm run build",
36-
"try": "testbin"
42+
"prepublishOnly": "rm -rf dist && npm run build"
3743
},
3844
"author": "",
3945
"license": "Apache-2.0",

0 commit comments

Comments
 (0)