Nick Fitzgerald
8325d9ada4
binary-install: don't make getting a binary from a download infallible
...
Instead of panicking on unexpected states, check for them and return an
error. Also add more debug logging for when we `cargo install` wasm-bindgen.
6 years ago
Ashley Williams
a9a4237b79
feat(binstall): prepare for publish
6 years ago
Ashley Williams
9491d549a0
feat(test): remove windows output fmting test
6 years ago
Alex Crichton
80be336ee2
Replace `slog` with `log`
...
This commit replaces the `slog` family of crates used by `wasm-pack`
with the `log` crate plus `env_logger`. This also means that by default
`wasm-pack` also won't create a `wasm-pack.log` file in the current
directory. Enabling logging will now be done through
`RUST_LOG=wasm_pack` instead of `-v` flags.
Closes #425
6 years ago
Vsevolod Velichko
43488dae1d
add test and some documentation for custom extra options passed to build command
6 years ago
Mason Stallmo
272ef97bef
Refactor: make `crate_license` a method of CrateData.
7 years ago
Mason Stallmo
1c704b7b7c
Reword WTFPL and add punctuation to license not found message.
7 years ago
Mason Stallmo
2d837f795c
Copy license file(s) to out directory
...
Check the Cagro.toml for a license and if one is found glob for LICENSE* files to copy to the out directory
7 years ago
huangjj27
c6894c46f7
bugfix(390): pass the ci
...
in the CI, there is no user. begining with "C:\" is just enough
7 years ago
huangjj27
9feb3a857c
check if the log missing things
7 years ago
huangjj27
06a949b9ed
Capital disk Url
7 years ago
huangjj27
837393b5fc
trim head
7 years ago
huangjj27
7fd731279b
print out wasm-log for check
7 years ago
huangjj27
06e38ec3e8
checkout if CI's log contain INFO messages
7 years ago
huangjj27
83de8d71d2
fix test for wasm-bindgen 0.2.21
7 years ago
huangjj27
2512199cb3
resolve conlicts and pass the test
7 years ago
huangjj27
b301015588
update: rebasing to master
...
fixes conflicts encountered when rebasing to master
fixes # 390
7 years ago
huangjj27
cf56fa10d6
bugfix(command/build): passing test case
...
this commit fixes #390 , #414 , and closes #408 for the test case
have to pass after a successful build.
7 years ago
huangjj27
054e1739ae
test(command/build): right test case
...
the test case would pass after solving #408
7 years ago
huangjj27
472890c063
test(command/build): add test for fix-390
7 years ago
Jesper Håkansson
c39410c81e
feat: Use levenshtein function to warn about wasm-pack typos
7 years ago
Jesper Håkansson
203cf6996c
test: Add test case for `parse_crate_data`
7 years ago
Nick Fitzgerald
64d52d8735
Add three build profiles and infrastructure for their toml configuration
...
Fixes #153
Fixes #160
7 years ago
Mackenzie Clark
b3d62e1649
do not canonicalize the crate path
7 years ago
Jesper Håkansson
99b9602d31
chore: Run latest rustfmt
7 years ago
Jesper Håkansson
b47dfa3009
chore: Run latest rustfmt
7 years ago
Alex Crichton
fe48dbd15a
Don't require cdylib crate-type for testing
...
The `cdylib` crate type output isn't actually necessary for the
`wasm-pack test` stage because `wasm-bindgen` isn't run over a wasm
file. This commit removes the checks during `wasm-pack test` that the
`cdylib` crate type is configured.
7 years ago
Jesper Håkansson
489d3e84c2
refactor: Rename binary-install to wasm-pack-binary-install
7 years ago
Alex Crichton
35fe250d09
Fix wasm-bindgen if lib is renamed via `lib.name`
...
This commit fixes an issue where if a library is renamed via the `name`
key in the `[lib]` section of the manifest then `wasm-pack` would try to
generate bindings for an noexistent wasm-file, generating an error.
The fix was to internally use `cargo_metadata` more aggressively and
move around where this data is generated. This ended up refactoring a
few locations, but this should also bring improved error messages for
`cargo metadata` as well as caching the resulting data more aggressively
to avoid recalculating it too much.
Closes #339
7 years ago
Nick Fitzgerald
8abedfebbe
Run `cargo fmt`
7 years ago
Nick Fitzgerald
e7145e585f
Add a test for building a wasm crate in a workspace
...
Fixes #252
7 years ago
Nick Fitzgerald
098eb33cea
Run cargo fmt
7 years ago
Nick Fitzgerald
6d3e9dfebb
Refactor: make `check_crate_config` a method of `CargoManifest`
7 years ago
Nick Fitzgerald
25490301e0
Refactor: make `get_crate_name` a method of `CargoManifest`
7 years ago
Nick Fitzgerald
0e09b3fd3c
Refactor: make `write_package_json` a method on `CargoManifest`
7 years ago
Nick Fitzgerald
511e6c29a0
Refactor: replace `manifest::read_cargo_toml` with a constructor
7 years ago
Nick Fitzgerald
4e6abcfd1d
Only read the `Cargo.toml` manifest once
...
And then keep reusing what we read, instead of re-reading it again.
Fixes #25
7 years ago
Alex Crichton
f986edf4c7
Move test synchronization to tests, not in `wasm-pack`
...
In `wasm-pack` it can't do cross-process synchronization, and in tests
there's now multiple processes which need to be synchronized.
7 years ago
Alex Crichton
110d930351
Assert not only an error happens but the right error happens
...
Add message assertions to the various assertions in `test.rs`
7 years ago
Alex Crichton
c664cfddd1
Use a global cache for all downloaded binaries
...
This commit switches wasm-pack to using a global cache for all download
binaries, living typically in a user's home directory. The intention
here is to aovid creating a `bin` folder in all wasm-pack projects and
additionally share downloads between projects to ensure that you're
downloading a minimal number of binaries from the network.
Along the way the downloading code was restructured to support a global
cache, but everything should largely be as it was before!
Closes #292
7 years ago
Jesper Håkansson
65d060cfc4
chore: Run latest rustfmt
7 years ago
Nick Fitzgerald
182c3931c3
Run cargo fmt
7 years ago
huangjj27
ee9116d2e0
bugfix(bindgen-target-dir): use PathBuf to join
...
the old code are hard coded path with "/", which may cause error
on windows, thus changing to use PathBuf.join.
fixing #414
7 years ago
Jesper Håkansson
a4b29a9293
refactor: Move binary installation to it's own crate
7 years ago
Mason Stallmo
6426e23cbe
Fix typo in test function name for copying the README
7 years ago
huangjj27
ad62870f40
useing local wasm-bindgen
7 years ago
huangjj27
40a5fa2b74
test(command/build): add a test for build command
7 years ago
Nick Fitzgerald
2fa961d97d
Use `child::run` for spawning child processes everywhere
7 years ago
Nick Fitzgerald
4fd08dcbd2
test: Add a utility for creating null loggers for tests
7 years ago
Alex Crichton
17b385060f
Remove lingering forced nightly usages
...
These look to have been removed elsewhere, so seem to be left in by
mistake!
7 years ago