Alex Crichton
8127b5b42d
Add support for `--target web`
...
This commit adds support for the new `--web` flag in `wasm-bindgen`
under the flag name `--target web`. To ensure that it was plubmed around
the stringly-typed `target` type was switched to an `enum Target` to
ensure that all cases it's looked at are handled appropriately for the
new `web` target.
6 years ago
Alex Crichton
e20ade53bc
Fix tests on master
...
This fixes an accidental regression from #554 which was in turn an
accidental regression from #526
6 years ago
Ashley Williams
cde16f1b22
fix(manifest): LICENSE and README don't need to be whitelisted
6 years ago
huangjj27
0a9f488a0d
fix(test): update wasm-bindgen versions to improving caching in tests
6 years ago
Jonas Scheffner
cd8ee977d5
Use win32 chromedriver binaries for win64 systems, update chromedriver version to 2.45 and fix error message
6 years ago
Ashley Williams
b0f47b960e
fix(style): appease cargo fmt
6 years ago
Nick Fitzgerald
5637b07577
tests: Port all of our tests to use `assert_cmd`
6 years ago
rhysd
835ce11023
add test case for copying 'homepage' field from Cargo.toml to package.json
6 years ago
rhysd
e724b01365
add tests to check README and licenses are in 'files' field
6 years ago
rhysd
5f515dcf68
add a test case for non-standard license file field
6 years ago
Nick Fitzgerald
f5f9d40c91
Only print `cargo test` output the once
...
Also introduces testing of our CLI's output via `assert_cmd`. Expect some follow
ups to get more of our testing infrastructure using this incredible crate!
Fixes #511
6 years ago
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