✨ 0.4.2
-
🤕 Fixes
-
recognize
[dependencies.wasm-bindgen]
during dep check ininit
- ashleygwilliams, issue/221 pull/224When we originally implemented the dependency check in
wasm-pack init
we naively only checked for the "simple" dependency declaration,[dependencies] wasm-bindgen="0.2"
. However! This is not the only way to declare this dependency, and it's not the ideal way to do it if you want to specify features from the crate. Now that a bunch of folks want to usefeatures = ["serde-serialize"]
we ran into a bunch of folks having issues with our naive dependency checker! Thanks so much to turboladen for filing the very detailed issue that helped us solve this quickly!PSSSST! Curious what
features = ["serde-serialize"]
withwasm-bindgen
actually does? It's awesome:It's possible to pass data from Rust to JS not explicitly supported in the Feature Reference by serializing via Serde.
Read the Passing arbitrary data to JS docs to learn more!
-
improve UX of publish and pack commands - Mackiovello, pull/198
Previous to this fix, you would need to be in the parent directory of the
/pkg
dir to successfully runpack
orpublish
. This was pretty crummy! Thankfully, Mackiovello swooped in with a fix, that you can find documented in the pack and publish docs! -
use
PathBuf
instead ofString
for paths - Mackiovello, pull/220This is mostly a maintenance PR but does fix one very small bug- depending on if you add a trailing slash to a path that you pass to
init
, you might have seen an extra/
! Now that we're using a proper Type to handle this, that's much better, and in general, all the operations using paths are more robust now.
-
-
📖 Documentation
-
update docs and tests to eliminate no longer necessary feature flags - ashleygwilliams, pull/226
The Rust 2018 edition marches on and we are seeing feature flags drop like flies :) Instead of a whole slew of feature flags, we now only need one,
#![feature(use_extern_macros)]
, and that one is also not long for this world :)
-