diff --git a/Cargo.lock b/Cargo.lock index 75a68022..ed9ff810 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -650,9 +650,9 @@ dependencies = [ [[package]] name = "once_cell" -version = "1.9.0" +version = "1.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5" +checksum = "1261fe7e33c73b354eab43b1273a57c8f967d0391e80353e51f764ac02cf6775" [[package]] name = "oorandom" @@ -1233,34 +1233,35 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.81" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c53b543413a17a202f4be280a7e5c62a1c69345f5de525ee64f8cfdbc954994" +checksum = "128d1e363af62632b8eb57219c8fd7877144af57558fb2ef0368d0087bddeb2e" dependencies = [ "cfg-if", + "once_cell", "wasm-bindgen-macro", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.81" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5491a68ab4500fa6b4d726bd67408630c3dbe9c4fe7bda16d5c82a1fd8c7340a" +checksum = "cb6dd4d3ca0ddffd1dd1c9c04f94b868c37ff5fac97c30b97cff2d74fce3a358" dependencies = [ "bumpalo", - "lazy_static", "log", + "once_cell", "proc-macro2", "quote", - "syn 1.0.76", + "syn 2.0.32", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.81" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c441e177922bc58f1e12c022624b6216378e5febc2f0533e41ba443d505b80aa" +checksum = "e79384be7f8f5a9dd5d7167216f022090cf1f9ec128e6e6a482a2cb5c5422c56" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1268,22 +1269,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.81" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d94ac45fcf608c1f45ef53e748d35660f168490c10b23704c7779ab8f5c3048" +checksum = "26c6ab57572f7a24a4985830b120de1594465e5d500f24afe89e16b4e833ef68" dependencies = [ "proc-macro2", "quote", - "syn 1.0.76", + "syn 2.0.32", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.81" +version = "0.2.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a89911bd99e5f3659ec4acf9c4d93b0a90fe4a2a11f15328472058edc5261be" +checksum = "65fc09f10666a9f147042251e0dda9c18f166ff7de300607007e96bdebc1068d" [[package]] name = "web-sys" diff --git a/Cargo.toml b/Cargo.toml index 0d92b8e7..467374d9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,7 +56,7 @@ threadpool = "1.8.1" toml = "0.8.1" [target.'cfg(target_arch = "wasm32")'.dependencies] -wasm-bindgen = { version = "0.2.81", optional = true } +wasm-bindgen = { version = "0.2.95", optional = true } [dev-dependencies] criterion = "0.4.0" diff --git a/wasm/build-wasm.sh b/wasm/build-wasm.sh index 1872d05f..7d3e9d15 100755 --- a/wasm/build-wasm.sh +++ b/wasm/build-wasm.sh @@ -1,10 +1,7 @@ # TODO: Ensure that version is up to date cp README.md wasm/ cp LICENSE.md wasm/ -npx wasm-pack@0.10.3 build --target web --out-dir wasm/stylua.web -- --features lua52,lua53,lua54,luau - -# workaround for bundler usage -echo "export { getImports as __getImports, finalizeInit as __finalizeInit }" >> wasm/stylua.web/stylua_lib.js +npx wasm-pack@0.13.0 build --target web --out-dir wasm/stylua.web -- --features lua52,lua53,lua54,luau # bundle for node CommonJS npx rollup@4.9.5 wasm/src/stylua_lib_node.cjs --file wasm/stylua_lib.cjs --format cjs