Skip to content

Commit d210362

Browse files
committed
fix esm
1 parent 3057f50 commit d210362

3 files changed

Lines changed: 15 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ jobs:
8686
tmp=$(mktemp)
8787
jq --arg version "${{ github.event.release.tag_name }}" '.version = $version' package.json > $tmp
8888
mv $tmp > package.json
89-
echo '{ "type": "module" }' >> lib/mjs/package.json
9089
echo version=$(jq -r '.version' package.json) >> $GITHUB_OUTPUT
9190
9291
- name: Publish

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,16 @@
2626
"types": "lib/types/index.d.ts",
2727
"scripts": {
2828
"clear": "rm -rf ./lib",
29-
"build:esm": "npx tsc && npx tsc-esm-fix --tsconfig tsconfig.json",
29+
"patch:esm-js": "npx tsc-esm-fix --tsconfig tsconfig.json",
30+
"patch:esm-type": "echo '{ \"type\": \"module\" }' >> lib/mjs/package.json",
31+
"build:esm": "npx tsc && npm run patch:esm-js && npm run patch:esm-type",
3032
"build:cjs": "npx tsc -p tsconfig.cjs.json",
3133
"build": "npm run clear && npm run build:esm && npm run build:cjs",
3234
"test": "npx mocha"
3335
},
3436
"devDependencies": {
3537
"@types/mocha": "latest",
36-
"@types/node": "^18.11.10",
38+
"@types/node": "^18.11.11",
3739
"assert": "latest",
3840
"mocha": "latest",
3941
"ts-node": "latest",
@@ -45,6 +47,6 @@
4547
"pnpm": ">=7.0.0"
4648
},
4749
"dependencies": {
48-
"axios": "1.1.x"
50+
"axios": "1.1.3"
4951
}
5052
}

pnpm-lock.yaml

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)