diff --git a/.cargo/config.toml b/.cargo/config.toml index 2520a916838..b1fd3c94702 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -1,6 +1,3 @@ -[target.wasm32-unknown-unknown] -rustflags = ['--cfg', 'getrandom_backend="wasm_js"'] - # TODO: track https://github.com/rust-lang/rust/issues/141626 for a resolution [target.x86_64-pc-windows-msvc] rustflags = ['-Csymbol-mangling-version=v0'] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cef2ca784e9..2e133a36eb1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -73,7 +73,17 @@ jobs: - name: Set-up npm config for publishing run: npm config set -- '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}" + - name: Check if the npm version already exists + run: | + VERSION=$(jq -r '.version' ./ffi/wasm/pkg/package.json) + + if npm view @boa-dev/boa_wasm@$VERSION version > dev/null 2>&1; then + echo "Version $VERSION already published. Skipping" + echo "SKIP_PUBLISH=true" >> $GITHUB_ENV + fi + - name: Publish to npm + if: env.SKIP_PUBLISH != 'true' run: npm publish ./ffi/wasm/pkg --access=public release-binaries: diff --git a/.github/workflows/test262_release.yml b/.github/workflows/test262_release.yml index fb4e4cc4237..6b04d6d0f7e 100644 --- a/.github/workflows/test262_release.yml +++ b/.github/workflows/test262_release.yml @@ -1,9 +1,16 @@ -name: Update Test262 Results on Release +name: Update Test262 Results on: release: types: - published + push: + branches: + - main + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: update_test262_results: @@ -38,7 +45,7 @@ jobs: uses: actions/checkout@v5 with: repository: boa-dev/data - token: ${{ secrets.GITHUB_TOKEN }} + token: ${{ secrets.DATA_PAT }} path: data # Run the Test262 test suite @@ -48,13 +55,18 @@ jobs: cargo run --release --bin boa_tester -- run -v -o ../data/test262 # Commit and push results back to the `data` repo - - name: Commit and push results + - name: Commit results run: | cd data git config user.name "GitHub Actions" git config user.email "actions@github.com" - git add test262/results/${{ github.ref_name }} - git commit -m "Update Test262 results for release ${{ github.ref_name }}" - git push - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + git add test262 + git commit -m "Update Test262 results ( ${{ github.ref_name }} )" + - name: Push changes + uses: ad-m/github-push-action@master + with: + # cannot use secrets.GITHUB_TOKEN since it only gives you + # write permissions to the current repository. + github_token: ${{ secrets.DATA_PAT }} + repository: boa-dev/data + directory: data diff --git a/Cargo.lock b/Cargo.lock index 14382e55559..4bb88769b43 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -314,7 +314,7 @@ dependencies = [ [[package]] name = "boa_ast" -version = "0.21.0" +version = "0.21.1" dependencies = [ "arbitrary", "bitflags 2.9.4", @@ -329,7 +329,7 @@ dependencies = [ [[package]] name = "boa_cli" -version = "0.21.0" +version = "0.21.1" dependencies = [ "boa_engine", "boa_gc", @@ -352,7 +352,7 @@ dependencies = [ [[package]] name = "boa_engine" -version = "0.21.0" +version = "0.21.1" dependencies = [ "aligned-vec", "arrayvec", @@ -378,7 +378,7 @@ dependencies = [ "futures-channel", "futures-concurrency", "futures-lite 2.6.1", - "getrandom 0.3.3", + "getrandom 0.3.4", "hashbrown 0.16.0", "iana-time-zone", "icu_calendar", @@ -432,7 +432,7 @@ dependencies = [ [[package]] name = "boa_examples" -version = "0.21.0" +version = "0.21.1" dependencies = [ "boa_ast", "boa_engine", @@ -450,7 +450,7 @@ dependencies = [ [[package]] name = "boa_gc" -version = "0.21.0" +version = "0.21.1" dependencies = [ "boa_macros", "boa_string", @@ -462,7 +462,7 @@ dependencies = [ [[package]] name = "boa_icu_provider" -version = "0.21.0" +version = "0.21.1" dependencies = [ "icu_casemap", "icu_collator", @@ -482,7 +482,7 @@ dependencies = [ [[package]] name = "boa_interner" -version = "0.21.0" +version = "0.21.1" dependencies = [ "arbitrary", "boa_gc", @@ -498,7 +498,7 @@ dependencies = [ [[package]] name = "boa_interop" -version = "0.21.0" +version = "0.21.1" dependencies = [ "boa_engine", "boa_macros", @@ -506,7 +506,7 @@ dependencies = [ [[package]] name = "boa_macros" -version = "0.21.0" +version = "0.21.1" dependencies = [ "cfg-if", "cow-utils", @@ -520,7 +520,7 @@ dependencies = [ [[package]] name = "boa_macros_tests" -version = "0.21.0" +version = "0.21.1" dependencies = [ "boa_engine", "boa_gc", @@ -529,7 +529,7 @@ dependencies = [ [[package]] name = "boa_parser" -version = "0.21.0" +version = "0.21.1" dependencies = [ "bitflags 2.9.4", "boa_ast", @@ -555,7 +555,7 @@ dependencies = [ [[package]] name = "boa_runtime" -version = "0.21.0" +version = "0.21.1" dependencies = [ "boa_engine", "boa_gc", @@ -576,7 +576,7 @@ dependencies = [ [[package]] name = "boa_string" -version = "0.21.0" +version = "0.21.1" dependencies = [ "fast-float2", "itoa", @@ -588,7 +588,7 @@ dependencies = [ [[package]] name = "boa_tester" -version = "0.21.0" +version = "0.21.1" dependencies = [ "bitflags 2.9.4", "boa_engine", @@ -612,7 +612,7 @@ dependencies = [ [[package]] name = "boa_wasm" -version = "0.21.0" +version = "0.21.1" dependencies = [ "boa_engine", "console_error_panic_hook", @@ -1653,7 +1653,7 @@ dependencies = [ [[package]] name = "gen-icu4x-data" -version = "0.21.0" +version = "0.21.1" dependencies = [ "icu_casemap", "icu_collator", @@ -1692,20 +1692,20 @@ checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "libc", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", ] [[package]] name = "getrandom" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" +checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" dependencies = [ "cfg-if", "js-sys", "libc", "r-efi", - "wasi 0.14.3+wasi-0.2.4", + "wasip2", "wasm-bindgen", ] @@ -2853,7 +2853,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", - "wasi 0.11.1+wasi-snapshot-preview1", + "wasi", "windows-sys 0.59.0", ] @@ -3423,7 +3423,7 @@ version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" dependencies = [ - "getrandom 0.3.3", + "getrandom 0.3.4", ] [[package]] @@ -4193,7 +4193,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15b61f8f20e3a6f7e0649d825294eaf317edce30f82cf6026e7e4cb9222a7d1e" dependencies = [ "fastrand 2.3.0", - "getrandom 0.3.3", + "getrandom 0.3.4", "once_cell", "rustix", "windows-sys 0.60.2", @@ -4829,10 +4829,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] -name = "wasi" -version = "0.14.3+wasi-0.2.4" +name = "wasip2" +version = "1.0.2+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a51ae83037bdd272a9e28ce236db8c07016dd0d50c27038b3f407533c030c95" +checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" dependencies = [ "wit-bindgen", ] @@ -5444,9 +5444,9 @@ dependencies = [ [[package]] name = "wit-bindgen" -version = "0.45.0" +version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "052283831dbae3d879dc7f51f3d92703a316ca49f91540417d38591826127814" +checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" [[package]] name = "write16" diff --git a/Cargo.toml b/Cargo.toml index 2c9e834df23..85d42f1858c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -24,7 +24,7 @@ exclude = [ [workspace.package] edition = "2024" -version = "0.21.0" +version = "0.21.1" rust-version = "1.88.0" authors = ["boa-dev"] repository = "https://github.com/boa-dev/boa" @@ -34,15 +34,15 @@ description = "Boa is a Javascript lexer, parser and compiler written in Rust. C [workspace.dependencies] # Repo Crates -boa_ast = { version = "~0.21.0", path = "core/ast" } -boa_engine = { version = "~0.21.0", path = "core/engine" } +boa_ast = { version = "~0.21.1", path = "core/ast" } +boa_engine = { version = "~0.21.1", path = "core/engine" } boa_gc = { version = "~0.21.0", path = "core/gc" } -boa_icu_provider = { version = "~0.21.0", path = "core/icu_provider" } -boa_interner = { version = "~0.21.0", path = "core/interner" } -boa_macros = { version = "~0.21.0", path = "core/macros" } -boa_parser = { version = "~0.21.0", path = "core/parser" } -boa_runtime = { version = "~0.21.0", path = "core/runtime" } -boa_string = { version = "~0.21.0", path = "core/string" } +boa_icu_provider = { version = "~0.21.1", path = "core/icu_provider" } +boa_interner = { version = "~0.21.1", path = "core/interner" } +boa_macros = { version = "~0.21.1", path = "core/macros" } +boa_parser = { version = "~0.21.1", path = "core/parser" } +boa_runtime = { version = "~0.21.1", path = "core/runtime" } +boa_string = { version = "~0.21.1", path = "core/string" } # Utility Repo Crates tag_ptr = { version = "~0.1.0", path = "utils/tag_ptr" } @@ -80,7 +80,6 @@ thin-vec = "0.2.14" time = { version = "0.3.44", default-features = false, features = [ "local-offset", "large-dates", - "wasm-bindgen", "parsing", "formatting", "macros", @@ -96,7 +95,7 @@ comfy-table = "7.2.1" serde_repr = "0.1.20" bus = "2.4.1" wasm-bindgen = { version = "0.2.97", default-features = false } -getrandom = { version = "0.3.3", default-features = false } +getrandom = { version = "0.3.4", default-features = false } console_error_panic_hook = "0.1.7" wasm-bindgen-test = "0.3.47" smol = "2.0.2" diff --git a/core/engine/Cargo.toml b/core/engine/Cargo.toml index 820a6e17fac..d9515a56b9e 100644 --- a/core/engine/Cargo.toml +++ b/core/engine/Cargo.toml @@ -74,7 +74,7 @@ temporal = ["dep:icu_calendar", "dep:temporal_rs", "dep:iana-time-zone", "dep:ti experimental = ["temporal"] # Enable binding to JS APIs for system related utilities. -js = ["dep:web-time", "dep:getrandom"] +js = ["dep:web-time", "dep:getrandom", "getrandom/wasm_js", "time/wasm-bindgen"] # Enable support for Float16 typed arrays float16 = ["dep:float16"]