Skip to content

Commit 91cf0c6

Browse files
committed
Fix Deno and Node.js builds
1 parent c532dfd commit 91cf0c6

File tree

4 files changed

+18
-5
lines changed

4 files changed

+18
-5
lines changed

.github/workflows/deno.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,11 @@ jobs:
4141
run: TARGET=deno ./build
4242

4343
- name: Publish to JSR
44-
working-directory: ./minify-html-wasm/pkg
45-
run: npx jsr publish
44+
working-directory: ./minify-html-wasm
45+
run: |
46+
# Sadly `jsr` ignores .gitignore files (i.e. our built dist package) and will fail on a dirty repo,
47+
# contrary to almost every other build/package system.
48+
# Therefore, we first move to a non-ignored folder.
49+
mv -iv pkg pkg-pub
50+
cd pkg-pub
51+
npx jsr publish --allow-dirty

.github/workflows/nodejs.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ jobs:
5656
TARGET=${{ matrix.target }} node plat-pkg/package.json.gen.js
5757
5858
- name: Create and publish native package
59-
uses: JS-DevTools/npm-publish@v3
59+
# We need this fix: https://github.com/JS-DevTools/npm-publish/issues/198
60+
uses: JS-DevTools/npm-publish@66e0e1d9494ba904d4d608ae77fc5f4fe9bcc038
6061
if: startsWith(github.ref, 'refs/tags/v')
6162
with:
6263
access: public
@@ -76,8 +77,7 @@ jobs:
7677
cp ../README.md .
7778
7879
- name: Pack and publish package
79-
# We need this fix: https://github.com/JS-DevTools/npm-publish/issues/198
80-
uses: JS-DevTools/npm-publish@66e0e1d9494ba904d4d608ae77fc5f4fe9bcc038
80+
uses: JS-DevTools/npm-publish@v3
8181
if: startsWith(github.ref, 'refs/tags/v')
8282
with:
8383
access: public

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# minify-html changelog
22

3+
## Pending
4+
5+
- Fix Node.js builds.
6+
- Fix Deno builds.
7+
38
## 0.16.1
49

510
- Fix Node.js builds.

minify-html-wasm/build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ if [[ "$target" = "bundler" ]]; then
1717
elif [[ "$target" = "deno" ]]; then
1818
rm .gitignore
1919
cp ../deno.json .
20+
# Necessary for Deno.
21+
sed -i '1s%^%/* @ts-self-types="./index.d.ts" */\n%' index.js
2022
fi
2123
popd
2224

0 commit comments

Comments
 (0)