Skip to content

Commit fe387da

Browse files
committed
Simplify postcompile script to use echo instead of node -e
1 parent 8966488 commit fe387da

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
},
3232
"scripts": {
3333
"compile": "tsc --build tsconfig.build.json",
34-
"postcompile": "node -e \"const fs = require('fs'); fs.writeFileSync('dist/esm/package.json', JSON.stringify({type:'module'})); fs.writeFileSync('dist/cjs/package.json', JSON.stringify({type:'commonjs'}));\"",
34+
"postcompile": "echo '{\"type\":\"module\"}' > dist/esm/package.json && echo '{\"type\":\"commonjs\"}' > dist/cjs/package.json",
3535
"clean": "git clean -dfqX",
3636
"prepack": "npm run compile",
3737
"prettier-check": "prettier --check .",

tsconfig.base.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"composite": true,
44
"rootDir": "./src",
55
"outDir": "./dist/esm",
6-
"target": "es2021",
6+
"target": "es2020",
77
"module": "esnext",
88
"moduleResolution": "node",
99
"esModuleInterop": true,
@@ -19,7 +19,7 @@
1919
"noUnusedParameters": true,
2020
"noUnusedLocals": true,
2121
"forceConsistentCasingInFileNames": true,
22-
"lib": ["es2021"],
22+
"lib": ["es2020", "esnext.asynciterable"],
2323
"types": ["node"],
2424
"baseUrl": ".",
2525
"paths": {

0 commit comments

Comments
 (0)