We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b3a3cc commit ccc7d5fCopy full SHA for ccc7d5f
2 files changed
.husky/pre-commit
@@ -1,3 +1,2 @@
1
npm test
2
-npm run test:esm
3
npx lint-staged
scripts/build.sh
@@ -5,6 +5,11 @@ if [[ $1 == '--cjs' ]]; then
5
find lib -type f \( -name '*.mjs*' -or -name '*.mts*' \) -delete
6
7
elif [[ $1 == '--esm' ]]; then
8
+ if [[ ! -z $(git status --porcelain src) ]]; then
9
+ echo '*** Working changes detected in "src", skipping ESM build! ***'
10
+ exit 0
11
+ fi
12
+
13
find src -type f -name '*.ts' -exec bash -c 'mv "$1" "${1%.ts}.mts"' _ {} \;
14
jscodeshift -t scripts/add-mjs-extension.ts src --extensions=mts
15
rollup --config --failAfterWarnings --environment ESM:true
0 commit comments