Skip to content

Commit adf0fe0

Browse files
committed
Fix Deno and Node.js builds
1 parent b41cdcd commit adf0fe0

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed

.github/workflows/deno.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
- name: Build native module
3939
working-directory: ./minify-html-wasm
4040
shell: bash
41-
run: TARGET=web ./build
41+
run: TARGET=deno ./build
4242

4343
- name: Publish to JSR
4444
working-directory: ./minify-html-wasm/pkg

.github/workflows/nodejs.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ jobs:
7676
cp ../README.md .
7777
7878
- name: Pack and publish package
79-
uses: JS-DevTools/npm-publish@v3
79+
# We need this fix: https://github.com/JS-DevTools/npm-publish/issues/198
80+
uses: JS-DevTools/npm-publish@66e0e1d9494ba904d4d608ae77fc5f4fe9bcc038
8081
if: startsWith(github.ref, 'refs/tags/v')
8182
with:
8283
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.0
49

510
- BREAKING: Cfg options have changed such that spec compliance is the default, to avoid confusion with users:

minify-html-wasm/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ default = ["console_error_panic_hook"]
1515
js-sys = "0.3.58"
1616
minify-html = { path = "../minify-html" }
1717
wasm-bindgen = "0.2.63"
18+
# We don't use this dep directly, but it's transitive, and we must enable "js" feature to use with WASM.
19+
getrandom = { version = "0.2", features = ["js"] }
1820

1921
# The `console_error_panic_hook` crate provides better debugging of panics by
2022
# logging them with `console.error`. This is great for development, but requires

minify-html-wasm/build

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,13 @@ target="${TARGET:-bundler}"
99
rm -rf pkg
1010
wasm-pack build --target "$target"
1111
pushd pkg
12-
# `bundler` is for WASM/npm, `web` is for Deno.
12+
# `bundler` is for WASM/npm, `deno` is for Deno.
1313
if [[ "$target" = "bundler" ]]; then
1414
jq -s '.[0] * .[1]' package.json ../package.merge.json > package.new.json
1515
mv package.new.json package.json
1616
rm .gitignore
17-
elif [[ "$target" = "web" ]]; then
18-
rm package.json .gitignore
17+
elif [[ "$target" = "deno" ]]; then
18+
rm .gitignore
1919
cp ../deno.json .
2020
fi
2121
popd

0 commit comments

Comments
 (0)