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
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
Nick Fitzgerald
1bbc966240
Don't print stdout/stderr in error messages because we already pipe that to console when running the child process
...
Fixes #422
7 years ago
Nick Fitzgerald
b16660375e
Add "Error:" prefix to error messages
7 years ago
Nick Fitzgerald
352b47d732
Provide better error context for `cargo build`
7 years ago
Jesper Håkansson
65d060cfc4
chore: Run latest rustfmt
7 years ago
Nick Fitzgerald
182c3931c3
Run cargo fmt
7 years ago
Nick Fitzgerald
965ae35933
Add no-modules to --target flag's help text
...
Fixes #416
7 years ago
huangjj27
c713477ac8
change for cargo_metadata
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
daubaris
7c3f497e3c
added wasm-pack feature checking wasm-pack version
7 years ago
Jesper Håkansson
9404c1496d
chore: Run rustfmt
7 years ago
Jesper Håkansson
b7a84200a6
chore: Run rustfmt
7 years ago
Jesper Håkansson
0be4905e31
refactor: Return failure::Error instead of wasm_pack::error::Error
7 years ago
Jesper Håkansson
899f5e0ffc
refactor: Import self and use full module path for failure
...
Use full module path for failure to be consistent since
it's used like that in other modules.
7 years ago
Jesper Håkansson
e9e0fb3cba
refactor: Return failure::Error instead of wasm_pack::error::Error
7 years ago
Nick Fitzgerald
e9276e0aab
error: Add stdout to the `Error::Cli` variant
7 years ago
Nick Fitzgerald
1621d18072
child: Always print everything to our output
...
Also don't buffer the child's stdout and stderr.
7 years ago
Mason Stallmo
78117ef4a1
Fix bad formating
7 years ago
Mason Stallmo
b82fa7db65
Combine filed missing messages into one INFO line
7 years ago
Mason Stallmo
e47af81f8f
Change to INFO when alerting users about missing fields in Cargo.toml
7 years ago
Nick Fitzgerald
2fa961d97d
Use `child::run` for spawning child processes everywhere
7 years ago
Nick Fitzgerald
6e8e8a6cb2
Create a module for running child processes
7 years ago
konstin
514e5c6032
Add exit_status to cli error to fix #291
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
Nick Fitzgerald
e1c8ca825d
cargo fmt
7 years ago
Nick Fitzgerald
15defe9038
test: fix crate dependency suggestion
...
Fixes #377
7 years ago
Ashley Williams
d3f8264ef7
feat(buildmode): allow --mode force to skip rustc check
7 years ago
Ashley Williams
0c696e2289
fix(build): make rustc error msg a little better
7 years ago
Ashley Williams
edd7308221
fix(build): rustc check works now
7 years ago
Ashley Williams
631037197f
fix(build): rustc check emoji and fix
7 years ago
Ashley Williams
9d35377cd3
fix(build): fix and improve rustc check err msgs
7 years ago
Ashley Williams
c0acb99e58
feat(build): remove all mention of nightly
7 years ago
Ashley Williams
b28d2850a7
feat(build): add rustc check
7 years ago
Ashley Williams
3856db20b9
fix(style): appease cargo fmt
7 years ago
Alex Crichton
9b24dcb259
Execute `cargo metadata` at most once
...
This can be somewhat expensive, so make sure we don't have to chew
through too much!
7 years ago
Alex Crichton
3d1f528fc9
Make tests more future-proof with wasm-bindgen
...
This way when future wasm-bindgen version are published the tests will
continue working!
7 years ago
data-pup
dd87211323
feat(lockfiles): Use `Cargo.lock` to identify wasm-bindgen versions
...
This lets us leverage `cargo` for semver finding and then ensure that we get the
exact same version of the CLI that cargo selected. It also lets us support fuzzy
dependencies like "0.2" instead of exact dependencies like "0.2.21" again.
7 years ago
Alex Crichton
cd4e381ef4
Pass `--debug` to `wasm-bindgen` in debug mode
...
In debug mode `wasm-bindgen` emits more JS glue to check more invariants
and otherwise provide more sanity checks. This is omitted by default
with wasm-pack as it runs in release mode by default, but if `--debug`
is passed let's be sure to include it!
7 years ago
Ashley Williams
0fa456c62b
feat(build): force lib build only
7 years ago
Ashley Williams
120236f1a9
fix(style): appease cargo fmt
7 years ago
Ashley Williams
d79349e1f5
feat(manifest): build no_modules npmpkg
7 years ago
Ashley Williams
1985db371f
feat(manifest:npm): add nomodules manifest struct
7 years ago
Ashley Williams
64c5a22ff6
feat(bindgen): accept no-modules as target
7 years ago
Ashley Williams
f5eaad2d77
refactor(manifest): make check optional deps a method
7 years ago
Ashley Williams
8b9ad63985
refactor(manifest:types): clean up code duplication
7 years ago
Ashley Williams
069f7ede2e
fix(manifest:esm): snakecase to remove warning, test for sideeffects field
7 years ago
Ashley Williams
354f038a1a
fix(style): remove printlns and appease cargo fmt
7 years ago
Ashley Williams
e607eda95c
refactor(manifest): move optional field warn checks to function
7 years ago