From f53c6f5aa06cea8494b32102b294b7fd25d167bb Mon Sep 17 00:00:00 2001 From: Ashley Williams Date: Thu, 25 Jul 2019 12:50:26 -0500 Subject: [PATCH 01/94] feat(build): --no-pack flag --- src/command/build.rs | 24 +++++++++++++++++++----- tests/all/build.rs | 14 ++++++++++++++ 2 files changed, 33 insertions(+), 5 deletions(-) diff --git a/src/command/build.rs b/src/command/build.rs index 723f507..5c7a40b 100644 --- a/src/command/build.rs +++ b/src/command/build.rs @@ -28,6 +28,7 @@ pub struct Build { pub scope: Option, pub disable_dts: bool, pub target: Target, + pub no_pack: bool, pub profile: BuildProfile, pub mode: InstallMode, pub out_dir: PathBuf, @@ -148,6 +149,10 @@ pub struct BuildOptions { /// Sets the output file names. Defaults to package name. pub out_name: Option, + #[structopt(long = "no-pack")] + /// Option to not generate a package.json + pub no_pack: bool, + #[structopt(last = true)] /// List of extra options to pass to `cargo build` pub extra_options: Vec, @@ -163,6 +168,7 @@ impl Default for BuildOptions { target: Target::default(), debug: false, dev: false, + no_pack: false, release: false, profiling: false, out_dir: String::new(), @@ -197,6 +203,7 @@ impl Build { scope: build_opts.scope, disable_dts: build_opts.disable_dts, target: build_opts.target, + no_pack: build_opts.no_pack, profile, mode: build_opts.mode, out_dir, @@ -214,7 +221,7 @@ impl Build { /// Execute this `Build` command. pub fn run(&mut self) -> Result<(), Error> { - let process_steps = Build::get_process_steps(self.mode); + let process_steps = Build::get_process_steps(self.mode, self.no_pack); let started = Instant::now(); @@ -239,7 +246,7 @@ impl Build { Ok(()) } - fn get_process_steps(mode: InstallMode) -> Vec<(&'static str, BuildStep)> { + fn get_process_steps(mode: InstallMode, no_pack: bool) -> Vec<(&'static str, BuildStep)> { macro_rules! steps { ($($name:ident),+) => { { @@ -261,16 +268,23 @@ impl Build { ]); } } + steps.extend(steps![ step_build_wasm, step_create_dir, - step_copy_readme, - step_copy_license, step_install_wasm_bindgen, step_run_wasm_bindgen, step_run_wasm_opt, - step_create_json, ]); + + if !no_pack { + steps.extend(steps![ + step_create_json, + step_copy_readme, + step_copy_license, + ]); + } + steps } diff --git a/tests/all/build.rs b/tests/all/build.rs index 98581ae..ef7969c 100644 --- a/tests/all/build.rs +++ b/tests/all/build.rs @@ -21,6 +21,20 @@ fn it_should_build_js_hello_world_example() { fixture.wasm_pack().arg("build").assert().success(); } +#[test] +fn it_should_not_make_a_pkg_json_if_passed_no_pack() { + let fixture = utils::fixture::js_hello_world(); + fixture + .wasm_pack() + .arg("build") + .arg("--no-pack") + .assert() + .success(); + + let pkg_json_path = fixture.path.join("pkg").join("package.json"); + assert_eq!(pkg_json_path.exists(), false); +} + #[test] fn it_should_build_crates_in_a_workspace() { let fixture = utils::fixture::Fixture::new(); From 9edf7669595c6adda5f40cb739001e9c915bb444 Mon Sep 17 00:00:00 2001 From: Jared L <48422312+lhjt@users.noreply.github.com> Date: Tue, 5 Oct 2021 13:28:50 +1100 Subject: [PATCH 02/94] fix(typo): considerations.md --- docs/src/prerequisites/considerations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/prerequisites/considerations.md b/docs/src/prerequisites/considerations.md index b4bd082..9d72496 100644 --- a/docs/src/prerequisites/considerations.md +++ b/docs/src/prerequisites/considerations.md @@ -14,7 +14,7 @@ ReqwestError(reqwest::Error { kind: Builder, source: "JsValue(ReferenceError: Re ReferenceError: Response is not defined ``` -## Workarround +## Workaround Import or declare fetch and objects: Headers, Request, Response ```ts From a8da03cf01971a5f691cfcad56a5a3c0832637bc Mon Sep 17 00:00:00 2001 From: Fichtelcoder Date: Sat, 23 Oct 2021 11:22:10 +0200 Subject: [PATCH 03/94] Fix #1059. This is the correct way to pass extra arguments, such as features to cargo. --- docs/src/commands/build.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/commands/build.md b/docs/src/commands/build.md index 9f4bae4..616fd24 100644 --- a/docs/src/commands/build.md +++ b/docs/src/commands/build.md @@ -133,7 +133,7 @@ at the very end of your command, just as you would for `cargo build`. For example, to build the previous example using cargo's offline feature: ``` -wasm-pack build examples/js-hello-world --mode no-install --offline +wasm-pack build examples/js-hello-world --mode no-install -- --offline ```
From 84124ee8eca74133a4c6b9aa8deffbf64c0a4a8b Mon Sep 17 00:00:00 2001 From: Sven Assmann Date: Wed, 17 Nov 2021 02:15:20 +0100 Subject: [PATCH 04/94] fix(#1076): `--target-dir` as extra option is now considered as expected --- src/bindgen.rs | 16 ++++++++++++++-- src/command/build.rs | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/bindgen.rs b/src/bindgen.rs index 535d6b8..b7d2db8 100644 --- a/src/bindgen.rs +++ b/src/bindgen.rs @@ -19,6 +19,7 @@ pub fn wasm_bindgen_build( disable_dts: bool, target: Target, profile: BuildProfile, + extra_options: &Vec, ) -> Result<(), failure::Error> { let release_or_debug = match profile { BuildProfile::Release | BuildProfile::Profiling => "release", @@ -26,9 +27,20 @@ pub fn wasm_bindgen_build( }; let out_dir = out_dir.to_str().unwrap(); + let has_target_dir_overwrite = extra_options.contains(&"--target-dir".to_string()); + let target_directory = if has_target_dir_overwrite { + let i = extra_options + .binary_search(&"--target-dir".to_string()) + .unwrap(); + extra_options + .get(i + 1) + .map(Path::new) + .unwrap_or(data.target_directory()) + } else { + data.target_directory() + }; - let wasm_path = data - .target_directory() + let wasm_path = target_directory .join("wasm32-unknown-unknown") .join(release_or_debug) .join(data.crate_name()) diff --git a/src/command/build.rs b/src/command/build.rs index b680270..4e368a0 100644 --- a/src/command/build.rs +++ b/src/command/build.rs @@ -388,6 +388,7 @@ impl Build { self.disable_dts, self.target, self.profile, + &self.extra_options, )?; info!("wasm bindings were built at {:#?}.", &self.out_dir); Ok(()) From 35bd2bac12459e3e7c6ce98567a1a044dc6c543a Mon Sep 17 00:00:00 2001 From: Markus Stange Date: Thu, 2 Dec 2021 14:15:19 -0500 Subject: [PATCH 05/94] Replace two mentions of `wasm-pack init` with `wasm-pack build` in the docs. --- docs/src/commands/build.md | 2 +- .../tutorials/npm-browser-packages/packaging-and-publishing.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/commands/build.md b/docs/src/commands/build.md index 9f4bae4..8a09d16 100644 --- a/docs/src/commands/build.md +++ b/docs/src/commands/build.md @@ -122,7 +122,7 @@ wasm-pack build examples/js-hello-world --mode no-install | Option | Description | |---------------|------------------------------------------------------------------------------------------| -| `no-install` | `wasm-pack init` implicitly and create wasm binding without installing `wasm-bindgen`. | +| `no-install` | `wasm-pack build` implicitly and create wasm binding without installing `wasm-bindgen`. | | `normal` | do all the stuffs of `no-install` with installed `wasm-bindgen`. | ## Extra options diff --git a/docs/src/tutorials/npm-browser-packages/packaging-and-publishing.md b/docs/src/tutorials/npm-browser-packages/packaging-and-publishing.md index 4824295..e94b109 100644 --- a/docs/src/tutorials/npm-browser-packages/packaging-and-publishing.md +++ b/docs/src/tutorials/npm-browser-packages/packaging-and-publishing.md @@ -7,7 +7,7 @@ command: $ wasm-pack build --scope MYSCOPE ``` -where `MYSCOPE` is your npm username. Normally you could just type `wasm-pack init` but since +where `MYSCOPE` is your npm username. Normally you could just type `wasm-pack build` but since other people are doing this tutorial as well we don't want conflicts with the `wasm-add` package name! This command when run does a few things: From 713868b204f151acd1989c3f29ff9d3bc944c306 Mon Sep 17 00:00:00 2001 From: Dominic Elm Date: Fri, 3 Dec 2021 19:58:33 +0100 Subject: [PATCH 06/94] feat: add support for macos aarch64 --- src/install/mod.rs | 2 +- src/target.rs | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/install/mod.rs b/src/install/mod.rs index 06bf72a..6474d1e 100644 --- a/src/install/mod.rs +++ b/src/install/mod.rs @@ -172,7 +172,7 @@ fn prebuilt_url(tool: &Tool, version: &str) -> Result { Tool::WasmOpt => "x86-linux", _ => bail!("Unrecognized target!"), } - } else if target::MACOS && target::x86_64 { + } else if target::MACOS && (target::x86_64 || target::aarch64) { "x86_64-apple-darwin" } else if target::WINDOWS && target::x86_64 { match tool { diff --git a/src/target.rs b/src/target.rs index cfaff6a..0a6d38f 100644 --- a/src/target.rs +++ b/src/target.rs @@ -13,3 +13,5 @@ pub const WINDOWS: bool = cfg!(target_os = "windows"); pub const x86_64: bool = cfg!(target_arch = "x86_64"); #[allow(non_upper_case_globals)] pub const x86: bool = cfg!(target_arch = "x86"); +#[allow(non_upper_case_globals)] +pub const aarch64: bool = cfg!(target_arch = "aarch64"); From 08825f20113f8be2fc2fcedddd51dedca9669f97 Mon Sep 17 00:00:00 2001 From: Dominic Elm Date: Tue, 14 Dec 2021 08:56:09 +0100 Subject: [PATCH 07/94] fix: add support for arm64 when using npm --- npm/binary.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/npm/binary.js b/npm/binary.js index d66bf98..41b33d8 100644 --- a/npm/binary.js +++ b/npm/binary.js @@ -13,7 +13,7 @@ const getPlatform = () => { if (type === "Linux" && arch === "x64") { return "x86_64-unknown-linux-musl"; } - if (type === "Darwin" && arch === "x64") { + if (type === "Darwin" && (arch === "x64" || arch === "arm64")) { return "x86_64-apple-darwin"; } From e49a1aa8da3111667ecd5b75ca43878e27c26162 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesper=20H=C3=A5kansson?= Date: Thu, 16 Dec 2021 18:59:05 +0100 Subject: [PATCH 08/94] fix: Lock axios version to 0.21.2 --- npm/package-lock.json | 383 ------------------------------------------ npm/package.json | 3 + npm/yarn.lock | 152 +++++++++++++++++ 3 files changed, 155 insertions(+), 383 deletions(-) delete mode 100644 npm/package-lock.json create mode 100644 npm/yarn.lock diff --git a/npm/package-lock.json b/npm/package-lock.json deleted file mode 100644 index b0c22aa..0000000 --- a/npm/package-lock.json +++ /dev/null @@ -1,383 +0,0 @@ -{ - "name": "wasm-pack", - "version": "0.10.1", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "wasm-pack", - "version": "0.10.1", - "hasInstallScript": true, - "license": "MIT OR Apache-2.0", - "dependencies": { - "binary-install": "^0.1.0" - }, - "bin": { - "wasm-pack": "run.js" - } - }, - "node_modules/axios": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", - "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", - "dependencies": { - "follow-redirects": "^1.10.0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "node_modules/binary-install": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/binary-install/-/binary-install-0.1.1.tgz", - "integrity": "sha512-DqED0D/6LrS+BHDkKn34vhRqOGjy5gTMgvYZsGK2TpNbdPuz4h+MRlNgGv5QBRd7pWq/jylM4eKNCizgAq3kNQ==", - "dependencies": { - "axios": "^0.21.1", - "rimraf": "^3.0.2", - "tar": "^6.1.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", - "engines": { - "node": ">=10" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "node_modules/follow-redirects": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.2.tgz", - "integrity": "sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==", - "engines": { - "node": ">=4.0" - } - }, - "node_modules/fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "dependencies": { - "minipass": "^3.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "node_modules/glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minipass": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", - "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "dependencies": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - } - }, - "node_modules/tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", - "dependencies": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - }, - "engines": { - "node": ">= 10" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } - }, - "dependencies": { - "axios": { - "version": "0.21.1", - "resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz", - "integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==", - "requires": { - "follow-redirects": "^1.10.0" - } - }, - "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" - }, - "binary-install": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/binary-install/-/binary-install-0.1.1.tgz", - "integrity": "sha512-DqED0D/6LrS+BHDkKn34vhRqOGjy5gTMgvYZsGK2TpNbdPuz4h+MRlNgGv5QBRd7pWq/jylM4eKNCizgAq3kNQ==", - "requires": { - "axios": "^0.21.1", - "rimraf": "^3.0.2", - "tar": "^6.1.0" - } - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "chownr": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", - "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" - }, - "follow-redirects": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.13.2.tgz", - "integrity": "sha512-6mPTgLxYm3r6Bkkg0vNM0HTjfGrOEtsfbhagQvbxDEsEkpNhw582upBaoRZylzen6krEmxXJgt9Ju6HiI4O7BA==" - }, - "fs-minipass": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", - "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", - "requires": { - "minipass": "^3.0.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" - }, - "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" - }, - "minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minipass": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.1.3.tgz", - "integrity": "sha512-Mgd2GdMVzY+x3IJ+oHnVM+KG3lA5c8tnabyJKmHSaG2kAGpudxuOf8ToDkhumF7UzME7DecbQE9uOZhNm7PuJg==", - "requires": { - "yallist": "^4.0.0" - } - }, - "minizlib": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", - "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", - "requires": { - "minipass": "^3.0.0", - "yallist": "^4.0.0" - } - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "requires": { - "wrappy": "1" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "requires": { - "glob": "^7.1.3" - } - }, - "tar": { - "version": "6.1.11", - "resolved": "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz", - "integrity": "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==", - "requires": { - "chownr": "^2.0.0", - "fs-minipass": "^2.0.0", - "minipass": "^3.0.0", - "minizlib": "^2.1.1", - "mkdirp": "^1.0.3", - "yallist": "^4.0.0" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" - } - } -} diff --git a/npm/package.json b/npm/package.json index 8ce22f6..3ae9352 100644 --- a/npm/package.json +++ b/npm/package.json @@ -31,5 +31,8 @@ "homepage": "https://github.com/rustwasm/wasm-pack#readme", "dependencies": { "binary-install": "^0.1.0" + }, + "resolutions": { + "axios": "0.21.2" } } diff --git a/npm/yarn.lock b/npm/yarn.lock new file mode 100644 index 0000000..c37e12c --- /dev/null +++ b/npm/yarn.lock @@ -0,0 +1,152 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +axios@0.21.2, axios@^0.21.1: + version "0.21.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.2.tgz#21297d5084b2aeeb422f5d38e7be4fbb82239017" + integrity sha512-87otirqUw3e8CzHTMO+/9kh/FSgXt/eVDvipijwDtEuwbkySWZ9SBm6VEubmJ/kLKEoLQV/POhxXFb66bfekfg== + dependencies: + follow-redirects "^1.14.0" + +balanced-match@^1.0.0: + version "1.0.2" + resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" + integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== + +binary-install@^0.1.0: + version "0.1.1" + resolved "https://registry.yarnpkg.com/binary-install/-/binary-install-0.1.1.tgz#c1b22f174581764e5c52cd16664cf1d287e38bd4" + integrity sha512-DqED0D/6LrS+BHDkKn34vhRqOGjy5gTMgvYZsGK2TpNbdPuz4h+MRlNgGv5QBRd7pWq/jylM4eKNCizgAq3kNQ== + dependencies: + axios "^0.21.1" + rimraf "^3.0.2" + tar "^6.1.0" + +brace-expansion@^1.1.7: + version "1.1.11" + resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" + integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + dependencies: + balanced-match "^1.0.0" + concat-map "0.0.1" + +chownr@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" + integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== + +concat-map@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" + integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= + +follow-redirects@^1.14.0: + version "1.14.6" + resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.6.tgz#8cfb281bbc035b3c067d6cd975b0f6ade6e855cd" + integrity sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A== + +fs-minipass@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" + integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== + dependencies: + minipass "^3.0.0" + +fs.realpath@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" + integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= + +glob@^7.1.3: + version "7.2.0" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" + integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== + dependencies: + fs.realpath "^1.0.0" + inflight "^1.0.4" + inherits "2" + minimatch "^3.0.4" + once "^1.3.0" + path-is-absolute "^1.0.0" + +inflight@^1.0.4: + version "1.0.6" + resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" + integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + dependencies: + once "^1.3.0" + wrappy "1" + +inherits@2: + version "2.0.4" + resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" + integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== + +minimatch@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" + integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + dependencies: + brace-expansion "^1.1.7" + +minipass@^3.0.0: + version "3.1.6" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.6.tgz#3b8150aa688a711a1521af5e8779c1d3bb4f45ee" + integrity sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ== + dependencies: + yallist "^4.0.0" + +minizlib@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" + integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== + dependencies: + minipass "^3.0.0" + yallist "^4.0.0" + +mkdirp@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" + integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== + +once@^1.3.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" + integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + dependencies: + wrappy "1" + +path-is-absolute@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" + integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= + +rimraf@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" + integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== + dependencies: + glob "^7.1.3" + +tar@^6.1.0: + version "6.1.11" + resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" + integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== + dependencies: + chownr "^2.0.0" + fs-minipass "^2.0.0" + minipass "^3.0.0" + minizlib "^2.1.1" + mkdirp "^1.0.3" + yallist "^4.0.0" + +wrappy@1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" + integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= + +yallist@^4.0.0: + version "4.0.0" + resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" + integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== From c8944e3e96f962888030f8f127e0fdcde84eb32a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesper=20H=C3=A5kansson?= Date: Thu, 16 Dec 2021 19:31:24 +0100 Subject: [PATCH 09/94] 0.10.2 --- CHANGELOG.md | 42 ++++++ Cargo.lock | 212 +++++++++++++++-------------- Cargo.toml | 2 +- docs/index.html | 6 +- npm/package.json | 2 +- src/test/webdriver/chromedriver.rs | 2 +- src/test/webdriver/geckodriver.rs | 2 +- 7 files changed, 158 insertions(+), 110 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf70a74..2a03fd9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,48 @@ ## 🤍 Unreleased +## 🌦️ 0.10.2 + +- ### ✨ Features + + - **Implement support for RFC 8, transitive NPM dependencies - [jpgneves], [issue/606] [pull/986]** + + [pull/986]: https://github.com/rustwasm/wasm-pack/pull/986 + [issue/606]: https://github.com/rustwasm/wasm-pack/issues/606 + [jpgneves]: https://github.com/jpgneves + +- ### 🤕 Fixes + + - **Add support for macos aarch64 - [d3lm], [issue/913] [pull/1088]** + + This fixes aarch64 for MacOS and will download x86_64-apple-darwin. + + [pull/1088]: https://github.com/rustwasm/wasm-pack/pull/1088 + [issue/913]: https://github.com/rustwasm/wasm-pack/issues/913 + [d3lm]: https://github.com/d3lm + + - **Add linux/arm64 to release workflow - [nacardin], [issue/1064] [pull/1065]** + + [pull/1065]: https://github.com/rustwasm/wasm-pack/pull/1065 + [issue/1064]: https://github.com/rustwasm/wasm-pack/issues/1064 + [nacardin]: https://github.com/nacardin + + - **Force axios version - [drager], [pull/1094]** + + Forces npm package `axios` to version `0.21.2` in order to get security fix for a security vulnerability present in axios + before version `0.21.2`. + + [pull/1094]: https://github.com/rustwasm/wasm-pack/pull/1094 + +- ### 📖 Documentation + + - **Update docs for how to pass extra options to cargo - [FrankenApps], [issue/1059] [pull/1073]** + + [FrankenApps]: https://github.com/FrankenApps + [pull/1073]: https://github.com/rustwasm/wasm-pack/pull/1073 + [issue/1059]: https://github.com/rustwasm/wasm-pack/issues/1059 + + ## 🌦️ 0.10.1 - ### 🤕 Fixes diff --git a/Cargo.lock b/Cargo.lock index b4a7052..b2669b7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.16.0" +version = "0.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e61f2b7f93d2c7d2b08263acaa4a363b3e276806c68af6134c44f523bf1aacd" +checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" dependencies = [ "gimli", ] @@ -28,9 +28,9 @@ dependencies = [ [[package]] name = "ansi_term" -version = "0.11.0" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" +checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" dependencies = [ "winapi 0.3.9", ] @@ -84,9 +84,9 @@ checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" -version = "0.3.61" +version = "0.3.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7a905d892734eea339e896738c14b9afce22b5318f64b951e70bf3844419b01" +checksum = "321629d8ba6513061f26707241fa9bc89524ff1cd7a915a97ef0c62c666ce1b6" dependencies = [ "addr2line", "cc", @@ -198,9 +198,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.70" +version = "1.0.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d26a6ce4b6a484fa3edb70f7efa6fc430fd2b87285fe8b84304fd0936faa0dc0" +checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" [[package]] name = "cfg-if" @@ -229,9 +229,9 @@ dependencies = [ [[package]] name = "clap" -version = "2.33.3" +version = "2.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002" +checksum = "a0610544180c38b88101fecf2dd634b174a62eef6946f84dfc6a7127512b381c" dependencies = [ "ansi_term", "atty", @@ -282,13 +282,13 @@ dependencies = [ [[package]] name = "console" -version = "0.14.1" +version = "0.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3993e6445baa160675931ec041a5e03ca84b9c6e32a056150d3aa2bdda0a1f45" +checksum = "a28b32d32ca44b70c3e4acd7db1babf555fa026e385fb95f18028f88848b3c31" dependencies = [ "encode_unicode", - "lazy_static 1.4.0", "libc", + "once_cell", "regex", "terminal_size", "unicode-width", @@ -331,9 +331,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.9.1" +version = "0.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a89e2ae426ea83155dccf10c0fa6b1463ef6d5fcb44cee0b224a408fa640a62" +checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" dependencies = [ "core-foundation-sys", "libc", @@ -341,15 +341,15 @@ dependencies = [ [[package]] name = "core-foundation-sys" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea221b5284a47e40033bf9b66f35f984ec0ea2931eb03505246cd27a963f981b" +checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "crc32fast" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" +checksum = "738c290dfaea84fc1ca15ad9c168d083b05a714e1efddd8edaab678dc28d2836" dependencies = [ "cfg-if 1.0.0", ] @@ -414,9 +414,9 @@ dependencies = [ [[package]] name = "curl" -version = "0.4.38" +version = "0.4.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "003cb79c1c6d1c93344c7e1201bb51c2148f24ec2bd9c253709d6b2efb796515" +checksum = "1bc6d233563261f8db6ffb83bbaad5a73837a6e6b28868e926337ebbdece0be3" dependencies = [ "curl-sys", "libc", @@ -429,9 +429,9 @@ dependencies = [ [[package]] name = "curl-sys" -version = "0.4.45+curl-7.78.0" +version = "0.4.51+curl-7.80.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de9e5a72b1c744eb5dd20b2be4d7eb84625070bb5c4ab9b347b70464ab1e62eb" +checksum = "d130987e6a6a34fe0889e1083022fa48cd90e6709a84be3fb8dd95801de5af20" dependencies = [ "cc", "libc", @@ -448,7 +448,7 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ad1c29a0368928e78c551354dbff79f103a962ad820519724ef0d74f1c62fa9" dependencies = [ - "console 0.14.1", + "console 0.15.0", "lazy_static 1.4.0", "tempfile 2.2.0", ] @@ -490,9 +490,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.28" +version = "0.8.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80df024fbc5ac80f87dfef0d9f5209a252f2a497f7f42944cff24d8253cac065" +checksum = "7896dc8abb250ffdda33912550faa54c88ec8b998dec0b2c55ab224921ce11df" dependencies = [ "cfg-if 1.0.0", ] @@ -557,9 +557,9 @@ dependencies = [ [[package]] name = "flate2" -version = "1.0.21" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80edafed416a46fb378521624fab1cfa2eb514784fd8921adbe8a8d8321da811" +checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" dependencies = [ "cfg-if 1.0.0", "crc32fast", @@ -669,9 +669,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.25.0" +version = "0.26.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0a01e0497841a3b2db4f8afa483cce65f7e96a3498bd6c541734792aeac8fe7" +checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" [[package]] name = "glob" @@ -735,7 +735,7 @@ checksum = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" dependencies = [ "bytes", "fnv", - "itoa", + "itoa 0.4.8", ] [[package]] @@ -794,7 +794,7 @@ dependencies = [ "http-body", "httparse", "iovec", - "itoa", + "itoa 0.4.8", "log", "net2", "rustc_version", @@ -857,9 +857,9 @@ dependencies = [ [[package]] name = "instant" -version = "0.1.10" +version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bee0328b1209d157ef001c94dd85b4f8f64139adb0eac2659f4b08382b2f474d" +checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ "cfg-if 1.0.0", ] @@ -888,6 +888,12 @@ version = "0.4.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" +[[package]] +name = "itoa" +version = "1.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" + [[package]] name = "kernel32-sys" version = "0.2.2" @@ -912,9 +918,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.101" +version = "0.2.112" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cb00336871be5ed2c8ed44b60ae9959dc5b9f08539422ed43f09e34ecaeba21" +checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" [[package]] name = "libz-sys" @@ -1115,24 +1121,24 @@ dependencies = [ [[package]] name = "object" -version = "0.26.2" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39f37e50073ccad23b6d09bcb5b263f4e76d3bb6038e4a3c08e52162ffa8abc2" +checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "692fcb63b64b1758029e0a96ee63e049ce8c5948587f2f7208df04625e5f6b56" +checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5" [[package]] name = "openssl" -version = "0.10.36" +version = "0.10.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d9facdb76fec0b73c406f125d44d86fdad818d66fef0531eec9233ca425ff4a" +checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" dependencies = [ "bitflags", "cfg-if 1.0.0", @@ -1150,18 +1156,18 @@ checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" [[package]] name = "openssl-src" -version = "111.16.0+1.1.1l" +version = "111.17.0+1.1.1m" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ab2173f69416cf3ec12debb5823d244127d23a9b127d5a5189aa97c5fa2859f" +checksum = "05d6a336abd10814198f66e2a91ccd7336611f30334119ca8ce300536666fcf4" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.66" +version = "0.9.72" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1996d2d305e561b70d1ee0c53f1542833f4e1ac6ce9a6708b6ff2738ca67dc82" +checksum = "7e46109c383602735fa0a2e48dd2b7c892b048e1bf69e5c3b1d804b7d9c203cb" dependencies = [ "autocfg 1.0.1", "cc", @@ -1173,9 +1179,9 @@ dependencies = [ [[package]] name = "os_type" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96eaebe22d9f12429b1af6a0b5dd411ccfc5cb5968710abbb8c512046be9df90" +checksum = "c3df761f6470298359f84fcfb60d86db02acc22c251c37265c07a3d1057d2389" dependencies = [ "regex", ] @@ -1259,7 +1265,7 @@ dependencies = [ "instant", "libc", "redox_syscall 0.2.10", - "smallvec 1.6.1", + "smallvec 1.7.0", "winapi 0.3.9", ] @@ -1277,15 +1283,15 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "pkg-config" -version = "0.3.19" +version = "0.3.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" +checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" [[package]] name = "ppv-lite86" -version = "0.2.10" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" +checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" [[package]] name = "predicates" @@ -1308,12 +1314,12 @@ checksum = "57e35a3326b75e49aa85f5dc6ec15b41108cf5aee58eabb1f274dd18b73c2451" [[package]] name = "predicates-tree" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7dd0fd014130206c9352efbdc92be592751b2b9274dff685348341082c6ea3d" +checksum = "338c7be2905b732ae3984a2f40032b5e94fd8f52505b186c7d4d68d193445df7" dependencies = [ "predicates-core", - "treeline", + "termtree", ] [[package]] @@ -1342,9 +1348,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.29" +version = "1.0.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9f5105d4fdaab20335ca9565e106a5d9b82b6219b5ba735731124ac6711d23d" +checksum = "2f84e92c0f7c9d58328b85a78557813e4bd845130db68d7184635344399423b1" dependencies = [ "unicode-xid", ] @@ -1367,9 +1373,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" +checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" dependencies = [ "proc-macro2", ] @@ -1680,9 +1686,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.5" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" +checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" [[package]] name = "same-file" @@ -1756,18 +1762,18 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.130" +version = "1.0.131" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f12d06de37cf59146fbdecab66aa99f9fe4f78722e3607577a5375d66bd0c913" +checksum = "b4ad69dfbd3e45369132cc64e6748c2d65cdfb001a2b1c232d128b4ad60561c1" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.130" +version = "1.0.131" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7bc1a1ab1961464eae040d96713baa5a724a8152c1222492465b54322ec508b" +checksum = "b710a83c4e0dff6a3d511946b95274ad9ca9e5d3ae497b63fda866ac955358d2" dependencies = [ "proc-macro2", "quote", @@ -1785,11 +1791,11 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.67" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f9e390c27c3c0ce8bc5d725f6e4d30a29d26659494aa4b17535f7522c5c950" +checksum = "bcbd0344bc6533bc7ec56df11d42fb70f1b912351c0825ccb7211b59d8af7cf5" dependencies = [ - "itoa", + "itoa 1.0.1", "ryu", "serde", ] @@ -1801,7 +1807,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" dependencies = [ "dtoa", - "itoa", + "itoa 0.4.8", "serde", "url 1.7.2", ] @@ -1836,9 +1842,9 @@ checksum = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" [[package]] name = "slab" -version = "0.4.4" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c307a32c1c5c437f38c7fd45d753050587732ba8628319fbdf12a7e289ccc590" +checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" [[package]] name = "smallvec" @@ -1851,15 +1857,15 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.6.1" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" +checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" [[package]] name = "socket2" -version = "0.4.1" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "765f090f0e423d2b55843402a07915add955e7d60657db13707a159727326cad" +checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" dependencies = [ "libc", "winapi 0.3.9", @@ -1888,9 +1894,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "structopt" -version = "0.3.23" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf9d950ef167e25e0bdb073cf1d68e9ad2795ac826f2f3f59647817cf23c0bfa" +checksum = "40b9788f4202aa75c240ecc9c15c65185e6a39ccdeb0fd5d008b98825464c87c" dependencies = [ "clap", "lazy_static 1.4.0", @@ -1899,9 +1905,9 @@ dependencies = [ [[package]] name = "structopt-derive" -version = "0.4.16" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "134d838a2c9943ac3125cf6df165eda53493451b719f3255b2a26b85f772d0ba" +checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0" dependencies = [ "heck", "proc-macro-error", @@ -1912,9 +1918,9 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.76" +version = "1.0.82" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6f107db402c2c2055242dbf4d2af0e69197202e9faacbef9571bbe47f5a1b84" +checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59" dependencies = [ "proc-macro2", "quote", @@ -1923,9 +1929,9 @@ dependencies = [ [[package]] name = "synstructure" -version = "0.12.5" +version = "0.12.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "474aaa926faa1603c40b7885a9eaea29b444d1cb2850cb7c0e37bb1a4182f4fa" +checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" dependencies = [ "proc-macro2", "quote", @@ -1935,9 +1941,9 @@ dependencies = [ [[package]] name = "tar" -version = "0.4.37" +version = "0.4.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6f5515d3add52e0bbdcad7b83c388bb36ba7b754dda3b5f5bc2d38640cdba5c" +checksum = "4b55807c0344e1e6c04d7c965f5289c39a8d94ae23ed5c0b57aabac549f871c6" dependencies = [ "filetime", "libc", @@ -1999,6 +2005,12 @@ dependencies = [ "libc", ] +[[package]] +name = "termtree" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "13a4ec180a2de59b57434704ccfad967f789b12737738798fa08798cd5824c16" + [[package]] name = "textwrap" version = "0.11.0" @@ -2010,18 +2022,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.29" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "602eca064b2d83369e2b2f34b09c70b605402801927c65c11071ac911d299b88" +checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.29" +version = "1.0.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bad553cc2c78e8de258400763a647e80e6d1b31ee237275d756f6836d204494c" +checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" dependencies = [ "proc-macro2", "quote", @@ -2040,9 +2052,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.3.1" +version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "848a1e1181b9f6753b5e96a092749e29b11d19ede67dfbbd6c7dc7e0f49b5338" +checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" dependencies = [ "tinyvec_macros", ] @@ -2204,12 +2216,6 @@ dependencies = [ "serde", ] -[[package]] -name = "treeline" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7f741b240f1a48843f9b8e0444fb55fb2a4ff67293b50a9179dfd5ea67f8d41" - [[package]] name = "try-lock" version = "0.2.3" @@ -2236,9 +2242,9 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.6" +version = "0.3.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "246f4c42e67e7a4e3c6106ff716a5d067d4132a642840b242e357e468a2a0085" +checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" [[package]] name = "unicode-normalization" @@ -2257,9 +2263,9 @@ checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" [[package]] name = "unicode-width" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3" +checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" [[package]] name = "unicode-xid" @@ -2362,7 +2368,7 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasm-pack" -version = "0.10.1" +version = "0.10.2" dependencies = [ "assert_cmd", "atty", diff --git a/Cargo.toml b/Cargo.toml index 80b51a6..53fc37f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "wasm-pack" description = "📦✨ your favorite rust -> wasm workflow tool!" -version = "0.10.1" +version = "0.10.2" authors = ["Ashley Williams ", "Jesper Håkansson "] repository = "https://github.com/rustwasm/wasm-pack.git" license = "MIT/Apache-2.0" diff --git a/docs/index.html b/docs/index.html index 4e183d2..e75e8e4 100644 --- a/docs/index.html +++ b/docs/index.html @@ -42,9 +42,9 @@

📦✨ your favorite rust -> wasm workflow tool!

- ✨ Install wasm-pack 0.10.1 ✨ -

5 Sep 2021 | - + ✨ Install wasm-pack 0.10.2 ✨ +

16 Dec 2021 | + Release Notes

diff --git a/npm/package.json b/npm/package.json index 3ae9352..3b3fed9 100644 --- a/npm/package.json +++ b/npm/package.json @@ -1,6 +1,6 @@ { "name": "wasm-pack", - "version": "0.10.1", + "version": "0.10.2", "description": "📦✨ your favorite rust -> wasm workflow tool!", "main": "binary.js", "scripts": { diff --git a/src/test/webdriver/chromedriver.rs b/src/test/webdriver/chromedriver.rs index c1c96ad..a5e8e02 100644 --- a/src/test/webdriver/chromedriver.rs +++ b/src/test/webdriver/chromedriver.rs @@ -9,7 +9,7 @@ use target; // Keep it up to date with each `wasm-pack` release. // https://chromedriver.storage.googleapis.com/LATEST_RELEASE -const DEFAULT_CHROMEDRIVER_VERSION: &str = "91.0.4472.101"; +const DEFAULT_CHROMEDRIVER_VERSION: &str = "96.0.4664.45"; const CHROMEDRIVER_LAST_UPDATED_STAMP: &str = "chromedriver_last_updated"; const CHROMEDRIVER_VERSION_STAMP: &str = "chromedriver_version"; diff --git a/src/test/webdriver/geckodriver.rs b/src/test/webdriver/geckodriver.rs index f19eaee..0de45e2 100644 --- a/src/test/webdriver/geckodriver.rs +++ b/src/test/webdriver/geckodriver.rs @@ -9,7 +9,7 @@ use target; // Keep it up to date with each `wasm-pack` release. // https://github.com/mozilla/geckodriver/releases/latest -const DEFAULT_GECKODRIVER_VERSION: &str = "v0.29.1"; +const DEFAULT_GECKODRIVER_VERSION: &str = "v0.30.0"; const DEFAULT_WINDOWS_GECKODRIVER_VERSION: &str = "v0.24.0"; const GECKODRIVER_LAST_UPDATED_STAMP: &str = "geckodriver_last_updated"; From af8eb338425daeffaeea3543e0d2c9c8eec06468 Mon Sep 17 00:00:00 2001 From: huntc Date: Fri, 11 Feb 2022 16:24:29 +1100 Subject: [PATCH 10/94] Do not remove the pkg directory A recent commit ensured that the pkg directory was removed as the first step of creating it. Unfortunately, this causes a problem for tools such as webpack when watching the pkg directory. In the case of webpack, it is unable to recover its watching and so any watch server must be restarted, consuming the developer's time. --- src/command/utils.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/command/utils.rs b/src/command/utils.rs index 7c6ec0c..4a735e2 100644 --- a/src/command/utils.rs +++ b/src/command/utils.rs @@ -37,7 +37,6 @@ fn find_manifest_from_cwd() -> Result { /// Construct our `pkg` directory in the crate. pub fn create_pkg_dir(out_dir: &Path) -> Result<(), failure::Error> { - let _ = fs::remove_dir_all(&out_dir); // Clean up any existing directory and ignore errors fs::create_dir_all(&out_dir)?; fs::write(out_dir.join(".gitignore"), "*")?; Ok(()) From 11ef667f6f1f4b9ff6536a15edc5910f540eb738 Mon Sep 17 00:00:00 2001 From: "main()" Date: Tue, 1 Mar 2022 14:58:02 +0100 Subject: [PATCH 11/94] Clean up package.json from previous runs Else wasm-pack crashes trying to read its own (old) file --- src/command/utils.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/command/utils.rs b/src/command/utils.rs index 4a735e2..0158abf 100644 --- a/src/command/utils.rs +++ b/src/command/utils.rs @@ -37,6 +37,7 @@ fn find_manifest_from_cwd() -> Result { /// Construct our `pkg` directory in the crate. pub fn create_pkg_dir(out_dir: &Path) -> Result<(), failure::Error> { + let _ = fs::remove_file(out_dir.join("package.json")); // Clean up package.json from previous runs fs::create_dir_all(&out_dir)?; fs::write(out_dir.join(".gitignore"), "*")?; Ok(()) From 2a36a1b999362c10f8aacca43b03aebb1e6b9657 Mon Sep 17 00:00:00 2001 From: Nino Date: Wed, 16 Mar 2022 13:00:26 +0000 Subject: [PATCH 12/94] Add suppot for more platforms to installer script --- docs/_installer/init.sh | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/docs/_installer/init.sh b/docs/_installer/init.sh index 7dbc05a..91ec0af 100644 --- a/docs/_installer/init.sh +++ b/docs/_installer/init.sh @@ -85,6 +85,19 @@ get_architecture() { local _ostype="$(uname -s)" local _cputype="$(uname -m)" + # This is when installing inside docker, or can be useful to side-step + # the script's built-in platform detection heuristic (if it drifts again in the future) + set +u + if [ -n "$TARGETOS" ]; then + _ostype="$TARGETOS" # probably always linux + fi + + if [ -n "$TARGETARCH" ]; then + _cputype="$TARGETARCH" + fi + set -u + + if [ "$_ostype" = Darwin -a "$_cputype" = i386 ]; then # Darwin `uname -s` lies if sysctl hw.optional.x86_64 | grep -q ': 1'; then @@ -93,7 +106,7 @@ get_architecture() { fi case "$_ostype" in - Linux) + Linux | linux) local _ostype=unknown-linux-musl ;; @@ -114,11 +127,19 @@ get_architecture() { x86_64 | x86-64 | x64 | amd64) local _cputype=x86_64 ;; + arm64 | aarch64) + local _cputype=aarch64 + ;; *) err "no precompiled binaries available for CPU architecture: $_cputype" esac + # See https://github.com/rustwasm/wasm-pack/pull/1088 + if [ "$_cputype" == "aarch64" ] && [ "$_ostype" == "apple-darwin" ]; then + _cputype="x86_64" + fi + local _arch="$_cputype-$_ostype" RETVAL="$_arch" From e050e6ff8dcd743878ce68334562ef0fc0cf7778 Mon Sep 17 00:00:00 2001 From: Avery Harnish Date: Thu, 21 Apr 2022 17:02:12 -0500 Subject: [PATCH 13/94] chore: updates binary-install to v1.0.0 --- npm/binary.js | 12 --- npm/package.json | 11 +- npm/run.js | 4 - npm/uninstall.js | 4 - npm/yarn.lock | 254 +++++++++++++++++++++++------------------------ 5 files changed, 129 insertions(+), 156 deletions(-) delete mode 100755 npm/run.js delete mode 100644 npm/uninstall.js diff --git a/npm/binary.js b/npm/binary.js index 41b33d8..1bdac35 100644 --- a/npm/binary.js +++ b/npm/binary.js @@ -29,23 +29,11 @@ const getBinary = () => { return new Binary(platform === windows ? "wasm-pack.exe" : "wasm-pack", url); }; -const run = () => { - const binary = getBinary(); - binary.run(); -}; - const install = () => { const binary = getBinary(); binary.install(); }; -const uninstall = () => { - const binary = getBinary(); - binary.uninstall(); -}; - module.exports = { install, - run, - uninstall, }; diff --git a/npm/package.json b/npm/package.json index 3b3fed9..a4aa2c1 100644 --- a/npm/package.json +++ b/npm/package.json @@ -4,11 +4,7 @@ "description": "📦✨ your favorite rust -> wasm workflow tool!", "main": "binary.js", "scripts": { - "postinstall": "node ./install.js", - "preuninstall": "node ./uninstall.js" - }, - "bin": { - "wasm-pack": "./run.js" + "postinstall": "node ./install.js" }, "repository": { "type": "git", @@ -30,9 +26,6 @@ }, "homepage": "https://github.com/rustwasm/wasm-pack#readme", "dependencies": { - "binary-install": "^0.1.0" - }, - "resolutions": { - "axios": "0.21.2" + "binary-install": "^1.0.0" } } diff --git a/npm/run.js b/npm/run.js deleted file mode 100755 index 847da53..0000000 --- a/npm/run.js +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node - -const { run } = require("./binary"); -run(); diff --git a/npm/uninstall.js b/npm/uninstall.js deleted file mode 100644 index 56088ad..0000000 --- a/npm/uninstall.js +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env node - -const { uninstall } = require("./binary"); -uninstall(); diff --git a/npm/yarn.lock b/npm/yarn.lock index c37e12c..b0557b3 100644 --- a/npm/yarn.lock +++ b/npm/yarn.lock @@ -2,151 +2,151 @@ # yarn lockfile v1 -axios@0.21.2, axios@^0.21.1: - version "0.21.2" - resolved "https://registry.yarnpkg.com/axios/-/axios-0.21.2.tgz#21297d5084b2aeeb422f5d38e7be4fbb82239017" - integrity sha512-87otirqUw3e8CzHTMO+/9kh/FSgXt/eVDvipijwDtEuwbkySWZ9SBm6VEubmJ/kLKEoLQV/POhxXFb66bfekfg== +"axios@^0.26.1": + "integrity" "sha512-fPwcX4EvnSHuInCMItEhAGnaSEXRBjtzh9fOtsE6E1G6p7vl7edEeZe11QHf18+6+9gR5PbKV/sGKNaD8YaMeA==" + "resolved" "https://registry.npmjs.org/axios/-/axios-0.26.1.tgz" + "version" "0.26.1" dependencies: - follow-redirects "^1.14.0" + "follow-redirects" "^1.14.8" -balanced-match@^1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" - integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw== +"balanced-match@^1.0.0": + "integrity" "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + "resolved" "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" + "version" "1.0.2" -binary-install@^0.1.0: - version "0.1.1" - resolved "https://registry.yarnpkg.com/binary-install/-/binary-install-0.1.1.tgz#c1b22f174581764e5c52cd16664cf1d287e38bd4" - integrity sha512-DqED0D/6LrS+BHDkKn34vhRqOGjy5gTMgvYZsGK2TpNbdPuz4h+MRlNgGv5QBRd7pWq/jylM4eKNCizgAq3kNQ== +"binary-install@^1.0.0": + "integrity" "sha512-2IS/OpkHB+s4PVDqP0l6+d5uLsgdq5Uvt19Op7RWDXTHHJNE52txkFTwOeQuJv3EkB87rJ2yRpRXQ8/CyqEctQ==" + "resolved" "https://registry.npmjs.org/binary-install/-/binary-install-1.0.0.tgz" + "version" "1.0.0" dependencies: - axios "^0.21.1" - rimraf "^3.0.2" - tar "^6.1.0" - -brace-expansion@^1.1.7: - version "1.1.11" - resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-1.1.11.tgz#3c7fcbf529d87226f3d2f52b966ff5271eb441dd" - integrity sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA== + "axios" "^0.26.1" + "rimraf" "^3.0.2" + "tar" "^6.1.11" + +"brace-expansion@^1.1.7": + "integrity" "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==" + "resolved" "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz" + "version" "1.1.11" dependencies: - balanced-match "^1.0.0" - concat-map "0.0.1" - -chownr@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" - integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== - -concat-map@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" - integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= - -follow-redirects@^1.14.0: - version "1.14.6" - resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.6.tgz#8cfb281bbc035b3c067d6cd975b0f6ade6e855cd" - integrity sha512-fhUl5EwSJbbl8AR+uYL2KQDxLkdSjZGR36xy46AO7cOMTrCMON6Sa28FmAnC2tRTDbd/Uuzz3aJBv7EBN7JH8A== - -fs-minipass@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/fs-minipass/-/fs-minipass-2.1.0.tgz#7f5036fdbf12c63c169190cbe4199c852271f9fb" - integrity sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg== + "balanced-match" "^1.0.0" + "concat-map" "0.0.1" + +"chownr@^2.0.0": + "integrity" "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==" + "resolved" "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz" + "version" "2.0.0" + +"concat-map@0.0.1": + "integrity" "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=" + "resolved" "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz" + "version" "0.0.1" + +"follow-redirects@^1.14.8": + "integrity" "sha512-MQDfihBQYMcyy5dhRDJUHcw7lb2Pv/TuE6xP1vyraLukNDHKbDxDNaOE3NbCAdKQApno+GPRyo1YAp89yCjK4w==" + "resolved" "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.9.tgz" + "version" "1.14.9" + +"fs-minipass@^2.0.0": + "integrity" "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==" + "resolved" "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz" + "version" "2.1.0" dependencies: - minipass "^3.0.0" + "minipass" "^3.0.0" -fs.realpath@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" - integrity sha1-FQStJSMVjKpA20onh8sBQRmU6k8= +"fs.realpath@^1.0.0": + "integrity" "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=" + "resolved" "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" + "version" "1.0.0" -glob@^7.1.3: - version "7.2.0" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" - integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== +"glob@^7.1.3": + "integrity" "sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q==" + "resolved" "https://registry.npmjs.org/glob/-/glob-7.2.0.tgz" + "version" "7.2.0" dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - -inflight@^1.0.4: - version "1.0.6" - resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9" - integrity sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk= + "fs.realpath" "^1.0.0" + "inflight" "^1.0.4" + "inherits" "2" + "minimatch" "^3.0.4" + "once" "^1.3.0" + "path-is-absolute" "^1.0.0" + +"inflight@^1.0.4": + "integrity" "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=" + "resolved" "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz" + "version" "1.0.6" dependencies: - once "^1.3.0" - wrappy "1" - -inherits@2: - version "2.0.4" - resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c" - integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ== - -minimatch@^3.0.4: - version "3.0.4" - resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" - integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== + "once" "^1.3.0" + "wrappy" "1" + +"inherits@2": + "integrity" "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==" + "resolved" "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz" + "version" "2.0.4" + +"minimatch@^3.0.4": + "integrity" "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==" + "resolved" "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz" + "version" "3.0.4" dependencies: - brace-expansion "^1.1.7" + "brace-expansion" "^1.1.7" -minipass@^3.0.0: - version "3.1.6" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-3.1.6.tgz#3b8150aa688a711a1521af5e8779c1d3bb4f45ee" - integrity sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ== +"minipass@^3.0.0": + "integrity" "sha512-rty5kpw9/z8SX9dmxblFA6edItUmwJgMeYDZRrwlIVN27i8gysGbznJwUggw2V/FVqFSDdWy040ZPS811DYAqQ==" + "resolved" "https://registry.npmjs.org/minipass/-/minipass-3.1.6.tgz" + "version" "3.1.6" dependencies: - yallist "^4.0.0" + "yallist" "^4.0.0" -minizlib@^2.1.1: - version "2.1.2" - resolved "https://registry.yarnpkg.com/minizlib/-/minizlib-2.1.2.tgz#e90d3466ba209b932451508a11ce3d3632145931" - integrity sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg== +"minizlib@^2.1.1": + "integrity" "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==" + "resolved" "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz" + "version" "2.1.2" dependencies: - minipass "^3.0.0" - yallist "^4.0.0" - -mkdirp@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-1.0.4.tgz#3eb5ed62622756d79a5f0e2a221dfebad75c2f7e" - integrity sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw== - -once@^1.3.0: - version "1.4.0" - resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" - integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E= + "minipass" "^3.0.0" + "yallist" "^4.0.0" + +"mkdirp@^1.0.3": + "integrity" "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==" + "resolved" "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz" + "version" "1.0.4" + +"once@^1.3.0": + "integrity" "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=" + "resolved" "https://registry.npmjs.org/once/-/once-1.4.0.tgz" + "version" "1.4.0" dependencies: - wrappy "1" + "wrappy" "1" -path-is-absolute@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" - integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= +"path-is-absolute@^1.0.0": + "integrity" "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=" + "resolved" "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz" + "version" "1.0.1" -rimraf@^3.0.2: - version "3.0.2" - resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-3.0.2.tgz#f1a5402ba6220ad52cc1282bac1ae3aa49fd061a" - integrity sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA== +"rimraf@^3.0.2": + "integrity" "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==" + "resolved" "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz" + "version" "3.0.2" dependencies: - glob "^7.1.3" + "glob" "^7.1.3" -tar@^6.1.0: - version "6.1.11" - resolved "https://registry.yarnpkg.com/tar/-/tar-6.1.11.tgz#6760a38f003afa1b2ffd0ffe9e9abbd0eab3d621" - integrity sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA== +"tar@^6.1.11": + "integrity" "sha512-an/KZQzQUkZCkuoAA64hM92X0Urb6VpRhAFllDzz44U2mcD5scmT3zBc4VgVpkugF580+DQn8eAFSyoQt0tznA==" + "resolved" "https://registry.npmjs.org/tar/-/tar-6.1.11.tgz" + "version" "6.1.11" dependencies: - chownr "^2.0.0" - fs-minipass "^2.0.0" - minipass "^3.0.0" - minizlib "^2.1.1" - mkdirp "^1.0.3" - yallist "^4.0.0" - -wrappy@1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" - integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8= - -yallist@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" - integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== + "chownr" "^2.0.0" + "fs-minipass" "^2.0.0" + "minipass" "^3.0.0" + "minizlib" "^2.1.1" + "mkdirp" "^1.0.3" + "yallist" "^4.0.0" + +"wrappy@1": + "integrity" "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" + "resolved" "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz" + "version" "1.0.2" + +"yallist@^4.0.0": + "integrity" "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" + "resolved" "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" + "version" "4.0.0" From acf6a96f8854efd04e63716d16a5b3e30b1e399d Mon Sep 17 00:00:00 2001 From: Avery Harnish Date: Wed, 27 Apr 2022 09:43:32 -0500 Subject: [PATCH 14/94] chore: adds run.js back --- npm/binary.js | 6 ++++++ npm/package.json | 2 +- npm/run.js | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 npm/run.js diff --git a/npm/binary.js b/npm/binary.js index 1bdac35..6671545 100644 --- a/npm/binary.js +++ b/npm/binary.js @@ -34,6 +34,12 @@ const install = () => { binary.install(); }; +const run = () => { + const binary = getBinary(); + binary.run(); +} + module.exports = { install, + run, }; diff --git a/npm/package.json b/npm/package.json index a4aa2c1..781761a 100644 --- a/npm/package.json +++ b/npm/package.json @@ -26,6 +26,6 @@ }, "homepage": "https://github.com/rustwasm/wasm-pack#readme", "dependencies": { - "binary-install": "^1.0.0" + "binary-install": "^1.0.1" } } diff --git a/npm/run.js b/npm/run.js new file mode 100644 index 0000000..847da53 --- /dev/null +++ b/npm/run.js @@ -0,0 +1,4 @@ +#!/usr/bin/env node + +const { run } = require("./binary"); +run(); From 059fb9a386ab05950a251f4496c763e5c314f4a2 Mon Sep 17 00:00:00 2001 From: Michael Mauderer Date: Fri, 13 May 2022 10:41:26 +0100 Subject: [PATCH 15/94] Update mod.rs --- src/install/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/install/mod.rs b/src/install/mod.rs index 6474d1e..1b4ef69 100644 --- a/src/install/mod.rs +++ b/src/install/mod.rs @@ -207,7 +207,7 @@ fn prebuilt_url(tool: &Tool, version: &str) -> Result { Tool::WasmOpt => { Ok(format!( "https://github.com/WebAssembly/binaryen/releases/download/{vers}/binaryen-{vers}-{target}.tar.gz", - vers = "version_90", + vers = "version_108", target = target, )) } From 6c1fc859544d553e5c52e608eaf43934284ff209 Mon Sep 17 00:00:00 2001 From: Dallas <4213800+dallasbrittany@users.noreply.github.com> Date: Wed, 25 May 2022 11:22:55 -0500 Subject: [PATCH 16/94] Update non-rustup-setups.md --- docs/src/prerequisites/non-rustup-setups.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/prerequisites/non-rustup-setups.md b/docs/src/prerequisites/non-rustup-setups.md index 5171bdc..be53eb2 100644 --- a/docs/src/prerequisites/non-rustup-setups.md +++ b/docs/src/prerequisites/non-rustup-setups.md @@ -1,5 +1,5 @@ # Non-Rustup setups -`wasm-pack` compiles your code using the `wasm32-unknown-unknown` target. `wasm-pack` will automatically add this target for Rustup setups if you don't already have it installed by doing `rustup target add wasm32-unknown-unknown`. However, if you're not using Rustup we won't be able to this automatically and you'll have to do this yourself. +`wasm-pack` compiles your code using the `wasm32-unknown-unknown` target. `wasm-pack` will automatically add this target for Rustup setups if you don't already have it installed by doing `rustup target add wasm32-unknown-unknown`. However, if you're not using Rustup, then we won't be able to do this automatically, and you'll have to do this yourself. ## Manually add wasm32-unknown-unknown *Disclaimer: This is not guaranteed to work for every setup. These instructions below are specific for setups that match the exact rustc release, which means that the downloaded wasm32 target can be incompatible.* From 4e0fd291e52897a2e39bfd3c21ada30c298d0c7d Mon Sep 17 00:00:00 2001 From: Julian Rosse Date: Thu, 26 May 2022 14:38:34 -0400 Subject: [PATCH 17/94] small fixes --- docs/src/commands/build.md | 6 +++--- docs/src/contributing.md | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/src/commands/build.md b/docs/src/commands/build.md index 616fd24..7d6a7c5 100644 --- a/docs/src/commands/build.md +++ b/docs/src/commands/build.md @@ -1,6 +1,6 @@ # wasm-pack build -The `wasm-pack build` command creates the files neccessary for JavaScript +The `wasm-pack build` command creates the files necessary for JavaScript interoperability and for publishing a package to npm. This involves compiling your code to wasm and generating a pkg folder. This pkg folder will contain the wasm binary, a JS wrapper file, your `README`, and a `package.json` file. @@ -22,7 +22,7 @@ path is given, the `build` command will run in the current directory. ## Output Directory -By default, `wasm-pack` will generate a directory for it's build output called `pkg`. +By default, `wasm-pack` will generate a directory for its build output called `pkg`. If you'd like to customize this you can use the `--out-dir` flag. ``` @@ -99,7 +99,7 @@ wasm-pack build --target nodejs ## Scope -The init command also accepts an optional `--scope` argument. This will scope +The `build` command also accepts an optional `--scope` argument. This will scope your package name, which is useful if your package name might conflict with something in the public registry. For example: diff --git a/docs/src/contributing.md b/docs/src/contributing.md index d2a4dac..34f3a6a 100644 --- a/docs/src/contributing.md +++ b/docs/src/contributing.md @@ -12,14 +12,14 @@ You'll also want to check out the contributing [guidelines]. ## 🏃‍♀️ Up and Running -1. fork and clone this repository +1. fork and clone the `rustwasm/wasm-pack` repository 2. install [node/npm] 2. `cd wasm-pack` 3. `cargo run`. To test command line arguments you can run `cargo run -- `. ## Documentation -Documentation lives in the `/docs` directory. Each command has it's own page. +Documentation lives in the `/docs` directory. Each command has its own page. Additionally there are extra pages explaining the prerequisites, setup, and how to contribute (which you are reading now!). @@ -28,7 +28,7 @@ contribute (which you are reading now!). Tests live in the `/tests` directory. To run the tests you can run: ``` -cargo test +cargo test ``` You can also manually test the CLI tool by running: From 72ced8198b5bdb45bf030579a1f857e363378cbd Mon Sep 17 00:00:00 2001 From: nasso Date: Thu, 2 Jun 2022 14:34:10 +0200 Subject: [PATCH 18/94] Update release.yml --- .github/workflows/release.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ea3891b..86272ec 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -96,6 +96,7 @@ jobs: mv wasm-pack-init.exe ${{ env.RELEASE_DIR }} - name: Create tarball + shell: bash run: 7z a -ttar -so -an ./${{ env.RELEASE_DIR }}/${{ env.RELEASE_BIN }}-${{ steps.get_version.outputs.VERSION }}-${{ matrix.target }} | 7z a -si ./${{ env.RELEASE_DIR }}/${{ env.RELEASE_BIN }}-${{ steps.get_version.outputs.VERSION }}-${{ matrix.target }}.tar.gz - name: Upload Zip From acf90abda8145fe58fadcde634e3b0b6c934d11b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jun 2022 19:46:29 +0000 Subject: [PATCH 19/94] chore(deps): bump openssl-src from 111.17.0+1.1.1m to 111.20.0+1.1.1o Bumps [openssl-src](https://github.com/alexcrichton/openssl-src-rs) from 111.17.0+1.1.1m to 111.20.0+1.1.1o. - [Release notes](https://github.com/alexcrichton/openssl-src-rs/releases) - [Commits](https://github.com/alexcrichton/openssl-src-rs/commits) --- updated-dependencies: - dependency-name: openssl-src dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b2669b7..9ea9e29 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1156,9 +1156,9 @@ checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" [[package]] name = "openssl-src" -version = "111.17.0+1.1.1m" +version = "111.20.0+1.1.1o" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05d6a336abd10814198f66e2a91ccd7336611f30334119ca8ce300536666fcf4" +checksum = "92892c4f87d56e376e469ace79f1128fdaded07646ddf73aa0be4706ff712dec" dependencies = [ "cc", ] From e6981ec45648887ee4b1ecb9c44c6b11f1f338e5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 6 Jun 2022 21:19:10 +0000 Subject: [PATCH 20/94] chore(deps): bump regex from 1.5.4 to 1.5.6 Bumps [regex](https://github.com/rust-lang/regex) from 1.5.4 to 1.5.6. - [Release notes](https://github.com/rust-lang/regex/releases) - [Changelog](https://github.com/rust-lang/regex/blob/master/CHANGELOG.md) - [Commits](https://github.com/rust-lang/regex/compare/1.5.4...1.5.6) --- updated-dependencies: - dependency-name: regex dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b2669b7..036cecb 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1599,9 +1599,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.5.4" +version = "1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d07a8629359eb56f1e2fb1652bb04212c072a87ba68546a04065d525673ac461" +checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" dependencies = [ "aho-corasick", "memchr", @@ -1610,9 +1610,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.25" +version = "0.6.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f497285884f3fcff424ffc933e56d7cbca511def0c9831a7f9b5f6153e3cc89b" +checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" [[package]] name = "remove_dir_all" From dee3614a488c9b133ae2155fbb70bea8f370a2d6 Mon Sep 17 00:00:00 2001 From: Florian Schwalm Date: Wed, 2 Mar 2022 17:42:23 +0100 Subject: [PATCH 21/94] Make Deno target available --- src/bindgen.rs | 1 + src/command/build.rs | 5 +++++ src/manifest/mod.rs | 2 ++ 3 files changed, 8 insertions(+) diff --git a/src/bindgen.rs b/src/bindgen.rs index 535d6b8..e9d872c 100644 --- a/src/bindgen.rs +++ b/src/bindgen.rs @@ -115,6 +115,7 @@ fn build_target_arg_legacy(target: Target, cli_path: &Path) -> Result "--browser", + Target::Deno => "--deno", }; Ok(target_arg.to_string()) } diff --git a/src/command/build.rs b/src/command/build.rs index b680270..1f94471 100644 --- a/src/command/build.rs +++ b/src/command/build.rs @@ -55,6 +55,9 @@ pub enum Target { /// in a browser but pollutes the global namespace and must be manually /// instantiated. NoModules, + /// Correspond to `--target deno` where the output is natively usable as + /// a Deno module loaded with `import`. + Deno, } impl Default for Target { @@ -70,6 +73,7 @@ impl fmt::Display for Target { Target::Web => "web", Target::Nodejs => "nodejs", Target::NoModules => "no-modules", + Target::Deno => "deno", }; write!(f, "{}", s) } @@ -83,6 +87,7 @@ impl FromStr for Target { "web" => Ok(Target::Web), "nodejs" => Ok(Target::Nodejs), "no-modules" => Ok(Target::NoModules), + "deno" => Ok(Target::Deno), _ => bail!("Unknown target: {}", s), } } diff --git a/src/manifest/mod.rs b/src/manifest/mod.rs index 25fb196..6a48352 100644 --- a/src/manifest/mod.rs +++ b/src/manifest/mod.rs @@ -590,6 +590,8 @@ impl CrateData { Target::NoModules => self.to_nomodules(scope, disable_dts, existing_deps, out_dir), Target::Bundler => self.to_esmodules(scope, disable_dts, existing_deps, out_dir), Target::Web => self.to_web(scope, disable_dts, existing_deps, out_dir), + // Deno does not need package.json + Target::Deno => return Ok(()), }; let npm_json = serde_json::to_string_pretty(&npm_data)?; From 961da162a7d48459fa3f153b1fd9b5e10e9dbaa9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesper=20H=C3=A5kansson?= Date: Sun, 12 Jun 2022 21:44:18 +0200 Subject: [PATCH 22/94] 0.10.3 --- CHANGELOG.md | 45 +++ Cargo.lock | 443 +++++++++++++++-------------- Cargo.toml | 2 +- docs/index.html | 6 +- npm/package.json | 2 +- src/test/webdriver/chromedriver.rs | 2 +- src/test/webdriver/geckodriver.rs | 2 +- 7 files changed, 285 insertions(+), 217 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a03fd9..7048474 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,51 @@ ## 🤍 Unreleased +## 🌦️ 0.10.3 + +- ### 🤕 Fixes + + - **Use bash to create release tarballs - [nasso], [issue/1097] [pull/1144]** + + Fixes Windows installer failure due to malformatted tar. + + [pull/1144]: https://github.com/rustwasm/wasm-pack/pull/1144 + [issue/1097]: https://github.com/rustwasm/wasm-pack/issues/1097 + [nasso]: https://github.com/nasso + + - **Clean up package.json from previous runs - [main--], [issue/1110-comment] [pull/1119]** + + Remove the package.json file from previous runs to avoid crashes. + + [pull/1119]: https://github.com/rustwasm/wasm-pack/pull/1119 + [issue/1110-comment]: https://github.com/rustwasm/wasm-pack/pull/1110#issuecomment-1059008962 + [main--]: https://github.com/main-- + + - **Do not remove the pkg directory - [huntc], [issue/1099] [pull/1110]** + + A recent change ensured that the pkg directory was removed as the first step of attempting to create it. + Unfortunately, this caused a problem for webpack when watching the pkg directory. + Webpack was unable to recover its watching and so any watch server must be restarted, + which is a blocker when using it. This PR and release fixes this. + + [pull/1110]: https://github.com/rustwasm/wasm-pack/pull/1110 + [issue/1099]: https://github.com/rustwasm/wasm-pack/issues/1099 + [huntc]: https://github.com/huntc + + - **Bump regex from 1.5.4 to 1.5.6 - [dependabot], [pull/1147]** + + Version 1.5.5 of the regex crate fixed a security bug in the regex compiler. + + [pull/1147]: https://github.com/rustwasm/wasm-pack/pull/1147 + + - **Bump openssl-src from 111.17.0+1.1.1m to 111.20.0+1.1.1o - [dependabot], [pull/1146]** + + Bring in bug fixes from the new version of openssl-src. + + [pull/1146]: https://github.com/rustwasm/wasm-pack/pull/1146 + [dependabot]: https://github.com/apps/dependabot + + ## 🌦️ 0.10.2 - ### ✨ Features diff --git a/Cargo.lock b/Cargo.lock index 2f0d4a2..cebccd6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -72,21 +72,24 @@ dependencies = [ [[package]] name = "autocfg" -version = "0.1.7" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" +checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" +dependencies = [ + "autocfg 1.1.0", +] [[package]] name = "autocfg" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" +checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.63" +version = "0.3.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "321629d8ba6513061f26707241fa9bc89524ff1cd7a915a97ef0c62c666ce1b6" +checksum = "11a17d453482a265fd5f8479f2a3f405566e6ca627837aaddb85af8b1ab8ef61" dependencies = [ "addr2line", "cc", @@ -198,9 +201,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.72" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22a9137b95ea06864e018375b72adfb7db6e6f68cfc8df5a04d00288050485ee" +checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" [[package]] name = "cfg-if" @@ -273,7 +276,7 @@ dependencies = [ "clicolors-control", "lazy_static 1.4.0", "libc", - "parking_lot 0.11.2", + "parking_lot 0.12.1", "regex", "termios", "unicode-width", @@ -331,9 +334,9 @@ dependencies = [ [[package]] name = "core-foundation" -version = "0.9.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6888e10551bb93e424d8df1d07f1a8b4fceb0001a3a4b048bfc47554946f47b3" +checksum = "194a7a9e6de53fa55116934067c844d9d749312f75c6f6d0980e8c252f8c2146" dependencies = [ "core-foundation-sys", "libc", @@ -347,9 +350,9 @@ checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" [[package]] name = "crc32fast" -version = "1.3.0" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "738c290dfaea84fc1ca15ad9c168d083b05a714e1efddd8edaab678dc28d2836" +checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ "cfg-if 1.0.0", ] @@ -371,7 +374,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "cfg-if 0.1.10", "crossbeam-utils 0.7.2", "lazy_static 1.4.0", @@ -397,16 +400,16 @@ version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "cfg-if 0.1.10", "lazy_static 1.4.0", ] [[package]] name = "crossbeam-utils" -version = "0.8.5" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db" +checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" dependencies = [ "cfg-if 1.0.0", "lazy_static 1.4.0", @@ -414,9 +417,9 @@ dependencies = [ [[package]] name = "curl" -version = "0.4.41" +version = "0.4.43" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc6d233563261f8db6ffb83bbaad5a73837a6e6b28868e926337ebbdece0be3" +checksum = "37d855aeef205b43f65a5001e0997d81f8efca7badad4fad7d897aa7f0d0651f" dependencies = [ "curl-sys", "libc", @@ -429,9 +432,9 @@ dependencies = [ [[package]] name = "curl-sys" -version = "0.4.51+curl-7.80.0" +version = "0.4.55+curl-7.83.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d130987e6a6a34fe0889e1083022fa48cd90e6709a84be3fb8dd95801de5af20" +checksum = "23734ec77368ec583c2e61dd3f0b0e5c98b93abe6d2a004ca06b91dd7e3e2762" dependencies = [ "cc", "libc", @@ -490,9 +493,9 @@ checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" [[package]] name = "encoding_rs" -version = "0.8.30" +version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7896dc8abb250ffdda33912550faa54c88ec8b998dec0b2c55ab224921ce11df" +checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" dependencies = [ "cfg-if 1.0.0", ] @@ -543,27 +546,34 @@ dependencies = [ "synstructure", ] +[[package]] +name = "fastrand" +version = "1.7.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" +dependencies = [ + "instant", +] + [[package]] name = "filetime" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "975ccf83d8d9d0d84682850a38c8169027be83368805971cc4f238c2b245bc98" +checksum = "c0408e2626025178a6a7f7ffc05a25bc47103229f19c113755de7bf63816290c" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.10", + "redox_syscall 0.2.13", "winapi 0.3.9", ] [[package]] name = "flate2" -version = "1.0.22" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e6988e897c1c9c485f43b47a529cef42fde0547f9d8d41a7062518f1d8fc53f" +checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" dependencies = [ - "cfg-if 1.0.0", "crc32fast", - "libc", "miniz_oxide", ] @@ -658,9 +668,9 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.2.3" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fcd999463524c52659517fe2cea98493cfe485d10565e7b0fb07dbba7ad2753" +checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" dependencies = [ "cfg-if 1.0.0", "libc", @@ -752,9 +762,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.5.1" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acd94fdbe1d4ff688b67b04eee2e17bd50995534a61539e45adfefb45e5e5503" +checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" [[package]] name = "human-panic" @@ -767,7 +777,7 @@ dependencies = [ "serde", "serde_derive", "termcolor", - "toml 0.5.8", + "toml 0.5.9", "uuid 0.8.2", ] @@ -847,11 +857,11 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.7.0" +version = "1.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc633605454125dec4b66843673f01c7df2b89479b32e0ed634e43a91cff62a5" +checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "hashbrown", ] @@ -890,9 +900,9 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.1" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aab8fc367588b89dcee83ab0fd66b72b50b72fa1904d7095045ace2b0c81c35" +checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" [[package]] name = "kernel32-sys" @@ -918,15 +928,15 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.112" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b03d17f364a3a042d5e5d46b053bbbf82c92c9430c592dd4c064dc6ee997125" +checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" [[package]] name = "libz-sys" -version = "1.1.3" +version = "1.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de5435b8549c16d423ed0c03dbaafe57cf6c3344744f1242520d59c9d8ecec66" +checksum = "9702761c3935f8cc2f101793272e202c72b99da8f4224a19ddcf1279a6450bbf" dependencies = [ "cc", "libc", @@ -955,18 +965,19 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712a4d093c9976e24e7dbca41db895dabcbac38eb5f4045393d17a95bdfb1109" +checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" dependencies = [ + "autocfg 1.1.0", "scopeguard 1.1.0", ] [[package]] name = "log" -version = "0.4.14" +version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" +checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ "cfg-if 1.0.0", ] @@ -985,9 +996,9 @@ checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" [[package]] name = "memchr" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "308cc39be01b73d0d18f82a0e7b2a3df85245f84af96fdddc5d202d27e47b86a" +checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" [[package]] name = "memoffset" @@ -995,7 +1006,7 @@ version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", ] [[package]] @@ -1006,9 +1017,9 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "mime_guess" -version = "2.0.3" +version = "2.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" +checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" dependencies = [ "mime", "unicase", @@ -1016,12 +1027,11 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.4.4" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" +checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" dependencies = [ "adler", - "autocfg 1.0.1", ] [[package]] @@ -1057,9 +1067,9 @@ dependencies = [ [[package]] name = "native-tls" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48ba9f7719b5a0f42f338907614285fb5fd70e53858141f69898a1fb7203b24d" +checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" dependencies = [ "lazy_static 1.4.0", "libc", @@ -1070,7 +1080,7 @@ dependencies = [ "schannel", "security-framework", "security-framework-sys", - "tempfile 3.2.0", + "tempfile 3.3.0", ] [[package]] @@ -1092,28 +1102,28 @@ checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" [[package]] name = "num-integer" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" +checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.14" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" +checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", ] [[package]] name = "num_cpus" -version = "1.13.0" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3" +checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" dependencies = [ "hermit-abi", "libc", @@ -1121,38 +1131,50 @@ dependencies = [ [[package]] name = "object" -version = "0.27.1" +version = "0.28.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67ac1d3f9a1d3616fd9a60c8d74296f22406a238b6a72f5cc1e6f314df4ffbf9" +checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.9.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da32515d9f6e6e489d7bc9d84c71b060db7247dc035bbe44eac88cf87486d8d5" +checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" [[package]] name = "openssl" -version = "0.10.38" +version = "0.10.40" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c7ae222234c30df141154f159066c5093ff73b63204dcda7121eb082fc56a95" +checksum = "fb81a6430ac911acb25fe5ac8f1d2af1b4ea8a4fdfda0f1ee4292af2e2d8eb0e" dependencies = [ "bitflags", "cfg-if 1.0.0", "foreign-types", "libc", "once_cell", + "openssl-macros", "openssl-sys", ] +[[package]] +name = "openssl-macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b501e44f11665960c7e7fcf062c7d96a14ade4aa98116c004b2e37b5be7d736c" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "openssl-probe" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28988d872ab76095a6e6ac88d99b54fd267702734fd7ffe610ca27f533ddb95a" +checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" @@ -1165,11 +1187,11 @@ dependencies = [ [[package]] name = "openssl-sys" -version = "0.9.72" +version = "0.9.74" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e46109c383602735fa0a2e48dd2b7c892b048e1bf69e5c3b1d804b7d9c203cb" +checksum = "835363342df5fba8354c5b453325b110ffd54044e588c539cf2f20a8014e4cb1" dependencies = [ - "autocfg 1.0.1", + "autocfg 1.1.0", "cc", "libc", "openssl-src", @@ -1218,13 +1240,12 @@ dependencies = [ [[package]] name = "parking_lot" -version = "0.11.2" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7d17b78036a60663b797adeaee46f5c9dfebb86948d1255007a1d6be0271ff99" +checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "instant", - "lock_api 0.4.5", - "parking_lot_core 0.8.5", + "lock_api 0.4.7", + "parking_lot_core 0.9.3", ] [[package]] @@ -1257,16 +1278,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.8.5" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d76e8e1493bcac0d2766c42737f34458f1c8c50c0d23bcb24ea953affb273216" +checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" dependencies = [ "cfg-if 1.0.0", - "instant", "libc", - "redox_syscall 0.2.10", - "smallvec 1.7.0", - "winapi 0.3.9", + "redox_syscall 0.2.13", + "smallvec 1.8.0", + "windows-sys", ] [[package]] @@ -1283,15 +1303,9 @@ checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] name = "pkg-config" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58893f751c9b0412871a09abd62ecd2a00298c6c83befa223ef98c52aef40cbe" - -[[package]] -name = "ppv-lite86" -version = "0.2.15" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed0cfbc8191465bed66e1718596ee0b0b35d5ee1f41c5df2189d0fe8bde535ba" +checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" [[package]] name = "predicates" @@ -1308,15 +1322,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57e35a3326b75e49aa85f5dc6ec15b41108cf5aee58eabb1f274dd18b73c2451" +checksum = "da1c2388b1513e1b605fcec39a95e0a9e8ef088f71443ef37099fa9ae6673fcb" [[package]] name = "predicates-tree" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "338c7be2905b732ae3984a2f40032b5e94fd8f52505b186c7d4d68d193445df7" +checksum = "4d86de6de25020a36c6d3643a86d9a6a9f552107c0559c60ea03551b5e16c032" dependencies = [ "predicates-core", "termtree", @@ -1348,11 +1362,11 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.34" +version = "1.0.39" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f84e92c0f7c9d58328b85a78557813e4bd845130db68d7184635344399423b1" +checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" dependencies = [ - "unicode-xid", + "unicode-ident", ] [[package]] @@ -1373,9 +1387,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.10" +version = "1.0.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38bc8cc6a5f2e3655e0899c1b848643b2562f853f114bfec7be120678e3ace05" +checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" dependencies = [ "proc-macro2", ] @@ -1422,11 +1436,11 @@ version = "0.6.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" dependencies = [ - "autocfg 0.1.7", + "autocfg 0.1.8", "libc", - "rand_chacha 0.1.1", + "rand_chacha", "rand_core 0.4.2", - "rand_hc 0.1.0", + "rand_hc", "rand_isaac", "rand_jitter", "rand_os", @@ -1435,38 +1449,16 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "rand" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e7573632e6454cf6b99d7aac4ccca54be06da05aca2ef7423d22d27d4d4bcd8" -dependencies = [ - "libc", - "rand_chacha 0.3.1", - "rand_core 0.6.3", - "rand_hc 0.3.1", -] - [[package]] name = "rand_chacha" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" dependencies = [ - "autocfg 0.1.7", + "autocfg 0.1.8", "rand_core 0.3.1", ] -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core 0.6.3", -] - [[package]] name = "rand_core" version = "0.3.1" @@ -1482,15 +1474,6 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" -[[package]] -name = "rand_core" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d34f1408f55294453790c48b2f1ebbb1c5b4b7563eb1f418bcfcfdbb06ebb4e7" -dependencies = [ - "getrandom 0.2.3", -] - [[package]] name = "rand_hc" version = "0.1.0" @@ -1500,15 +1483,6 @@ dependencies = [ "rand_core 0.3.1", ] -[[package]] -name = "rand_hc" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d51e9f596de227fda2ea6c84607f5558e196eeaf43c986b724ba4fb8fdf497e7" -dependencies = [ - "rand_core 0.6.3", -] - [[package]] name = "rand_isaac" version = "0.1.1" @@ -1549,7 +1523,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" dependencies = [ - "autocfg 0.1.7", + "autocfg 0.1.8", "rand_core 0.4.2", ] @@ -1579,9 +1553,9 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "redox_syscall" -version = "0.2.10" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8383f39639269cde97d255a32bdb68c047337295414940c68bdd30c2e13203ff" +checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" dependencies = [ "bitflags", ] @@ -1666,7 +1640,7 @@ dependencies = [ "base64 0.13.0", "blake2b_simd", "constant_time_eq", - "crossbeam-utils 0.8.5", + "crossbeam-utils 0.8.8", ] [[package]] @@ -1686,9 +1660,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.9" +version = "1.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73b4b750c782965c211b42f022f59af1fbceabdd026623714f104152f1ec149f" +checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" [[package]] name = "same-file" @@ -1701,12 +1675,12 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.19" +version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" +checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" dependencies = [ "lazy_static 1.4.0", - "winapi 0.3.9", + "windows-sys", ] [[package]] @@ -1723,9 +1697,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "security-framework" -version = "2.4.2" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525bc1abfda2e1998d152c45cf13e696f76d0a4972310b22fac1658b05df7c87" +checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" dependencies = [ "bitflags", "core-foundation", @@ -1736,9 +1710,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.4.2" +version = "2.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9dd14d83160b528b7bfd66439110573efcfbe281b17fc2ca9f39f550d619c7e" +checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" dependencies = [ "core-foundation-sys", "libc", @@ -1762,18 +1736,18 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.131" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ad69dfbd3e45369132cc64e6748c2d65cdfb001a2b1c232d128b4ad60561c1" +checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.131" +version = "1.0.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b710a83c4e0dff6a3d511946b95274ad9ca9e5d3ae497b63fda866ac955358d2" +checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" dependencies = [ "proc-macro2", "quote", @@ -1791,11 +1765,11 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.73" +version = "1.0.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcbd0344bc6533bc7ec56df11d42fb70f1b912351c0825ccb7211b59d8af7cf5" +checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" dependencies = [ - "itoa 1.0.1", + "itoa 1.0.2", "ryu", "serde", ] @@ -1842,9 +1816,9 @@ checksum = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" [[package]] name = "slab" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9def91fd1e018fe007022791f865d0ccc9b3a0d5001e01aabb8b40e46000afb5" +checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" [[package]] name = "smallvec" @@ -1857,15 +1831,15 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ecab6c735a6bb4139c0caafd0cc3635748bbb3acf4550e8138122099251f309" +checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" [[package]] name = "socket2" -version = "0.4.2" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5dc90fe6c7be1a323296982db1836d1ea9e47b6839496dde9a541bc496df3516" +checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" dependencies = [ "libc", "winapi 0.3.9", @@ -1894,9 +1868,9 @@ checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "structopt" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40b9788f4202aa75c240ecc9c15c65185e6a39ccdeb0fd5d008b98825464c87c" +checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" dependencies = [ "clap", "lazy_static 1.4.0", @@ -1918,13 +1892,13 @@ dependencies = [ [[package]] name = "syn" -version = "1.0.82" +version = "1.0.96" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8daf5dd0bb60cbd4137b1b587d2fc0ae729bc07cf01cd70b36a1ed5ade3b9d59" +checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf" dependencies = [ "proc-macro2", "quote", - "unicode-xid", + "unicode-ident", ] [[package]] @@ -1965,23 +1939,23 @@ dependencies = [ [[package]] name = "tempfile" -version = "3.2.0" +version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" +checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ "cfg-if 1.0.0", + "fastrand", "libc", - "rand 0.8.4", - "redox_syscall 0.2.10", + "redox_syscall 0.2.13", "remove_dir_all", "winapi 0.3.9", ] [[package]] name = "termcolor" -version = "1.1.2" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4" +checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" dependencies = [ "winapi-util", ] @@ -2007,9 +1981,9 @@ dependencies = [ [[package]] name = "termtree" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13a4ec180a2de59b57434704ccfad967f789b12737738798fa08798cd5824c16" +checksum = "507e9898683b6c43a9aa55b64259b721b52ba226e0f3779137e50ad114a4c90b" [[package]] name = "textwrap" @@ -2022,18 +1996,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "854babe52e4df1653706b98fcfc05843010039b406875930a70e4d9644e5c417" +checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.30" +version = "1.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa32fd3f627f367fe16f893e2597ae3c05020f8bba2666a4e6ea73d377e5714b" +checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" dependencies = [ "proc-macro2", "quote", @@ -2052,9 +2026,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.5.1" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c1c1d5a42b6245520c249549ec267180beaffcc0615401ac8e31853d4b6d8d2" +checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" dependencies = [ "tinyvec_macros", ] @@ -2209,9 +2183,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.8" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" +checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" dependencies = [ "serde", ] @@ -2242,9 +2216,15 @@ dependencies = [ [[package]] name = "unicode-bidi" -version = "0.3.7" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a01404663e3db436ed2746d9fefef640d868edae3cceb81c3b8d5732fda678f" +checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" + +[[package]] +name = "unicode-ident" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" [[package]] name = "unicode-normalization" @@ -2257,9 +2237,9 @@ dependencies = [ [[package]] name = "unicode-segmentation" -version = "1.8.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8895849a949e7845e06bd6dc1aa51731a103c42707010a5b591c0038fb73385b" +checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" [[package]] name = "unicode-width" @@ -2269,9 +2249,9 @@ checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" [[package]] name = "unicode-xid" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ccb82d61f80a663efe1f787a51b16b5a51e3314d6ac365b08639f52387b33f3" +checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" [[package]] name = "url" @@ -2311,7 +2291,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom 0.2.3", + "getrandom 0.2.6", ] [[package]] @@ -2328,9 +2308,9 @@ checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191" [[package]] name = "version_check" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fecdca9a5291cc2b8dcf7dc02453fee791a280f3743cb0905f8822ae463b3fe" +checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" [[package]] name = "walkdir" @@ -2368,7 +2348,7 @@ checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] name = "wasm-pack" -version = "0.10.2" +version = "0.10.3" dependencies = [ "assert_cmd", "atty", @@ -2397,7 +2377,7 @@ dependencies = [ "siphasher", "strsim", "structopt", - "tempfile 3.2.0", + "tempfile 3.3.0", "toml 0.4.10", "walkdir", "which", @@ -2456,6 +2436,49 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" +[[package]] +name = "windows-sys" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" +dependencies = [ + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_msvc", +] + +[[package]] +name = "windows_aarch64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" + +[[package]] +name = "windows_i686_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" + +[[package]] +name = "windows_i686_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" + +[[package]] +name = "windows_x86_64_gnu" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" + +[[package]] +name = "windows_x86_64_msvc" +version = "0.36.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" + [[package]] name = "winreg" version = "0.6.2" @@ -2477,9 +2500,9 @@ dependencies = [ [[package]] name = "xattr" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" +checksum = "6d1526bbe5aaeb5eb06885f4d987bcdfa5e23187055de9b83fe00156a821fabc" dependencies = [ "libc", ] diff --git a/Cargo.toml b/Cargo.toml index 53fc37f..6fd73cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "wasm-pack" description = "📦✨ your favorite rust -> wasm workflow tool!" -version = "0.10.2" +version = "0.10.3" authors = ["Ashley Williams ", "Jesper Håkansson "] repository = "https://github.com/rustwasm/wasm-pack.git" license = "MIT/Apache-2.0" diff --git a/docs/index.html b/docs/index.html index e75e8e4..a7cda41 100644 --- a/docs/index.html +++ b/docs/index.html @@ -42,9 +42,9 @@

📦✨ your favorite rust -> wasm workflow tool!

- ✨ Install wasm-pack 0.10.2 ✨ -

16 Dec 2021 | - + ✨ Install wasm-pack 0.10.3 ✨ +

13 June 2022 | + Release Notes

diff --git a/npm/package.json b/npm/package.json index 3b3fed9..11188b1 100644 --- a/npm/package.json +++ b/npm/package.json @@ -1,6 +1,6 @@ { "name": "wasm-pack", - "version": "0.10.2", + "version": "0.10.3", "description": "📦✨ your favorite rust -> wasm workflow tool!", "main": "binary.js", "scripts": { diff --git a/src/test/webdriver/chromedriver.rs b/src/test/webdriver/chromedriver.rs index a5e8e02..6fb9301 100644 --- a/src/test/webdriver/chromedriver.rs +++ b/src/test/webdriver/chromedriver.rs @@ -9,7 +9,7 @@ use target; // Keep it up to date with each `wasm-pack` release. // https://chromedriver.storage.googleapis.com/LATEST_RELEASE -const DEFAULT_CHROMEDRIVER_VERSION: &str = "96.0.4664.45"; +const DEFAULT_CHROMEDRIVER_VERSION: &str = "102.0.5005.61"; const CHROMEDRIVER_LAST_UPDATED_STAMP: &str = "chromedriver_last_updated"; const CHROMEDRIVER_VERSION_STAMP: &str = "chromedriver_version"; diff --git a/src/test/webdriver/geckodriver.rs b/src/test/webdriver/geckodriver.rs index 0de45e2..eaf25b3 100644 --- a/src/test/webdriver/geckodriver.rs +++ b/src/test/webdriver/geckodriver.rs @@ -9,7 +9,7 @@ use target; // Keep it up to date with each `wasm-pack` release. // https://github.com/mozilla/geckodriver/releases/latest -const DEFAULT_GECKODRIVER_VERSION: &str = "v0.30.0"; +const DEFAULT_GECKODRIVER_VERSION: &str = "v0.31.0"; const DEFAULT_WINDOWS_GECKODRIVER_VERSION: &str = "v0.24.0"; const GECKODRIVER_LAST_UPDATED_STAMP: &str = "geckodriver_last_updated"; From 0b0d51017047812d5412fb67c79daf216b5f6dec Mon Sep 17 00:00:00 2001 From: avery Date: Mon, 13 Jun 2022 15:50:15 -0500 Subject: [PATCH 23/94] fix: adds back run.js to npm installer --- npm/package.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/npm/package.json b/npm/package.json index 91b01ba..9e062df 100644 --- a/npm/package.json +++ b/npm/package.json @@ -6,6 +6,9 @@ "scripts": { "postinstall": "node ./install.js" }, + "bin": { + "wasm-pack": "node ./run.js" + }, "repository": { "type": "git", "url": "git+https://github.com/rustwasm/wasm-pack.git" From 42a6aaa152de7d010ceaf231599f959621d7eddb Mon Sep 17 00:00:00 2001 From: Demur Rumed Date: Thu, 19 Nov 2020 18:05:31 +0000 Subject: [PATCH 24/94] Pass through --weak-refs --reference-types flags to bindgen --- src/bindgen.rs | 10 ++++++++++ src/command/build.rs | 16 ++++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/src/bindgen.rs b/src/bindgen.rs index e9d872c..4b6a051 100644 --- a/src/bindgen.rs +++ b/src/bindgen.rs @@ -17,6 +17,8 @@ pub fn wasm_bindgen_build( out_dir: &Path, out_name: &Option, disable_dts: bool, + weak_refs: bool, + reference_types: bool, target: Target, profile: BuildProfile, ) -> Result<(), failure::Error> { @@ -48,6 +50,14 @@ pub fn wasm_bindgen_build( .arg(out_dir) .arg(dts_arg); + if weak_refs { + cmd.arg("--weak-refs"); + } + + if reference_types { + cmd.arg("--reference-types"); + } + let target_arg = build_target_arg(target, &bindgen_path)?; if supports_dash_dash_target(&bindgen_path)? { cmd.arg("--target").arg(target_arg); diff --git a/src/command/build.rs b/src/command/build.rs index 1f94471..68677fe 100644 --- a/src/command/build.rs +++ b/src/command/build.rs @@ -28,6 +28,8 @@ pub struct Build { pub crate_data: manifest::CrateData, pub scope: Option, pub disable_dts: bool, + pub weak_refs: bool, + pub reference_types: bool, pub target: Target, pub profile: BuildProfile, pub mode: InstallMode, @@ -132,6 +134,14 @@ pub struct BuildOptions { /// this flag will disable generating this TypeScript file. pub disable_dts: bool, + #[structopt(long = "weak-refs")] + /// Enable usage of the JS weak references proposal. + pub weak_refs: bool, + + #[structopt(long = "reference-types")] + /// Enable usage of WebAssembly reference types. + pub reference_types: bool, + #[structopt(long = "target", short = "t", default_value = "bundler")] /// Sets the target environment. [possible values: bundler, nodejs, web, no-modules] pub target: Target, @@ -173,6 +183,8 @@ impl Default for BuildOptions { scope: None, mode: InstallMode::default(), disable_dts: false, + weak_refs: false, + reference_types: false, target: Target::default(), debug: false, dev: false, @@ -217,6 +229,8 @@ impl Build { crate_data, scope: build_opts.scope, disable_dts: build_opts.disable_dts, + weak_refs: build_opts.weak_refs, + reference_types: build_opts.reference_types, target: build_opts.target, profile, mode: build_opts.mode, @@ -391,6 +405,8 @@ impl Build { &self.out_dir, &self.out_name, self.disable_dts, + self.weak_refs, + self.reference_types, self.target, self.profile, )?; From 922967d884d9c68f82412b18c284bd5c94ffc8dd Mon Sep 17 00:00:00 2001 From: Demur Rumed Date: Fri, 29 Jul 2022 12:06:01 +0000 Subject: [PATCH 25/94] Pass --enable-reference-types to wasm-opt --- src/command/build.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/command/build.rs b/src/command/build.rs index 68677fe..e24a93c 100644 --- a/src/command/build.rs +++ b/src/command/build.rs @@ -415,7 +415,7 @@ impl Build { } fn step_run_wasm_opt(&mut self) -> Result<(), Error> { - let args = match self + let mut args = match self .crate_data .configured_profile(self.profile) .wasm_opt_args() @@ -423,6 +423,9 @@ impl Build { Some(args) => args, None => return Ok(()), }; + if self.reference_types { + args.push("--enable-reference-types".into()); + } info!("executing wasm-opt with {:?}", args); wasm_opt::run( &self.cache, From cf28908c78f753b483f9f71234eaaa19be2267dc Mon Sep 17 00:00:00 2001 From: GlennBecker Date: Sat, 27 Aug 2022 14:44:25 -0600 Subject: [PATCH 26/94] Add Linux arm64 support --- npm/binary.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/npm/binary.js b/npm/binary.js index 6671545..96fc5ac 100644 --- a/npm/binary.js +++ b/npm/binary.js @@ -13,6 +13,9 @@ const getPlatform = () => { if (type === "Linux" && arch === "x64") { return "x86_64-unknown-linux-musl"; } + if (type === "Linux" && arch === "arm64") { + return "aarch64-unknown-linux-musl"; + } if (type === "Darwin" && (arch === "x64" || arch === "arm64")) { return "x86_64-apple-darwin"; } From cf7a5a0c55da57a1960700ad66fc2555bcd7fcaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Kr=C3=BCger?= Date: Thu, 11 Aug 2022 20:56:56 +0200 Subject: [PATCH 27/94] Fix binaryen toolchain URL --- src/install/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/install/mod.rs b/src/install/mod.rs index 1b4ef69..7c7d378 100644 --- a/src/install/mod.rs +++ b/src/install/mod.rs @@ -164,7 +164,7 @@ pub fn download_prebuilt( fn prebuilt_url(tool: &Tool, version: &str) -> Result { let target = if target::LINUX && target::x86_64 { match tool { - Tool::WasmOpt => "x86-linux", + Tool::WasmOpt => "x86_64-linux", _ => "x86_64-unknown-linux-musl", } } else if target::LINUX && target::x86 { From c8ed7865903db3401401db001355ffabfd5ab329 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Kr=C3=BCger?= Date: Wed, 17 Aug 2022 12:12:44 +0200 Subject: [PATCH 28/94] Make x86 32bit an unsupported installation target --- src/install/mod.rs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/install/mod.rs b/src/install/mod.rs index 7c7d378..2c079d9 100644 --- a/src/install/mod.rs +++ b/src/install/mod.rs @@ -167,11 +167,6 @@ fn prebuilt_url(tool: &Tool, version: &str) -> Result { Tool::WasmOpt => "x86_64-linux", _ => "x86_64-unknown-linux-musl", } - } else if target::LINUX && target::x86 { - match tool { - Tool::WasmOpt => "x86-linux", - _ => bail!("Unrecognized target!"), - } } else if target::MACOS && (target::x86_64 || target::aarch64) { "x86_64-apple-darwin" } else if target::WINDOWS && target::x86_64 { From 5080097b39a9b6ff9825d9289d4d1b895a202cf7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Kr=C3=BCger?= Date: Wed, 17 Aug 2022 12:13:05 +0200 Subject: [PATCH 29/94] Fix macos install target path --- src/install/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/install/mod.rs b/src/install/mod.rs index 2c079d9..f8f9373 100644 --- a/src/install/mod.rs +++ b/src/install/mod.rs @@ -168,7 +168,7 @@ fn prebuilt_url(tool: &Tool, version: &str) -> Result { _ => "x86_64-unknown-linux-musl", } } else if target::MACOS && (target::x86_64 || target::aarch64) { - "x86_64-apple-darwin" + "x86_64-macos" } else if target::WINDOWS && target::x86_64 { match tool { Tool::WasmOpt => "x86-windows", From a0074b889352192d63ce1df4a70f12107bf77068 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Kr=C3=BCger?= Date: Tue, 23 Aug 2022 11:40:28 +0200 Subject: [PATCH 30/94] Fix windows x86_64 binaryen toolchain download URL --- src/install/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/install/mod.rs b/src/install/mod.rs index f8f9373..25f6986 100644 --- a/src/install/mod.rs +++ b/src/install/mod.rs @@ -171,7 +171,7 @@ fn prebuilt_url(tool: &Tool, version: &str) -> Result { "x86_64-macos" } else if target::WINDOWS && target::x86_64 { match tool { - Tool::WasmOpt => "x86-windows", + Tool::WasmOpt => "x86_64-windows", _ => "x86_64-pc-windows-msvc", } } else if target::WINDOWS && target::x86 { From 0d39cced6bd9d0e310bffb1944cf8409dfb6f97e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Kr=C3=BCger?= Date: Tue, 23 Aug 2022 15:07:40 +0200 Subject: [PATCH 31/94] Test URL-building matrix --- src/install/arch.rs | 40 +++++++++++++++++++++++++++++++++++++ src/install/mod.rs | 46 +++++++++++++++++++++++-------------------- src/install/os.rs | 40 +++++++++++++++++++++++++++++++++++++ tests/all/download.rs | 36 ++++++++++++++++++++++++++++++++- 4 files changed, 140 insertions(+), 22 deletions(-) create mode 100644 src/install/arch.rs create mode 100644 src/install/os.rs diff --git a/src/install/arch.rs b/src/install/arch.rs new file mode 100644 index 0000000..63516fa --- /dev/null +++ b/src/install/arch.rs @@ -0,0 +1,40 @@ +use std::fmt; + +use crate::target; + +/// An enum representing supported architectures +#[derive(Clone, PartialEq, Eq)] +pub enum Arch { + /// x86 64-bit + X86_64, + /// x86 32-bit + X86, + /// ARM 64-bit + AArch64, +} + +impl Arch { + /// Gets the current architecture + pub fn get() -> Result { + if target::x86_64 { + Ok(Arch::X86_64) + } else if target::x86 { + Ok(Arch::X86) + } else if target::aarch64 { + Ok(Arch::AArch64) + } else { + bail!("Unrecognized target!") + } + } +} + +impl fmt::Display for Arch { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let s = match self { + Arch::X86_64 => "x86-64", + Arch::X86 => "x86", + Arch::AArch64 => "aarch64", + }; + write!(f, "{}", s) + } +} diff --git a/src/install/mod.rs b/src/install/mod.rs index 25f6986..ab4f6ff 100644 --- a/src/install/mod.rs +++ b/src/install/mod.rs @@ -12,14 +12,17 @@ use std::env; use std::fs; use std::path::Path; use std::process::Command; -use target; use which::which; use PBAR; +mod arch; mod krate; mod mode; +mod os; mod tool; +pub use self::arch::Arch; pub use self::mode::InstallMode; +pub use self::os::Os; pub use self::tool::Tool; /// Possible outcomes of attempting to find/install a tool @@ -162,27 +165,28 @@ pub fn download_prebuilt( /// Returns the URL of a precompiled version of wasm-bindgen, if we have one /// available for our host platform. fn prebuilt_url(tool: &Tool, version: &str) -> Result { - let target = if target::LINUX && target::x86_64 { - match tool { - Tool::WasmOpt => "x86_64-linux", - _ => "x86_64-unknown-linux-musl", - } - } else if target::MACOS && (target::x86_64 || target::aarch64) { - "x86_64-macos" - } else if target::WINDOWS && target::x86_64 { - match tool { - Tool::WasmOpt => "x86_64-windows", - _ => "x86_64-pc-windows-msvc", - } - } else if target::WINDOWS && target::x86 { - match tool { - Tool::WasmOpt => "x86-windows", - _ => bail!("Unrecognized target!"), - } - } else { - bail!("Unrecognized target!") - }; + let os = Os::get()?; + let arch = Arch::get()?; + prebuilt_url_for(tool, version, &arch, &os) +} +/// Get the download URL for some tool at some version, architecture and operating system +pub fn prebuilt_url_for( + tool: &Tool, + version: &str, + arch: &Arch, + os: &Os, +) -> Result { + let target = match (os, arch, tool) { + (Os::Linux, Arch::X86_64, Tool::WasmOpt) => "x86_64-linux", + (Os::Linux, Arch::X86_64, _) => "x86_64-unknown-linux-musl", + (Os::MacOS, Arch::X86, _) => bail!("Unrecognized target!"), + (Os::MacOS, _, Tool::WasmOpt) => "x86_64-macos", + (Os::MacOS, _, _) => "x86_64-apple-darwin", + (Os::Windows, Arch::X86_64, Tool::WasmOpt) => "x86_64-windows", + (Os::Windows, Arch::X86_64, _) => "x86_64-pc-windows-msvc", + _ => bail!("Unrecognized target!"), + }; match tool { Tool::WasmBindgen => { Ok(format!( diff --git a/src/install/os.rs b/src/install/os.rs new file mode 100644 index 0000000..7d31b35 --- /dev/null +++ b/src/install/os.rs @@ -0,0 +1,40 @@ +use std::fmt; + +use crate::target; + +/// An enum representing supported operating systems +#[derive(Clone, PartialEq, Eq)] +pub enum Os { + /// Linux operating system + Linux, + /// Macos operating system + MacOS, + /// Windows operating system + Windows, +} + +impl Os { + /// Get the current operating system + pub fn get() -> Result { + if target::LINUX { + Ok(Os::Linux) + } else if target::MACOS { + Ok(Os::MacOS) + } else if target::WINDOWS { + Ok(Os::Windows) + } else { + bail!("Unrecognized target!") + } + } +} + +impl fmt::Display for Os { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + let s = match self { + Os::Linux => "linux", + Os::MacOS => "macOS", + Os::Windows => "windows", + }; + write!(f, "{}", s) + } +} diff --git a/tests/all/download.rs b/tests/all/download.rs index 05d9f6d..f19ba1e 100644 --- a/tests/all/download.rs +++ b/tests/all/download.rs @@ -1,6 +1,6 @@ use binary_install::Cache; use tempfile; -use wasm_pack::install::{self, Tool}; +use wasm_pack::install::{self, Arch, Os, Tool}; #[test] #[cfg(any( @@ -58,3 +58,37 @@ fn can_download_prebuilt_cargo_generate() { assert!(false, "Download Failed"); } } + +#[test] +fn all_latest_tool_download_urls_valid() { + let mut errors = Vec::new(); + + for tool in [Tool::CargoGenerate, Tool::WasmBindgen, Tool::WasmOpt] { + for arch in [Arch::X86_64, Arch::X86, Arch::AArch64] { + for os in [Os::Linux, Os::MacOS, Os::Windows] { + // For all valid tool, arch & os combinations, + // error out when any of them is a 404 or similar + if let Ok(url) = install::prebuilt_url_for(&tool, "0.2.82", &arch, &os) { + let client = reqwest::Client::new(); + // Use HTTP HEAD instead of GET to avoid fetching lots of stuff + let res = client.head(&url).send().unwrap(); + if res.status().is_client_error() { + errors.push(format!( + "Can't download URL {} for {} on {}: {}", + url, + arch, + os, + res.status() + )); + } + } + } + } + } + if !errors.is_empty() { + panic!( + "Some URLs for prebuild tools were unavailable:\n{}", + errors.join("\n") + ); + } +} From bda774394227734cb4b8ac43e9c02595b5fdc67d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Kr=C3=BCger?= Date: Wed, 26 Oct 2022 17:18:40 +0200 Subject: [PATCH 32/94] Apply patches from @printfn --- src/install/mod.rs | 8 ++++---- src/wasm_opt.rs | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/install/mod.rs b/src/install/mod.rs index ab4f6ff..612c6da 100644 --- a/src/install/mod.rs +++ b/src/install/mod.rs @@ -152,7 +152,7 @@ pub fn download_prebuilt( } } Tool::WasmOpt => { - let binaries = &["wasm-opt"]; + let binaries = &["wasm-opt", "libbinaryen"]; match cache.download(install_permitted, "wasm-opt", binaries, &url)? { Some(download) => Ok(Status::Found(download)), // TODO(ag_dubs): why is this different? i forget... @@ -180,9 +180,9 @@ pub fn prebuilt_url_for( let target = match (os, arch, tool) { (Os::Linux, Arch::X86_64, Tool::WasmOpt) => "x86_64-linux", (Os::Linux, Arch::X86_64, _) => "x86_64-unknown-linux-musl", - (Os::MacOS, Arch::X86, _) => bail!("Unrecognized target!"), - (Os::MacOS, _, Tool::WasmOpt) => "x86_64-macos", - (Os::MacOS, _, _) => "x86_64-apple-darwin", + (Os::MacOS, Arch::X86_64, Tool::WasmOpt) => "x86_64-macos", + (Os::MacOS, Arch::X86_64, _) => "x86_64-apple-darwin", + (Os::MacOS, Arch::AArch64, Tool::WasmOpt) => "arm64-macos", (Os::Windows, Arch::X86_64, Tool::WasmOpt) => "x86_64-windows", (Os::Windows, Arch::X86_64, _) => "x86_64-pc-windows-msvc", _ => bail!("Unrecognized target!"), diff --git a/src/wasm_opt.rs b/src/wasm_opt.rs index d3ad4c6..cd8944e 100644 --- a/src/wasm_opt.rs +++ b/src/wasm_opt.rs @@ -40,6 +40,7 @@ pub fn run( let tmp = path.with_extension("wasm-opt.wasm"); let mut cmd = Command::new(&wasm_opt_path); cmd.arg(&path).arg("-o").arg(&tmp).args(args); + cmd.env("DYLD_LIBRARY_PATH", &wasm_opt_path.parent().unwrap()); child::run(cmd, "wasm-opt")?; std::fs::rename(&tmp, &path)?; } From f73b53c5ab2e530f4fd065094b7cc1034457d09d Mon Sep 17 00:00:00 2001 From: printfn Date: Sat, 29 Oct 2022 09:08:09 +1300 Subject: [PATCH 33/94] Switch from failure to anyhow --- Cargo.lock | 870 ++++++++++++++++++++++------- Cargo.toml | 6 +- src/bindgen.rs | 12 +- src/build/mod.rs | 14 +- src/build/wasm_target.rs | 12 +- src/cache.rs | 3 +- src/child.rs | 6 +- src/command/build.rs | 34 +- src/command/generate.rs | 9 +- src/command/login.rs | 4 +- src/command/mod.rs | 5 +- src/command/pack.rs | 7 +- src/command/publish/access.rs | 4 +- src/command/publish/mod.rs | 7 +- src/command/test.rs | 30 +- src/command/utils.rs | 8 +- src/generate.rs | 8 +- src/install/arch.rs | 3 +- src/install/krate.rs | 3 +- src/install/mod.rs | 33 +- src/install/mode.rs | 5 +- src/install/os.rs | 3 +- src/installer.rs | 12 +- src/lib.rs | 5 +- src/license.rs | 18 +- src/lockfile.rs | 14 +- src/main.rs | 10 +- src/manifest/mod.rs | 32 +- src/npm.rs | 12 +- src/progressbar.rs | 5 +- src/readme.rs | 4 +- src/stamps.rs | 24 +- src/test/mod.rs | 4 +- src/test/webdriver.rs | 4 +- src/test/webdriver/chromedriver.rs | 16 +- src/test/webdriver/geckodriver.rs | 22 +- src/test/webdriver/safaridriver.rs | 3 +- src/wasm_opt.rs | 13 +- tests/all/download.rs | 6 +- tests/all/license.rs | 2 +- tests/all/main.rs | 5 +- tests/all/readme.rs | 2 +- tests/all/test.rs | 3 + tests/all/utils/file.rs | 4 +- tests/all/utils/manifest.rs | 6 +- tests/all/webdriver.rs | 1 + 46 files changed, 857 insertions(+), 456 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cebccd6..69eef93 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -17,15 +17,36 @@ version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" +[[package]] +name = "aes" +version = "0.7.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" +dependencies = [ + "cfg-if 1.0.0", + "cipher", + "cpufeatures", + "opaque-debug", +] + [[package]] name = "aho-corasick" -version = "0.7.18" +version = "0.7.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e37cfd5e7657ada45f742d6e99ca5788580b5c529dc78faf11ece6dc702656f" +checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" dependencies = [ "memchr", ] +[[package]] +name = "android_system_properties" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +dependencies = [ + "libc", +] + [[package]] name = "ansi_term" version = "0.12.1" @@ -36,16 +57,10 @@ dependencies = [ ] [[package]] -name = "arrayref" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4c527152e37cf757a3f78aae5a06fbeefdb07ccc535c980a3208ee3060dd544" - -[[package]] -name = "arrayvec" -version = "0.5.2" +name = "anyhow" +version = "1.0.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" +checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" [[package]] name = "assert_cmd" @@ -87,9 +102,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.65" +version = "0.3.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11a17d453482a265fd5f8479f2a3f405566e6ca627837aaddb85af8b1ab8ef61" +checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" dependencies = [ "addr2line", "cc", @@ -110,24 +125,24 @@ dependencies = [ ] [[package]] -name = "base64" -version = "0.13.0" +name = "base64ct" +version = "1.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" +checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" [[package]] name = "binary-install" -version = "0.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b5bc5f8c50dd6a80d0b303ddab79f42ddcb52fd43d68107ecf622c551fd4cd4" +version = "0.0.3-alpha.1" +source = "git+https://github.com/rustwasm/binary-install?rev=6d60f6731c8294000ea8f3a0260659b025cf7f94#6d60f6731c8294000ea8f3a0260659b025cf7f94" dependencies = [ + "anyhow", "curl", - "dirs", - "failure", + "dirs-next", "flate2", + "fs2", "hex", "is_executable", - "siphasher", + "siphasher 0.3.10", "tar", "zip", ] @@ -139,16 +154,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] -name = "blake2b_simd" -version = "0.5.11" +name = "block-buffer" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afa748e348ad3be8263be728124b24a24f268266f6f5d58af9d75f6a40b5c587" +checksum = "69cce20737498f97b993470a6e536b8523f0af7892a4f928cceb1ac5e52ebe7e" dependencies = [ - "arrayref", - "arrayvec", - "constant_time_eq", + "generic-array", ] +[[package]] +name = "bumpalo" +version = "3.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" + [[package]] name = "byteorder" version = "1.4.3" @@ -204,6 +223,9 @@ name = "cc" version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +dependencies = [ + "jobserver", +] [[package]] name = "cfg-if" @@ -219,17 +241,28 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.19" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" +checksum = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1" dependencies = [ - "libc", + "iana-time-zone", + "js-sys", "num-integer", "num-traits", - "time", + "time 0.1.44", + "wasm-bindgen", "winapi 0.3.9", ] +[[package]] +name = "cipher" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7ee52072ec15386f770805afd189a01c8841be8696bed250fa2f13c4c0d6dfb7" +dependencies = [ + "generic-array", +] + [[package]] name = "clap" version = "2.34.0" @@ -266,6 +299,16 @@ dependencies = [ "bitflags", ] +[[package]] +name = "codespan-reporting" +version = "0.11.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3538270d33cc669650c4b093848450d380def10c331d38c768e34cac80576e6e" +dependencies = [ + "termcolor", + "unicode-width", +] + [[package]] name = "console" version = "0.6.2" @@ -285,14 +328,13 @@ dependencies = [ [[package]] name = "console" -version = "0.15.0" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28b32d32ca44b70c3e4acd7db1babf555fa026e385fb95f18028f88848b3c31" +checksum = "c050367d967ced717c04b65d8c619d863ef9292ce0c5760028655a2fb298718c" dependencies = [ "encode_unicode", + "lazy_static 1.4.0", "libc", - "once_cell", - "regex", "terminal_size", "unicode-width", "winapi 0.3.9", @@ -310,7 +352,7 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" dependencies = [ - "time", + "time 0.1.44", "url 1.7.2", ] @@ -327,7 +369,7 @@ dependencies = [ "publicsuffix", "serde", "serde_json", - "time", + "time 0.1.44", "try_from", "url 1.7.2", ] @@ -348,6 +390,15 @@ version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5827cebf4670468b8772dd191856768aedcb1b0278a04f989f7766351917b9dc" +[[package]] +name = "cpufeatures" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "28d997bd5e24a5928dd43e46dc529867e207907fe0b239c3477d924f7f2ca320" +dependencies = [ + "libc", +] + [[package]] name = "crc32fast" version = "1.3.2" @@ -407,19 +458,28 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.8" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bf124c720b7686e3c2663cf54062ab0f68a88af2fb6a030e87e30bf721fcb38" +checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" dependencies = [ "cfg-if 1.0.0", - "lazy_static 1.4.0", +] + +[[package]] +name = "crypto-common" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" +dependencies = [ + "generic-array", + "typenum", ] [[package]] name = "curl" -version = "0.4.43" +version = "0.4.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37d855aeef205b43f65a5001e0997d81f8efca7badad4fad7d897aa7f0d0651f" +checksum = "509bd11746c7ac09ebd19f0b17782eae80aadee26237658a6b4808afb5c11a22" dependencies = [ "curl-sys", "libc", @@ -432,9 +492,9 @@ dependencies = [ [[package]] name = "curl-sys" -version = "0.4.55+curl-7.83.1" +version = "0.4.58+curl-7.86.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23734ec77368ec583c2e61dd3f0b0e5c98b93abe6d2a004ca06b91dd7e3e2762" +checksum = "430e2ecf0c5f4445334472cf8f9611a6eea404b4135ca5500f38a97a128c913e" dependencies = [ "cc", "libc", @@ -445,13 +505,57 @@ dependencies = [ "winapi 0.3.9", ] +[[package]] +name = "cxx" +version = "1.0.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6b7d4e43b25d3c994662706a1d4fcfc32aaa6afd287502c111b237093bb23f3a" +dependencies = [ + "cc", + "cxxbridge-flags", + "cxxbridge-macro", + "link-cplusplus", +] + +[[package]] +name = "cxx-build" +version = "1.0.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84f8829ddc213e2c1368e51a2564c552b65a8cb6a28f31e576270ac81d5e5827" +dependencies = [ + "cc", + "codespan-reporting", + "once_cell", + "proc-macro2", + "quote", + "scratch", + "syn", +] + +[[package]] +name = "cxxbridge-flags" +version = "1.0.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e72537424b474af1460806647c41d4b6d35d09ef7fe031c5c2fa5766047cc56a" + +[[package]] +name = "cxxbridge-macro" +version = "1.0.80" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "309e4fb93eed90e1e14bea0da16b209f81813ba9fc7830c20ed151dd7bc0a4d7" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "dialoguer" version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1ad1c29a0368928e78c551354dbff79f103a962ad820519724ef0d74f1c62fa9" dependencies = [ - "console 0.15.0", + "console 0.15.2", "lazy_static 1.4.0", "tempfile 2.2.0", ] @@ -463,10 +567,31 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" [[package]] -name = "dirs" -version = "1.0.5" +name = "digest" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fd78930633bd1c6e35c4b42b1df7b0cbc6bc191146e512bb3bedf243fcc3901" +checksum = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c" +dependencies = [ + "block-buffer", + "crypto-common", + "subtle", +] + +[[package]] +name = "dirs-next" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" +dependencies = [ + "cfg-if 1.0.0", + "dirs-sys-next", +] + +[[package]] +name = "dirs-sys-next" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", "redox_users", @@ -481,9 +606,9 @@ checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" [[package]] name = "either" -version = "1.6.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" +checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" [[package]] name = "encode_unicode" @@ -548,23 +673,23 @@ dependencies = [ [[package]] name = "fastrand" -version = "1.7.0" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3fcf0cee53519c866c09b5de1f6c56ff9d647101f81c1964fa632e148896cdf" +checksum = "a7a407cfaa3385c4ae6b23e84623d48c2798d06e3e6a1878f7f59f17b3f86499" dependencies = [ "instant", ] [[package]] name = "filetime" -version = "0.2.16" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0408e2626025178a6a7f7ffc05a25bc47103229f19c113755de7bf63816290c" +checksum = "4b9663d381d07ae25dc88dbdf27df458faa83a9b25336bcac83d5e452b5fc9d3" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.13", - "winapi 0.3.9", + "redox_syscall 0.2.16", + "windows-sys 0.42.0", ] [[package]] @@ -609,12 +734,21 @@ checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" [[package]] name = "form_urlencoded" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" +checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" dependencies = [ - "matches", - "percent-encoding 2.1.0", + "percent-encoding 2.2.0", +] + +[[package]] +name = "fs2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" +dependencies = [ + "libc", + "winapi 0.3.9", ] [[package]] @@ -656,32 +790,31 @@ dependencies = [ ] [[package]] -name = "getrandom" -version = "0.1.16" +name = "generic-array" +version = "0.14.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" +checksum = "bff49e947297f3312447abdca79f45f4738097cc82b06e72054d2223f601f1b9" dependencies = [ - "cfg-if 1.0.0", - "libc", - "wasi 0.9.0+wasi-snapshot-preview1", + "typenum", + "version_check", ] [[package]] name = "getrandom" -version = "0.2.6" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9be70c98951c83b8d2f8f60d7065fa6d5146873094452a1008da8c2f1e4205ad" +checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ "cfg-if 1.0.0", "libc", - "wasi 0.10.2+wasi-snapshot-preview1", + "wasi 0.11.0+wasi-snapshot-preview1", ] [[package]] name = "gimli" -version = "0.26.1" +version = "0.26.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78cc372d058dcf6d5ecd98510e7fbc9e5aec4d21de70f65fea8fecebcd881bd4" +checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" [[package]] name = "glob" @@ -709,9 +842,9 @@ dependencies = [ [[package]] name = "hashbrown" -version = "0.11.2" +version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab5ef0d4909ef3724cc8cce6ccc8572c5c817592e9285f5464f8e86f8bd3726e" +checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" [[package]] name = "heck" @@ -733,9 +866,18 @@ dependencies = [ [[package]] name = "hex" -version = "0.3.2" +version = "0.4.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" + +[[package]] +name = "hmac" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "805026a5d0141ffc30abb3be3173848ad46a1b1664fe632428479619a3644d77" +checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" +dependencies = [ + "digest", +] [[package]] name = "http" @@ -762,9 +904,9 @@ dependencies = [ [[package]] name = "httparse" -version = "1.7.1" +version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "496ce29bb5a52785b44e0f7ca2847ae0bb839c9bd28f69acac9b99d461c0c04c" +checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" [[package]] name = "human-panic" @@ -808,7 +950,7 @@ dependencies = [ "log", "net2", "rustc_version", - "time", + "time 0.1.44", "tokio", "tokio-buf", "tokio-executor", @@ -833,6 +975,30 @@ dependencies = [ "tokio-io", ] +[[package]] +name = "iana-time-zone" +version = "0.1.53" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "64c122667b287044802d6ce17ee2ddf13207ed924c712de9a66a5814d5b64765" +dependencies = [ + "android_system_properties", + "core-foundation-sys", + "iana-time-zone-haiku", + "js-sys", + "wasm-bindgen", + "winapi 0.3.9", +] + +[[package]] +name = "iana-time-zone-haiku" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0703ae284fc167426161c2e3f1da3ea71d94b21bedbcc9494e92b28e334e3dca" +dependencies = [ + "cxx", + "cxx-build", +] + [[package]] name = "idna" version = "0.1.5" @@ -855,11 +1021,21 @@ dependencies = [ "unicode-normalization", ] +[[package]] +name = "idna" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e14ddfc70884202db2244c223200c204c2bda1bc6e0998d11b5e024d657209e6" +dependencies = [ + "unicode-bidi", + "unicode-normalization", +] + [[package]] name = "indexmap" -version = "1.8.2" +version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6012d540c5baa3589337a98ce73408de9b5a25ec9fc2c6fd6be8f0d39e0ca5a" +checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ "autocfg 1.1.0", "hashbrown", @@ -900,9 +1076,27 @@ checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" [[package]] name = "itoa" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "112c678d4050afce233f4f2852bb2eb519230b3cf12f33585275537d7e41578d" +checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" + +[[package]] +name = "jobserver" +version = "0.1.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "068b1ee6743e4d11fb9c6a1e6064b3693a1b600e7f5f5988047d98b3dc9fb90b" +dependencies = [ + "libc", +] + +[[package]] +name = "js-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "49409df3e3bf0856b916e2ceaca09ee28e6871cf7d9ce97a692cacfdb2a25a47" +dependencies = [ + "wasm-bindgen", +] [[package]] name = "kernel32-sys" @@ -928,9 +1122,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.126" +version = "0.2.137" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" +checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" [[package]] name = "libz-sys" @@ -944,6 +1138,15 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "link-cplusplus" +version = "1.0.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" +dependencies = [ + "cc", +] + [[package]] name = "lock_api" version = "0.1.5" @@ -965,9 +1168,9 @@ dependencies = [ [[package]] name = "lock_api" -version = "0.4.7" +version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "327fa5b6a6940e4699ec49a9beae1ea4845c6bab9314e4f84ac68742139d8c53" +checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" dependencies = [ "autocfg 1.1.0", "scopeguard 1.1.0", @@ -1027,9 +1230,9 @@ dependencies = [ [[package]] name = "miniz_oxide" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f5c75688da582b8ffc1f1799e9db273f32133c49e048f614d22ec3256773ccc" +checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" dependencies = [ "adler", ] @@ -1085,9 +1288,9 @@ dependencies = [ [[package]] name = "net2" -version = "0.2.37" +version = "0.2.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "391630d12b68002ae1e25e8f974306474966550ad82dac6886fb8910c19568ae" +checksum = "74d0df99cfcd2530b2e694f6e17e7f37b8e26bb23983ac530c0c97408837c631" dependencies = [ "cfg-if 0.1.10", "libc", @@ -1129,26 +1332,41 @@ dependencies = [ "libc", ] +[[package]] +name = "num_threads" +version = "0.1.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +dependencies = [ + "libc", +] + [[package]] name = "object" -version = "0.28.4" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e42c982f2d955fac81dd7e1d0e1426a7d702acd9c98d19ab01083a6a0328c424" +checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.12.0" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7709cef83f0c1f58f666e746a08b21e0085f7440fa6a29cc194d68aac97a4225" +checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" + +[[package]] +name = "opaque-debug" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.40" +version = "0.10.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb81a6430ac911acb25fe5ac8f1d2af1b4ea8a4fdfda0f1ee4292af2e2d8eb0e" +checksum = "12fc0523e3bd51a692c8850d075d74dc062ccf251c0110668cbd921917118a13" dependencies = [ "bitflags", "cfg-if 1.0.0", @@ -1178,18 +1396,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "111.20.0+1.1.1o" +version = "111.22.0+1.1.1q" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92892c4f87d56e376e469ace79f1128fdaded07646ddf73aa0be4706ff712dec" +checksum = "8f31f0d509d1c1ae9cada2f9539ff8f37933831fd5098879e482aa687d659853" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.74" +version = "0.9.77" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "835363342df5fba8354c5b453325b110ffd54044e588c539cf2f20a8014e4cb1" +checksum = "b03b84c3b2d099b81f0953422b4d4ad58761589d0229b5506356afca05a3670a" dependencies = [ "autocfg 1.1.0", "cc", @@ -1201,9 +1419,9 @@ dependencies = [ [[package]] name = "os_type" -version = "2.4.0" +version = "2.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3df761f6470298359f84fcfb60d86db02acc22c251c37265c07a3d1057d2389" +checksum = "e24d44c0eea30167516ed8f6daca4b5e3eebcde1bde1e4e6e08b809fb02c7ba5" dependencies = [ "regex", ] @@ -1244,8 +1462,8 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "lock_api 0.4.7", - "parking_lot_core 0.9.3", + "lock_api 0.4.9", + "parking_lot_core 0.9.4", ] [[package]] @@ -1278,15 +1496,38 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.3" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a279cbf25cb0757810394fbc1e359949b59e348145c643a939a525692e6929" +checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0" dependencies = [ "cfg-if 1.0.0", "libc", - "redox_syscall 0.2.13", - "smallvec 1.8.0", - "windows-sys", + "redox_syscall 0.2.16", + "smallvec 1.10.0", + "windows-sys 0.42.0", +] + +[[package]] +name = "password-hash" +version = "0.4.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" +dependencies = [ + "base64ct", + "rand_core 0.6.4", + "subtle", +] + +[[package]] +name = "pbkdf2" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" +dependencies = [ + "digest", + "hmac", + "password-hash", + "sha2", ] [[package]] @@ -1297,15 +1538,15 @@ checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" [[package]] name = "percent-encoding" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] name = "pkg-config" -version = "0.3.25" +version = "0.3.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae" +checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] name = "predicates" @@ -1362,9 +1603,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.39" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c54b25569025b7fc9651de43004ae593a75ad88543b17178aa5e1b9c4f15f56f" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ "unicode-ident", ] @@ -1376,7 +1617,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "95b4ce31ff0a27d93c8de1849cf58162283752f065a90d508f1105fa6c9a213f" dependencies = [ "idna 0.2.3", - "url 2.2.2", + "url 2.3.1", ] [[package]] @@ -1387,9 +1628,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.18" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1feb54ed693b93a84e14094943b84b7c4eae204c512b7ccb95ab0c66d278ad1" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ "proc-macro2", ] @@ -1474,6 +1715,12 @@ version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" + [[package]] name = "rand_hc" version = "0.1.0" @@ -1553,29 +1800,29 @@ checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" [[package]] name = "redox_syscall" -version = "0.2.13" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62f25bc4c7e55e0b0b7a1d43fb893f4fa1361d0abe38b9ce4f323c2adfe6ef42" +checksum = "fb5a58c1855b4b6819d59012155603f0b22ad30cad752600aadfcb695265519a" dependencies = [ "bitflags", ] [[package]] name = "redox_users" -version = "0.3.5" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de0737333e7a9502c789a36d7c7fa6092a49895d4faa31ca5df163857ded2e9d" +checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ - "getrandom 0.1.16", - "redox_syscall 0.1.57", - "rust-argon2", + "getrandom", + "redox_syscall 0.2.16", + "thiserror", ] [[package]] name = "regex" -version = "1.5.6" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d83f127d94bdbcda4c8cc2e50f6f84f4b611f69c902699ca385a39c3a75f9ff1" +checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" dependencies = [ "aho-corasick", "memchr", @@ -1584,9 +1831,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.6.26" +version = "0.6.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b3de9ec5dc0a3417da371aab17d729997c15010e7fd24ff707773a33bddb64" +checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" [[package]] name = "remove_dir_all" @@ -1603,7 +1850,7 @@ version = "0.9.24" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f88643aea3c1343c804950d7bf983bd2067f5ab59db6d613a08e05572f2714ab" dependencies = [ - "base64 0.10.1", + "base64", "bytes", "cookie", "cookie_store", @@ -1620,7 +1867,7 @@ dependencies = [ "serde", "serde_json", "serde_urlencoded", - "time", + "time 0.1.44", "tokio", "tokio-executor", "tokio-io", @@ -1631,18 +1878,6 @@ dependencies = [ "winreg", ] -[[package]] -name = "rust-argon2" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b18820d944b33caa75a71378964ac46f58517c92b6ae5f762636247c09e78fb" -dependencies = [ - "base64 0.13.0", - "blake2b_simd", - "constant_time_eq", - "crossbeam-utils 0.8.8", -] - [[package]] name = "rustc-demangle" version = "0.1.21" @@ -1660,9 +1895,9 @@ dependencies = [ [[package]] name = "ryu" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3f6f92acf49d1b98f7a81226834412ada05458b7364277387724a237f062695" +checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" [[package]] name = "same-file" @@ -1680,7 +1915,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" dependencies = [ "lazy_static 1.4.0", - "windows-sys", + "windows-sys 0.36.1", ] [[package]] @@ -1695,11 +1930,17 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" +[[package]] +name = "scratch" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" + [[package]] name = "security-framework" -version = "2.6.1" +version = "2.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dc14f172faf8a0194a3aded622712b0de276821addc574fa54fc0a1167e10dc" +checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" dependencies = [ "bitflags", "core-foundation", @@ -1736,18 +1977,18 @@ checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" [[package]] name = "serde" -version = "1.0.137" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61ea8d54c77f8315140a05f4c7237403bf38b72704d031543aa1d16abbf517d1" +checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.137" +version = "1.0.147" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f26faba0c3959972377d3b2d306ee9f71faee9714294e41bb777f83f88578be" +checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" dependencies = [ "proc-macro2", "quote", @@ -1765,11 +2006,11 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.81" +version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b7ce2b32a1aed03c558dc61a5cd328f15aff2dbc17daad8fb8af04d2100e15c" +checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" dependencies = [ - "itoa 1.0.2", + "itoa 1.0.4", "ryu", "serde", ] @@ -1808,17 +2049,48 @@ dependencies = [ "syn", ] +[[package]] +name = "sha1" +version = "0.10.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest", +] + +[[package]] +name = "sha2" +version = "0.10.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" +dependencies = [ + "cfg-if 1.0.0", + "cpufeatures", + "digest", +] + [[package]] name = "siphasher" version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" +[[package]] +name = "siphasher" +version = "0.3.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7bd3e3206899af3f8b12af284fafc038cc1dc2b41d1b89dd17297221c5d225de" + [[package]] name = "slab" -version = "0.4.6" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb703cfe953bccee95685111adeedb76fabe4e97549a58d16f03ea7b9367bb32" +checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" +dependencies = [ + "autocfg 1.1.0", +] [[package]] name = "smallvec" @@ -1831,15 +2103,15 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.8.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2dd574626839106c320a323308629dcb1acfc96e32a8cba364ddc61ac23ee83" +checksum = "a507befe795404456341dfab10cef66ead4c041f62b8b11bbb92bffe5d0953e0" [[package]] name = "socket2" -version = "0.4.4" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66d72b759436ae32898a2af0a14218dbf55efde3feeb170eb623637db85ee1e0" +checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" dependencies = [ "libc", "winapi 0.3.9", @@ -1890,11 +2162,17 @@ dependencies = [ "syn", ] +[[package]] +name = "subtle" +version = "2.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" + [[package]] name = "syn" -version = "1.0.96" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0748dd251e24453cb8717f0354206b91557e4ec8703673a4b30208f2abaf1ebf" +checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" dependencies = [ "proc-macro2", "quote", @@ -1946,7 +2224,7 @@ dependencies = [ "cfg-if 1.0.0", "fastrand", "libc", - "redox_syscall 0.2.13", + "redox_syscall 0.2.16", "remove_dir_all", "winapi 0.3.9", ] @@ -1996,18 +2274,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.31" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd829fe32373d27f76265620b5309d0340cb8550f523c1dda251d6298069069a" +checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.31" +version = "1.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0396bc89e626244658bef819e22d0cc459e795a5ebe878e6ec336d1674a8d79a" +checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" dependencies = [ "proc-macro2", "quote", @@ -2016,14 +2294,44 @@ dependencies = [ [[package]] name = "time" -version = "0.1.43" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" +checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" dependencies = [ "libc", + "wasi 0.10.0+wasi-snapshot-preview1", "winapi 0.3.9", ] +[[package]] +name = "time" +version = "0.3.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0fab5c8b9980850e06d92ddbe3ab839c062c801f3927c0fb8abd6fc8e918fbca" +dependencies = [ + "itoa 1.0.4", + "libc", + "num_threads", + "serde", + "time-core", + "time-macros", +] + +[[package]] +name = "time-core" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" + +[[package]] +name = "time-macros" +version = "0.2.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "65bb801831d812c562ae7d2bfb531f26e66e4e1f6b17307ba4149c5064710e5b" +dependencies = [ + "time-core", +] + [[package]] name = "tinyvec" version = "1.6.0" @@ -2205,6 +2513,12 @@ dependencies = [ "cfg-if 0.1.10", ] +[[package]] +name = "typenum" +version = "1.15.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" + [[package]] name = "unicase" version = "2.6.0" @@ -2222,36 +2536,36 @@ checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" [[package]] name = "unicode-ident" -version = "1.0.0" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d22af068fba1eb5edcb4aea19d382b2a3deb4c8f9d475c589b6ada9e0fd493ee" +checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" [[package]] name = "unicode-normalization" -version = "0.1.19" +version = "0.1.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d54590932941a9e9266f0832deed84ebe1bf2e4c9e4a3554d393d18f5e854bf9" +checksum = "5c5713f0fc4b5db668a2ac63cdb7bb4469d8c9fed047b1d0292cc7b0ce2ba921" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8820f5d777f6224dc4be3632222971ac30164d4a258d595640799554ebfd99" +checksum = "0fdbf052a0783de01e944a6ce7a8cb939e295b1e7be835a1112c3b9a7f047a5a" [[package]] name = "unicode-width" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed742d4ea2bd1176e236172c8429aaf54486e7ac098db29ffe6529e0ce50973" +checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" [[package]] name = "unicode-xid" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "957e51f3646910546462e67d5f7599b9e4fb8acdd304b087a6494730f9eebf04" +checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" [[package]] name = "url" @@ -2266,14 +2580,13 @@ dependencies = [ [[package]] name = "url" -version = "2.2.2" +version = "2.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a507c383b2d33b5fc35d1861e77e6b383d158b2da5e14fe51b83dfedf6fd578c" +checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" dependencies = [ "form_urlencoded", - "idna 0.2.3", - "matches", - "percent-encoding 2.1.0", + "idna 0.3.0", + "percent-encoding 2.2.0", ] [[package]] @@ -2291,7 +2604,7 @@ version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "getrandom 0.2.6", + "getrandom", ] [[package]] @@ -2336,20 +2649,75 @@ dependencies = [ [[package]] name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +version = "0.10.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" [[package]] name = "wasi" -version = "0.10.2+wasi-snapshot-preview1" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" + +[[package]] +name = "wasm-bindgen" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" +dependencies = [ + "cfg-if 1.0.0", + "wasm-bindgen-macro", +] + +[[package]] +name = "wasm-bindgen-backend" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4c8ffb332579b0557b52d268b91feab8df3615f265d5270fec2a8c95b17c1142" +dependencies = [ + "bumpalo", + "log", + "once_cell", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-macro" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "052be0f94026e6cbc75cdefc9bae13fd6052cdcaf532fa6c45e7ae33a1e6c810" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] + +[[package]] +name = "wasm-bindgen-macro-support" +version = "0.2.83" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "07bc0c051dc5f23e307b13285f9d75df86bfdf816c5721e573dec1f9b8aa193c" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" +checksum = "1c38c045535d93ec4f0b4defec448e4291638ee608530863b1e2ba115d4fff7f" [[package]] name = "wasm-pack" version = "0.10.3" dependencies = [ + "anyhow", "assert_cmd", "atty", "binary-install", @@ -2359,7 +2727,6 @@ dependencies = [ "curl", "dialoguer", "env_logger", - "failure", "glob", "human-panic", "lazy_static 1.4.0", @@ -2374,7 +2741,7 @@ dependencies = [ "serde_ignored", "serde_json", "serial_test", - "siphasher", + "siphasher 0.2.3", "strsim", "structopt", "tempfile 3.3.0", @@ -2385,12 +2752,13 @@ dependencies = [ [[package]] name = "which" -version = "2.0.1" +version = "4.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b57acb10231b9493c8472b20cb57317d0679a49e0bdbee44b3b803a6473af164" +checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" dependencies = [ - "failure", + "either", "libc", + "once_cell", ] [[package]] @@ -2442,43 +2810,100 @@ version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" dependencies = [ - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_msvc", + "windows_aarch64_msvc 0.36.1", + "windows_i686_gnu 0.36.1", + "windows_i686_msvc 0.36.1", + "windows_x86_64_gnu 0.36.1", + "windows_x86_64_msvc 0.36.1", ] +[[package]] +name = "windows-sys" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" +dependencies = [ + "windows_aarch64_gnullvm", + "windows_aarch64_msvc 0.42.0", + "windows_i686_gnu 0.42.0", + "windows_i686_msvc 0.42.0", + "windows_x86_64_gnu 0.42.0", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc 0.42.0", +] + +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" + [[package]] name = "windows_aarch64_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" +[[package]] +name = "windows_aarch64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" + [[package]] name = "windows_i686_gnu" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" +[[package]] +name = "windows_i686_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" + [[package]] name = "windows_i686_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +[[package]] +name = "windows_i686_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" + [[package]] name = "windows_x86_64_gnu" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" +[[package]] +name = "windows_x86_64_gnu" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" + +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" + [[package]] name = "windows_x86_64_msvc" version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" +[[package]] +name = "windows_x86_64_msvc" +version = "0.42.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" + [[package]] name = "winreg" version = "0.6.2" @@ -2509,14 +2934,49 @@ dependencies = [ [[package]] name = "zip" -version = "0.5.13" +version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93ab48844d61251bb3835145c521d88aa4031d7139e8485990f60ca911fa0815" +checksum = "537ce7411d25e54e8ae21a7ce0b15840e7bfcff15b51d697ec3266cc76bdf080" dependencies = [ + "aes", "byteorder", "bzip2", + "constant_time_eq", "crc32fast", + "crossbeam-utils 0.8.12", "flate2", - "thiserror", - "time", + "hmac", + "pbkdf2", + "sha1", + "time 0.3.16", + "zstd", +] + +[[package]] +name = "zstd" +version = "0.11.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" +dependencies = [ + "zstd-safe", +] + +[[package]] +name = "zstd-safe" +version = "5.0.2+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" +dependencies = [ + "libc", + "zstd-sys", +] + +[[package]] +name = "zstd-sys" +version = "2.0.1+zstd.1.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b" +dependencies = [ + "cc", + "libc", ] diff --git a/Cargo.toml b/Cargo.toml index 6fd73cf..cc63749 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,13 +10,13 @@ categories = ["wasm"] documentation = "https://rustwasm.github.io/wasm-pack/" [dependencies] +anyhow = "1.0.66" atty = "0.2.11" cargo_metadata = "0.8.0" console = "0.6.1" dialoguer = "0.3.0" curl = "0.4.13" env_logger = { version = "0.5.13", default-features = false } -failure = "0.1.2" human-panic = "1.0.1" glob = "0.2" log = "0.4.6" @@ -32,8 +32,8 @@ strsim = "0.8.0" siphasher = "0.2.3" structopt = "0.3" toml = "0.4" -which = "2.0.0" -binary-install = "0.0.2" +which = "4.3.0" +binary-install = { git = "https://github.com/rustwasm/binary-install", rev = "6d60f6731c8294000ea8f3a0260659b025cf7f94" } walkdir = "2" chrono = "0.4.6" diff --git a/src/bindgen.rs b/src/bindgen.rs index e9d872c..df97053 100644 --- a/src/bindgen.rs +++ b/src/bindgen.rs @@ -1,8 +1,8 @@ //! Functionality related to running `wasm-bindgen`. +use anyhow::{bail, Context, Result}; use child; use command::build::{BuildProfile, Target}; -use failure::{self, ResultExt}; use install::{self, Tool}; use manifest::CrateData; use semver; @@ -19,7 +19,7 @@ pub fn wasm_bindgen_build( disable_dts: bool, target: Target, profile: BuildProfile, -) -> Result<(), failure::Error> { +) -> Result<()> { let release_or_debug = match profile { BuildProfile::Release | BuildProfile::Profiling => "release", BuildProfile::Dev => "debug", @@ -75,7 +75,7 @@ pub fn wasm_bindgen_build( } /// Check if the `wasm-bindgen` dependency is locally satisfied for the web target -fn supports_web_target(cli_path: &Path) -> Result { +fn supports_web_target(cli_path: &Path) -> Result { let cli_version = semver::Version::parse(&install::get_cli_version( &install::Tool::WasmBindgen, cli_path, @@ -85,7 +85,7 @@ fn supports_web_target(cli_path: &Path) -> Result { } /// Check if the `wasm-bindgen` dependency is locally satisfied for the --target flag -fn supports_dash_dash_target(cli_path: &Path) -> Result { +fn supports_dash_dash_target(cli_path: &Path) -> Result { let cli_version = semver::Version::parse(&install::get_cli_version( &install::Tool::WasmBindgen, cli_path, @@ -94,7 +94,7 @@ fn supports_dash_dash_target(cli_path: &Path) -> Result { Ok(cli_version >= expected_version) } -fn build_target_arg(target: Target, cli_path: &Path) -> Result { +fn build_target_arg(target: Target, cli_path: &Path) -> Result { if !supports_dash_dash_target(cli_path)? { Ok(build_target_arg_legacy(target, cli_path)?) } else { @@ -102,7 +102,7 @@ fn build_target_arg(target: Target, cli_path: &Path) -> Result Result { +fn build_target_arg_legacy(target: Target, cli_path: &Path) -> Result { log::info!("Your version of wasm-bindgen is out of date. You should consider updating your Cargo.toml to a version >= 0.2.40."); let target_arg = match target { Target::Nodejs => "--nodejs", diff --git a/src/build/mod.rs b/src/build/mod.rs index c19d12a..a49432e 100644 --- a/src/build/mod.rs +++ b/src/build/mod.rs @@ -1,9 +1,9 @@ //! Building a Rust crate into a `.wasm` binary. +use anyhow::{bail, Context, Result}; use child; use command::build::BuildProfile; use emoji; -use failure::{Error, ResultExt}; use manifest::Crate; use std::path::Path; use std::process::Command; @@ -23,7 +23,7 @@ pub struct WasmPackVersion { } /// Ensure that `rustc` is present and that it is >= 1.30.0 -pub fn check_rustc_version() -> Result { +pub fn check_rustc_version() -> Result { let local_minor_version = rustc_minor_version(); match local_minor_version { Some(mv) => { @@ -60,7 +60,7 @@ fn rustc_minor_version() -> Option { } /// Checks and returns local and latest versions of wasm-pack -pub fn check_wasm_pack_versions() -> Result { +pub fn check_wasm_pack_versions() -> Result { match wasm_pack_local_version() { Some(local) => Ok(WasmPackVersion {local, latest: Crate::return_wasm_pack_latest_version()?.unwrap_or_else(|| "".to_string())}), None => bail!("We can't figure out what your wasm-pack version is, make sure the installation path is correct.") @@ -77,7 +77,7 @@ pub fn cargo_build_wasm( path: &Path, profile: BuildProfile, extra_options: &[String], -) -> Result<(), Error> { +) -> Result<()> { let msg = format!("{}Compiling to Wasm...", emoji::CYCLONE); PBAR.info(&msg); @@ -125,11 +125,7 @@ pub fn cargo_build_wasm( /// * `path`: Path to the crate directory to build tests. /// * `debug`: Whether to build tests in `debug` mode. /// * `extra_options`: Additional parameters to pass to `cargo` when building tests. -pub fn cargo_build_wasm_tests( - path: &Path, - debug: bool, - extra_options: &[String], -) -> Result<(), Error> { +pub fn cargo_build_wasm_tests(path: &Path, debug: bool, extra_options: &[String]) -> Result<()> { let mut cmd = Command::new("cargo"); cmd.current_dir(path).arg("build").arg("--tests"); diff --git a/src/build/wasm_target.rs b/src/build/wasm_target.rs index f3cdf11..6105470 100644 --- a/src/build/wasm_target.rs +++ b/src/build/wasm_target.rs @@ -1,8 +1,8 @@ //! Checking for the wasm32 target +use anyhow::{anyhow, bail, Context, Result}; use child; use emoji; -use failure::{Error, ResultExt}; use log::info; use std::fmt; use std::path::{Path, PathBuf}; @@ -52,7 +52,7 @@ impl fmt::Display for Wasm32Check { /// Ensure that `rustup` has the `wasm32-unknown-unknown` target installed for /// current toolchain -pub fn check_for_wasm32_target() -> Result<(), Error> { +pub fn check_for_wasm32_target() -> Result<()> { let msg = format!("{}Checking for the Wasm target...", emoji::TARGET); PBAR.info(&msg); @@ -65,7 +65,7 @@ pub fn check_for_wasm32_target() -> Result<(), Error> { } /// Get rustc's sysroot as a PathBuf -fn get_rustc_sysroot() -> Result { +fn get_rustc_sysroot() -> Result { let command = Command::new("rustc") .args(&["--print", "sysroot"]) .output()?; @@ -73,7 +73,7 @@ fn get_rustc_sysroot() -> Result { if command.status.success() { Ok(String::from_utf8(command.stdout)?.trim().into()) } else { - Err(format_err!( + Err(anyhow!( "Getting rustc's sysroot wasn't successful. Got {}", command.status )) @@ -97,7 +97,7 @@ fn is_wasm32_target_in_sysroot(sysroot: &Path) -> bool { } } -fn check_wasm32_target() -> Result { +fn check_wasm32_target() -> Result { let sysroot = get_rustc_sysroot()?; let rustc_path = which::which("rustc")?; @@ -132,7 +132,7 @@ fn check_wasm32_target() -> Result { } /// Add wasm32-unknown-unknown using `rustup`. -fn rustup_add_wasm_target() -> Result<(), Error> { +fn rustup_add_wasm_target() -> Result<()> { let mut cmd = Command::new("rustup"); cmd.arg("target").arg("add").arg("wasm32-unknown-unknown"); child::run(cmd, "rustup").context("Adding the wasm32-unknown-unknown target with rustup")?; diff --git a/src/cache.rs b/src/cache.rs index 4e3c2d0..cbb07b7 100644 --- a/src/cache.rs +++ b/src/cache.rs @@ -1,11 +1,12 @@ //! Getting and configuring wasm-pack's binary cache. +use anyhow::Result; use binary_install::Cache; use std::env; use std::path::Path; /// Get wasm-pack's binary cache. -pub fn get_wasm_pack_cache() -> Result { +pub fn get_wasm_pack_cache() -> Result { if let Ok(path) = env::var("WASM_PACK_CACHE") { Ok(Cache::at(Path::new(&path))) } else { diff --git a/src/child.rs b/src/child.rs index 9fedc3e..742a186 100644 --- a/src/child.rs +++ b/src/child.rs @@ -3,7 +3,7 @@ //! This module helps us ensure that all child processes that we spawn get //! properly logged and their output is logged as well. -use failure::Error; +use anyhow::{bail, Result}; use install::Tool; use log::info; use std::process::{Command, Stdio}; @@ -25,7 +25,7 @@ pub fn new_command(program: &str) -> Command { } /// Run the given command and return on success. -pub fn run(mut command: Command, command_name: &str) -> Result<(), Error> { +pub fn run(mut command: Command, command_name: &str) -> Result<()> { info!("Running {:?}", command); let status = command.status()?; @@ -43,7 +43,7 @@ pub fn run(mut command: Command, command_name: &str) -> Result<(), Error> { } /// Run the given command and return its stdout. -pub fn run_capture_stdout(mut command: Command, command_name: &Tool) -> Result { +pub fn run_capture_stdout(mut command: Command, command_name: &Tool) -> Result { info!("Running {:?}", command); let output = command diff --git a/src/command/build.rs b/src/command/build.rs index 1f94471..b14b99f 100644 --- a/src/command/build.rs +++ b/src/command/build.rs @@ -1,13 +1,13 @@ //! Implementation of the `wasm-pack build` command. use crate::wasm_opt; +use anyhow::{anyhow, bail, Error, Result}; use binary_install::Cache; use bindgen; use build; use cache; use command::utils::{create_pkg_dir, get_crate_path}; use emoji; -use failure::Error; use install::{self, InstallMode, Tool}; use license; use lockfile::Lockfile; @@ -81,7 +81,7 @@ impl fmt::Display for Target { impl FromStr for Target { type Err = Error; - fn from_str(s: &str) -> Result { + fn from_str(s: &str) -> Result { match s { "bundler" | "browser" => Ok(Target::Bundler), "web" => Ok(Target::Web), @@ -185,11 +185,11 @@ impl Default for BuildOptions { } } -type BuildStep = fn(&mut Build) -> Result<(), Error>; +type BuildStep = fn(&mut Build) -> Result<()>; impl Build { /// Construct a build command from the given options. - pub fn try_from_opts(mut build_opts: BuildOptions) -> Result { + pub fn try_from_opts(mut build_opts: BuildOptions) -> Result { if let Some(path) = &build_opts.path { if path.to_string_lossy().starts_with("--") { let path = build_opts.path.take().unwrap(); @@ -234,7 +234,7 @@ impl Build { } /// Execute this `Build` command. - pub fn run(&mut self) -> Result<(), Error> { + pub fn run(&mut self) -> Result<()> { let process_steps = Build::get_process_steps(self.mode); let started = Instant::now(); @@ -295,7 +295,7 @@ impl Build { steps } - fn step_check_rustc_version(&mut self) -> Result<(), Error> { + fn step_check_rustc_version(&mut self) -> Result<()> { info!("Checking rustc version..."); let version = build::check_rustc_version()?; let msg = format!("rustc version is {}.", version); @@ -303,21 +303,21 @@ impl Build { Ok(()) } - fn step_check_crate_config(&mut self) -> Result<(), Error> { + fn step_check_crate_config(&mut self) -> Result<()> { info!("Checking crate configuration..."); self.crate_data.check_crate_config()?; info!("Crate is correctly configured."); Ok(()) } - fn step_check_for_wasm_target(&mut self) -> Result<(), Error> { + fn step_check_for_wasm_target(&mut self) -> Result<()> { info!("Checking for wasm-target..."); build::wasm_target::check_for_wasm32_target()?; info!("Checking for wasm-target was successful."); Ok(()) } - fn step_build_wasm(&mut self) -> Result<(), Error> { + fn step_build_wasm(&mut self) -> Result<()> { info!("Building wasm..."); build::cargo_build_wasm(&self.crate_path, self.profile, &self.extra_options)?; @@ -332,14 +332,14 @@ impl Build { Ok(()) } - fn step_create_dir(&mut self) -> Result<(), Error> { + fn step_create_dir(&mut self) -> Result<()> { info!("Creating a pkg directory..."); create_pkg_dir(&self.out_dir)?; info!("Created a pkg directory at {:#?}.", &self.crate_path); Ok(()) } - fn step_create_json(&mut self) -> Result<(), Error> { + fn step_create_json(&mut self) -> Result<()> { self.crate_data.write_package_json( &self.out_dir, &self.scope, @@ -353,21 +353,21 @@ impl Build { Ok(()) } - fn step_copy_readme(&mut self) -> Result<(), Error> { + fn step_copy_readme(&mut self) -> Result<()> { info!("Copying readme from crate..."); readme::copy_from_crate(&self.crate_path, &self.out_dir)?; info!("Copied readme from crate to {:#?}.", &self.out_dir); Ok(()) } - fn step_copy_license(&mut self) -> Result<(), failure::Error> { + fn step_copy_license(&mut self) -> Result<()> { info!("Copying license from crate..."); license::copy_from_crate(&self.crate_data, &self.crate_path, &self.out_dir)?; info!("Copied license from crate to {:#?}.", &self.out_dir); Ok(()) } - fn step_install_wasm_bindgen(&mut self) -> Result<(), failure::Error> { + fn step_install_wasm_bindgen(&mut self) -> Result<()> { info!("Identifying wasm-bindgen dependency..."); let lockfile = Lockfile::new(&self.crate_data)?; let bindgen_version = lockfile.require_wasm_bindgen()?; @@ -383,7 +383,7 @@ impl Build { Ok(()) } - fn step_run_wasm_bindgen(&mut self) -> Result<(), Error> { + fn step_run_wasm_bindgen(&mut self) -> Result<()> { info!("Building the wasm bindings..."); bindgen::wasm_bindgen_build( &self.crate_data, @@ -398,7 +398,7 @@ impl Build { Ok(()) } - fn step_run_wasm_opt(&mut self) -> Result<(), Error> { + fn step_run_wasm_opt(&mut self) -> Result<()> { let args = match self .crate_data .configured_profile(self.profile) @@ -414,7 +414,7 @@ impl Build { &args, self.mode.install_permitted(), ).map_err(|e| { - format_err!( + anyhow!( "{}\nTo disable `wasm-opt`, add `wasm-opt = false` to your package metadata in your `Cargo.toml`.", e ) }) diff --git a/src/command/generate.rs b/src/command/generate.rs index 8c793b8..2f72186 100644 --- a/src/command/generate.rs +++ b/src/command/generate.rs @@ -1,18 +1,13 @@ +use anyhow::Result; use cache; -use failure::Error; use generate; use install::{self, Tool}; use log::info; -use std::result; use PBAR; /// Executes the 'cargo-generate' command in the current directory /// which generates a new rustwasm project from a template. -pub fn generate( - template: String, - name: String, - install_permitted: bool, -) -> result::Result<(), Error> { +pub fn generate(template: String, name: String, install_permitted: bool) -> Result<()> { info!("Generating a new rustwasm project..."); let download = install::download_prebuilt_or_cargo_install( Tool::CargoGenerate, diff --git a/src/command/login.rs b/src/command/login.rs index 6df51f5..f24156d 100644 --- a/src/command/login.rs +++ b/src/command/login.rs @@ -1,6 +1,6 @@ +use anyhow::Result; use log::info; use npm; -use std::result; use PBAR; pub fn login( @@ -8,7 +8,7 @@ pub fn login( scope: &Option, always_auth: bool, auth_type: &Option, -) -> result::Result<(), failure::Error> { +) -> Result<()> { let registry = registry.unwrap_or_else(|| npm::DEFAULT_NPM_REGISTRY.to_string()); info!("Logging in to npm..."); diff --git a/src/command/mod.rs b/src/command/mod.rs index 6e1bfa7..86eaf3f 100644 --- a/src/command/mod.rs +++ b/src/command/mod.rs @@ -17,10 +17,9 @@ use self::pack::pack; use self::publish::{access::Access, publish}; use self::test::{Test, TestOptions}; use crate::install::InstallMode; -use failure::Error; +use anyhow::Result; use log::info; use std::path::PathBuf; -use std::result; /// The various kinds of commands that `wasm-pack` can execute. #[derive(Debug, StructOpt)] @@ -113,7 +112,7 @@ pub enum Command { } /// Run a command with the given logger! -pub fn run_wasm_pack(command: Command) -> result::Result<(), Error> { +pub fn run_wasm_pack(command: Command) -> Result<()> { // Run the correct command based off input and store the result of it so that we can clear // the progress bar then return it match command { diff --git a/src/command/pack.rs b/src/command/pack.rs index 18a0315..6b3da04 100644 --- a/src/command/pack.rs +++ b/src/command/pack.rs @@ -1,19 +1,18 @@ +use anyhow::{anyhow, Result}; use command::utils::{find_pkg_directory, get_crate_path}; -use failure::Error; use log::info; use npm; use std::path::PathBuf; -use std::result; use PBAR; /// Executes the 'npm pack' command on the 'pkg' directory /// which creates a tarball that can be published to the NPM registry -pub fn pack(path: Option) -> result::Result<(), Error> { +pub fn pack(path: Option) -> Result<()> { let crate_path = get_crate_path(path)?; info!("Packing up the npm package..."); let pkg_directory = find_pkg_directory(&crate_path).ok_or_else(|| { - format_err!( + anyhow!( "Unable to find the pkg directory at path {:#?}, or in a child directory of {:#?}", &crate_path, &crate_path diff --git a/src/command/publish/access.rs b/src/command/publish/access.rs index 6562e96..6b374b4 100644 --- a/src/command/publish/access.rs +++ b/src/command/publish/access.rs @@ -1,4 +1,4 @@ -use failure::Error; +use anyhow::{bail, Error, Result}; use std::fmt; use std::str::FromStr; @@ -14,7 +14,7 @@ pub enum Access { impl FromStr for Access { type Err = Error; - fn from_str(s: &str) -> Result { + fn from_str(s: &str) -> Result { match s { "public" => Ok(Access::Public), "restricted" => Ok(Access::Restricted), diff --git a/src/command/publish/mod.rs b/src/command/publish/mod.rs index 64c14c8..7ac495b 100644 --- a/src/command/publish/mod.rs +++ b/src/command/publish/mod.rs @@ -2,14 +2,13 @@ pub mod access; use self::access::Access; +use anyhow::{anyhow, bail, Result}; use command::build::{Build, BuildOptions, Target}; use command::utils::{find_pkg_directory, get_crate_path}; use dialoguer::{Confirmation, Input, Select}; -use failure::Error; use log::info; use npm; use std::path::PathBuf; -use std::result; use std::str::FromStr; use PBAR; @@ -20,7 +19,7 @@ pub fn publish( path: Option, access: Option, tag: Option, -) -> result::Result<(), Error> { +) -> Result<()> { let crate_path = get_crate_path(path)?; info!("Publishing the npm package..."); @@ -58,7 +57,7 @@ pub fn publish( .and_then(|mut build| build.run()) .map(|()| crate_path.join(out_dir)) .map_err(|_| { - format_err!( + anyhow!( "Unable to find the pkg directory at path '{:#?}',\ or in a child directory of '{:#?}'", &crate_path, diff --git a/src/command/test.rs b/src/command/test.rs index 9c5ab9b..8fc0a85 100644 --- a/src/command/test.rs +++ b/src/command/test.rs @@ -1,11 +1,11 @@ //! Implementation of the `wasm-pack test` command. +use anyhow::{bail, Result}; use binary_install::Cache; use build; use cache; use command::utils::get_crate_path; use console::style; -use failure::Error; use install::{self, InstallMode, Tool}; use lockfile::Lockfile; use log::info; @@ -108,11 +108,11 @@ pub struct Test { extra_options: Vec, } -type TestStep = fn(&mut Test) -> Result<(), Error>; +type TestStep = fn(&mut Test) -> Result<()>; impl Test { /// Construct a test command from the given options. - pub fn try_from_opts(test_opts: TestOptions) -> Result { + pub fn try_from_opts(test_opts: TestOptions) -> Result { let TestOptions { node, mode, @@ -181,7 +181,7 @@ impl Test { } /// Execute this test command. - pub fn run(mut self) -> Result<(), Error> { + pub fn run(mut self) -> Result<()> { let process_steps = self.get_process_steps(); let started = Instant::now(); @@ -249,21 +249,21 @@ impl Test { } } - fn step_check_rustc_version(&mut self) -> Result<(), Error> { + fn step_check_rustc_version(&mut self) -> Result<()> { info!("Checking rustc version..."); let _ = build::check_rustc_version()?; info!("Rustc version is correct."); Ok(()) } - fn step_check_for_wasm_target(&mut self) -> Result<(), Error> { + fn step_check_for_wasm_target(&mut self) -> Result<()> { info!("Adding wasm-target..."); build::wasm_target::check_for_wasm32_target()?; info!("Adding wasm-target was successful."); Ok(()) } - fn step_build_tests(&mut self) -> Result<(), Error> { + fn step_build_tests(&mut self) -> Result<()> { info!("Compiling tests to wasm..."); // If the user has run `wasm-pack test -- --features "f1" -- test_name`, then we want to only pass through @@ -280,7 +280,7 @@ impl Test { Ok(()) } - fn step_install_wasm_bindgen(&mut self) -> Result<(), Error> { + fn step_install_wasm_bindgen(&mut self) -> Result<()> { info!("Identifying wasm-bindgen dependency..."); let lockfile = Lockfile::new(&self.crate_data)?; let bindgen_version = lockfile.require_wasm_bindgen()?; @@ -315,7 +315,7 @@ impl Test { Ok(()) } - fn step_test_node(&mut self) -> Result<(), Error> { + fn step_test_node(&mut self) -> Result<()> { assert!(self.node); info!("Running tests in node..."); test::cargo_test_wasm( @@ -334,7 +334,7 @@ impl Test { Ok(()) } - fn step_get_chromedriver(&mut self) -> Result<(), Error> { + fn step_get_chromedriver(&mut self) -> Result<()> { assert!(self.chrome && self.chromedriver.is_none()); self.chromedriver = Some(webdriver::get_or_install_chromedriver( @@ -344,7 +344,7 @@ impl Test { Ok(()) } - fn step_test_chrome(&mut self) -> Result<(), Error> { + fn step_test_chrome(&mut self) -> Result<()> { let chromedriver = self.chromedriver.as_ref().unwrap().display().to_string(); let chromedriver = chromedriver.as_str(); info!( @@ -359,7 +359,7 @@ impl Test { Ok(()) } - fn step_get_geckodriver(&mut self) -> Result<(), Error> { + fn step_get_geckodriver(&mut self) -> Result<()> { assert!(self.firefox && self.geckodriver.is_none()); self.geckodriver = Some(webdriver::get_or_install_geckodriver( @@ -369,7 +369,7 @@ impl Test { Ok(()) } - fn step_test_firefox(&mut self) -> Result<(), Error> { + fn step_test_firefox(&mut self) -> Result<()> { let geckodriver = self.geckodriver.as_ref().unwrap().display().to_string(); let geckodriver = geckodriver.as_str(); info!( @@ -384,14 +384,14 @@ impl Test { Ok(()) } - fn step_get_safaridriver(&mut self) -> Result<(), Error> { + fn step_get_safaridriver(&mut self) -> Result<()> { assert!(self.safari && self.safaridriver.is_none()); self.safaridriver = Some(webdriver::get_safaridriver()?); Ok(()) } - fn step_test_safari(&mut self) -> Result<(), Error> { + fn step_test_safari(&mut self) -> Result<()> { let safaridriver = self.safaridriver.as_ref().unwrap().display().to_string(); let safaridriver = safaridriver.as_str(); info!( diff --git a/src/command/utils.rs b/src/command/utils.rs index 0158abf..152dd99 100644 --- a/src/command/utils.rs +++ b/src/command/utils.rs @@ -1,7 +1,7 @@ //! Utility functions for commands. #![allow(clippy::redundant_closure)] -use failure; +use anyhow::Result; use std::fs; use std::path::{Path, PathBuf}; use std::time::Duration; @@ -9,7 +9,7 @@ use walkdir::WalkDir; /// If an explicit path is given, then use it, otherwise assume the current /// directory is the crate path. -pub fn get_crate_path(path: Option) -> Result { +pub fn get_crate_path(path: Option) -> Result { match path { Some(p) => Ok(p), None => find_manifest_from_cwd(), @@ -19,7 +19,7 @@ pub fn get_crate_path(path: Option) -> Result /// Search up the path for the manifest file from the current working directory /// If we don't find the manifest file then return back the current working directory /// to provide the appropriate error -fn find_manifest_from_cwd() -> Result { +fn find_manifest_from_cwd() -> Result { let mut parent_path = std::env::current_dir()?; let mut manifest_path = parent_path.join("Cargo.toml"); loop { @@ -36,7 +36,7 @@ fn find_manifest_from_cwd() -> Result { } /// Construct our `pkg` directory in the crate. -pub fn create_pkg_dir(out_dir: &Path) -> Result<(), failure::Error> { +pub fn create_pkg_dir(out_dir: &Path) -> Result<()> { let _ = fs::remove_file(out_dir.join("package.json")); // Clean up package.json from previous runs fs::create_dir_all(&out_dir)?; fs::write(out_dir.join(".gitignore"), "*")?; diff --git a/src/generate.rs b/src/generate.rs index 5a385f2..552618f 100644 --- a/src/generate.rs +++ b/src/generate.rs @@ -1,18 +1,14 @@ //! Functionality related to running `cargo-generate`. +use anyhow::{Context, Result}; use child; use emoji; -use failure::{self, ResultExt}; use install::{self, Tool}; use std::process::Command; /// Run `cargo generate` in the current directory to create a new /// project from a template -pub fn generate( - template: &str, - name: &str, - install_status: &install::Status, -) -> Result<(), failure::Error> { +pub fn generate(template: &str, name: &str, install_status: &install::Status) -> Result<()> { let bin_path = install::get_tool_path(install_status, Tool::CargoGenerate)? .binary(&Tool::CargoGenerate.to_string())?; let mut cmd = Command::new(&bin_path); diff --git a/src/install/arch.rs b/src/install/arch.rs index 63516fa..b8c1f68 100644 --- a/src/install/arch.rs +++ b/src/install/arch.rs @@ -1,3 +1,4 @@ +use anyhow::{bail, Result}; use std::fmt; use crate::target; @@ -15,7 +16,7 @@ pub enum Arch { impl Arch { /// Gets the current architecture - pub fn get() -> Result { + pub fn get() -> Result { if target::x86_64 { Ok(Arch::X86_64) } else if target::x86 { diff --git a/src/install/krate.rs b/src/install/krate.rs index 4a76530..6f9c62f 100644 --- a/src/install/krate.rs +++ b/src/install/krate.rs @@ -1,3 +1,4 @@ +use anyhow::Result; use install::Tool; use serde::Deserialize; @@ -13,7 +14,7 @@ pub struct KrateResponse { } impl Krate { - pub fn new(name: &Tool) -> Result { + pub fn new(name: &Tool) -> Result { let krate_address = format!("https://crates.io/api/v1/crates/{}", name); let client = reqwest::Client::new(); let mut res = client.get(&krate_address).send()?; diff --git a/src/install/mod.rs b/src/install/mod.rs index 612c6da..8215b37 100644 --- a/src/install/mod.rs +++ b/src/install/mod.rs @@ -1,10 +1,10 @@ //! Functionality related to installing prebuilt binaries and/or running cargo install. use self::krate::Krate; +use anyhow::{anyhow, bail, Context, Result}; use binary_install::{Cache, Download}; use child; use emoji; -use failure::{self, ResultExt}; use install; use log::debug; use log::{info, warn}; @@ -36,7 +36,7 @@ pub enum Status { } /// Handles possible installs status and returns the download or a error message -pub fn get_tool_path(status: &Status, tool: Tool) -> Result<&Download, failure::Error> { +pub fn get_tool_path(status: &Status, tool: Tool) -> Result<&Download> { match status { Status::Found(download) => Ok(download), Status::CannotInstall => bail!("Not able to find or install a local {}.", tool), @@ -57,7 +57,7 @@ pub fn download_prebuilt_or_cargo_install( cache: &Cache, version: &str, install_permitted: bool, -) -> Result { +) -> Result { // If the tool is installed globally and it has the right version, use // that. Assume that other tools are installed next to it. // @@ -89,11 +89,7 @@ pub fn download_prebuilt_or_cargo_install( } /// Check if the tool dependency is locally satisfied. -pub fn check_version( - tool: &Tool, - path: &Path, - expected_version: &str, -) -> Result { +pub fn check_version(tool: &Tool, path: &Path, expected_version: &str) -> Result { let expected_version = if expected_version == "latest" { let krate = Krate::new(tool)?; krate.max_version @@ -110,7 +106,7 @@ pub fn check_version( } /// Fetches the version of a CLI tool -pub fn get_cli_version(tool: &Tool, path: &Path) -> Result { +pub fn get_cli_version(tool: &Tool, path: &Path) -> Result { let mut cmd = Command::new(path); cmd.arg("--version"); let stdout = child::run_capture_stdout(cmd, tool)?; @@ -127,7 +123,7 @@ pub fn download_prebuilt( cache: &Cache, version: &str, install_permitted: bool, -) -> Result { +) -> Result { let url = match prebuilt_url(tool, version) { Ok(url) => url, Err(e) => bail!( @@ -164,19 +160,14 @@ pub fn download_prebuilt( /// Returns the URL of a precompiled version of wasm-bindgen, if we have one /// available for our host platform. -fn prebuilt_url(tool: &Tool, version: &str) -> Result { +fn prebuilt_url(tool: &Tool, version: &str) -> Result { let os = Os::get()?; let arch = Arch::get()?; prebuilt_url_for(tool, version, &arch, &os) } /// Get the download URL for some tool at some version, architecture and operating system -pub fn prebuilt_url_for( - tool: &Tool, - version: &str, - arch: &Arch, - os: &Os, -) -> Result { +pub fn prebuilt_url_for(tool: &Tool, version: &str, arch: &Arch, os: &Os) -> Result { let target = match (os, arch, tool) { (Os::Linux, Arch::X86_64, Tool::WasmOpt) => "x86_64-linux", (Os::Linux, Arch::X86_64, _) => "x86_64-unknown-linux-musl", @@ -220,7 +211,7 @@ pub fn cargo_install( cache: &Cache, version: &str, install_permitted: bool, -) -> Result { +) -> Result { debug!( "Attempting to use a `cargo install`ed version of `{}={}`", tool, version, @@ -275,7 +266,7 @@ pub fn cargo_install( // just want them in `$root/*` directly (which matches how the tarballs are // laid out, and where the rest of our code expects them to be). So we do a // little renaming here. - let binaries: Result, failure::Error> = match tool { + let binaries: Result> = match tool { Tool::WasmBindgen => Ok(vec!["wasm-bindgen", "wasm-bindgen-test-runner"]), Tool::CargoGenerate => Ok(vec!["cargo-generate"]), Tool::WasmOpt => bail!("Cannot install wasm-opt with cargo."), @@ -287,8 +278,8 @@ pub fn cargo_install( .join(b) .with_extension(env::consts::EXE_EXTENSION); let to = tmp.join(from.file_name().unwrap()); - fs::rename(&from, &to).with_context(|_| { - format!( + fs::rename(&from, &to).with_context(|| { + anyhow!( "failed to move {} to {} for `cargo install`ed `{}`", from.display(), to.display(), diff --git a/src/install/mode.rs b/src/install/mode.rs index ae548e2..a55153d 100644 --- a/src/install/mode.rs +++ b/src/install/mode.rs @@ -1,3 +1,4 @@ +use anyhow::{bail, Error, Result}; use std::str::FromStr; /// The `InstallMode` determines which mode of initialization we are running, and @@ -20,8 +21,8 @@ impl Default for InstallMode { } impl FromStr for InstallMode { - type Err = failure::Error; - fn from_str(s: &str) -> Result { + type Err = Error; + fn from_str(s: &str) -> Result { match s { "no-install" => Ok(InstallMode::Noinstall), "normal" => Ok(InstallMode::Normal), diff --git a/src/install/os.rs b/src/install/os.rs index 7d31b35..b5ef640 100644 --- a/src/install/os.rs +++ b/src/install/os.rs @@ -1,3 +1,4 @@ +use anyhow::{bail, Result}; use std::fmt; use crate::target; @@ -15,7 +16,7 @@ pub enum Os { impl Os { /// Get the current operating system - pub fn get() -> Result { + pub fn get() -> Result { if target::LINUX { Ok(Os::Linux) } else if target::MACOS { diff --git a/src/installer.rs b/src/installer.rs index 47e64ec..67f2b6b 100644 --- a/src/installer.rs +++ b/src/installer.rs @@ -22,14 +22,14 @@ use std::io; use std::path::Path; use std::process; +use anyhow::{anyhow, bail, Context, Result}; use atty; -use failure::{self, ResultExt}; use which; pub fn install() -> ! { if let Err(e) = do_install() { eprintln!("{}", e); - for cause in e.iter_causes() { + for cause in e.chain() { eprintln!("Caused by: {}", cause); } } @@ -47,7 +47,7 @@ pub fn install() -> ! { process::exit(0); } -fn do_install() -> Result<(), failure::Error> { +fn do_install() -> Result<()> { // Find `rustup.exe` in PATH, we'll be using its installation directory as // our installation directory. let rustup = match which::which("rustup") { @@ -74,7 +74,7 @@ fn do_install() -> Result<(), failure::Error> { // Our relatively simple install step! let me = env::current_exe()?; fs::copy(&me, &destination) - .with_context(|_| format!("failed to copy executable to `{}`", destination.display()))?; + .with_context(|| anyhow!("failed to copy executable to `{}`", destination.display()))?; println!( "info: successfully installed wasm-pack to `{}`", destination.display() @@ -85,7 +85,7 @@ fn do_install() -> Result<(), failure::Error> { Ok(()) } -fn confirm_can_overwrite(dst: &Path) -> Result<(), failure::Error> { +fn confirm_can_overwrite(dst: &Path) -> Result<()> { // If the `-f` argument was passed, we can always overwrite everything. if env::args().any(|arg| arg == "-f") { return Ok(()); @@ -112,7 +112,7 @@ fn confirm_can_overwrite(dst: &Path) -> Result<(), failure::Error> { let mut line = String::new(); io::stdin() .read_line(&mut line) - .with_context(|_| "failed to read stdin")?; + .context("failed to read stdin")?; if line.starts_with('y') || line.starts_with('Y') { return Ok(()); diff --git a/src/lib.rs b/src/lib.rs index 3efc15f..db0ecf8 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,15 +2,14 @@ #![deny(missing_docs)] +extern crate anyhow; extern crate cargo_metadata; extern crate console; -extern crate strsim; -#[macro_use] -extern crate failure; extern crate glob; extern crate parking_lot; extern crate semver; extern crate serde; +extern crate strsim; extern crate which; #[macro_use] extern crate serde_derive; diff --git a/src/license.rs b/src/license.rs index 4297344..c804853 100644 --- a/src/license.rs +++ b/src/license.rs @@ -1,6 +1,6 @@ //! Copy `LICENSE` file(s) for the packaged wasm. -use failure; +use anyhow::{anyhow, Result}; use std::fs; use std::path::Path; @@ -8,14 +8,12 @@ use glob::glob; use manifest::CrateData; use PBAR; -fn glob_license_files(path: &Path) -> Result, failure::Error> { +fn glob_license_files(path: &Path) -> Result> { let mut license_files: Vec = Vec::new(); let path_string = match path.join("LICENSE*").to_str() { Some(path_string) => path_string.to_owned(), None => { - return Err(format_err!( - "Could not convert joined license path to String" - )); + return Err(anyhow!("Could not convert joined license path to String")); } }; @@ -24,11 +22,11 @@ fn glob_license_files(path: &Path) -> Result, failure::Error> { Ok(globed_path) => { let file_name = match globed_path.file_name() { Some(file_name) => file_name, - None => return Err(format_err!("Could not get file name from path")), + None => return Err(anyhow!("Could not get file name from path")), }; let file_name_string = match file_name.to_str() { Some(file_name_string) => file_name_string.to_owned(), - None => return Err(format_err!("Could not convert filename to String")), + None => return Err(anyhow!("Could not convert filename to String")), }; license_files.push(file_name_string); } @@ -39,11 +37,7 @@ fn glob_license_files(path: &Path) -> Result, failure::Error> { } /// Copy the crate's license into the `pkg` directory. -pub fn copy_from_crate( - crate_data: &CrateData, - path: &Path, - out_dir: &Path, -) -> Result<(), failure::Error> { +pub fn copy_from_crate(crate_data: &CrateData, path: &Path, out_dir: &Path) -> Result<()> { assert!( fs::metadata(path).ok().map_or(false, |m| m.is_dir()), "crate directory should exist" diff --git a/src/lockfile.rs b/src/lockfile.rs index 3edd6cf..18ab37e 100644 --- a/src/lockfile.rs +++ b/src/lockfile.rs @@ -5,8 +5,8 @@ use std::fs; use std::path::PathBuf; +use anyhow::{anyhow, bail, Context, Result}; use console::style; -use failure::{Error, ResultExt}; use manifest::CrateData; use toml; @@ -25,12 +25,12 @@ struct Package { impl Lockfile { /// Read the `Cargo.lock` file for the crate at the given path. - pub fn new(crate_data: &CrateData) -> Result { + pub fn new(crate_data: &CrateData) -> Result { let lock_path = get_lockfile_path(crate_data)?; let lockfile = fs::read_to_string(&lock_path) - .with_context(|_| format!("failed to read: {}", lock_path.display()))?; + .with_context(|| anyhow!("failed to read: {}", lock_path.display()))?; let lockfile = toml::from_str(&lockfile) - .with_context(|_| format!("failed to parse: {}", lock_path.display()))?; + .with_context(|| anyhow!("failed to parse: {}", lock_path.display()))?; Ok(lockfile) } @@ -41,9 +41,9 @@ impl Lockfile { /// Like `wasm_bindgen_version`, except it returns an error instead of /// `None`. - pub fn require_wasm_bindgen(&self) -> Result<&str, Error> { + pub fn require_wasm_bindgen(&self) -> Result<&str> { self.wasm_bindgen_version().ok_or_else(|| { - format_err!( + anyhow!( "Ensure that you have \"{}\" as a dependency in your Cargo.toml file:\n\ [dependencies]\n\ wasm-bindgen = \"0.2\"", @@ -67,7 +67,7 @@ impl Lockfile { /// Given the path to the crate that we are buliding, return a `PathBuf` /// containing the location of the lock file, by finding the workspace root. -fn get_lockfile_path(crate_data: &CrateData) -> Result { +fn get_lockfile_path(crate_data: &CrateData) -> Result { // Check that a lock file can be found in the directory. Return an error // if it cannot, otherwise return the path buffer. let lockfile_path = crate_data.workspace_root().join("Cargo.lock"); diff --git a/src/main.rs b/src/main.rs index 8f313d8..c77f845 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,15 +1,15 @@ #![allow(clippy::redundant_closure, clippy::redundant_pattern_matching)] +extern crate anyhow; extern crate atty; extern crate env_logger; -#[macro_use] -extern crate failure; extern crate human_panic; extern crate log; extern crate structopt; extern crate wasm_pack; extern crate which; +use anyhow::Result; use std::env; use std::panic; use std::sync::mpsc; @@ -23,7 +23,7 @@ use wasm_pack::{ mod installer; -fn background_check_for_updates() -> mpsc::Receiver> { +fn background_check_for_updates() -> mpsc::Receiver> { let (sender, receiver) = mpsc::channel(); let _detached_thread = thread::spawn(move || { @@ -51,14 +51,14 @@ fn main() { if let Err(e) = run() { eprintln!("Error: {}", e); - for cause in e.iter_causes() { + for cause in e.chain() { eprintln!("Caused by: {}", cause); } ::std::process::exit(1); } } -fn run() -> Result<(), failure::Error> { +fn run() -> Result<()> { let wasm_pack_version = background_check_for_updates(); // Deprecate `init` diff --git a/src/manifest/mod.rs b/src/manifest/mod.rs index 6a48352..4da1f31 100644 --- a/src/manifest/mod.rs +++ b/src/manifest/mod.rs @@ -6,6 +6,7 @@ clippy::redundant_closure )] +use anyhow::{anyhow, bail, Context, Result}; mod npm; use std::path::Path; @@ -19,7 +20,6 @@ use chrono::offset; use chrono::DateTime; use command::build::{BuildProfile, Target}; use curl::easy; -use failure::{Error, ResultExt}; use serde::{self, Deserialize}; use serde_json; use std::collections::BTreeSet; @@ -149,7 +149,7 @@ struct CrateInformation { impl Crate { /// Returns latest wasm-pack version - pub fn return_wasm_pack_latest_version() -> Result, failure::Error> { + pub fn return_wasm_pack_latest_version() -> Result> { let current_time = chrono::offset::Local::now(); let old_metadata_file = Self::return_wasm_pack_file(); @@ -172,9 +172,7 @@ impl Crate { } } - fn return_api_call_result( - current_time: DateTime, - ) -> Result { + fn return_api_call_result(current_time: DateTime) -> Result { let version = Self::return_latest_wasm_pack_version(); // We always override the stamp file with the current time because we don't @@ -192,7 +190,7 @@ impl Crate { fn override_stamp_file( current_time: DateTime, version: Option<&str>, - ) -> Result<(), failure::Error> { + ) -> Result<()> { let path = env::current_exe()?; let mut file = fs::OpenOptions::new() @@ -224,7 +222,7 @@ impl Crate { } /// Returns wasm-pack latest version (if it's received) by executing check_wasm_pack_latest_version function. - fn return_latest_wasm_pack_version() -> Result { + fn return_latest_wasm_pack_version() -> Result { Self::check_wasm_pack_latest_version().map(|crt| crt.crt.max_version) } @@ -239,7 +237,7 @@ impl Crate { } /// Call to the crates.io api and return the latest version of `wasm-pack` - fn check_wasm_pack_latest_version() -> Result { + fn check_wasm_pack_latest_version() -> Result { let url = "https://crates.io/api/v1/crates/wasm-pack"; let mut easy = easy::Easy2::new(Collector(Vec::new())); @@ -403,7 +401,7 @@ pub struct ManifestAndUnsedKeys { impl CrateData { /// Reads all metadata for the crate whose manifest is inside the directory /// specified by `path`. - pub fn new(crate_path: &Path, out_name: Option) -> Result { + pub fn new(crate_path: &Path, out_name: Option) -> Result { let manifest_path = crate_path.join("Cargo.toml"); if !manifest_path.is_file() { bail!( @@ -428,7 +426,7 @@ impl CrateData { pkg.name == manifest.package.name && CrateData::is_same_path(&pkg.manifest_path, &manifest_path) }) - .ok_or_else(|| format_err!("failed to find package in metadata"))?; + .ok_or_else(|| anyhow!("failed to find package in metadata"))?; Ok(CrateData { data, @@ -454,9 +452,9 @@ impl CrateData { /// # Errors /// Will return Err if the file (manifest_path) couldn't be read or /// if deserialize to `CargoManifest` fails. - pub fn parse_crate_data(manifest_path: &Path) -> Result { + pub fn parse_crate_data(manifest_path: &Path) -> Result { let manifest = fs::read_to_string(&manifest_path) - .with_context(|_| format!("failed to read: {}", manifest_path.display()))?; + .with_context(|| anyhow!("failed to read: {}", manifest_path.display()))?; let manifest = &mut toml::Deserializer::new(&manifest); let mut unused_keys = BTreeSet::new(); @@ -472,7 +470,7 @@ impl CrateData { unused_keys.insert(path_string); } }) - .with_context(|_| format!("failed to parse manifest: {}", manifest_path.display()))?; + .with_context(|| anyhow!("failed to parse manifest: {}", manifest_path.display()))?; Ok(ManifestAndUnsedKeys { manifest, @@ -501,12 +499,12 @@ impl CrateData { } /// Check that the crate the given path is properly configured. - pub fn check_crate_config(&self) -> Result<(), Error> { + pub fn check_crate_config(&self) -> Result<()> { self.check_crate_type()?; Ok(()) } - fn check_crate_type(&self) -> Result<(), Error> { + fn check_crate_type(&self) -> Result<()> { let pkg = &self.data.packages[self.current_idx]; let any_cdylib = pkg .targets @@ -573,7 +571,7 @@ impl CrateData { scope: &Option, disable_dts: bool, target: Target, - ) -> Result<(), Error> { + ) -> Result<()> { let pkg_file_path = out_dir.join("package.json"); // Check if a `package.json` was already generated by wasm-bindgen, if so // we merge the NPM dependencies already specified in it. @@ -597,7 +595,7 @@ impl CrateData { let npm_json = serde_json::to_string_pretty(&npm_data)?; fs::write(&pkg_file_path, npm_json) - .with_context(|_| format!("failed to write: {}", pkg_file_path.display()))?; + .with_context(|| anyhow!("failed to write: {}", pkg_file_path.display()))?; Ok(()) } diff --git a/src/npm.rs b/src/npm.rs index 015b416..48a768f 100644 --- a/src/npm.rs +++ b/src/npm.rs @@ -1,15 +1,15 @@ //! Functionality related to publishing to npm. +use anyhow::{bail, Context, Result}; use child; use command::publish::access::Access; -use failure::{self, ResultExt}; use log::info; /// The default npm registry used when we aren't working with a custom registry. pub const DEFAULT_NPM_REGISTRY: &str = "https://registry.npmjs.org/"; /// Run the `npm pack` command. -pub fn npm_pack(path: &str) -> Result<(), failure::Error> { +pub fn npm_pack(path: &str) -> Result<()> { let mut cmd = child::new_command("npm"); cmd.current_dir(path).arg("pack"); child::run(cmd, "npm pack").context("Packaging up your code failed")?; @@ -17,11 +17,7 @@ pub fn npm_pack(path: &str) -> Result<(), failure::Error> { } /// Run the `npm publish` command. -pub fn npm_publish( - path: &str, - access: Option, - tag: Option, -) -> Result<(), failure::Error> { +pub fn npm_publish(path: &str, access: Option, tag: Option) -> Result<()> { let mut cmd = child::new_command("npm"); match access { Some(a) => cmd.current_dir(path).arg("publish").arg(&a.to_string()), @@ -41,7 +37,7 @@ pub fn npm_login( scope: &Option, always_auth: bool, auth_type: &Option, -) -> Result<(), failure::Error> { +) -> Result<()> { let mut args = vec!["login".to_string(), format!("--registry={}", registry)]; if let Some(scope) = scope { diff --git a/src/progressbar.rs b/src/progressbar.rs index 1fa2590..c4a96e4 100644 --- a/src/progressbar.rs +++ b/src/progressbar.rs @@ -1,5 +1,6 @@ //! Fancy progress bar functionality. +use anyhow::{bail, Error, Result}; use console::style; use emoji; use std::sync::atomic::{AtomicBool, AtomicU8, Ordering}; @@ -19,8 +20,8 @@ pub enum LogLevel { } impl std::str::FromStr for LogLevel { - type Err = failure::Error; - fn from_str(s: &str) -> Result { + type Err = Error; + fn from_str(s: &str) -> Result { match s { "error" => Ok(LogLevel::Error), "warn" => Ok(LogLevel::Warn), diff --git a/src/readme.rs b/src/readme.rs index 6e1c57f..b8d5e8e 100644 --- a/src/readme.rs +++ b/src/readme.rs @@ -1,13 +1,13 @@ //! Generating `README` files for the packaged wasm. -use failure::{self, ResultExt}; +use anyhow::{Context, Result}; use std::fs; use std::path::Path; use PBAR; /// Copy the crate's README into the `pkg` directory. -pub fn copy_from_crate(path: &Path, out_dir: &Path) -> Result<(), failure::Error> { +pub fn copy_from_crate(path: &Path, out_dir: &Path) -> Result<()> { assert!( fs::metadata(path).ok().map_or(false, |m| m.is_dir()), "crate directory should exist" diff --git a/src/stamps.rs b/src/stamps.rs index 62cd2e1..694b086 100644 --- a/src/stamps.rs +++ b/src/stamps.rs @@ -1,33 +1,25 @@ //! Key-value store in `*.stamps` file. -use failure::{self, ResultExt}; +use anyhow::{anyhow, Context, Result}; use std::{env, fs, path::PathBuf}; /// Get a value corresponding to the key from the JSON value. /// /// You should use return value of function `read_stamps_file_to_json()` as `json` argument. -pub fn get_stamp_value( - key: impl AsRef, - json: &serde_json::Value, -) -> Result { +pub fn get_stamp_value(key: impl AsRef, json: &serde_json::Value) -> Result { json.get(key.as_ref()) .and_then(|value| value.as_str().map(ToOwned::to_owned)) - .ok_or_else(|| { - failure::err_msg(format!("cannot get stamp value for key '{}'", key.as_ref())) - }) + .ok_or_else(|| anyhow!("cannot get stamp value for key '{}'", key.as_ref())) } /// Save the key-value pair to the store. -pub fn save_stamp_value( - key: impl Into, - value: impl AsRef, -) -> Result<(), failure::Error> { +pub fn save_stamp_value(key: impl Into, value: impl AsRef) -> Result<()> { let mut json = read_stamps_file_to_json().unwrap_or_else(|_| serde_json::Map::new().into()); { let stamps = json .as_object_mut() - .ok_or_else(|| failure::err_msg("stamps file doesn't contain JSON object"))?; + .ok_or_else(|| anyhow!("stamps file doesn't contain JSON object"))?; stamps.insert(key.into(), value.as_ref().into()); } @@ -35,7 +27,7 @@ pub fn save_stamp_value( } /// Get the path of the `*.stamps` file that is used as the store. -pub fn get_stamps_file_path() -> Result { +pub fn get_stamps_file_path() -> Result { let path = env::current_exe() .map(|path| path.with_extension("stamps")) .context("cannot get stamps file path")?; @@ -43,7 +35,7 @@ pub fn get_stamps_file_path() -> Result { } /// Read `*.stamps` file and convert its content to the JSON value. -pub fn read_stamps_file_to_json() -> Result { +pub fn read_stamps_file_to_json() -> Result { let stamps_file_path = get_stamps_file_path()?; let stamps_file_content = fs::read_to_string(stamps_file_path).context("cannot find or read stamps file")?; @@ -52,7 +44,7 @@ pub fn read_stamps_file_to_json() -> Result { Ok(json) } -fn write_to_stamps_file(json: serde_json::Value) -> Result<(), failure::Error> { +fn write_to_stamps_file(json: serde_json::Value) -> Result<()> { let stamps_file_path = get_stamps_file_path()?; let pretty_json = serde_json::to_string_pretty(&json).context("JSON serialization failed")?; fs::write(stamps_file_path, pretty_json).context("cannot write to stamps file")?; diff --git a/src/test/mod.rs b/src/test/mod.rs index 513e8fa..05ba4fc 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -3,8 +3,8 @@ pub mod webdriver; use crate::PBAR; +use anyhow::{Context, Result}; use child; -use failure::{self, ResultExt}; use std::ffi::OsStr; use std::path::Path; use std::process::Command; @@ -16,7 +16,7 @@ pub fn cargo_test_wasm( release: bool, envs: I, extra_options: &[String], -) -> Result<(), failure::Error> +) -> Result<()> where I: IntoIterator, K: AsRef, diff --git a/src/test/webdriver.rs b/src/test/webdriver.rs index 93de546..3b9ece9 100644 --- a/src/test/webdriver.rs +++ b/src/test/webdriver.rs @@ -4,8 +4,8 @@ mod chromedriver; mod geckodriver; mod safaridriver; +use anyhow::Result; use binary_install::Cache; -use failure; use std::path::PathBuf; use PBAR; @@ -22,7 +22,7 @@ fn get_and_notify( installation_allowed: bool, name: &str, url: &str, -) -> Result, failure::Error> { +) -> Result> { if let Some(dl) = cache.download(false, name, &[name], url)? { return Ok(Some(dl.binary(name)?)); } diff --git a/src/test/webdriver/chromedriver.rs b/src/test/webdriver/chromedriver.rs index 6fb9301..67e1928 100644 --- a/src/test/webdriver/chromedriver.rs +++ b/src/test/webdriver/chromedriver.rs @@ -1,7 +1,7 @@ use super::{get_and_notify, Collector}; +use anyhow::{bail, Context, Result}; use binary_install::Cache; use chrono::DateTime; -use failure::{self, ResultExt}; use install::InstallMode; use stamps; use std::path::PathBuf; @@ -16,10 +16,7 @@ const CHROMEDRIVER_VERSION_STAMP: &str = "chromedriver_version"; /// Get the path to an existing `chromedriver`, or install it if no existing /// binary is found or if there is a new binary version. -pub fn get_or_install_chromedriver( - cache: &Cache, - mode: InstallMode, -) -> Result { +pub fn get_or_install_chromedriver(cache: &Cache, mode: InstallMode) -> Result { if let Ok(path) = which::which("chromedriver") { return Ok(path); } @@ -27,10 +24,7 @@ pub fn get_or_install_chromedriver( } /// Download and install a pre-built `chromedriver` binary. -pub fn install_chromedriver( - cache: &Cache, - installation_allowed: bool, -) -> Result { +pub fn install_chromedriver(cache: &Cache, installation_allowed: bool) -> Result { let target = if target::LINUX && target::x86_64 { "linux64" } else if target::MACOS && target::x86_64 { @@ -99,7 +93,7 @@ fn get_chromedriver_url(target: &str) -> String { // ------ `get_chromedriver_url` helpers ------ -fn save_chromedriver_version(version: String) -> Result { +fn save_chromedriver_version(version: String) -> Result { stamps::save_stamp_value(CHROMEDRIVER_VERSION_STAMP, &version)?; let current_time = chrono::offset::Local::now().to_rfc3339(); @@ -122,7 +116,7 @@ fn should_load_chromedriver_version_from_stamp(json: &serde_json::Value) -> bool } } -fn fetch_chromedriver_version() -> Result { +fn fetch_chromedriver_version() -> Result { let mut handle = curl::easy::Easy2::new(Collector(Vec::new())); handle .url("https://chromedriver.storage.googleapis.com/LATEST_RELEASE") diff --git a/src/test/webdriver/geckodriver.rs b/src/test/webdriver/geckodriver.rs index eaf25b3..1a8ee80 100644 --- a/src/test/webdriver/geckodriver.rs +++ b/src/test/webdriver/geckodriver.rs @@ -1,7 +1,7 @@ use super::{get_and_notify, Collector}; +use anyhow::{anyhow, bail, Context, Result}; use binary_install::Cache; use chrono::DateTime; -use failure::{self, ResultExt}; use install::InstallMode; use stamps; use std::path::PathBuf; @@ -17,10 +17,7 @@ const GECKODRIVER_VERSION_STAMP: &str = "geckodriver_version"; /// Get the path to an existing `geckodriver`, or install it if no existing /// binary is found or if there is a new binary version. -pub fn get_or_install_geckodriver( - cache: &Cache, - mode: InstallMode, -) -> Result { +pub fn get_or_install_geckodriver(cache: &Cache, mode: InstallMode) -> Result { // geckodriver Windows binaries >v0.24.0 have an additional // runtime dependency that we cannot be sure is present on the // user's machine @@ -38,10 +35,7 @@ pub fn get_or_install_geckodriver( } /// Download and install a pre-built `geckodriver` binary. -pub fn install_geckodriver( - cache: &Cache, - installation_allowed: bool, -) -> Result { +pub fn install_geckodriver(cache: &Cache, installation_allowed: bool) -> Result { let (target, ext) = if target::LINUX && target::x86 { ("linux32", "tar.gz") } else if target::LINUX && target::x86_64 { @@ -124,7 +118,7 @@ fn get_geckodriver_url(target: &str, ext: &str) -> String { // ------ `get_geckodriver_url` helpers ------ -fn save_geckodriver_version(version: String) -> Result { +fn save_geckodriver_version(version: String) -> Result { stamps::save_stamp_value(GECKODRIVER_VERSION_STAMP, &version)?; let current_time = chrono::offset::Local::now().to_rfc3339(); @@ -147,7 +141,7 @@ fn should_load_geckodriver_version_from_stamp(json: &serde_json::Value) -> bool } } -fn fetch_latest_geckodriver_tag_json() -> Result { +fn fetch_latest_geckodriver_tag_json() -> Result { let mut headers = curl::easy::List::new(); headers .append("Accept: application/json") @@ -176,14 +170,12 @@ fn fetch_latest_geckodriver_tag_json() -> Result { } /// JSON example: `{"id":15227534,"tag_name":"v0.24.0","update_url":"/mozzila...` -fn get_version_from_json(json: impl AsRef) -> Result { +fn get_version_from_json(json: impl AsRef) -> Result { let json: serde_json::Value = serde_json::from_str(json.as_ref()) .context("geckodriver's latest release data is not valid JSON")?; json.get("tag_name") .and_then(|tag_name| tag_name.as_str().map(ToOwned::to_owned)) - .ok_or_else(|| { - failure::err_msg("cannot get `tag_name` from geckodriver's latest release data") - }) + .ok_or_else(|| anyhow!("cannot get `tag_name` from geckodriver's latest release data")) } fn assemble_geckodriver_url(tag: &str, target: &str, ext: &str) -> String { diff --git a/src/test/webdriver/safaridriver.rs b/src/test/webdriver/safaridriver.rs index 867a14d..6869d2e 100644 --- a/src/test/webdriver/safaridriver.rs +++ b/src/test/webdriver/safaridriver.rs @@ -1,3 +1,4 @@ +use anyhow::{bail, Result}; use std::path::PathBuf; /// Get the path to an existing `safaridriver`. @@ -5,7 +6,7 @@ use std::path::PathBuf; /// We can't install `safaridriver` if an existing one is not found because /// Apple does not provide pre-built binaries. However, `safaridriver` *should* /// be present by default. -pub fn get_safaridriver() -> Result { +pub fn get_safaridriver() -> Result { match which::which("safaridriver") { Ok(p) => Ok(p), Err(_) => bail!("could not find `safaridriver` on the `$PATH`"), diff --git a/src/wasm_opt.rs b/src/wasm_opt.rs index cd8944e..7e354e3 100644 --- a/src/wasm_opt.rs +++ b/src/wasm_opt.rs @@ -3,18 +3,14 @@ use crate::child; use crate::install::{self, Tool}; use crate::PBAR; +use anyhow::Result; use binary_install::{Cache, Download}; use std::path::Path; use std::process::Command; /// Execute `wasm-opt` over wasm binaries found in `out_dir`, downloading if /// necessary into `cache`. Passes `args` to each invocation of `wasm-opt`. -pub fn run( - cache: &Cache, - out_dir: &Path, - args: &[String], - install_permitted: bool, -) -> Result<(), failure::Error> { +pub fn run(cache: &Cache, out_dir: &Path, args: &[String], install_permitted: bool) -> Result<()> { let wasm_opt = match find_wasm_opt(cache, install_permitted)? { install::Status::Found(path) => path, install::Status::CannotInstall => { @@ -55,10 +51,7 @@ pub fn run( /// Returns `None` if a binary wasn't found in `PATH` and this platform doesn't /// have precompiled binaries. Returns an error if we failed to download the /// binary. -pub fn find_wasm_opt( - cache: &Cache, - install_permitted: bool, -) -> Result { +pub fn find_wasm_opt(cache: &Cache, install_permitted: bool) -> Result { // First attempt to look up in PATH. If found assume it works. if let Ok(path) = which::which("wasm-opt") { PBAR.info(&format!("found wasm-opt at {:?}", path)); diff --git a/tests/all/download.rs b/tests/all/download.rs index f19ba1e..7d00bb8 100644 --- a/tests/all/download.rs +++ b/tests/all/download.rs @@ -35,10 +35,8 @@ fn downloading_prebuilt_wasm_bindgen_handles_http_errors() { assert!(result.is_err()); let error = result.err().unwrap(); - assert!(error.iter_chain().any(|e| e.to_string().contains("404"))); - assert!(error - .iter_chain() - .any(|e| e.to_string().contains(bad_version))); + assert!(error.chain().any(|e| e.to_string().contains("404"))); + assert!(error.chain().any(|e| e.to_string().contains(bad_version))); } #[test] diff --git a/tests/all/license.rs b/tests/all/license.rs index cffa799..8869db8 100644 --- a/tests/all/license.rs +++ b/tests/all/license.rs @@ -1,4 +1,4 @@ -extern crate failure; +extern crate anyhow; extern crate wasm_pack; use std::fs; diff --git a/tests/all/main.rs b/tests/all/main.rs index 20a25ae..c99a871 100644 --- a/tests/all/main.rs +++ b/tests/all/main.rs @@ -1,8 +1,7 @@ +extern crate anyhow; extern crate assert_cmd; -extern crate failure; -extern crate predicates; -#[macro_use] extern crate lazy_static; +extern crate predicates; #[macro_use] extern crate serde_derive; extern crate binary_install; diff --git a/tests/all/readme.rs b/tests/all/readme.rs index 8576f33..a621631 100644 --- a/tests/all/readme.rs +++ b/tests/all/readme.rs @@ -1,4 +1,4 @@ -extern crate failure; +extern crate anyhow; extern crate wasm_pack; use std::fs; diff --git a/tests/all/test.rs b/tests/all/test.rs index bc95e8d..0113f76 100644 --- a/tests/all/test.rs +++ b/tests/all/test.rs @@ -33,6 +33,7 @@ fn it_can_run_tests_with_different_wbg_test_and_wbg_versions() { #[cfg(any( all(target_os = "linux", target_arch = "x86_64"), all(target_os = "macos", target_arch = "x86_64"), + all(target_os = "macos", target_arch = "aarch64"), all(target_os = "windows", target_arch = "x86"), all(target_os = "windows", target_arch = "x86_64") ))] @@ -44,6 +45,7 @@ fn it_can_run_browser_tests() { all(target_os = "linux", target_arch = "x86"), all(target_os = "linux", target_arch = "x86_64"), all(target_os = "macos", target_arch = "x86_64"), + all(target_os = "macos", target_arch = "aarch64"), all(target_os = "windows", target_arch = "x86"), all(target_os = "windows", target_arch = "x86_64") )); @@ -104,6 +106,7 @@ fn it_can_run_failing_tests() { all(target_os = "linux", target_arch = "x86"), all(target_os = "linux", target_arch = "x86_64"), all(target_os = "macos", target_arch = "x86_64"), + all(target_os = "macos", target_arch = "aarch64"), all(target_os = "windows", target_arch = "x86"), all(target_os = "windows", target_arch = "x86_64") ))] diff --git a/tests/all/utils/file.rs b/tests/all/utils/file.rs index cf7f23f..e154808 100644 --- a/tests/all/utils/file.rs +++ b/tests/all/utils/file.rs @@ -2,9 +2,9 @@ use std::fs::File; use std::io::Read; use std::path::Path; -use failure::Error; +use anyhow::Result; -pub fn read_file(path: &Path) -> Result { +pub fn read_file(path: &Path) -> Result { let mut file = File::open(path)?; let mut contents = String::new(); file.read_to_string(&mut contents)?; diff --git a/tests/all/utils/manifest.rs b/tests/all/utils/manifest.rs index eeeb4e6..3a788de 100644 --- a/tests/all/utils/manifest.rs +++ b/tests/all/utils/manifest.rs @@ -2,7 +2,7 @@ use std::io::prelude::*; use std::path::Path; use std::{collections::HashMap, fs::File}; -use failure::Error; +use anyhow::Result; use serde_json; #[derive(Deserialize)] @@ -43,7 +43,7 @@ pub struct Repository { pub url: String, } -pub fn read_package_json(path: &Path, out_dir: &Path) -> Result { +pub fn read_package_json(path: &Path, out_dir: &Path) -> Result { let manifest_path = path.join(out_dir).join("package.json"); let mut pkg_file = File::open(manifest_path)?; let mut pkg_contents = String::new(); @@ -52,7 +52,7 @@ pub fn read_package_json(path: &Path, out_dir: &Path) -> Result Result<(), Error> { +pub fn create_wbg_package_json(out_dir: &Path, contents: &str) -> Result<()> { let manifest_path = out_dir.join("package.json"); Ok(std::fs::write(manifest_path, contents)?) } diff --git a/tests/all/webdriver.rs b/tests/all/webdriver.rs index 6223290..cf081e7 100644 --- a/tests/all/webdriver.rs +++ b/tests/all/webdriver.rs @@ -20,6 +20,7 @@ fn can_install_chromedriver() { all(target_os = "linux", target_arch = "x86"), all(target_os = "linux", target_arch = "x86_64"), all(target_os = "macos", target_arch = "x86_64"), + all(target_os = "macos", target_arch = "aarch64"), all(target_os = "windows", target_arch = "x86"), all(target_os = "windows", target_arch = "x86_64") ))] From 30f2b0a26232b54c8ab7e2e09751170f52856eab Mon Sep 17 00:00:00 2001 From: printfn Date: Thu, 27 Oct 2022 19:05:51 +1300 Subject: [PATCH 34/94] Correctly download libbinaryen.dylib on macos --- src/install/mod.rs | 6 +++++- src/wasm_opt.rs | 5 ++--- tests/all/download.rs | 27 ++++++++++++++++++++++----- 3 files changed, 29 insertions(+), 9 deletions(-) diff --git a/src/install/mod.rs b/src/install/mod.rs index 8215b37..a668217 100644 --- a/src/install/mod.rs +++ b/src/install/mod.rs @@ -148,7 +148,11 @@ pub fn download_prebuilt( } } Tool::WasmOpt => { - let binaries = &["wasm-opt", "libbinaryen"]; + let binaries: &[&str] = match Os::get()? { + Os::MacOS => &["bin/wasm-opt", "lib/libbinaryen.dylib"], + Os::Linux => &["bin/wasm-opt"], + Os::Windows => &["bin/wasm-opt.exe"], + }; match cache.download(install_permitted, "wasm-opt", binaries, &url)? { Some(download) => Ok(Status::Found(download)), // TODO(ag_dubs): why is this different? i forget... diff --git a/src/wasm_opt.rs b/src/wasm_opt.rs index 7e354e3..ca507b3 100644 --- a/src/wasm_opt.rs +++ b/src/wasm_opt.rs @@ -1,7 +1,7 @@ //! Support for downloading and executing `wasm-opt` use crate::child; -use crate::install::{self, Tool}; +use crate::install; use crate::PBAR; use anyhow::Result; use binary_install::{Cache, Download}; @@ -23,7 +23,7 @@ pub fn run(cache: &Cache, out_dir: &Path, args: &[String], install_permitted: bo } }; - let wasm_opt_path = wasm_opt.binary(&Tool::WasmOpt.to_string())?; + let wasm_opt_path = wasm_opt.binary("bin/wasm-opt")?; PBAR.info("Optimizing wasm binaries with `wasm-opt`..."); for file in out_dir.read_dir()? { @@ -36,7 +36,6 @@ pub fn run(cache: &Cache, out_dir: &Path, args: &[String], install_permitted: bo let tmp = path.with_extension("wasm-opt.wasm"); let mut cmd = Command::new(&wasm_opt_path); cmd.arg(&path).arg("-o").arg(&tmp).args(args); - cmd.env("DYLD_LIBRARY_PATH", &wasm_opt_path.parent().unwrap()); child::run(cmd, "wasm-opt")?; std::fs::rename(&tmp, &path)?; } diff --git a/tests/all/download.rs b/tests/all/download.rs index 7d00bb8..3ba579f 100644 --- a/tests/all/download.rs +++ b/tests/all/download.rs @@ -1,5 +1,3 @@ -use binary_install::Cache; -use tempfile; use wasm_pack::install::{self, Arch, Os, Tool}; #[test] @@ -10,7 +8,7 @@ use wasm_pack::install::{self, Arch, Os, Tool}; ))] fn can_download_prebuilt_wasm_bindgen() { let dir = tempfile::TempDir::new().unwrap(); - let cache = Cache::at(dir.path()); + let cache = binary_install::Cache::at(dir.path()); if let install::Status::Found(dl) = install::download_prebuilt(&Tool::WasmBindgen, &cache, "0.2.74", true).unwrap() { @@ -30,7 +28,7 @@ fn can_download_prebuilt_wasm_bindgen() { fn downloading_prebuilt_wasm_bindgen_handles_http_errors() { let dir = tempfile::TempDir::new().unwrap(); let bad_version = "0.2.74-some-trailing-version-stuff-that-does-not-exist"; - let cache = Cache::at(dir.path()); + let cache = binary_install::Cache::at(dir.path()); let result = install::download_prebuilt(&Tool::WasmBindgen, &cache, bad_version, true); assert!(result.is_err()); let error = result.err().unwrap(); @@ -47,7 +45,7 @@ fn downloading_prebuilt_wasm_bindgen_handles_http_errors() { ))] fn can_download_prebuilt_cargo_generate() { let dir = tempfile::TempDir::new().unwrap(); - let cache = Cache::at(dir.path()); + let cache = binary_install::Cache::at(dir.path()); if let install::Status::Found(dl) = install::download_prebuilt(&Tool::CargoGenerate, &cache, "latest", true).unwrap() { @@ -57,6 +55,25 @@ fn can_download_prebuilt_cargo_generate() { } } +#[test] +#[cfg(any( + all(target_os = "linux", target_arch = "x86_64"), + all(target_os = "macos", target_arch = "x86_64"), + all(target_os = "macos", target_arch = "aarch64"), + all(windows, target_arch = "x86_64"), +))] +fn can_download_prebuilt_wasm_opt() { + let dir = tempfile::TempDir::new().unwrap(); + let cache = binary_install::Cache::at(dir.path()); + if let install::Status::Found(dl) = + install::download_prebuilt(&Tool::WasmOpt, &cache, "latest", true).unwrap() + { + assert!(dl.binary("bin/wasm-opt").unwrap().is_file()); + } else { + assert!(false, "Download Failed"); + } +} + #[test] fn all_latest_tool_download_urls_valid() { let mut errors = Vec::new(); From ebdaea81509573e9b41c44805baa99b32a33d472 Mon Sep 17 00:00:00 2001 From: printfn Date: Mon, 31 Oct 2022 10:54:33 +1300 Subject: [PATCH 35/94] Bump binaryen version to 110 --- src/install/mod.rs | 2 +- src/wasm_opt.rs | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/install/mod.rs b/src/install/mod.rs index a668217..fb343c7 100644 --- a/src/install/mod.rs +++ b/src/install/mod.rs @@ -201,7 +201,7 @@ pub fn prebuilt_url_for(tool: &Tool, version: &str, arch: &Arch, os: &Os) -> Res Tool::WasmOpt => { Ok(format!( "https://github.com/WebAssembly/binaryen/releases/download/{vers}/binaryen-{vers}-{target}.tar.gz", - vers = "version_108", + vers = "version_110", target = target, )) } diff --git a/src/wasm_opt.rs b/src/wasm_opt.rs index ca507b3..6e2149a 100644 --- a/src/wasm_opt.rs +++ b/src/wasm_opt.rs @@ -61,11 +61,10 @@ pub fn find_wasm_opt(cache: &Cache, install_permitted: bool) -> Result Date: Sat, 29 Oct 2022 10:45:10 +1300 Subject: [PATCH 36/94] Update dependencies --- Cargo.lock | 1332 +++++++++++------------------------- Cargo.toml | 28 +- src/command/publish/mod.rs | 6 +- src/install/krate.rs | 4 +- src/manifest/mod.rs | 2 +- tests/all/download.rs | 2 +- tests/all/utils/fixture.rs | 1 + 7 files changed, 415 insertions(+), 960 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 69eef93..72a0101 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -23,7 +23,7 @@ version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9e8b47f52ea9bae42228d07ec09eb676433d7c4ed1ebdf0f1d1c29ed446f1ab8" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cipher", "cpufeatures", "opaque-debug", @@ -64,14 +64,16 @@ checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" [[package]] name = "assert_cmd" -version = "0.11.1" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2dc477793bd82ec39799b6f6b3df64938532fdf2ab0d49ef817eac65856a5a1e" +checksum = "d5c2ca00549910ec251e3bd15f87aeeb206c9456b9a77b43ff6c97c54042a472" dependencies = [ - "escargot", + "bstr", + "doc-comment", "predicates", "predicates-core", "predicates-tree", + "wait-timeout", ] [[package]] @@ -85,15 +87,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "autocfg" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dde43e75fd43e8a1bf86103336bc699aa8d17ad1be60c76c0bdfd4828e19b78" -dependencies = [ - "autocfg 1.1.0", -] - [[package]] name = "autocfg" version = "1.1.0" @@ -108,7 +101,7 @@ checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" dependencies = [ "addr2line", "cc", - "cfg-if 1.0.0", + "cfg-if", "libc", "miniz_oxide", "object", @@ -117,12 +110,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.10.1" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b25d992356d2eb0ed82172f5248873db5560c4721f564b13cb5193bda5e668e" -dependencies = [ - "byteorder", -] +checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64ct" @@ -142,7 +132,7 @@ dependencies = [ "fs2", "hex", "is_executable", - "siphasher 0.3.10", + "siphasher", "tar", "zip", ] @@ -162,6 +152,17 @@ dependencies = [ "generic-array", ] +[[package]] +name = "bstr" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" +dependencies = [ + "lazy_static 1.4.0", + "memchr", + "regex-automata", +] + [[package]] name = "bumpalo" version = "3.11.1" @@ -176,14 +177,9 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "0.4.12" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "206fdffcfa2df7cbe15601ef46c813fce0965eb3286db6b56c583b814b51c81c" -dependencies = [ - "byteorder", - "either", - "iovec", -] +checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" [[package]] name = "bzip2" @@ -206,16 +202,36 @@ dependencies = [ "pkg-config", ] +[[package]] +name = "camino" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "88ad0e1e3e88dd237a156ab9f571021b8a158caa0ae44b1968a241efb5144c1e" +dependencies = [ + "serde", +] + +[[package]] +name = "cargo-platform" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cbdb825da8a5df079a43676dbe042702f1707b1109f713a01420fbb4cc71fa27" +dependencies = [ + "serde", +] + [[package]] name = "cargo_metadata" -version = "0.8.2" +version = "0.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "700b3731fd7d357223d0000f4dbf1808401b694609035c3c411fbc0cd375c426" +checksum = "406c859255d568f4f742b3146d51851f3bfd49f734a2c289d9107c4395ee0062" dependencies = [ + "camino", + "cargo-platform", "semver", "serde", - "serde_derive", "serde_json", + "thiserror", ] [[package]] @@ -227,12 +243,6 @@ dependencies = [ "jobserver", ] -[[package]] -name = "cfg-if" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" - [[package]] name = "cfg-if" version = "1.0.0" @@ -272,7 +282,7 @@ dependencies = [ "ansi_term", "atty", "bitflags", - "strsim", + "strsim 0.8.0", "textwrap", "unicode-width", "vec_map", @@ -290,15 +300,6 @@ dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "cloudabi" -version = "0.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" -dependencies = [ - "bitflags", -] - [[package]] name = "codespan-reporting" version = "0.11.1" @@ -319,7 +320,7 @@ dependencies = [ "clicolors-control", "lazy_static 1.4.0", "libc", - "parking_lot 0.12.1", + "parking_lot", "regex", "termios", "unicode-width", @@ -346,34 +347,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" -[[package]] -name = "cookie" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "888604f00b3db336d2af898ec3c1d5d0ddf5e6d462220f2ededc33a87ac4bbd5" -dependencies = [ - "time 0.1.44", - "url 1.7.2", -] - -[[package]] -name = "cookie_store" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46750b3f362965f197996c4448e4a0935e791bf7d6631bfce9ee0af3d24c919c" -dependencies = [ - "cookie", - "failure", - "idna 0.1.5", - "log", - "publicsuffix", - "serde", - "serde_json", - "time 0.1.44", - "try_from", - "url 1.7.2", -] - [[package]] name = "core-foundation" version = "0.9.3" @@ -405,55 +378,7 @@ version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b540bd8bc810d3885c6ea91e2018302f68baba2129ab3e88f32389ee9370880d" dependencies = [ - "cfg-if 1.0.0", -] - -[[package]] -name = "crossbeam-deque" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20ff29ded3204c5106278a81a38f4b482636ed4fa1e6cfbeef193291beb29ed" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" -dependencies = [ - "autocfg 1.1.0", - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "lazy_static 1.4.0", - "maybe-uninit", - "memoffset", - "scopeguard 1.1.0", -] - -[[package]] -name = "crossbeam-queue" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" -dependencies = [ - "cfg-if 0.1.10", - "crossbeam-utils 0.7.2", - "maybe-uninit", -] - -[[package]] -name = "crossbeam-utils" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" -dependencies = [ - "autocfg 1.1.0", - "cfg-if 0.1.10", - "lazy_static 1.4.0", + "cfg-if", ] [[package]] @@ -462,7 +387,7 @@ version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] @@ -549,22 +474,35 @@ dependencies = [ "syn", ] +[[package]] +name = "dashmap" +version = "5.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "907076dfda823b0b36d2a1bb5f90c96660a5bbcd7729e10727f07858f22c4edc" +dependencies = [ + "cfg-if", + "hashbrown", + "lock_api", + "once_cell", + "parking_lot_core", +] + [[package]] name = "dialoguer" -version = "0.3.0" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ad1c29a0368928e78c551354dbff79f103a962ad820519724ef0d74f1c62fa9" +checksum = "a92e7e37ecef6857fdc0c0c5d42fd5b0938e46590c2183cc92dd310a6d078eb1" dependencies = [ "console 0.15.2", - "lazy_static 1.4.0", - "tempfile 2.2.0", + "tempfile", + "zeroize", ] [[package]] -name = "difference" -version = "2.0.0" +name = "difflib" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198" +checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" [[package]] name = "digest" @@ -583,7 +521,7 @@ version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "dirs-sys-next", ] @@ -599,10 +537,10 @@ dependencies = [ ] [[package]] -name = "dtoa" -version = "0.4.8" +name = "doc-comment" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56899898ce76aaf4a0f24d914c97ea6ed976d42fec6ad33fcbb0a1103e07b2b0" +checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "either" @@ -622,53 +560,16 @@ version = "0.8.31" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9852635589dc9f9ea1b6fe9f05b50ef208c85c834a562f0c6abb1c475736ec2b" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] name = "env_logger" -version = "0.5.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15b0a4d2e39f8420210be8b27eeda28029729e2fd4291019455016c348240c38" -dependencies = [ - "atty", - "humantime", - "log", - "termcolor", -] - -[[package]] -name = "escargot" -version = "0.4.0" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ceb9adbf9874d5d028b5e4c5739d22b71988252b25c9c98fe7cf9738bee84597" +checksum = "c90bf5f19754d10198ccb95b70664fc925bd1fc090a0fd9a6ebc54acc8cd6272" dependencies = [ - "lazy_static 1.4.0", "log", - "serde", - "serde_json", -] - -[[package]] -name = "failure" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" -dependencies = [ - "backtrace", - "failure_derive", -] - -[[package]] -name = "failure_derive" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "synstructure", ] [[package]] @@ -686,9 +587,9 @@ version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4b9663d381d07ae25dc88dbdf27df458faa83a9b25336bcac83d5e452b5fc9d3" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "redox_syscall 0.2.16", + "redox_syscall", "windows-sys 0.42.0", ] @@ -704,9 +605,9 @@ dependencies = [ [[package]] name = "float-cmp" -version = "0.8.0" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1267f4ac4f343772758f7b1bdcbe767c218bbab93bb432acbf5162bbf85a6c4" +checksum = "98de4bbd547a563b716d8dfa9aad1cb19bfab00f4fa09a6a4ed21dbcf44ce9c4" dependencies = [ "num-traits", ] @@ -738,7 +639,7 @@ version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a9c384f161156f5260c24a097c56119f9be8c798586aecc13afbcbe7b7e26bf8" dependencies = [ - "percent-encoding 2.2.0", + "percent-encoding", ] [[package]] @@ -752,41 +653,80 @@ dependencies = [ ] [[package]] -name = "fuchsia-cprng" -version = "0.1.1" +name = "futures" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" +checksum = "38390104763dc37a5145a53c29c63c1290b5d316d6086ec32c293f6736051bb0" +dependencies = [ + "futures-channel", + "futures-core", + "futures-executor", + "futures-io", + "futures-sink", + "futures-task", + "futures-util", +] [[package]] -name = "fuchsia-zircon" -version = "0.3.3" +name = "futures-channel" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" +checksum = "52ba265a92256105f45b719605a571ffe2d1f0fea3807304b522c1d778f79eed" dependencies = [ - "bitflags", - "fuchsia-zircon-sys", + "futures-core", + "futures-sink", ] [[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" +name = "futures-core" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" +checksum = "04909a7a7e4633ae6c4a9ab280aeb86da1236243a77b694a49eacd659a4bd3ac" [[package]] -name = "futures" -version = "0.1.31" +name = "futures-executor" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7acc85df6714c176ab5edf386123fafe217be88c0840ec11f199441134a074e2" +dependencies = [ + "futures-core", + "futures-task", + "futures-util", +] + +[[package]] +name = "futures-io" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00f5fb52a06bdcadeb54e8d3671f8888a39697dcb0b81b23b55174030427f4eb" + +[[package]] +name = "futures-sink" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a471a38ef8ed83cd6e40aa59c1ffe17db6855c18e3604d9c4ed8c08ebc28678" +checksum = "39c15cf1a4aa79df40f1bb462fb39676d0ad9e366c2a33b590d7c66f4f81fcf9" [[package]] -name = "futures-cpupool" -version = "0.1.8" +name = "futures-task" +version = "0.3.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab90cde24b3319636588d0c35fe03b1333857621051837ed769faefb4c2162e4" +checksum = "2ffb393ac5d9a6eaa9d3fdf37ae2776656b706e200c8e16b1bdb227f5198e6ea" + +[[package]] +name = "futures-util" +version = "0.3.25" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "197676987abd2f9cadff84926f410af1c183608d36641465df73ae8211dc65d6" dependencies = [ - "futures", - "num_cpus", + "futures-channel", + "futures-core", + "futures-io", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "pin-utils", + "slab", ] [[package]] @@ -805,7 +745,7 @@ version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c05aeb6a22b8f62540c194aac980f2115af067bfe15a0734d7277a768d396b31" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", "wasi 0.11.0+wasi-snapshot-preview1", ] @@ -818,26 +758,27 @@ checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" [[package]] name = "glob" -version = "0.2.11" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8be18de09a56b60ed0edf84bc9df007e30040691af7acd1c41874faac5895bfb" +checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" [[package]] name = "h2" -version = "0.1.26" +version = "0.3.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5b34c246847f938a410a03c5458c7fee2274436675e76d8b903c08efc29c462" +checksum = "5f9f29bc9dda355256b2916cf526ab02ce0aeaaaf2bad60d65ef3f12f11dd0f4" dependencies = [ - "byteorder", "bytes", "fnv", - "futures", + "futures-core", + "futures-sink", + "futures-util", "http", "indexmap", - "log", "slab", - "string", - "tokio-io", + "tokio", + "tokio-util", + "tracing", ] [[package]] @@ -881,25 +822,24 @@ dependencies = [ [[package]] name = "http" -version = "0.1.21" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d6ccf5ede3a895d8856620237b2f02972c1bbc78d2965ad7fe8838d4a0ed41f0" +checksum = "75f43d41e26995c17e71ee126451dd3941010b0514a81a9d11f3b341debc2399" dependencies = [ "bytes", "fnv", - "itoa 0.4.8", + "itoa", ] [[package]] name = "http-body" -version = "0.1.0" +version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6741c859c1b2463a423a1dbce98d418e6c3c3fc720fb0d45528657320920292d" +checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ "bytes", - "futures", "http", - "tokio-buf", + "pin-project-lite", ] [[package]] @@ -908,6 +848,12 @@ version = "1.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" +[[package]] +name = "httpdate" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c4a1e36c821dbe04574f602848a19f742f4fb3c98d40449f11bcad18d6b17421" + [[package]] name = "human-panic" version = "1.0.3" @@ -919,60 +865,45 @@ dependencies = [ "serde", "serde_derive", "termcolor", - "toml 0.5.9", - "uuid 0.8.2", -] - -[[package]] -name = "humantime" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f" -dependencies = [ - "quick-error", + "toml", + "uuid", ] [[package]] name = "hyper" -version = "0.12.36" +version = "0.14.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c843caf6296fc1f93444735205af9ed4e109a539005abb2564ae1d6fad34c52" +checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" dependencies = [ "bytes", - "futures", - "futures-cpupool", + "futures-channel", + "futures-core", + "futures-util", "h2", "http", "http-body", "httparse", - "iovec", - "itoa 0.4.8", - "log", - "net2", - "rustc_version", - "time 0.1.44", + "httpdate", + "itoa", + "pin-project-lite", + "socket2", "tokio", - "tokio-buf", - "tokio-executor", - "tokio-io", - "tokio-reactor", - "tokio-tcp", - "tokio-threadpool", - "tokio-timer", + "tower-service", + "tracing", "want", ] [[package]] name = "hyper-tls" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a800d6aa50af4b5850b2b0f659625ce9504df908e9733b635720483be26174f" +checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ "bytes", - "futures", "hyper", "native-tls", - "tokio-io", + "tokio", + "tokio-native-tls", ] [[package]] @@ -999,28 +930,6 @@ dependencies = [ "cxx-build", ] -[[package]] -name = "idna" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f09e0f0b1fb55fdee1f17470ad800da77af5186a1a76c026b679358b7e844e" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "idna" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "418a0a6fab821475f634efe3ccc45c013f742efe03d853e8d3355d5cb850ecf8" -dependencies = [ - "matches", - "unicode-bidi", - "unicode-normalization", -] - [[package]] name = "idna" version = "0.3.0" @@ -1037,7 +946,7 @@ version = "1.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" dependencies = [ - "autocfg 1.1.0", + "autocfg", "hashbrown", ] @@ -1047,17 +956,14 @@ version = "0.1.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] [[package]] -name = "iovec" -version = "0.1.4" +name = "ipnet" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" -dependencies = [ - "libc", -] +checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" [[package]] name = "is_executable" @@ -1069,10 +975,13 @@ dependencies = [ ] [[package]] -name = "itoa" -version = "0.4.8" +name = "itertools" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b71991ff56294aa922b450139ee08b3bfc70982c6b2c7562771375cf73542dd4" +checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" +dependencies = [ + "either", +] [[package]] name = "itoa" @@ -1147,33 +1056,14 @@ dependencies = [ "cc", ] -[[package]] -name = "lock_api" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" -dependencies = [ - "owning_ref", - "scopeguard 0.3.3", -] - -[[package]] -name = "lock_api" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard 1.1.0", -] - [[package]] name = "lock_api" version = "0.4.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "435011366fe56583b16cf956f9df0095b405b82d76425bc8981c0e22e60ec4df" dependencies = [ - "autocfg 1.1.0", - "scopeguard 1.1.0", + "autocfg", + "scopeguard", ] [[package]] @@ -1182,52 +1072,21 @@ version = "0.4.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "abb12e687cfb44aa40f41fc3978ef76448f9b6038cad6aef4259d3c095a2382e" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", ] -[[package]] -name = "matches" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e378b66a060d48947b590737b30a1be76706c8dd7b8ba0f2fe3989c68a853f" - -[[package]] -name = "maybe-uninit" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" - [[package]] name = "memchr" version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2dffe52ecf27772e601905b7522cb4ef790d2cc203488bbd0e2fe85fcb74566d" -[[package]] -name = "memoffset" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "043175f069eda7b85febe4a74abbaeff828d9f8b448515d3151a14a3542811aa" -dependencies = [ - "autocfg 1.1.0", -] - [[package]] name = "mime" version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" -[[package]] -name = "mime_guess" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" -dependencies = [ - "mime", - "unicase", -] - [[package]] name = "miniz_oxide" version = "0.5.4" @@ -1239,33 +1098,14 @@ dependencies = [ [[package]] name = "mio" -version = "0.6.23" +version = "0.8.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4afd66f5b91bf2a3bc13fad0e21caedac168ca4c707504e75585648ae80e4cc4" +checksum = "e5d732bc30207a6423068df043e3d02e0735b155ad7ce1a6f76fe2baa5b158de" dependencies = [ - "cfg-if 0.1.10", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", "libc", "log", - "miow", - "net2", - "slab", - "winapi 0.2.8", -] - -[[package]] -name = "miow" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd808424166322d4a38da87083bfddd3ac4c131334ed55856112eb06d46944d" -dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", + "wasi 0.11.0+wasi-snapshot-preview1", + "windows-sys 0.42.0", ] [[package]] @@ -1283,18 +1123,7 @@ dependencies = [ "schannel", "security-framework", "security-framework-sys", - "tempfile 3.3.0", -] - -[[package]] -name = "net2" -version = "0.2.38" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d0df99cfcd2530b2e694f6e17e7f37b8e26bb23983ac530c0c97408837c631" -dependencies = [ - "cfg-if 0.1.10", - "libc", - "winapi 0.3.9", + "tempfile", ] [[package]] @@ -1309,7 +1138,7 @@ version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "225d3389fb3509a24c93f5c29eb6bde2586b98d9f016636dff58d7c6f7569cd9" dependencies = [ - "autocfg 1.1.0", + "autocfg", "num-traits", ] @@ -1319,7 +1148,7 @@ version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "578ede34cf02f8924ab9447f50c28075b4d3e5b269972345e7e0372b38c6cdcd" dependencies = [ - "autocfg 1.1.0", + "autocfg", ] [[package]] @@ -1369,7 +1198,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "12fc0523e3bd51a692c8850d075d74dc062ccf251c0110668cbd921917118a13" dependencies = [ "bitflags", - "cfg-if 1.0.0", + "cfg-if", "foreign-types", "libc", "once_cell", @@ -1409,7 +1238,7 @@ version = "0.9.77" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b03b84c3b2d099b81f0953422b4d4ad58761589d0229b5506356afca05a3670a" dependencies = [ - "autocfg 1.1.0", + "autocfg", "cc", "libc", "openssl-src", @@ -1426,72 +1255,14 @@ dependencies = [ "regex", ] -[[package]] -name = "owning_ref" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff55baddef9e4ad00f88b6c743a2a8062d4c6ade126c2a528644b8e444d52ce" -dependencies = [ - "stable_deref_trait", -] - -[[package]] -name = "parking_lot" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0802bff09003b291ba756dc7e79313e51cc31667e94afbe847def490424cde5" -dependencies = [ - "lock_api 0.1.5", - "parking_lot_core 0.3.1", -] - -[[package]] -name = "parking_lot" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f842b1982eb6c2fe34036a4fbfb06dd185a3f5c8edfaacdf7d1ea10b07de6252" -dependencies = [ - "lock_api 0.3.4", - "parking_lot_core 0.6.2", - "rustc_version", -] - [[package]] name = "parking_lot" version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" dependencies = [ - "lock_api 0.4.9", - "parking_lot_core 0.9.4", -] - -[[package]] -name = "parking_lot_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad7f7e6ebdc79edff6fdcb87a55b620174f7a989e3eb31b65231f4af57f00b8c" -dependencies = [ - "libc", - "rand 0.5.6", - "rustc_version", - "smallvec 0.6.14", - "winapi 0.3.9", -] - -[[package]] -name = "parking_lot_core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b876b1b9e7ac6e1a74a6da34d25c42e17e8862aa409cbbbdcfc8d86c6f3bc62b" -dependencies = [ - "cfg-if 0.1.10", - "cloudabi", - "libc", - "redox_syscall 0.1.57", - "rustc_version", - "smallvec 0.6.14", - "winapi 0.3.9", + "lock_api", + "parking_lot_core", ] [[package]] @@ -1500,10 +1271,10 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "libc", - "redox_syscall 0.2.16", - "smallvec 1.10.0", + "redox_syscall", + "smallvec", "windows-sys 0.42.0", ] @@ -1514,7 +1285,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" dependencies = [ "base64ct", - "rand_core 0.6.4", + "rand_core", "subtle", ] @@ -1532,15 +1303,21 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "1.0.1" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31010dd2e1ac33d5b46a5b413495239882813e0369f8ed8a5e266f173602f831" +checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" [[package]] -name = "percent-encoding" -version = "2.2.0" +name = "pin-project-lite" +version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "478c572c3d73181ff3c2539045f6eb99e5491218eae919370993b890cdbdd98e" +checksum = "e0a7ae3ac2f1173085d398531c705756c94a4c56843785df85a60c1a0afac116" + +[[package]] +name = "pin-utils" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" [[package]] name = "pkg-config" @@ -1550,12 +1327,13 @@ checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] name = "predicates" -version = "1.0.8" +version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f49cfaf7fdaa3bfacc6fa3e7054e65148878354a5cfddcf661df4c851f8021df" +checksum = "a5aab5be6e4732b473071984b3164dbbfb7a3674d30ea5ff44410b6bcd960c3c" dependencies = [ - "difference", + "difflib", "float-cmp", + "itertools", "normalize-line-endings", "predicates-core", "regex", @@ -1573,230 +1351,57 @@ version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d86de6de25020a36c6d3643a86d9a6a9f552107c0559c60ea03551b5e16c032" dependencies = [ - "predicates-core", - "termtree", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.47" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "publicsuffix" -version = "1.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95b4ce31ff0a27d93c8de1849cf58162283752f065a90d508f1105fa6c9a213f" -dependencies = [ - "idna 0.2.3", - "url 2.3.1", -] - -[[package]] -name = "quick-error" -version = "1.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" - -[[package]] -name = "quote" -version = "1.0.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "rand" -version = "0.3.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c" -dependencies = [ - "libc", - "rand 0.4.6", -] - -[[package]] -name = "rand" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293" -dependencies = [ - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "rdrand", - "winapi 0.3.9", -] - -[[package]] -name = "rand" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c618c47cd3ebd209790115ab837de41425723956ad3ce2e6a7f09890947cacb9" -dependencies = [ - "cloudabi", - "fuchsia-cprng", - "libc", - "rand_core 0.3.1", - "winapi 0.3.9", -] - -[[package]] -name = "rand" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d71dacdc3c88c1fde3885a3be3fbab9f35724e6ce99467f7d9c5026132184ca" -dependencies = [ - "autocfg 0.1.8", - "libc", - "rand_chacha", - "rand_core 0.4.2", - "rand_hc", - "rand_isaac", - "rand_jitter", - "rand_os", - "rand_pcg", - "rand_xorshift", - "winapi 0.3.9", -] - -[[package]] -name = "rand_chacha" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556d3a1ca6600bfcbab7c7c91ccb085ac7fbbcd70e008a98742e7847f4f7bcef" -dependencies = [ - "autocfg 0.1.8", - "rand_core 0.3.1", -] - -[[package]] -name = "rand_core" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b" -dependencies = [ - "rand_core 0.4.2", -] - -[[package]] -name = "rand_core" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc" - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" - -[[package]] -name = "rand_hc" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b40677c7be09ae76218dc623efbf7b18e34bced3f38883af07bb75630a21bc4" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_isaac" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded997c9d5f13925be2a6fd7e66bf1872597f759fd9dd93513dd7e92e5a5ee08" -dependencies = [ - "rand_core 0.3.1", -] - -[[package]] -name = "rand_jitter" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1166d5c91dc97b88d1decc3285bb0a99ed84b05cfd0bc2341bdf2d43fc41e39b" -dependencies = [ - "libc", - "rand_core 0.4.2", - "winapi 0.3.9", + "predicates-core", + "termtree", ] [[package]] -name = "rand_os" -version = "0.1.3" +name = "proc-macro-error" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b75f676a1e053fc562eafbb47838d67c84801e38fc1ba459e8f180deabd5071" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ - "cloudabi", - "fuchsia-cprng", - "libc", - "rand_core 0.4.2", - "rdrand", - "winapi 0.3.9", + "proc-macro-error-attr", + "proc-macro2", + "quote", + "syn", + "version_check", ] [[package]] -name = "rand_pcg" -version = "0.1.2" +name = "proc-macro-error-attr" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abf9b09b01790cfe0364f52bf32995ea3c39f4d2dd011eac241d2914146d0b44" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "autocfg 0.1.8", - "rand_core 0.4.2", + "proc-macro2", + "quote", + "version_check", ] [[package]] -name = "rand_xorshift" -version = "0.1.1" +name = "proc-macro2" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf7e9e623549b0e21f6e97cf8ecf247c1a8fd2e8a992ae265314300b2455d5c" +checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" dependencies = [ - "rand_core 0.3.1", + "unicode-ident", ] [[package]] -name = "rdrand" -version = "0.4.0" +name = "quote" +version = "1.0.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2" +checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" dependencies = [ - "rand_core 0.3.1", + "proc-macro2", ] [[package]] -name = "redox_syscall" -version = "0.1.57" +name = "rand_core" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" [[package]] name = "redox_syscall" @@ -1814,7 +1419,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b033d837a7cf162d7993aded9304e30a83213c648b6e389db233191f891e5c2b" dependencies = [ "getrandom", - "redox_syscall 0.2.16", + "redox_syscall", "thiserror", ] @@ -1829,6 +1434,12 @@ dependencies = [ "regex-syntax", ] +[[package]] +name = "regex-automata" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" + [[package]] name = "regex-syntax" version = "0.6.27" @@ -1846,35 +1457,38 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.9.24" +version = "0.11.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f88643aea3c1343c804950d7bf983bd2067f5ab59db6d613a08e05572f2714ab" +checksum = "431949c384f4e2ae07605ccaa56d1d9d2ecdb5cadd4f9577ccfab29f2e5149fc" dependencies = [ "base64", "bytes", - "cookie", - "cookie_store", "encoding_rs", - "flate2", - "futures", + "futures-core", + "futures-util", + "h2", "http", + "http-body", "hyper", "hyper-tls", + "ipnet", + "js-sys", "log", "mime", - "mime_guess", "native-tls", + "once_cell", + "percent-encoding", + "pin-project-lite", "serde", "serde_json", "serde_urlencoded", - "time 0.1.44", "tokio", - "tokio-executor", - "tokio-io", - "tokio-threadpool", - "tokio-timer", - "url 1.7.2", - "uuid 0.7.4", + "tokio-native-tls", + "tower-service", + "url", + "wasm-bindgen", + "wasm-bindgen-futures", + "web-sys", "winreg", ] @@ -1884,15 +1498,6 @@ version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" -[[package]] -name = "rustc_version" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" -dependencies = [ - "semver", -] - [[package]] name = "ryu" version = "1.0.11" @@ -1918,12 +1523,6 @@ dependencies = [ "windows-sys 0.36.1", ] -[[package]] -name = "scopeguard" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94258f53601af11e6a49f722422f6e3425c52b06245a5cf9bc09908b174f5e27" - [[package]] name = "scopeguard" version = "1.1.0" @@ -1961,20 +1560,13 @@ dependencies = [ [[package]] name = "semver" -version = "0.9.0" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" +checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" dependencies = [ - "semver-parser", "serde", ] -[[package]] -name = "semver-parser" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" - [[package]] name = "serde" version = "1.0.147" @@ -1997,9 +1589,9 @@ dependencies = [ [[package]] name = "serde_ignored" -version = "0.0.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190e9765dcedb56be63b6e0993a006c7e3b071a016a304736e4a315dc01fb142" +checksum = "82b3da7eedd967647a866f67829d1c79d184d7c4521126e9cc2c46a9585c6d21" dependencies = [ "serde", ] @@ -2010,40 +1602,44 @@ version = "1.0.87" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" dependencies = [ - "itoa 1.0.4", + "itoa", "ryu", "serde", ] [[package]] name = "serde_urlencoded" -version = "0.5.5" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "642dd69105886af2efd227f75a520ec9b44a820d65bc133a9131f7d229fd165a" +checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" dependencies = [ - "dtoa", - "itoa 0.4.8", + "form_urlencoded", + "itoa", + "ryu", "serde", - "url 1.7.2", ] [[package]] name = "serial_test" -version = "0.3.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f74862f16557830c73deefde614c906f8af0157e064b64f156e32a0b12d7114c" +checksum = "92761393ee4dc3ff8f4af487bd58f4307c9329bbedea02cac0089ad9c411e153" dependencies = [ + "dashmap", + "futures", "lazy_static 1.4.0", - "parking_lot 0.9.0", + "log", + "parking_lot", "serial_test_derive", ] [[package]] name = "serial_test_derive" -version = "0.3.2" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c188479c8b700998829c168d7a4c21032660b0dd2ed87a0b166c85811750740" +checksum = "4b6f5d1c3087fb119617cff2966fe3808a80e5eb59a8c1601d5994d66f4346a5" dependencies = [ + "proc-macro-error", "proc-macro2", "quote", "syn", @@ -2055,7 +1651,7 @@ version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f04293dc80c3993519f2d7f6f511707ee7094fe0c6d3406feb330cdb3540eba3" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest", ] @@ -2066,17 +1662,11 @@ version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "82e6b795fe2e3b1e845bafcb27aa35405c4d47cdfc92af5fc8d3002f76cebdc0" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "cpufeatures", "digest", ] -[[package]] -name = "siphasher" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b8de496cf83d4ed58b6be86c3a275b8602f6ffe98d3024a869e124147a9a3ac" - [[package]] name = "siphasher" version = "0.3.10" @@ -2089,16 +1679,7 @@ version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4614a76b2a8be0058caa9dbbaf66d988527d86d003c11a94fbd335d7661edcef" dependencies = [ - "autocfg 1.1.0", -] - -[[package]] -name = "smallvec" -version = "0.6.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b97fcaeba89edba30f044a10c6a3cc39df9c3f17d7cd829dd1446cab35f890e0" -dependencies = [ - "maybe-uninit", + "autocfg", ] [[package]] @@ -2118,25 +1699,16 @@ dependencies = [ ] [[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "string" -version = "0.2.1" +name = "strsim" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d24114bfcceb867ca7f71a0d3fe45d45619ec47a6fbfa98cb14e14250bfa5d6d" -dependencies = [ - "bytes", -] +checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" [[package]] name = "strsim" -version = "0.8.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "structopt" @@ -2179,18 +1751,6 @@ dependencies = [ "unicode-ident", ] -[[package]] -name = "synstructure" -version = "0.12.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f36bdaa60a83aca3921b5259d5400cbf5e90fc51931376a9bd4a0eb79aa7210f" -dependencies = [ - "proc-macro2", - "quote", - "syn", - "unicode-xid", -] - [[package]] name = "tar" version = "0.4.38" @@ -2202,29 +1762,16 @@ dependencies = [ "xattr", ] -[[package]] -name = "tempfile" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11ce2fe9db64b842314052e2421ac61a73ce41b898dc8e3750398b219c5fc1e0" -dependencies = [ - "kernel32-sys", - "libc", - "rand 0.3.23", - "redox_syscall 0.1.57", - "winapi 0.2.8", -] - [[package]] name = "tempfile" version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5cdb1ef4eaeeaddc8fbd371e5017057064af0911902ef36b39801f67cc6d79e4" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "fastrand", "libc", - "redox_syscall 0.2.16", + "redox_syscall", "remove_dir_all", "winapi 0.3.9", ] @@ -2309,7 +1856,7 @@ version = "0.3.16" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0fab5c8b9980850e06d92ddbe3ab839c062c801f3927c0fb8abd6fc8e918fbca" dependencies = [ - "itoa 1.0.4", + "itoa", "libc", "num_threads", "serde", @@ -2349,153 +1896,78 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "0.1.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a09c0b5bb588872ab2f09afa13ee6e9dac11e10a0ec9e8e3ba39a5a5d530af6" -dependencies = [ - "bytes", - "futures", - "mio", - "num_cpus", - "tokio-current-thread", - "tokio-executor", - "tokio-io", - "tokio-reactor", - "tokio-tcp", - "tokio-threadpool", - "tokio-timer", -] - -[[package]] -name = "tokio-buf" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fb220f46c53859a4b7ec083e41dec9778ff0b1851c0942b211edb89e0ccdc46" -dependencies = [ - "bytes", - "either", - "futures", -] - -[[package]] -name = "tokio-current-thread" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1de0e32a83f131e002238d7ccde18211c0a5397f60cbfffcb112868c2e0e20e" -dependencies = [ - "futures", - "tokio-executor", -] - -[[package]] -name = "tokio-executor" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb2d1b8f4548dbf5e1f7818512e9c406860678f29c300cdf0ebac72d1a3a1671" -dependencies = [ - "crossbeam-utils 0.7.2", - "futures", -] - -[[package]] -name = "tokio-io" -version = "0.1.13" +version = "1.21.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57fc868aae093479e3131e3d165c93b1c7474109d13c90ec0dda2a1bbfff0674" +checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099" dependencies = [ + "autocfg", "bytes", - "futures", - "log", -] - -[[package]] -name = "tokio-reactor" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09bc590ec4ba8ba87652da2068d150dcada2cfa2e07faae270a5e0409aa51351" -dependencies = [ - "crossbeam-utils 0.7.2", - "futures", - "lazy_static 1.4.0", - "log", + "libc", + "memchr", "mio", "num_cpus", - "parking_lot 0.9.0", - "slab", - "tokio-executor", - "tokio-io", - "tokio-sync", + "pin-project-lite", + "socket2", + "winapi 0.3.9", ] [[package]] -name = "tokio-sync" -version = "0.1.8" +name = "tokio-native-tls" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edfe50152bc8164fcc456dab7891fa9bf8beaf01c5ee7e1dd43a397c3cf87dee" +checksum = "f7d995660bd2b7f8c1568414c1126076c13fbb725c40112dc0120b78eb9b717b" dependencies = [ - "fnv", - "futures", + "native-tls", + "tokio", ] [[package]] -name = "tokio-tcp" -version = "0.1.4" +name = "tokio-util" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98df18ed66e3b72e742f185882a9e201892407957e45fbff8da17ae7a7c51f72" +checksum = "0bb2e075f03b3d66d8d8785356224ba688d2906a371015e225beeb65ca92c740" dependencies = [ "bytes", - "futures", - "iovec", - "mio", - "tokio-io", - "tokio-reactor", + "futures-core", + "futures-sink", + "pin-project-lite", + "tokio", + "tracing", ] [[package]] -name = "tokio-threadpool" -version = "0.1.18" +name = "toml" +version = "0.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df720b6581784c118f0eb4310796b12b1d242a7eb95f716a8367855325c25f89" +checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" dependencies = [ - "crossbeam-deque", - "crossbeam-queue", - "crossbeam-utils 0.7.2", - "futures", - "lazy_static 1.4.0", - "log", - "num_cpus", - "slab", - "tokio-executor", + "serde", ] [[package]] -name = "tokio-timer" -version = "0.2.13" +name = "tower-service" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93044f2d313c95ff1cb7809ce9a7a05735b012288a888b62d4434fd58c94f296" -dependencies = [ - "crossbeam-utils 0.7.2", - "futures", - "slab", - "tokio-executor", -] +checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" [[package]] -name = "toml" -version = "0.4.10" +name = "tracing" +version = "0.1.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "758664fc71a3a69038656bee8b6be6477d2a6c315a6b81f7081f591bffa4111f" +checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ - "serde", + "cfg-if", + "pin-project-lite", + "tracing-core", ] [[package]] -name = "toml" -version = "0.5.9" +name = "tracing-core" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" +checksum = "24eb03ba0eab1fd845050058ce5e616558e8f8d8fca633e6b163fe25c797213a" dependencies = [ - "serde", + "once_cell", ] [[package]] @@ -2504,30 +1976,12 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" -[[package]] -name = "try_from" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "283d3b89e1368717881a9d51dad843cc435380d8109c9e47d38780a324698d8b" -dependencies = [ - "cfg-if 0.1.10", -] - [[package]] name = "typenum" version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" -[[package]] -name = "unicase" -version = "2.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" -dependencies = [ - "version_check", -] - [[package]] name = "unicode-bidi" version = "0.3.8" @@ -2561,23 +2015,6 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c0edd1e5b14653f783770bce4a4dabb4a5108a5370a5f5d8cfe8710c361f6c8b" -[[package]] -name = "unicode-xid" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f962df74c8c05a667b5ee8bcf162993134c104e96440b663c8daa176dc772d8c" - -[[package]] -name = "url" -version = "1.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd4e7c0d531266369519a4aa4f399d748bd37043b00bde1e4ff1f60a120b355a" -dependencies = [ - "idna 0.1.5", - "matches", - "percent-encoding 1.0.1", -] - [[package]] name = "url" version = "2.3.1" @@ -2585,17 +2022,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0d68c799ae75762b8c3fe375feb6600ef5602c883c5d21eb51c09f22b83c4643" dependencies = [ "form_urlencoded", - "idna 0.3.0", - "percent-encoding 2.2.0", -] - -[[package]] -name = "uuid" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90dbc611eb48397705a6b0f6e917da23ae517e4d127123d2cf7674206627d32a" -dependencies = [ - "rand 0.6.5", + "idna", + "percent-encoding", ] [[package]] @@ -2625,6 +2053,15 @@ version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" +[[package]] +name = "wait-timeout" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" +dependencies = [ + "libc", +] + [[package]] name = "walkdir" version = "2.3.2" @@ -2638,11 +2075,10 @@ dependencies = [ [[package]] name = "want" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6395efa4784b027708f7451087e647ec73cc74f5d9bc2e418404248d679a230" +checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" dependencies = [ - "futures", "log", "try-lock", ] @@ -2665,7 +2101,7 @@ version = "0.2.83" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eaf9f5aceeec8be17c128b2e93e031fb8a4d469bb9c4ae2d7dc1888b26887268" dependencies = [ - "cfg-if 1.0.0", + "cfg-if", "wasm-bindgen-macro", ] @@ -2684,6 +2120,18 @@ dependencies = [ "wasm-bindgen-shared", ] +[[package]] +name = "wasm-bindgen-futures" +version = "0.4.33" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23639446165ca5a5de86ae1d8896b737ae80319560fbaa4c2887b7da6e7ebd7d" +dependencies = [ + "cfg-if", + "js-sys", + "wasm-bindgen", + "web-sys", +] + [[package]] name = "wasm-bindgen-macro" version = "0.2.83" @@ -2732,7 +2180,7 @@ dependencies = [ "lazy_static 1.4.0", "log", "openssl", - "parking_lot 0.6.4", + "parking_lot", "predicates", "reqwest", "semver", @@ -2741,15 +2189,25 @@ dependencies = [ "serde_ignored", "serde_json", "serial_test", - "siphasher 0.2.3", - "strsim", + "siphasher", + "strsim 0.10.0", "structopt", - "tempfile 3.3.0", - "toml 0.4.10", + "tempfile", + "toml", "walkdir", "which", ] +[[package]] +name = "web-sys" +version = "0.3.60" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bcda906d8be16e728fd5adc5b729afad4e444e106ab28cd1c7256e54fa61510f" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + [[package]] name = "which" version = "4.3.0" @@ -2906,23 +2364,13 @@ checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" [[package]] name = "winreg" -version = "0.6.2" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" +checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" dependencies = [ "winapi 0.3.9", ] -[[package]] -name = "ws2_32-sys" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - [[package]] name = "xattr" version = "0.2.3" @@ -2932,6 +2380,12 @@ dependencies = [ "libc", ] +[[package]] +name = "zeroize" +version = "1.5.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c394b5bd0c6f669e7275d9c20aa90ae064cb22e75a1cad54e1b34088034b149f" + [[package]] name = "zip" version = "0.6.3" @@ -2943,7 +2397,7 @@ dependencies = [ "bzip2", "constant_time_eq", "crc32fast", - "crossbeam-utils 0.8.12", + "crossbeam-utils", "flate2", "hmac", "pbkdf2", diff --git a/Cargo.toml b/Cargo.toml index cc63749..b3ff5e5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,36 +12,36 @@ documentation = "https://rustwasm.github.io/wasm-pack/" [dependencies] anyhow = "1.0.66" atty = "0.2.11" -cargo_metadata = "0.8.0" +cargo_metadata = "0.15" console = "0.6.1" -dialoguer = "0.3.0" +dialoguer = "0.10" curl = "0.4.13" -env_logger = { version = "0.5.13", default-features = false } +env_logger = { version = "0.9", default-features = false } human-panic = "1.0.1" -glob = "0.2" +glob = "0.3" log = "0.4.6" openssl = { version = '0.10.11', optional = true } -parking_lot = "0.6" -reqwest = "0.9.14" -semver = "0.9.0" +parking_lot = "0.12" +reqwest = { version = "0.11.12", features = ["blocking"] } +semver = "1" serde = "1.0.74" serde_derive = "1.0.74" -serde_ignored = "0.0.4" +serde_ignored = "0.1" serde_json = "1.0.26" -strsim = "0.8.0" -siphasher = "0.2.3" +strsim = "0.10" +siphasher = "0.3" structopt = "0.3" -toml = "0.4" +toml = "0.5" which = "4.3.0" binary-install = { git = "https://github.com/rustwasm/binary-install", rev = "6d60f6731c8294000ea8f3a0260659b025cf7f94" } walkdir = "2" chrono = "0.4.6" [dev-dependencies] -assert_cmd = "0.11" +assert_cmd = "2" lazy_static = "1.1.0" -predicates = "1.0.0" -serial_test = "0.3" +predicates = "2" +serial_test = "0.9" tempfile = "3" [features] diff --git a/src/command/publish/mod.rs b/src/command/publish/mod.rs index 7ac495b..8d0374a 100644 --- a/src/command/publish/mod.rs +++ b/src/command/publish/mod.rs @@ -5,7 +5,7 @@ use self::access::Access; use anyhow::{anyhow, bail, Result}; use command::build::{Build, BuildOptions, Target}; use command::utils::{find_pkg_directory, get_crate_path}; -use dialoguer::{Confirmation, Input, Select}; +use dialoguer::{Confirm, Input, Select}; use log::info; use npm; use std::path::PathBuf; @@ -30,8 +30,8 @@ pub fn publish( None => { // while `wasm-pack publish`, if the pkg directory cannot be found, // then try to `wasm-pack build` - if Confirmation::new() - .with_text("Your package hasn't been built, build it?") + if Confirm::new() + .with_prompt("Your package hasn't been built, build it?") .interact()? { let out_dir = Input::new() diff --git a/src/install/krate.rs b/src/install/krate.rs index 6f9c62f..321b74b 100644 --- a/src/install/krate.rs +++ b/src/install/krate.rs @@ -16,8 +16,8 @@ pub struct KrateResponse { impl Krate { pub fn new(name: &Tool) -> Result { let krate_address = format!("https://crates.io/api/v1/crates/{}", name); - let client = reqwest::Client::new(); - let mut res = client.get(&krate_address).send()?; + let client = reqwest::blocking::Client::new(); + let res = client.get(&krate_address).send()?; let kr: KrateResponse = serde_json::from_str(&res.text()?)?; Ok(kr.krate) diff --git a/src/manifest/mod.rs b/src/manifest/mod.rs index 4da1f31..7614c90 100644 --- a/src/manifest/mod.rs +++ b/src/manifest/mod.rs @@ -424,7 +424,7 @@ impl CrateData { .iter() .position(|pkg| { pkg.name == manifest.package.name - && CrateData::is_same_path(&pkg.manifest_path, &manifest_path) + && CrateData::is_same_path(pkg.manifest_path.as_std_path(), &manifest_path) }) .ok_or_else(|| anyhow!("failed to find package in metadata"))?; diff --git a/tests/all/download.rs b/tests/all/download.rs index 3ba579f..62a79da 100644 --- a/tests/all/download.rs +++ b/tests/all/download.rs @@ -84,7 +84,7 @@ fn all_latest_tool_download_urls_valid() { // For all valid tool, arch & os combinations, // error out when any of them is a 404 or similar if let Ok(url) = install::prebuilt_url_for(&tool, "0.2.82", &arch, &os) { - let client = reqwest::Client::new(); + let client = reqwest::blocking::Client::new(); // Use HTTP HEAD instead of GET to avoid fetching lots of stuff let res = client.head(&url).send().unwrap(); if res.status().is_client_error() { diff --git a/tests/all/utils/fixture.rs b/tests/all/utils/fixture.rs index e51d904..d42885d 100644 --- a/tests/all/utils/fixture.rs +++ b/tests/all/utils/fixture.rs @@ -1,4 +1,5 @@ use binary_install::Cache; +use lazy_static::lazy_static; use std::env; use std::fs; use std::mem::ManuallyDrop; From 028076dfcbc92db72ac7a256bbd5dc63ca20102b Mon Sep 17 00:00:00 2001 From: printfn Date: Mon, 31 Oct 2022 14:42:50 +1300 Subject: [PATCH 37/94] Fix flaky unit tests due to non-existent cache --- tests/all/utils/fixture.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/all/utils/fixture.rs b/tests/all/utils/fixture.rs index d42885d..13f9e79 100644 --- a/tests/all/utils/fixture.rs +++ b/tests/all/utils/fixture.rs @@ -322,7 +322,9 @@ impl Fixture { } pub fn cache(&self) -> Cache { - Cache::at(&self.cache_dir()) + let cache_dir = self.cache_dir(); + fs::create_dir_all(&cache_dir).unwrap(); + Cache::at(&cache_dir) } /// The `step_install_wasm_bindgen` and `step_run_wasm_bindgen` steps only From 556373df30269d1a8a283bc758310ae44fa20aac Mon Sep 17 00:00:00 2001 From: printfn Date: Mon, 31 Oct 2022 15:12:25 +1300 Subject: [PATCH 38/94] Update mdbook to v0.4 v0.3.7 no longer compiles as of Rust 1.64, see https://github.com/rust-lang/mdBook/issues/1875 --- .github/workflows/book.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index 4d06b70..2266adc 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -31,7 +31,7 @@ jobs: - name: Install mdbook run: | (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update) - (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.3" mdbook) + (test -x $HOME/.cargo/bin/mdbook || cargo install --vers "^0.4" mdbook) cargo install-update -a - name: Build book From 9a3c7cd9d5e28389cb67a19f91a0c1a17fd84b37 Mon Sep 17 00:00:00 2001 From: printfn Date: Sun, 20 Nov 2022 04:45:15 +0000 Subject: [PATCH 39/94] Use prebuilt cargo-generate binary on aarch64-macos --- src/install/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/install/mod.rs b/src/install/mod.rs index fb343c7..d48fb07 100644 --- a/src/install/mod.rs +++ b/src/install/mod.rs @@ -177,6 +177,7 @@ pub fn prebuilt_url_for(tool: &Tool, version: &str, arch: &Arch, os: &Os) -> Res (Os::Linux, Arch::X86_64, _) => "x86_64-unknown-linux-musl", (Os::MacOS, Arch::X86_64, Tool::WasmOpt) => "x86_64-macos", (Os::MacOS, Arch::X86_64, _) => "x86_64-apple-darwin", + (Os::MacOS, Arch::AArch64, Tool::CargoGenerate) => "aarch64-apple-darwin", (Os::MacOS, Arch::AArch64, Tool::WasmOpt) => "arm64-macos", (Os::Windows, Arch::X86_64, Tool::WasmOpt) => "x86_64-windows", (Os::Windows, Arch::X86_64, _) => "x86_64-pc-windows-msvc", @@ -193,8 +194,7 @@ pub fn prebuilt_url_for(tool: &Tool, version: &str, arch: &Arch, os: &Os) -> Res Tool::CargoGenerate => { Ok(format!( "https://github.com/cargo-generate/cargo-generate/releases/download/v{0}/cargo-generate-v{0}-{1}.tar.gz", - // Krate::new(&Tool::CargoGenerate)?.max_version, - "0.5.1", // latest released binary [#907](https://github.com/rustwasm/wasm-pack/issues/907) + "0.17.3", target )) }, From 034c1036c2828b423957761409a50c2cdfe48c24 Mon Sep 17 00:00:00 2001 From: printfn Date: Tue, 10 Jan 2023 10:04:32 +0000 Subject: [PATCH 40/94] Bump binaryen to version 111 --- src/install/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/install/mod.rs b/src/install/mod.rs index d48fb07..c54f392 100644 --- a/src/install/mod.rs +++ b/src/install/mod.rs @@ -201,7 +201,7 @@ pub fn prebuilt_url_for(tool: &Tool, version: &str, arch: &Arch, os: &Os) -> Res Tool::WasmOpt => { Ok(format!( "https://github.com/WebAssembly/binaryen/releases/download/{vers}/binaryen-{vers}-{target}.tar.gz", - vers = "version_110", + vers = "version_111", target = target, )) } From f3043551f913de6a9be522c12db87f481b58acf9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 10 Jan 2023 22:25:35 +0000 Subject: [PATCH 41/94] chore(deps): bump bzip2 from 0.4.3 to 0.4.4 Bumps [bzip2](https://github.com/alexcrichton/bzip2-rs) from 0.4.3 to 0.4.4. - [Release notes](https://github.com/alexcrichton/bzip2-rs/releases) - [Commits](https://github.com/alexcrichton/bzip2-rs/commits/0.4.4) --- updated-dependencies: - dependency-name: bzip2 dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index cebccd6..c0c4e60 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -168,9 +168,9 @@ dependencies = [ [[package]] name = "bzip2" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6afcd980b5f3a45017c57e57a2fcccbb351cc43a356ce117ef760ef8052b89b0" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" dependencies = [ "bzip2-sys", "libc", From 2f10c0f47a94324388d279b2aa920b45800ee67b Mon Sep 17 00:00:00 2001 From: printfn Date: Sat, 14 Jan 2023 20:07:08 +0000 Subject: [PATCH 42/94] Use binary-install v0.1.0 --- Cargo.lock | 5 +++-- Cargo.toml | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 72a0101..b5b8125 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -122,8 +122,9 @@ checksum = "b645a089122eccb6111b4f81cbc1a49f5900ac4666bb93ac027feaecf15607bf" [[package]] name = "binary-install" -version = "0.0.3-alpha.1" -source = "git+https://github.com/rustwasm/binary-install?rev=6d60f6731c8294000ea8f3a0260659b025cf7f94#6d60f6731c8294000ea8f3a0260659b025cf7f94" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "803f66374c8ed72df7f69451751560fe4bd5681ec96e0e0a21457c30b46482c8" dependencies = [ "anyhow", "curl", diff --git a/Cargo.toml b/Cargo.toml index b3ff5e5..0d8482f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -33,7 +33,7 @@ siphasher = "0.3" structopt = "0.3" toml = "0.5" which = "4.3.0" -binary-install = { git = "https://github.com/rustwasm/binary-install", rev = "6d60f6731c8294000ea8f3a0260659b025cf7f94" } +binary-install = "0.1.0" walkdir = "2" chrono = "0.4.6" From a9b41053187f4b136f0cdebab66025dff03091a8 Mon Sep 17 00:00:00 2001 From: printfn Date: Sat, 14 Jan 2023 20:39:20 +0000 Subject: [PATCH 43/94] Bump dependencies --- Cargo.lock | 424 +++++++++++++++++++++++------------------------------ Cargo.toml | 58 ++++---- 2 files changed, 213 insertions(+), 269 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index b5b8125..d0b5a65 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,9 +4,9 @@ version = 3 [[package]] name = "addr2line" -version = "0.17.0" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9ecd88a8c8378ca913a680cd98f0f13ac67383d35993f86c90a70e3f137816b" +checksum = "a76fd60b23679b7d19bd066031410fb7e458ccc5e958eb5c325888ce4baedc97" dependencies = [ "gimli", ] @@ -31,9 +31,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "0.7.19" +version = "0.7.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4f55bd91a0978cbfd91c457a164bab8b4001c833b7f323132c0a4e1922dd44e" +checksum = "cc936419f96fa211c1b9166887b38e5e40b19958e5b895be7c1f93adec7071ac" dependencies = [ "memchr", ] @@ -58,15 +58,15 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.66" +version = "1.0.68" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "216261ddc8289130e551ddcd5ce8a064710c0d064a4d2895c67151c92b5443f6" +checksum = "2cb2f989d18dd141ab8ae82f64d1a8cdd37e0840f73a406896cf5e99502fab61" [[package]] name = "assert_cmd" -version = "2.0.5" +version = "2.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5c2ca00549910ec251e3bd15f87aeeb206c9456b9a77b43ff6c97c54042a472" +checksum = "9834fcc22e0874394a010230586367d4a3e9f11b560f469262678547e1d2575e" dependencies = [ "bstr", "doc-comment", @@ -82,7 +82,7 @@ version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ - "hermit-abi", + "hermit-abi 0.1.19", "libc", "winapi 0.3.9", ] @@ -95,9 +95,9 @@ checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" [[package]] name = "backtrace" -version = "0.3.66" +version = "0.3.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cab84319d616cfb654d03394f38ab7e6f0919e181b1b57e1fd15e7fb4077d9a7" +checksum = "233d376d6d185f2a3093e58f283f60f880315b6c60075b01f36b3b85154564ca" dependencies = [ "addr2line", "cc", @@ -155,13 +155,14 @@ dependencies = [ [[package]] name = "bstr" -version = "0.2.17" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" +checksum = "b45ea9b00a7b3f2988e9a65ad3917e62123c38dba709b666506207be96d1790b" dependencies = [ - "lazy_static 1.4.0", "memchr", + "once_cell", "regex-automata", + "serde", ] [[package]] @@ -178,15 +179,15 @@ checksum = "14c189c53d098945499cdfa7ecc63567cf3886b3332b312a5b4585d8d3a6a610" [[package]] name = "bytes" -version = "1.2.1" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec8a7b6a70fde80372154c65702f00a0f56f3e1c36abbc6c440484be248856db" +checksum = "dfb24e866b15a1af2a1b663f10c6b6b8f397a84aadb828f12e5b289ec23a3a3c" [[package]] name = "bzip2" -version = "0.4.3" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6afcd980b5f3a45017c57e57a2fcccbb351cc43a356ce117ef760ef8052b89b0" +checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" dependencies = [ "bzip2-sys", "libc", @@ -205,9 +206,9 @@ dependencies = [ [[package]] name = "camino" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ad0e1e3e88dd237a156ab9f571021b8a158caa0ae44b1968a241efb5144c1e" +checksum = "c77df041dc383319cc661b428b6961a005db4d6808d5e12536931b1ca9556055" dependencies = [ "serde", ] @@ -223,9 +224,9 @@ dependencies = [ [[package]] name = "cargo_metadata" -version = "0.15.1" +version = "0.15.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "406c859255d568f4f742b3146d51851f3bfd49f734a2c289d9107c4395ee0062" +checksum = "982a0cf6a99c350d7246035613882e376d58cebe571785abc5da4f648d53ac0a" dependencies = [ "camino", "cargo-platform", @@ -237,9 +238,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.0.73" +version = "1.0.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fff2a6927b3bb87f9595d67196a70493f627687a71d87a0d692242c33f58c11" +checksum = "a20104e2335ce8a659d6dd92a51a767a0c062599c73b343fd152cb401e828c3d" dependencies = [ "jobserver", ] @@ -252,15 +253,15 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" [[package]] name = "chrono" -version = "0.4.22" +version = "0.4.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfd4d1b31faaa3a89d7934dbded3111da0d2ef28e3ebccdb4f0179f5929d1ef1" +checksum = "16b0a3d9ed01224b22057780a37bb8c5dbfe1be8ba48678e7bf57ec4b385411f" dependencies = [ "iana-time-zone", "js-sys", "num-integer", "num-traits", - "time 0.1.44", + "time 0.1.45", "wasm-bindgen", "winapi 0.3.9", ] @@ -330,16 +331,15 @@ dependencies = [ [[package]] name = "console" -version = "0.15.2" +version = "0.15.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c050367d967ced717c04b65d8c619d863ef9292ce0c5760028655a2fb298718c" +checksum = "c9b6515d269224923b26b5febea2ed42b2d5f2ce37284a4dd670fedd6cb8347a" dependencies = [ "encode_unicode", "lazy_static 1.4.0", "libc", - "terminal_size", "unicode-width", - "winapi 0.3.9", + "windows-sys", ] [[package]] @@ -384,9 +384,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.12" +version = "0.8.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edbafec5fa1f196ca66527c1b12c2ec4745ca14b50f1ad8f9f6f720b55d11fac" +checksum = "4fb766fa798726286dbbb842f174001dab8abc7b627a1dd86e0b7222a95d929f" dependencies = [ "cfg-if", ] @@ -418,9 +418,9 @@ dependencies = [ [[package]] name = "curl-sys" -version = "0.4.58+curl-7.86.0" +version = "0.4.59+curl-7.86.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "430e2ecf0c5f4445334472cf8f9611a6eea404b4135ca5500f38a97a128c913e" +checksum = "6cfce34829f448b08f55b7db6d0009e23e2e86a34e8c2b366269bf5799b4a407" dependencies = [ "cc", "libc", @@ -433,9 +433,9 @@ dependencies = [ [[package]] name = "cxx" -version = "1.0.80" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b7d4e43b25d3c994662706a1d4fcfc32aaa6afd287502c111b237093bb23f3a" +checksum = "51d1075c37807dcf850c379432f0df05ba52cc30f279c5cfc43cc221ce7f8579" dependencies = [ "cc", "cxxbridge-flags", @@ -445,9 +445,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.80" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84f8829ddc213e2c1368e51a2564c552b65a8cb6a28f31e576270ac81d5e5827" +checksum = "5044281f61b27bc598f2f6647d480aed48d2bf52d6eb0b627d84c0361b17aa70" dependencies = [ "cc", "codespan-reporting", @@ -460,15 +460,15 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.80" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e72537424b474af1460806647c41d4b6d35d09ef7fe031c5c2fa5766047cc56a" +checksum = "61b50bc93ba22c27b0d31128d2d130a0a6b3d267ae27ef7e4fae2167dfe8781c" [[package]] name = "cxxbridge-macro" -version = "1.0.80" +version = "1.0.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "309e4fb93eed90e1e14bea0da16b209f81813ba9fc7830c20ed151dd7bc0a4d7" +checksum = "39e61fda7e62115119469c7b3591fd913ecca96fb766cfd3f2e2502ab7bc87a5" dependencies = [ "proc-macro2", "quote", @@ -494,7 +494,7 @@ version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a92e7e37ecef6857fdc0c0c5d42fd5b0938e46590c2183cc92dd310a6d078eb1" dependencies = [ - "console 0.15.2", + "console 0.15.4", "tempfile", "zeroize", ] @@ -507,9 +507,9 @@ checksum = "6184e33543162437515c2e2b48714794e37845ec9851711914eec9d308f6ebe8" [[package]] name = "digest" -version = "0.10.5" +version = "0.10.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adfbc57365a37acbd2ebf2b64d7e69bb766e2fea813521ed536f5d0520dcf86c" +checksum = "8168378f4e5023e7218c89c891c0fd8ecdb5e5e4f18cb78f38cf245dd021e76f" dependencies = [ "block-buffer", "crypto-common", @@ -566,9 +566,9 @@ dependencies = [ [[package]] name = "env_logger" -version = "0.9.1" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c90bf5f19754d10198ccb95b70664fc925bd1fc090a0fd9a6ebc54acc8cd6272" +checksum = "85cdab6a89accf66733ad5a1693a4dcced6aeff64602b634530dd73c1f3ee9f0" dependencies = [ "log", ] @@ -584,21 +584,21 @@ dependencies = [ [[package]] name = "filetime" -version = "0.2.18" +version = "0.2.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b9663d381d07ae25dc88dbdf27df458faa83a9b25336bcac83d5e452b5fc9d3" +checksum = "4e884668cd0c7480504233e951174ddc3b382f7c2666e3b7310b5c4e7b0c37f9" dependencies = [ "cfg-if", "libc", "redox_syscall", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] name = "flate2" -version = "1.0.24" +version = "1.0.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f82b0f4c27ad9f8bfd1f3208d882da2b09c301bc1c828fd3a00d0216d2fbbff6" +checksum = "a8a2db397cb1c8772f31494cb8917e48cd1e64f0fa7efac59fbd741a0a8ce841" dependencies = [ "crc32fast", "miniz_oxide", @@ -753,15 +753,15 @@ dependencies = [ [[package]] name = "gimli" -version = "0.26.2" +version = "0.27.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22030e2c5a68ec659fde1e949a745124b48e6fa8b045b7ed5bd1fe4ccc5c4e5d" +checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" [[package]] name = "glob" -version = "0.3.0" +version = "0.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574" +checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" [[package]] name = "h2" @@ -806,6 +806,15 @@ dependencies = [ "libc", ] +[[package]] +name = "hermit-abi" +version = "0.2.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ee512640fe35acbfb4bb779db6f0d80704c2cacfa2e39b601ef3e3f47d1ae4c7" +dependencies = [ + "libc", +] + [[package]] name = "hex" version = "0.4.3" @@ -872,9 +881,9 @@ dependencies = [ [[package]] name = "hyper" -version = "0.14.20" +version = "0.14.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c929dc5c39e335a03c405292728118860721b10190d98c2a0f0efd5baafbac" +checksum = "034711faac9d2166cb1baf1a2fb0b60b1f277f8492fd72176c17f3515e1abd3c" dependencies = [ "bytes", "futures-channel", @@ -943,9 +952,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.9.1" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10a35a97730320ffe8e2d410b5d3b69279b98d2c14bdb8b70ea89ecf7888d41e" +checksum = "1885e79c1fc4b10f0e172c475f458b7f7b93061064d98c3293e98c5ba0c8b399" dependencies = [ "autocfg", "hashbrown", @@ -962,9 +971,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.5.0" +version = "2.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "879d54834c8c76457ef4293a689b2a8c59b076067ad77b15efafbb05f92a592b" +checksum = "30e22bd8629359895450b59ea7a776c850561b96a3b1d31321c1949d9e6c9146" [[package]] name = "is_executable" @@ -986,9 +995,9 @@ dependencies = [ [[package]] name = "itoa" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4217ad341ebadf8d8e724e264f13e593e0648f5b3e94b3896a5df283be015ecc" +checksum = "fad582f4b9e86b6caa621cabeb0963332d92eea04729ab12892c2533951e6440" [[package]] name = "jobserver" @@ -1032,9 +1041,9 @@ checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" [[package]] name = "libc" -version = "0.2.137" +version = "0.2.139" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc7fcc620a3bff7cdd7a365be3376c97191aeaccc2a603e600951e452615bf89" +checksum = "201de327520df007757c1f0adce6e827fe8562fbc28bfd9c15571c66ca1f5f79" [[package]] name = "libz-sys" @@ -1050,9 +1059,9 @@ dependencies = [ [[package]] name = "link-cplusplus" -version = "1.0.7" +version = "1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9272ab7b96c9046fbc5bc56c06c117cb639fe2d509df0c421cad82d2915cf369" +checksum = "ecd207c9c713c34f95a097a5b029ac2ce6010530c7b49d7fea24d977dede04f5" dependencies = [ "cc", ] @@ -1090,9 +1099,9 @@ checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" [[package]] name = "miniz_oxide" -version = "0.5.4" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96590ba8f175222643a85693f33d26e9c8a015f599c216509b1a6894af675d34" +checksum = "b275950c28b37e794e8c55d88aeb5e139d0ce23fdbbeda68f8d7174abdf9e8fa" dependencies = [ "adler", ] @@ -1106,14 +1115,14 @@ dependencies = [ "libc", "log", "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] name = "native-tls" -version = "0.2.10" +version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd7e2f3618557f980e0b17e8856252eee3c97fa12c54dff0ca290fb6266ca4a9" +checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ "lazy_static 1.4.0", "libc", @@ -1154,37 +1163,28 @@ dependencies = [ [[package]] name = "num_cpus" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19e64526ebdee182341572e50e9ad03965aa510cd94427a4549448f285e957a1" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "num_threads" -version = "0.1.6" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2819ce041d2ee131036f4fc9d6ae7ae125a3a40e97ba64d04fe799ad9dabbb44" +checksum = "0fac9e2da13b5eb447a6ce3d392f23a29d8694bff781bf03a16cd9ac8697593b" dependencies = [ + "hermit-abi 0.2.6", "libc", ] [[package]] name = "object" -version = "0.29.0" +version = "0.30.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21158b2c33aa6d4561f1c0a6ea283ca92bc54802a93b263e910746d679a7eb53" +checksum = "2b8c786513eb403643f2a88c244c2aaa270ef2153f55094587d0c48a3cf22a83" dependencies = [ "memchr", ] [[package]] name = "once_cell" -version = "1.15.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e82dad04139b71a90c080c8463fe0dc7902db5192d939bd0950f074d014339e1" +checksum = "6f61fba1741ea2b3d6a1e3178721804bb716a68a6aeba1149b5d52e3d464ea66" [[package]] name = "opaque-debug" @@ -1194,9 +1194,9 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.42" +version = "0.10.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12fc0523e3bd51a692c8850d075d74dc062ccf251c0110668cbd921917118a13" +checksum = "b102428fd03bc5edf97f62620f7298614c45cedf287c271e7ed450bbaf83f2e1" dependencies = [ "bitflags", "cfg-if", @@ -1226,18 +1226,18 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "111.22.0+1.1.1q" +version = "111.24.0+1.1.1s" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f31f0d509d1c1ae9cada2f9539ff8f37933831fd5098879e482aa687d659853" +checksum = "3498f259dab01178c6228c6b00dcef0ed2a2d5e20d648c017861227773ea4abd" dependencies = [ "cc", ] [[package]] name = "openssl-sys" -version = "0.9.77" +version = "0.9.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b03b84c3b2d099b81f0953422b4d4ad58761589d0229b5506356afca05a3670a" +checksum = "23bbbf7854cd45b83958ebe919f0e8e516793727652e27fda10a8384cfc790b7" dependencies = [ "autocfg", "cc", @@ -1268,15 +1268,15 @@ dependencies = [ [[package]] name = "parking_lot_core" -version = "0.9.4" +version = "0.9.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dc9e0dc2adc1c69d09143aff38d3d30c5c3f0df0dad82e6d25547af174ebec0" +checksum = "ba1ef8814b5c993410bb3adfad7a5ed269563e4a2f90c41f5d85be7fb47133bf" dependencies = [ "cfg-if", "libc", "redox_syscall", "smallvec", - "windows-sys 0.42.0", + "windows-sys", ] [[package]] @@ -1328,9 +1328,9 @@ checksum = "6ac9a59f73473f1b8d852421e59e64809f025994837ef743615c6d0c5b305160" [[package]] name = "predicates" -version = "2.1.1" +version = "2.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5aab5be6e4732b473071984b3164dbbfb7a3674d30ea5ff44410b6bcd960c3c" +checksum = "59230a63c37f3e18569bdb90e4a89cbf5bf8b06fea0b84e65ea10cc4df47addd" dependencies = [ "difflib", "float-cmp", @@ -1342,15 +1342,15 @@ dependencies = [ [[package]] name = "predicates-core" -version = "1.0.3" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da1c2388b1513e1b605fcec39a95e0a9e8ef088f71443ef37099fa9ae6673fcb" +checksum = "72f883590242d3c6fc5bf50299011695fa6590c2c70eac95ee1bdb9a733ad1a2" [[package]] name = "predicates-tree" -version = "1.0.5" +version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d86de6de25020a36c6d3643a86d9a6a9f552107c0559c60ea03551b5e16c032" +checksum = "54ff541861505aabf6ea722d2131ee980b8276e10a1297b94e896dd8b621850d" dependencies = [ "predicates-core", "termtree", @@ -1382,18 +1382,18 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.47" +version = "1.0.49" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ea3d908b0e36316caf9e9e2c4625cdde190a7e6f440d794667ed17a1855e725" +checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.21" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbe448f377a7d6961e30f5955f9b8d106c3f5e449d493ee1b125c1d43c2b5179" +checksum = "8856d8364d252a14d474036ea1358d63c9e6965c8e5c1885c18f73d70bff9c7b" dependencies = [ "proc-macro2", ] @@ -1426,9 +1426,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c4eb3267174b8c6c2f654116623910a0fef09c4753f8dd83db29c48a0df988b" +checksum = "48aaa5748ba571fb95cd2c85c09f629215d3a6ece942baa100950af03a34f733" dependencies = [ "aho-corasick", "memchr", @@ -1443,9 +1443,9 @@ checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" [[package]] name = "regex-syntax" -version = "0.6.27" +version = "0.6.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f87b73ce11b1619a3c6332f45341e0047173771e8b8b73f87bfeefb7b56244" +checksum = "456c603be3e8d448b072f410900c09faf164fbce2d480456f50eea6e25f9c848" [[package]] name = "remove_dir_all" @@ -1458,9 +1458,9 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.12" +version = "0.11.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "431949c384f4e2ae07605ccaa56d1d9d2ecdb5cadd4f9577ccfab29f2e5149fc" +checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c" dependencies = [ "base64", "bytes", @@ -1501,9 +1501,9 @@ checksum = "7ef03e0a2b150c7a90d01faf6254c9c48a41e95fb2a8c2ac1c6f0d2b9aefc342" [[package]] name = "ryu" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4501abdff3ae82a1c1b477a17252eb69cee9e66eb915c1abaa4f44d873df9f09" +checksum = "7b4b9743ed687d4b4bcedf9ff5eaa7398495ae14e61cba0a295704edbc7decde" [[package]] name = "same-file" @@ -1516,12 +1516,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.20" +version = "0.1.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88d6731146462ea25d9244b2ed5fd1d716d25c52e4d54aa4fb0f3c4e9854dbe2" +checksum = "713cfb06c7059f3588fb8044c0fad1d09e3c01d225e25b9220dbfdcf16dbb1b3" dependencies = [ - "lazy_static 1.4.0", - "windows-sys 0.36.1", + "windows-sys", ] [[package]] @@ -1532,9 +1531,9 @@ checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] name = "scratch" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8132065adcfd6e02db789d9285a0deb2f3fcb04002865ab67d5fb103533898" +checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" [[package]] name = "security-framework" @@ -1561,27 +1560,27 @@ dependencies = [ [[package]] name = "semver" -version = "1.0.14" +version = "1.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e25dfac463d778e353db5be2449d1cce89bd6fd23c9f1ea21310ce6e5a1b29c4" +checksum = "58bc9567378fc7690d6b2addae4e60ac2eeea07becb2c64b9f218b53865cba2a" dependencies = [ "serde", ] [[package]] name = "serde" -version = "1.0.147" +version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d193d69bae983fc11a79df82342761dfbf28a99fc8d203dca4c3c1b590948965" +checksum = "bb7d1f0d3021d347a83e556fc4683dea2ea09d87bccdf88ff5c12545d89d5efb" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.147" +version = "1.0.152" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f1d362ca8fc9c3e3a7484440752472d68a6caa98f1ab81d99b5dfe517cec852" +checksum = "af487d118eecd09402d70a5d72551860e788df87b464af30e5ea6a38c75c541e" dependencies = [ "proc-macro2", "quote", @@ -1590,18 +1589,18 @@ dependencies = [ [[package]] name = "serde_ignored" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82b3da7eedd967647a866f67829d1c79d184d7c4521126e9cc2c46a9585c6d21" +checksum = "94eb4a4087ba8bdf14a9208ac44fddbf55c01a6195f7edfc511ddaff6cae45a6" dependencies = [ "serde", ] [[package]] name = "serde_json" -version = "1.0.87" +version = "1.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce777b7b150d76b9cf60d28b55f5847135a003f7d7350c6be7a773508ce7d45" +checksum = "877c235533714907a8c2464236f5c4b2a17262ef1bd71f38f35ea592c8da6883" dependencies = [ "itoa", "ryu", @@ -1622,9 +1621,9 @@ dependencies = [ [[package]] name = "serial_test" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92761393ee4dc3ff8f4af487bd58f4307c9329bbedea02cac0089ad9c411e153" +checksum = "1c789ec87f4687d022a2405cf46e0cd6284889f1839de292cadeb6c6019506f2" dependencies = [ "dashmap", "futures", @@ -1636,11 +1635,10 @@ dependencies = [ [[package]] name = "serial_test_derive" -version = "0.9.0" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b6f5d1c3087fb119617cff2966fe3808a80e5eb59a8c1601d5994d66f4346a5" +checksum = "b64f9e531ce97c88b4778aad0ceee079216071cffec6ac9b904277f8f92e7fe3" dependencies = [ - "proc-macro-error", "proc-macro2", "quote", "syn", @@ -1743,9 +1741,9 @@ checksum = "6bdef32e8150c2a081110b42772ffe7d7c9032b606bc226c8260fd97e0976601" [[package]] name = "syn" -version = "1.0.103" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a864042229133ada95abf3b54fdc62ef5ccabe9515b64717bcb9a1919e59445d" +checksum = "1f4064b5b16e03ae50984a5a8ed5d4f8803e6bc1fd170a3cda91a1be4b18e3f5" dependencies = [ "proc-macro2", "quote", @@ -1786,16 +1784,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "terminal_size" -version = "0.1.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df" -dependencies = [ - "libc", - "winapi 0.3.9", -] - [[package]] name = "termios" version = "0.3.3" @@ -1807,9 +1795,9 @@ dependencies = [ [[package]] name = "termtree" -version = "0.2.4" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "507e9898683b6c43a9aa55b64259b721b52ba226e0f3779137e50ad114a4c90b" +checksum = "95059e91184749cb66be6dc994f67f182b6d897cb3df74a5bf66b5e709295fd8" [[package]] name = "textwrap" @@ -1822,18 +1810,18 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10deb33631e3c9018b9baf9dcbbc4f737320d2b576bac10f6aefa048fa407e3e" +checksum = "6a9cd18aa97d5c45c6603caea1da6628790b37f7a34b6ca89522331c5180fed0" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "982d17546b47146b28f7c22e3d08465f6b8903d0ea13c1660d9d84a6e7adcdbb" +checksum = "1fb327af4685e4d03fa8cbcf1716380da910eeb2bb8be417e7f9fd3fb164f36f" dependencies = [ "proc-macro2", "quote", @@ -1842,9 +1830,9 @@ dependencies = [ [[package]] name = "time" -version = "0.1.44" +version = "0.1.45" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255" +checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" dependencies = [ "libc", "wasi 0.10.0+wasi-snapshot-preview1", @@ -1853,13 +1841,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.16" +version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fab5c8b9980850e06d92ddbe3ab839c062c801f3927c0fb8abd6fc8e918fbca" +checksum = "a561bf4617eebd33bca6434b988f39ed798e527f51a1e797d0ee4f61c0a38376" dependencies = [ "itoa", - "libc", - "num_threads", "serde", "time-core", "time-macros", @@ -1873,9 +1859,9 @@ checksum = "2e153e1f1acaef8acc537e68b44906d2db6436e2b35ac2c6b42640fff91f00fd" [[package]] name = "time-macros" -version = "0.2.5" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65bb801831d812c562ae7d2bfb531f26e66e4e1f6b17307ba4149c5064710e5b" +checksum = "d967f99f534ca7e495c575c62638eebc2898a8c84c119b89e250477bc4ba16b2" dependencies = [ "time-core", ] @@ -1897,9 +1883,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.21.2" +version = "1.24.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e03c497dc955702ba729190dc4aac6f2a0ce97f913e5b1b5912fc5039d9099" +checksum = "1d9f76183f91ecfb55e1d7d5602bd1d979e38a3a522fe900241cf195624d67ae" dependencies = [ "autocfg", "bytes", @@ -1909,7 +1895,7 @@ dependencies = [ "num_cpus", "pin-project-lite", "socket2", - "winapi 0.3.9", + "windows-sys", ] [[package]] @@ -1938,9 +1924,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.9" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82e1a7758622a465f8cee077614c73484dac5b836c02ff6a40d5d1010324d7" +checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" dependencies = [ "serde", ] @@ -1973,15 +1959,15 @@ dependencies = [ [[package]] name = "try-lock" -version = "0.2.3" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59547bce71d9c38b83d9c0e92b6066c4253371f15005def0c30d9657f50c7642" +checksum = "3528ecfd12c466c6f163363caf2d02a71161dd5e1cc6ae7b34207ea2d42d81ed" [[package]] name = "typenum" -version = "1.15.0" +version = "1.16.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcf81ac59edc17cc8697ff311e8f5ef2d99fcbd9817b34cec66f90b6c3dfd987" +checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "unicode-bidi" @@ -1991,9 +1977,9 @@ checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" [[package]] name = "unicode-ident" -version = "1.0.5" +version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ceab39d59e4c9499d4e5a8ee0e2735b891bb7308ac83dfb4e80cad195c9f6f3" +checksum = "84a22b9f218b40614adcb3f4ff08b703773ad44fa9423e4e0d346d5db86e4ebc" [[package]] name = "unicode-normalization" @@ -2263,19 +2249,6 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-sys" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea04155a16a59f9eab786fe12a4a450e75cdb175f9e0d80da1e17db09f55b8d2" -dependencies = [ - "windows_aarch64_msvc 0.36.1", - "windows_i686_gnu 0.36.1", - "windows_i686_msvc 0.36.1", - "windows_x86_64_gnu 0.36.1", - "windows_x86_64_msvc 0.36.1", -] - [[package]] name = "windows-sys" version = "0.42.0" @@ -2283,85 +2256,55 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5a3e1820f08b8513f676f7ab6c1f99ff312fb97b553d30ff4dd86f9f15728aa7" dependencies = [ "windows_aarch64_gnullvm", - "windows_aarch64_msvc 0.42.0", - "windows_i686_gnu 0.42.0", - "windows_i686_msvc 0.42.0", - "windows_x86_64_gnu 0.42.0", + "windows_aarch64_msvc", + "windows_i686_gnu", + "windows_i686_msvc", + "windows_x86_64_gnu", "windows_x86_64_gnullvm", - "windows_x86_64_msvc 0.42.0", + "windows_x86_64_msvc", ] [[package]] name = "windows_aarch64_gnullvm" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d2aa71f6f0cbe00ae5167d90ef3cfe66527d6f613ca78ac8024c3ccab9a19e" +checksum = "8c9864e83243fdec7fc9c5444389dcbbfd258f745e7853198f365e3c4968a608" [[package]] name = "windows_aarch64_msvc" -version = "0.36.1" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bb8c3fd39ade2d67e9874ac4f3db21f0d710bee00fe7cab16949ec184eeaa47" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd0f252f5a35cac83d6311b2e795981f5ee6e67eb1f9a7f64eb4500fbc4dcdb4" +checksum = "4c8b1b673ffc16c47a9ff48570a9d85e25d265735c503681332589af6253c6c7" [[package]] name = "windows_i686_gnu" -version = "0.36.1" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "180e6ccf01daf4c426b846dfc66db1fc518f074baa793aa7d9b9aaeffad6a3b6" - -[[package]] -name = "windows_i686_gnu" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbeae19f6716841636c28d695375df17562ca208b2b7d0dc47635a50ae6c5de7" - -[[package]] -name = "windows_i686_msvc" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e7917148b2812d1eeafaeb22a97e4813dfa60a3f8f78ebe204bcc88f12f024" +checksum = "de3887528ad530ba7bdbb1faa8275ec7a1155a45ffa57c37993960277145d640" [[package]] name = "windows_i686_msvc" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "84c12f65daa39dd2babe6e442988fc329d6243fdce47d7d2d155b8d874862246" +checksum = "bf4d1122317eddd6ff351aa852118a2418ad4214e6613a50e0191f7004372605" [[package]] name = "windows_x86_64_gnu" -version = "0.36.1" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dcd171b8776c41b97521e5da127a2d86ad280114807d0b2ab1e462bc764d9e1" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf7b1b21b5362cbc318f686150e5bcea75ecedc74dd157d874d754a2ca44b0ed" +checksum = "c1040f221285e17ebccbc2591ffdc2d44ee1f9186324dd3e84e99ac68d699c45" [[package]] name = "windows_x86_64_gnullvm" -version = "0.42.0" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09d525d2ba30eeb3297665bd434a54297e4170c7f1a44cad4ef58095b4cd2028" +checksum = "628bfdf232daa22b0d64fdb62b09fcc36bb01f05a3939e20ab73aaf9470d0463" [[package]] name = "windows_x86_64_msvc" -version = "0.36.1" +version = "0.42.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c811ca4a8c853ef420abd8592ba53ddbbac90410fab6903b3e79972a631f7680" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.42.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40009d85759725a34da6d89a94e63d7bdc50a862acf0dbc7c8e488f1edcb6f5" +checksum = "447660ad36a13288b1db4d4248e857b510e8c3a225c822ba4fb748c0aafecffd" [[package]] name = "winreg" @@ -2403,7 +2346,7 @@ dependencies = [ "hmac", "pbkdf2", "sha1", - "time 0.3.16", + "time 0.3.17", "zstd", ] @@ -2428,10 +2371,11 @@ dependencies = [ [[package]] name = "zstd-sys" -version = "2.0.1+zstd.1.5.2" +version = "2.0.5+zstd.1.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fd07cbbc53846d9145dbffdf6dd09a7a0aa52be46741825f5c97bdd4f73f12b" +checksum = "edc50ffce891ad571e9f9afe5039c4837bede781ac4bb13052ed7ae695518596" dependencies = [ "cc", "libc", + "pkg-config", ] diff --git a/Cargo.toml b/Cargo.toml index 0d8482f..d7be18d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -10,39 +10,39 @@ categories = ["wasm"] documentation = "https://rustwasm.github.io/wasm-pack/" [dependencies] -anyhow = "1.0.66" -atty = "0.2.11" -cargo_metadata = "0.15" -console = "0.6.1" -dialoguer = "0.10" -curl = "0.4.13" -env_logger = { version = "0.9", default-features = false } -human-panic = "1.0.1" -glob = "0.3" -log = "0.4.6" -openssl = { version = '0.10.11', optional = true } -parking_lot = "0.12" -reqwest = { version = "0.11.12", features = ["blocking"] } -semver = "1" -serde = "1.0.74" -serde_derive = "1.0.74" -serde_ignored = "0.1" -serde_json = "1.0.26" -strsim = "0.10" -siphasher = "0.3" -structopt = "0.3" -toml = "0.5" +anyhow = "1.0.68" +atty = "0.2.14" +cargo_metadata = "0.15.2" +console = "0.6.2" +dialoguer = "0.10.2" +curl = "0.4.44" +env_logger = { version = "0.10.0", default-features = false } +human-panic = "1.0.3" +glob = "0.3.1" +log = "0.4.17" +openssl = { version = '0.10.45', optional = true } +parking_lot = "0.12.1" +reqwest = { version = "0.11.13", features = ["blocking"] } +semver = "1.0.16" +serde = "1.0.152" +serde_derive = "1.0.152" +serde_ignored = "0.1.7" +serde_json = "1.0.91" +strsim = "0.10.0" +siphasher = "0.3.10" +structopt = "0.3.26" +toml = "0.5.10" which = "4.3.0" binary-install = "0.1.0" -walkdir = "2" -chrono = "0.4.6" +walkdir = "2.3.2" +chrono = "0.4.23" [dev-dependencies] -assert_cmd = "2" -lazy_static = "1.1.0" -predicates = "2" -serial_test = "0.9" -tempfile = "3" +assert_cmd = "2.0.8" +lazy_static = "1.4.0" +predicates = "2.1.5" +serial_test = "0.10.0" +tempfile = "3.3.0" [features] # OpenSSL is vendored by default, can use system OpenSSL through feature flag. From ce3d172769c9a1514d14e3079f2bec74f57f7ee6 Mon Sep 17 00:00:00 2001 From: printfn Date: Sat, 14 Jan 2023 20:48:49 +0000 Subject: [PATCH 44/94] Fix SPDX license syntax --- Cargo.toml | 2 +- .../npm-browser-packages/getting-started/manual-setup.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index d7be18d..ca44075 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ description = "📦✨ your favorite rust -> wasm workflow tool!" version = "0.10.3" authors = ["Ashley Williams ", "Jesper Håkansson "] repository = "https://github.com/rustwasm/wasm-pack.git" -license = "MIT/Apache-2.0" +license = "MIT OR Apache-2.0" readme = "README.md" categories = ["wasm"] documentation = "https://rustwasm.github.io/wasm-pack/" diff --git a/docs/src/tutorials/npm-browser-packages/getting-started/manual-setup.md b/docs/src/tutorials/npm-browser-packages/getting-started/manual-setup.md index 25636dc..5daf43f 100644 --- a/docs/src/tutorials/npm-browser-packages/getting-started/manual-setup.md +++ b/docs/src/tutorials/npm-browser-packages/getting-started/manual-setup.md @@ -44,7 +44,7 @@ name = "hello-wasm" version = "0.1.0" authors = ["Ashley Williams "] description = "babby's first wasm package" -license = "MIT/Apache-2.0" +license = "MIT OR Apache-2.0" repository = "https://github.com/ashleygwilliams/hello-wasm" [lib] From b9b38890cf47074417c76b6d19f08a2682f4207b Mon Sep 17 00:00:00 2001 From: printfn Date: Sat, 14 Jan 2023 20:56:41 +0000 Subject: [PATCH 45/94] Update to Rust 2021 --- Cargo.toml | 1 + src/bindgen.rs | 8 ++++---- src/build/mod.rs | 10 +++++----- src/build/wasm_target.rs | 6 +++--- src/child.rs | 2 +- src/command/build.rs | 22 +++++++++++----------- src/command/generate.rs | 8 ++++---- src/command/login.rs | 4 ++-- src/command/pack.rs | 6 +++--- src/command/publish/mod.rs | 8 ++++---- src/command/test.rs | 14 +++++++------- src/generate.rs | 6 +++--- src/install/krate.rs | 2 +- src/install/mod.rs | 8 ++++---- src/lib.rs | 2 +- src/license.rs | 4 ++-- src/lockfile.rs | 2 +- src/manifest/mod.rs | 4 ++-- src/manifest/npm/commonjs.rs | 2 +- src/manifest/npm/esmodules.rs | 2 +- src/manifest/npm/nomodules.rs | 2 +- src/npm.rs | 4 ++-- src/progressbar.rs | 2 +- src/readme.rs | 2 +- src/test/mod.rs | 2 +- src/test/webdriver.rs | 2 +- src/test/webdriver/chromedriver.rs | 6 +++--- src/test/webdriver/geckodriver.rs | 6 +++--- tests/all/build.rs | 2 +- tests/all/generate.rs | 2 +- tests/all/license.rs | 2 +- tests/all/lockfile.rs | 2 +- tests/all/log_level.rs | 2 +- tests/all/manifest.rs | 2 +- tests/all/readme.rs | 2 +- tests/all/test.rs | 2 +- tests/all/wasm_opt.rs | 2 +- tests/all/webdriver.rs | 2 +- 38 files changed, 84 insertions(+), 83 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ca44075..2f43ab3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,6 +5,7 @@ version = "0.10.3" authors = ["Ashley Williams ", "Jesper Håkansson "] repository = "https://github.com/rustwasm/wasm-pack.git" license = "MIT OR Apache-2.0" +edition = "2021" readme = "README.md" categories = ["wasm"] documentation = "https://rustwasm.github.io/wasm-pack/" diff --git a/src/bindgen.rs b/src/bindgen.rs index db0342f..441ae25 100644 --- a/src/bindgen.rs +++ b/src/bindgen.rs @@ -1,10 +1,10 @@ //! Functionality related to running `wasm-bindgen`. +use crate::child; +use crate::command::build::{BuildProfile, Target}; +use crate::install::{self, Tool}; +use crate::manifest::CrateData; use anyhow::{bail, Context, Result}; -use child; -use command::build::{BuildProfile, Target}; -use install::{self, Tool}; -use manifest::CrateData; use semver; use std::path::Path; use std::process::Command; diff --git a/src/build/mod.rs b/src/build/mod.rs index a49432e..691ec49 100644 --- a/src/build/mod.rs +++ b/src/build/mod.rs @@ -1,14 +1,14 @@ //! Building a Rust crate into a `.wasm` binary. +use crate::child; +use crate::command::build::BuildProfile; +use crate::emoji; +use crate::manifest::Crate; +use crate::PBAR; use anyhow::{bail, Context, Result}; -use child; -use command::build::BuildProfile; -use emoji; -use manifest::Crate; use std::path::Path; use std::process::Command; use std::str; -use PBAR; pub mod wasm_target; diff --git a/src/build/wasm_target.rs b/src/build/wasm_target.rs index 6105470..8631086 100644 --- a/src/build/wasm_target.rs +++ b/src/build/wasm_target.rs @@ -1,13 +1,13 @@ //! Checking for the wasm32 target +use crate::child; +use crate::emoji; +use crate::PBAR; use anyhow::{anyhow, bail, Context, Result}; -use child; -use emoji; use log::info; use std::fmt; use std::path::{Path, PathBuf}; use std::process::Command; -use PBAR; struct Wasm32Check { rustc_path: PathBuf, diff --git a/src/child.rs b/src/child.rs index 742a186..7b8a58c 100644 --- a/src/child.rs +++ b/src/child.rs @@ -3,8 +3,8 @@ //! This module helps us ensure that all child processes that we spawn get //! properly logged and their output is logged as well. +use crate::install::Tool; use anyhow::{bail, Result}; -use install::Tool; use log::info; use std::process::{Command, Stdio}; diff --git a/src/command/build.rs b/src/command/build.rs index c1b63c4..4447e34 100644 --- a/src/command/build.rs +++ b/src/command/build.rs @@ -1,25 +1,25 @@ //! Implementation of the `wasm-pack build` command. +use crate::bindgen; +use crate::build; +use crate::cache; +use crate::command::utils::{create_pkg_dir, get_crate_path}; +use crate::emoji; +use crate::install::{self, InstallMode, Tool}; +use crate::license; +use crate::lockfile::Lockfile; +use crate::manifest; +use crate::readme; use crate::wasm_opt; +use crate::PBAR; use anyhow::{anyhow, bail, Error, Result}; use binary_install::Cache; -use bindgen; -use build; -use cache; -use command::utils::{create_pkg_dir, get_crate_path}; -use emoji; -use install::{self, InstallMode, Tool}; -use license; -use lockfile::Lockfile; use log::info; -use manifest; -use readme; use std::fmt; use std::path::PathBuf; use std::str::FromStr; use std::time::Instant; use structopt::clap::AppSettings; -use PBAR; /// Everything required to configure and run the `wasm-pack build` command. #[allow(missing_docs)] diff --git a/src/command/generate.rs b/src/command/generate.rs index 2f72186..609a0b5 100644 --- a/src/command/generate.rs +++ b/src/command/generate.rs @@ -1,9 +1,9 @@ +use crate::cache; +use crate::generate; +use crate::install::{self, Tool}; +use crate::PBAR; use anyhow::Result; -use cache; -use generate; -use install::{self, Tool}; use log::info; -use PBAR; /// Executes the 'cargo-generate' command in the current directory /// which generates a new rustwasm project from a template. diff --git a/src/command/login.rs b/src/command/login.rs index f24156d..817ae16 100644 --- a/src/command/login.rs +++ b/src/command/login.rs @@ -1,7 +1,7 @@ +use crate::npm; +use crate::PBAR; use anyhow::Result; use log::info; -use npm; -use PBAR; pub fn login( registry: Option, diff --git a/src/command/pack.rs b/src/command/pack.rs index 6b3da04..2c89108 100644 --- a/src/command/pack.rs +++ b/src/command/pack.rs @@ -1,9 +1,9 @@ +use crate::command::utils::{find_pkg_directory, get_crate_path}; +use crate::npm; +use crate::PBAR; use anyhow::{anyhow, Result}; -use command::utils::{find_pkg_directory, get_crate_path}; use log::info; -use npm; use std::path::PathBuf; -use PBAR; /// Executes the 'npm pack' command on the 'pkg' directory /// which creates a tarball that can be published to the NPM registry diff --git a/src/command/publish/mod.rs b/src/command/publish/mod.rs index 8d0374a..92c6f3f 100644 --- a/src/command/publish/mod.rs +++ b/src/command/publish/mod.rs @@ -2,15 +2,15 @@ pub mod access; use self::access::Access; +use crate::command::build::{Build, BuildOptions, Target}; +use crate::command::utils::{find_pkg_directory, get_crate_path}; +use crate::npm; +use crate::PBAR; use anyhow::{anyhow, bail, Result}; -use command::build::{Build, BuildOptions, Target}; -use command::utils::{find_pkg_directory, get_crate_path}; use dialoguer::{Confirm, Input, Select}; use log::info; -use npm; use std::path::PathBuf; use std::str::FromStr; -use PBAR; /// Creates a tarball from a 'pkg' directory /// and publishes it to the NPM registry diff --git a/src/command/test.rs b/src/command/test.rs index 8fc0a85..eed92eb 100644 --- a/src/command/test.rs +++ b/src/command/test.rs @@ -1,20 +1,20 @@ //! Implementation of the `wasm-pack test` command. +use crate::build; +use crate::cache; +use crate::command::utils::get_crate_path; +use crate::install::{self, InstallMode, Tool}; +use crate::lockfile::Lockfile; +use crate::manifest; +use crate::test::{self, webdriver}; use anyhow::{bail, Result}; use binary_install::Cache; -use build; -use cache; -use command::utils::get_crate_path; use console::style; -use install::{self, InstallMode, Tool}; -use lockfile::Lockfile; use log::info; -use manifest; use std::path::PathBuf; use std::str::FromStr; use std::time::Instant; use structopt::clap::AppSettings; -use test::{self, webdriver}; #[derive(Debug, Default, StructOpt)] #[structopt( diff --git a/src/generate.rs b/src/generate.rs index 552618f..660f123 100644 --- a/src/generate.rs +++ b/src/generate.rs @@ -1,9 +1,9 @@ //! Functionality related to running `cargo-generate`. +use crate::child; +use crate::emoji; +use crate::install::{self, Tool}; use anyhow::{Context, Result}; -use child; -use emoji; -use install::{self, Tool}; use std::process::Command; /// Run `cargo generate` in the current directory to create a new diff --git a/src/install/krate.rs b/src/install/krate.rs index 321b74b..4ac2fac 100644 --- a/src/install/krate.rs +++ b/src/install/krate.rs @@ -1,5 +1,5 @@ +use crate::install::Tool; use anyhow::Result; -use install::Tool; use serde::Deserialize; #[derive(Debug, Deserialize)] diff --git a/src/install/mod.rs b/src/install/mod.rs index c54f392..6debacc 100644 --- a/src/install/mod.rs +++ b/src/install/mod.rs @@ -1,11 +1,12 @@ //! Functionality related to installing prebuilt binaries and/or running cargo install. use self::krate::Krate; +use crate::child; +use crate::emoji; +use crate::install; +use crate::PBAR; use anyhow::{anyhow, bail, Context, Result}; use binary_install::{Cache, Download}; -use child; -use emoji; -use install; use log::debug; use log::{info, warn}; use std::env; @@ -13,7 +14,6 @@ use std::fs; use std::path::Path; use std::process::Command; use which::which; -use PBAR; mod arch; mod krate; diff --git a/src/lib.rs b/src/lib.rs index db0ecf8..8410b48 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -44,7 +44,7 @@ pub mod target; pub mod test; pub mod wasm_opt; -use progressbar::{LogLevel, ProgressOutput}; +use crate::progressbar::{LogLevel, ProgressOutput}; /// The global progress bar and user-facing message output. pub static PBAR: ProgressOutput = ProgressOutput::new(); diff --git a/src/license.rs b/src/license.rs index c804853..5305e41 100644 --- a/src/license.rs +++ b/src/license.rs @@ -4,9 +4,9 @@ use anyhow::{anyhow, Result}; use std::fs; use std::path::Path; +use crate::manifest::CrateData; +use crate::PBAR; use glob::glob; -use manifest::CrateData; -use PBAR; fn glob_license_files(path: &Path) -> Result> { let mut license_files: Vec = Vec::new(); diff --git a/src/lockfile.rs b/src/lockfile.rs index 18ab37e..44cb103 100644 --- a/src/lockfile.rs +++ b/src/lockfile.rs @@ -5,9 +5,9 @@ use std::fs; use std::path::PathBuf; +use crate::manifest::CrateData; use anyhow::{anyhow, bail, Context, Result}; use console::style; -use manifest::CrateData; use toml; /// This struct represents the contents of `Cargo.lock`. diff --git a/src/manifest/mod.rs b/src/manifest/mod.rs index 7614c90..e94fc80 100644 --- a/src/manifest/mod.rs +++ b/src/manifest/mod.rs @@ -15,10 +15,11 @@ use std::{collections::HashMap, fs}; use self::npm::{ repository::Repository, CommonJSPackage, ESModulesPackage, NoModulesPackage, NpmPackage, }; +use crate::command::build::{BuildProfile, Target}; +use crate::PBAR; use cargo_metadata::Metadata; use chrono::offset; use chrono::DateTime; -use command::build::{BuildProfile, Target}; use curl::easy; use serde::{self, Deserialize}; use serde_json; @@ -27,7 +28,6 @@ use std::env; use std::io::Write; use strsim::levenshtein; use toml; -use PBAR; const WASM_PACK_METADATA_KEY: &str = "package.metadata.wasm-pack"; const WASM_PACK_VERSION: Option<&'static str> = option_env!("CARGO_PKG_VERSION"); diff --git a/src/manifest/npm/commonjs.rs b/src/manifest/npm/commonjs.rs index eaf681d..29433ad 100644 --- a/src/manifest/npm/commonjs.rs +++ b/src/manifest/npm/commonjs.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use manifest::npm::repository::Repository; +use crate::manifest::npm::repository::Repository; #[derive(Serialize)] pub struct CommonJSPackage { diff --git a/src/manifest/npm/esmodules.rs b/src/manifest/npm/esmodules.rs index b3b541b..2501a6c 100644 --- a/src/manifest/npm/esmodules.rs +++ b/src/manifest/npm/esmodules.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use manifest::npm::repository::Repository; +use crate::manifest::npm::repository::Repository; #[derive(Serialize)] pub struct ESModulesPackage { diff --git a/src/manifest/npm/nomodules.rs b/src/manifest/npm/nomodules.rs index 20567cc..ed2e016 100644 --- a/src/manifest/npm/nomodules.rs +++ b/src/manifest/npm/nomodules.rs @@ -1,6 +1,6 @@ use std::collections::HashMap; -use manifest::npm::repository::Repository; +use crate::manifest::npm::repository::Repository; #[derive(Serialize)] pub struct NoModulesPackage { diff --git a/src/npm.rs b/src/npm.rs index 48a768f..7c4f08b 100644 --- a/src/npm.rs +++ b/src/npm.rs @@ -1,8 +1,8 @@ //! Functionality related to publishing to npm. +use crate::child; +use crate::command::publish::access::Access; use anyhow::{bail, Context, Result}; -use child; -use command::publish::access::Access; use log::info; /// The default npm registry used when we aren't working with a custom registry. diff --git a/src/progressbar.rs b/src/progressbar.rs index c4a96e4..330b7f9 100644 --- a/src/progressbar.rs +++ b/src/progressbar.rs @@ -1,8 +1,8 @@ //! Fancy progress bar functionality. +use crate::emoji; use anyhow::{bail, Error, Result}; use console::style; -use emoji; use std::sync::atomic::{AtomicBool, AtomicU8, Ordering}; #[repr(u8)] diff --git a/src/readme.rs b/src/readme.rs index b8d5e8e..c98cdc0 100644 --- a/src/readme.rs +++ b/src/readme.rs @@ -4,7 +4,7 @@ use anyhow::{Context, Result}; use std::fs; use std::path::Path; -use PBAR; +use crate::PBAR; /// Copy the crate's README into the `pkg` directory. pub fn copy_from_crate(path: &Path, out_dir: &Path) -> Result<()> { diff --git a/src/test/mod.rs b/src/test/mod.rs index 05ba4fc..1fbe920 100644 --- a/src/test/mod.rs +++ b/src/test/mod.rs @@ -2,9 +2,9 @@ pub mod webdriver; +use crate::child; use crate::PBAR; use anyhow::{Context, Result}; -use child; use std::ffi::OsStr; use std::path::Path; use std::process::Command; diff --git a/src/test/webdriver.rs b/src/test/webdriver.rs index 3b9ece9..fe77bfd 100644 --- a/src/test/webdriver.rs +++ b/src/test/webdriver.rs @@ -4,10 +4,10 @@ mod chromedriver; mod geckodriver; mod safaridriver; +use crate::PBAR; use anyhow::Result; use binary_install::Cache; use std::path::PathBuf; -use PBAR; pub use self::{ chromedriver::{get_or_install_chromedriver, install_chromedriver}, diff --git a/src/test/webdriver/chromedriver.rs b/src/test/webdriver/chromedriver.rs index 67e1928..c1d6397 100644 --- a/src/test/webdriver/chromedriver.rs +++ b/src/test/webdriver/chromedriver.rs @@ -1,11 +1,11 @@ use super::{get_and_notify, Collector}; +use crate::install::InstallMode; +use crate::stamps; +use crate::target; use anyhow::{bail, Context, Result}; use binary_install::Cache; use chrono::DateTime; -use install::InstallMode; -use stamps; use std::path::PathBuf; -use target; // Keep it up to date with each `wasm-pack` release. // https://chromedriver.storage.googleapis.com/LATEST_RELEASE diff --git a/src/test/webdriver/geckodriver.rs b/src/test/webdriver/geckodriver.rs index 1a8ee80..fc51b81 100644 --- a/src/test/webdriver/geckodriver.rs +++ b/src/test/webdriver/geckodriver.rs @@ -1,11 +1,11 @@ use super::{get_and_notify, Collector}; +use crate::install::InstallMode; +use crate::stamps; +use crate::target; use anyhow::{anyhow, bail, Context, Result}; use binary_install::Cache; use chrono::DateTime; -use install::InstallMode; -use stamps; use std::path::PathBuf; -use target; // Keep it up to date with each `wasm-pack` release. // https://github.com/mozilla/geckodriver/releases/latest diff --git a/tests/all/build.rs b/tests/all/build.rs index 4524498..6c42b48 100644 --- a/tests/all/build.rs +++ b/tests/all/build.rs @@ -1,7 +1,7 @@ +use crate::utils; use assert_cmd::prelude::*; use std::fs; use std::path::Path; -use utils; #[test] fn build_in_non_crate_directory_doesnt_panic() { diff --git a/tests/all/generate.rs b/tests/all/generate.rs index 4194942..b2f695e 100644 --- a/tests/all/generate.rs +++ b/tests/all/generate.rs @@ -1,5 +1,5 @@ +use crate::utils; use assert_cmd::prelude::*; -use utils; #[test] fn new_with_no_name_errors() { diff --git a/tests/all/license.rs b/tests/all/license.rs index 8869db8..ae0a6a7 100644 --- a/tests/all/license.rs +++ b/tests/all/license.rs @@ -3,7 +3,7 @@ extern crate wasm_pack; use std::fs; -use utils::{self, fixture}; +use crate::utils::{self, fixture}; use wasm_pack::license; use wasm_pack::manifest::CrateData; diff --git a/tests/all/lockfile.rs b/tests/all/lockfile.rs index f7a8784..94b938b 100644 --- a/tests/all/lockfile.rs +++ b/tests/all/lockfile.rs @@ -1,4 +1,4 @@ -use utils::fixture; +use crate::utils::fixture; use wasm_pack::lockfile::Lockfile; use wasm_pack::manifest::CrateData; diff --git a/tests/all/log_level.rs b/tests/all/log_level.rs index 95a08ca..65f4634 100644 --- a/tests/all/log_level.rs +++ b/tests/all/log_level.rs @@ -1,9 +1,9 @@ +use crate::utils; use assert_cmd::prelude::*; use predicates::boolean::PredicateBooleanExt; use predicates::prelude::predicate::str::contains; use predicates::reflection::PredicateReflection; use predicates::Predicate; -use utils; fn matches_info() -> impl Predicate + PredicateReflection { contains("[INFO]: Checking for the Wasm target...") diff --git a/tests/all/manifest.rs b/tests/all/manifest.rs index c5f0fbf..a828bd1 100644 --- a/tests/all/manifest.rs +++ b/tests/all/manifest.rs @@ -1,8 +1,8 @@ +use crate::utils::{self, fixture}; use assert_cmd::prelude::*; use std::collections::{HashMap, HashSet}; use std::fs; use std::path::PathBuf; -use utils::{self, fixture}; use wasm_pack::command::build::Target; use wasm_pack::command::utils::get_crate_path; use wasm_pack::{self, license, manifest}; diff --git a/tests/all/readme.rs b/tests/all/readme.rs index a621631..cefb01f 100644 --- a/tests/all/readme.rs +++ b/tests/all/readme.rs @@ -3,7 +3,7 @@ extern crate wasm_pack; use std::fs; -use utils::{self, fixture}; +use crate::utils::{self, fixture}; use wasm_pack::readme; #[test] diff --git a/tests/all/test.rs b/tests/all/test.rs index 0113f76..c5bba4e 100644 --- a/tests/all/test.rs +++ b/tests/all/test.rs @@ -1,7 +1,7 @@ +use crate::utils::fixture; use assert_cmd::prelude::*; use predicates::prelude::*; use std::env; -use utils::fixture; #[test] fn it_can_run_node_tests() { diff --git a/tests/all/wasm_opt.rs b/tests/all/wasm_opt.rs index 142d587..68c0dc9 100644 --- a/tests/all/wasm_opt.rs +++ b/tests/all/wasm_opt.rs @@ -1,6 +1,6 @@ +use crate::utils; use assert_cmd::prelude::*; use predicates::prelude::*; -use utils; #[test] fn off_in_dev() { diff --git a/tests/all/webdriver.rs b/tests/all/webdriver.rs index cf081e7..3cd93c9 100644 --- a/tests/all/webdriver.rs +++ b/tests/all/webdriver.rs @@ -1,5 +1,5 @@ +use crate::utils::fixture; use binary_install::Cache; -use utils::fixture; use wasm_pack::test::webdriver; #[test] From bf74de1560dda0434b21b5750c0021787214aa4c Mon Sep 17 00:00:00 2001 From: printfn Date: Mon, 16 Jan 2023 04:55:39 +0000 Subject: [PATCH 46/94] Add support for workspace inheritance --- Cargo.lock | 17 ++++++--- src/manifest/mod.rs | 93 ++++++++++++++++++--------------------------- 2 files changed, 49 insertions(+), 61 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index d0b5a65..96c4402 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -331,9 +331,9 @@ dependencies = [ [[package]] name = "console" -version = "0.15.4" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9b6515d269224923b26b5febea2ed42b2d5f2ce37284a4dd670fedd6cb8347a" +checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60" dependencies = [ "encode_unicode", "lazy_static 1.4.0", @@ -490,11 +490,12 @@ dependencies = [ [[package]] name = "dialoguer" -version = "0.10.2" +version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a92e7e37ecef6857fdc0c0c5d42fd5b0938e46590c2183cc92dd310a6d078eb1" +checksum = "af3c796f3b0b408d9fd581611b47fa850821fcb84aa640b83a3c1a5be2d691f2" dependencies = [ - "console 0.15.4", + "console 0.15.5", + "shell-words", "tempfile", "zeroize", ] @@ -1666,6 +1667,12 @@ dependencies = [ "digest", ] +[[package]] +name = "shell-words" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" + [[package]] name = "siphasher" version = "0.3.10" diff --git a/src/manifest/mod.rs b/src/manifest/mod.rs index e94fc80..790a6c9 100644 --- a/src/manifest/mod.rs +++ b/src/manifest/mod.rs @@ -50,12 +50,6 @@ pub struct CargoManifest { #[derive(Deserialize)] struct CargoPackage { name: String, - description: Option, - license: Option, - #[serde(rename = "license-file")] - license_file: Option, - repository: Option, - homepage: Option, #[serde(default)] metadata: CargoMetadata, @@ -522,9 +516,13 @@ impl CrateData { ) } + fn pkg(&self) -> &cargo_metadata::Package { + &self.data.packages[self.current_idx] + } + /// Get the crate name for the crate at the given path. pub fn crate_name(&self) -> String { - let pkg = &self.data.packages[self.current_idx]; + let pkg = self.pkg(); match pkg .targets .iter() @@ -545,12 +543,15 @@ impl CrateData { /// Get the license for the crate at the given path. pub fn crate_license(&self) -> &Option { - &self.manifest.package.license + &self.pkg().license } /// Get the license file path for the crate at the given path. - pub fn crate_license_file(&self) -> &Option { - &self.manifest.package.license_file + pub fn crate_license_file(&self) -> Option { + self.pkg() + .license_file + .clone() + .map(|license_file| license_file.into_string()) } /// Returns the path to this project's target directory where artifacts are @@ -654,14 +655,14 @@ impl CrateData { dts_file, files, main: js_file, - homepage: self.manifest.package.homepage.clone(), + homepage: self.pkg().homepage.clone(), keywords, } } fn license(&self) -> Option { - self.manifest.package.license.clone().or_else(|| { - self.manifest.package.license_file.clone().map(|file| { + self.crate_license().clone().or_else(|| { + self.crate_license_file().clone().map(|file| { // When license is written in file: https://docs.npmjs.com/files/package.json#license format!("SEE LICENSE IN {}", file) }) @@ -683,18 +684,13 @@ impl CrateData { NpmPackage::CommonJSPackage(CommonJSPackage { name: data.name, collaborators: pkg.authors.clone(), - description: self.manifest.package.description.clone(), + description: self.pkg().description.clone(), version: pkg.version.to_string(), license: self.license(), - repository: self - .manifest - .package - .repository - .clone() - .map(|repo_url| Repository { - ty: "git".to_string(), - url: repo_url, - }), + repository: self.pkg().repository.clone().map(|repo_url| Repository { + ty: "git".to_string(), + url: repo_url, + }), files: data.files, main: data.main, homepage: data.homepage, @@ -719,18 +715,13 @@ impl CrateData { NpmPackage::ESModulesPackage(ESModulesPackage { name: data.name, collaborators: pkg.authors.clone(), - description: self.manifest.package.description.clone(), + description: self.pkg().description.clone(), version: pkg.version.to_string(), license: self.license(), - repository: self - .manifest - .package - .repository - .clone() - .map(|repo_url| Repository { - ty: "git".to_string(), - url: repo_url, - }), + repository: self.pkg().repository.clone().map(|repo_url| Repository { + ty: "git".to_string(), + url: repo_url, + }), files: data.files, module: data.main, homepage: data.homepage, @@ -756,18 +747,13 @@ impl CrateData { NpmPackage::ESModulesPackage(ESModulesPackage { name: data.name, collaborators: pkg.authors.clone(), - description: self.manifest.package.description.clone(), + description: self.pkg().description.clone(), version: pkg.version.to_string(), license: self.license(), - repository: self - .manifest - .package - .repository - .clone() - .map(|repo_url| Repository { - ty: "git".to_string(), - url: repo_url, - }), + repository: self.pkg().repository.clone().map(|repo_url| Repository { + ty: "git".to_string(), + url: repo_url, + }), files: data.files, module: data.main, homepage: data.homepage, @@ -793,18 +779,13 @@ impl CrateData { NpmPackage::NoModulesPackage(NoModulesPackage { name: data.name, collaborators: pkg.authors.clone(), - description: self.manifest.package.description.clone(), + description: self.pkg().description.clone(), version: pkg.version.to_string(), license: self.license(), - repository: self - .manifest - .package - .repository - .clone() - .map(|repo_url| Repository { - ty: "git".to_string(), - url: repo_url, - }), + repository: self.pkg().repository.clone().map(|repo_url| Repository { + ty: "git".to_string(), + url: repo_url, + }), files: data.files, browser: data.main, homepage: data.homepage, @@ -816,13 +797,13 @@ impl CrateData { fn check_optional_fields(&self) { let mut messages = vec![]; - if self.manifest.package.description.is_none() { + if self.pkg().description.is_none() { messages.push("description"); } - if self.manifest.package.repository.is_none() { + if self.pkg().repository.is_none() { messages.push("repository"); } - if self.manifest.package.license.is_none() && self.manifest.package.license_file.is_none() { + if self.pkg().license.is_none() && self.pkg().license_file.is_none() { messages.push("license"); } From 7524f57006640f088134d9236585e5b598957db3 Mon Sep 17 00:00:00 2001 From: printfn Date: Sat, 28 Jan 2023 08:01:18 +0000 Subject: [PATCH 47/94] Update dependencies --- Cargo.lock | 192 ++++++++++++++--------------------------- Cargo.toml | 20 ++--- tests/all/log_level.rs | 14 +-- tests/all/manifest.rs | 9 +- 4 files changed, 87 insertions(+), 148 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 96c4402..3275611 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -53,7 +53,7 @@ version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d52a9bb7ec0cf484c551830a7ce27bd20d67eac647e1befb56b0be4ee39a55d2" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -84,7 +84,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi 0.1.19", "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -110,9 +110,9 @@ dependencies = [ [[package]] name = "base64" -version = "0.13.1" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" +checksum = "a4a4ddaa51a5bc52a6948f74c06d20aaaddb71924eab79b8c97a8c556e942d6a" [[package]] name = "base64ct" @@ -167,9 +167,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.11.1" +version = "3.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "572f695136211188308f16ad2ca5c851a712c464060ae6974944458eb83880ba" +checksum = "0d261e256854913907f67ed06efbc3338dfe6179796deefc1ff763fc1aee5535" [[package]] name = "byteorder" @@ -263,7 +263,7 @@ dependencies = [ "num-traits", "time 0.1.45", "wasm-bindgen", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -290,18 +290,6 @@ dependencies = [ "vec_map", ] -[[package]] -name = "clicolors-control" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f84dec9bc083ce2503908cd305af98bd363da6f54bf8d4bf0ac14ee749ad5d1" -dependencies = [ - "kernel32-sys", - "lazy_static 0.2.11", - "libc", - "winapi 0.3.9", -] - [[package]] name = "codespan-reporting" version = "0.11.1" @@ -312,23 +300,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "console" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecd48adf136733979b49e15bc3b4c43cc0d3c85ece7bd08e6daa414c6fcb13e6" -dependencies = [ - "atty", - "clicolors-control", - "lazy_static 1.4.0", - "libc", - "parking_lot", - "regex", - "termios", - "unicode-width", - "winapi 0.3.9", -] - [[package]] name = "console" version = "0.15.5" @@ -336,7 +307,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d79fbe8970a77e3e34151cc13d3b3e248aa0faaecb9f6091fa07ebefe5ad60" dependencies = [ "encode_unicode", - "lazy_static 1.4.0", + "lazy_static", "libc", "unicode-width", "windows-sys", @@ -413,7 +384,7 @@ dependencies = [ "openssl-sys", "schannel", "socket2", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -428,14 +399,14 @@ dependencies = [ "openssl-sys", "pkg-config", "vcpkg", - "winapi 0.3.9", + "winapi", ] [[package]] name = "cxx" -version = "1.0.86" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d1075c37807dcf850c379432f0df05ba52cc30f279c5cfc43cc221ce7f8579" +checksum = "322296e2f2e5af4270b54df9e85a02ff037e271af20ba3e7fe1575515dc840b8" dependencies = [ "cc", "cxxbridge-flags", @@ -445,9 +416,9 @@ dependencies = [ [[package]] name = "cxx-build" -version = "1.0.86" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5044281f61b27bc598f2f6647d480aed48d2bf52d6eb0b627d84c0361b17aa70" +checksum = "017a1385b05d631e7875b1f151c9f012d37b53491e2a87f65bff5c262b2111d8" dependencies = [ "cc", "codespan-reporting", @@ -460,15 +431,15 @@ dependencies = [ [[package]] name = "cxxbridge-flags" -version = "1.0.86" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61b50bc93ba22c27b0d31128d2d130a0a6b3d267ae27ef7e4fae2167dfe8781c" +checksum = "c26bbb078acf09bc1ecda02d4223f03bdd28bd4874edcb0379138efc499ce971" [[package]] name = "cxxbridge-macro" -version = "1.0.86" +version = "1.0.88" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39e61fda7e62115119469c7b3591fd913ecca96fb766cfd3f2e2502ab7bc87a5" +checksum = "357f40d1f06a24b60ae1fe122542c1fb05d28d32acb2aed064e84bc2ad1e252e" dependencies = [ "proc-macro2", "quote", @@ -494,7 +465,7 @@ version = "0.10.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af3c796f3b0b408d9fd581611b47fa850821fcb84aa640b83a3c1a5be2d691f2" dependencies = [ - "console 0.15.5", + "console", "shell-words", "tempfile", "zeroize", @@ -535,7 +506,7 @@ checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" dependencies = [ "libc", "redox_users", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -546,9 +517,9 @@ checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" [[package]] name = "either" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90e5c1c8368803113bf0c9584fc495a58b86dc8a29edbf8fe877d21d9507e797" +checksum = "7fcaabb2fef8c910e7f4c7ce9f67a1283a1715879a7c230ca9d6d1ae31f16d91" [[package]] name = "encode_unicode" @@ -651,7 +622,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9564fc758e15025b46aa6643b1b77d047d1a56a1aea6e01002ac0c7026876213" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -754,9 +725,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.27.0" +version = "0.27.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dec7af912d60cdbd3677c1af9352ebae6fb8394d165568a2234df0fa00f87793" +checksum = "221996f774192f0f718773def8201c4ae31f02616a54ccfc2d358bb0e5cefdec" [[package]] name = "glob" @@ -928,7 +899,7 @@ dependencies = [ "iana-time-zone-haiku", "js-sys", "wasm-bindgen", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -982,7 +953,7 @@ version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "302d553b8abc8187beb7d663e34c065ac4570b273bc9511a50e940e99409c577" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1018,22 +989,6 @@ dependencies = [ "wasm-bindgen", ] -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - -[[package]] -name = "lazy_static" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76f033c7ad61445c5b347c7382dd1237847eb1bce590fe50365dcb33d546be73" - [[package]] name = "lazy_static" version = "1.4.0" @@ -1125,7 +1080,7 @@ version = "0.2.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "07226173c32f2926027b63cce4bcd8076c3552846cbe7925f3aaffeac0a3b92e" dependencies = [ - "lazy_static 1.4.0", + "lazy_static", "libc", "log", "openssl", @@ -1174,9 +1129,9 @@ dependencies = [ [[package]] name = "object" -version = "0.30.2" +version = "0.30.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b8c786513eb403643f2a88c244c2aaa270ef2153f55094587d0c48a3cf22a83" +checksum = "ea86265d3d3dcb6a27fc51bd29a4bf387fae9d2986b823079d4986af253eb439" dependencies = [ "memchr", ] @@ -1383,9 +1338,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.49" +version = "1.0.50" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57a8eca9f9c4ffde41714334dee777596264c7825420f521abc92b5b5deb63a5" +checksum = "6ef7d57beacfaf2d8aee5937dab7b7f28de3cb8b1828479bb5de2a7106f2bae2" dependencies = [ "unicode-ident", ] @@ -1454,14 +1409,14 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] name = "reqwest" -version = "0.11.13" +version = "0.11.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68cc60575865c7831548863cc02356512e3f1dc2f3f82cb837d7fc4cc8f3c97c" +checksum = "21eed90ec8570952d53b772ecf8f206aa1ec9a3d76b2521c56c42973f2d91ee9" dependencies = [ "base64", "bytes", @@ -1538,9 +1493,9 @@ checksum = "ddccb15bcce173023b3fedd9436f882a0739b8dfb45e4f6b6002bee5929f61b2" [[package]] name = "security-framework" -version = "2.7.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bc1bb97804af6631813c55739f771071e0f2ed33ee20b68c86ec505d906356c" +checksum = "7c4437699b6d34972de58652c68b98cb5b53a4199ab126db8e20ec8ded29a721" dependencies = [ "bitflags", "core-foundation", @@ -1551,9 +1506,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.6.1" +version = "2.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0160a13a177a45bfb43ce71c01580998474f556ad854dcbca936dd2841a5c556" +checksum = "31c9bb296072e961fcbd8853511dd39c2d8be2deb1e17c6860b1d30732b323b4" dependencies = [ "core-foundation-sys", "libc", @@ -1622,13 +1577,13 @@ dependencies = [ [[package]] name = "serial_test" -version = "0.10.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c789ec87f4687d022a2405cf46e0cd6284889f1839de292cadeb6c6019506f2" +checksum = "538c30747ae860d6fb88330addbbd3e0ddbe46d662d032855596d8a8ca260611" dependencies = [ "dashmap", "futures", - "lazy_static 1.4.0", + "lazy_static", "log", "parking_lot", "serial_test_derive", @@ -1636,9 +1591,9 @@ dependencies = [ [[package]] name = "serial_test_derive" -version = "0.10.0" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b64f9e531ce97c88b4778aad0ceee079216071cffec6ac9b904277f8f92e7fe3" +checksum = "079a83df15f85d89a68d64ae1238f142f172b1fa915d0d76b26a7cba1b659a69" dependencies = [ "proc-macro2", "quote", @@ -1701,7 +1656,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "02e2d2db9033d13a1567121ddd7a095ee144db4e1ca1b1bda3419bc0da294ebd" dependencies = [ "libc", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1723,7 +1678,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10" dependencies = [ "clap", - "lazy_static 1.4.0", + "lazy_static", "structopt-derive", ] @@ -1779,27 +1734,18 @@ dependencies = [ "libc", "redox_syscall", "remove_dir_all", - "winapi 0.3.9", + "winapi", ] [[package]] name = "termcolor" -version = "1.1.3" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bab24d30b911b2376f3a13cc2cd443142f0c81dda04c118693e35b3835757755" +checksum = "be55cf8942feac5c765c2c993422806843c9a9a45d4d5c407ad6dd2ea95eb9b6" dependencies = [ "winapi-util", ] -[[package]] -name = "termios" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "411c5bf740737c7918b8b1fe232dca4dc9f8e754b8ad5e20966814001ed0ac6b" -dependencies = [ - "libc", -] - [[package]] name = "termtree" version = "0.4.0" @@ -1843,7 +1789,7 @@ checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" dependencies = [ "libc", "wasi 0.10.0+wasi-snapshot-preview1", - "winapi 0.3.9", + "winapi", ] [[package]] @@ -1890,9 +1836,9 @@ checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" [[package]] name = "tokio" -version = "1.24.1" +version = "1.24.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d9f76183f91ecfb55e1d7d5602bd1d979e38a3a522fe900241cf195624d67ae" +checksum = "597a12a59981d9e3c38d216785b0c37399f6e415e8d0712047620f189371b0bb" dependencies = [ "autocfg", "bytes", @@ -1931,9 +1877,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.5.10" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1333c76748e868a4d9d1017b5ab53171dfd095f70c712fdb4653a406547f598f" +checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" dependencies = [ "serde", ] @@ -1978,9 +1924,9 @@ checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" [[package]] name = "unicode-bidi" -version = "0.3.8" +version = "0.3.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "099b7128301d285f79ddd55b9a83d5e6b9e97c92e0ea0daebee7263e932de992" +checksum = "d54675592c1dbefd78cbd98db9bacd89886e1ca50692a0692baefffdeb92dd58" [[package]] name = "unicode-ident" @@ -2063,7 +2009,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56" dependencies = [ "same-file", - "winapi 0.3.9", + "winapi", "winapi-util", ] @@ -2165,13 +2111,13 @@ dependencies = [ "binary-install", "cargo_metadata", "chrono", - "console 0.6.2", + "console", "curl", "dialoguer", "env_logger", "glob", "human-panic", - "lazy_static 1.4.0", + "lazy_static", "log", "openssl", "parking_lot", @@ -2204,21 +2150,15 @@ dependencies = [ [[package]] name = "which" -version = "4.3.0" +version = "4.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c831fbbee9e129a8cf93e7747a82da9d95ba8e16621cae60ec2cdc849bacb7b" +checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" dependencies = [ "either", "libc", "once_cell", ] -[[package]] -name = "winapi" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" - [[package]] name = "winapi" version = "0.3.9" @@ -2229,12 +2169,6 @@ dependencies = [ "winapi-x86_64-pc-windows-gnu", ] -[[package]] -name = "winapi-build" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" - [[package]] name = "winapi-i686-pc-windows-gnu" version = "0.4.0" @@ -2247,7 +2181,7 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] @@ -2319,7 +2253,7 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "80d0f4e272c85def139476380b12f9ac60926689dd2e01d4923222f40580869d" dependencies = [ - "winapi 0.3.9", + "winapi", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 2f43ab3..5780dd6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,36 +13,36 @@ documentation = "https://rustwasm.github.io/wasm-pack/" [dependencies] anyhow = "1.0.68" atty = "0.2.14" +binary-install = "0.1.0" cargo_metadata = "0.15.2" -console = "0.6.2" -dialoguer = "0.10.2" +chrono = "0.4.23" +console = "0.15.5" curl = "0.4.44" +dialoguer = "0.10.3" env_logger = { version = "0.10.0", default-features = false } -human-panic = "1.0.3" glob = "0.3.1" +human-panic = "1.0.3" log = "0.4.17" openssl = { version = '0.10.45', optional = true } parking_lot = "0.12.1" -reqwest = { version = "0.11.13", features = ["blocking"] } +reqwest = { version = "0.11.14", features = ["blocking"] } semver = "1.0.16" serde = "1.0.152" serde_derive = "1.0.152" serde_ignored = "0.1.7" serde_json = "1.0.91" -strsim = "0.10.0" siphasher = "0.3.10" +strsim = "0.10.0" structopt = "0.3.26" -toml = "0.5.10" -which = "4.3.0" -binary-install = "0.1.0" +toml = "0.5.11" walkdir = "2.3.2" -chrono = "0.4.23" +which = "4.4.0" [dev-dependencies] assert_cmd = "2.0.8" lazy_static = "1.4.0" predicates = "2.1.5" -serial_test = "0.10.0" +serial_test = "1.0.0" tempfile = "3.3.0" [features] diff --git a/tests/all/log_level.rs b/tests/all/log_level.rs index 65f4634..ec95378 100644 --- a/tests/all/log_level.rs +++ b/tests/all/log_level.rs @@ -4,18 +4,22 @@ use predicates::boolean::PredicateBooleanExt; use predicates::prelude::predicate::str::contains; use predicates::reflection::PredicateReflection; use predicates::Predicate; +use wasm_pack::emoji; fn matches_info() -> impl Predicate + PredicateReflection { - contains("[INFO]: Checking for the Wasm target...") - .and(contains("[INFO]: Compiling to Wasm...")) + contains(format!("[INFO]: {}Checking for the Wasm target...", emoji::TARGET)) + .and(contains(format!("[INFO]: {}Compiling to Wasm...", emoji::CYCLONE))) .and(contains("[INFO]: License key is set in Cargo.toml but no LICENSE file(s) were found; Please add the LICENSE file(s) to your project directory")) .and(contains("[INFO]: Optimizing wasm binaries with `wasm-opt`...")) - .and(contains("[INFO]: :-) Done in ")) - .and(contains("[INFO]: :-) Your wasm pkg is ready to publish at ")) + .and(contains(format!("[INFO]: {} Done in ", emoji::SPARKLE))) + .and(contains(format!("[INFO]: {} Your wasm pkg is ready to publish at ", emoji::PACKAGE))) } fn matches_warn() -> impl Predicate + PredicateReflection { - contains("[WARN]: :-) origin crate has no README") + contains(format!( + "[WARN]: {} origin crate has no README", + emoji::WARN + )) } fn matches_cargo() -> impl Predicate + PredicateReflection { diff --git a/tests/all/manifest.rs b/tests/all/manifest.rs index a828bd1..48d17df 100644 --- a/tests/all/manifest.rs +++ b/tests/all/manifest.rs @@ -5,7 +5,7 @@ use std::fs; use std::path::PathBuf; use wasm_pack::command::build::Target; use wasm_pack::command::utils::get_crate_path; -use wasm_pack::{self, license, manifest}; +use wasm_pack::{self, emoji, license, manifest}; #[test] fn it_gets_the_crate_name_default_path() { @@ -559,10 +559,11 @@ fn parse_crate_data_returns_unused_keys_in_cargo_toml() { .arg("build") .assert() .success() - .stderr(predicates::str::contains( - "[WARN]: :-) \"package.metadata.wasm-pack.profile.production\" is an unknown key and will \ + .stderr(predicates::str::contains(format!( + "[WARN]: {} \"package.metadata.wasm-pack.profile.production\" is an unknown key and will \ be ignored. Please check your Cargo.toml.", - )); + emoji::WARN + ))); } #[test] From a352c19f6b260037b68fc3bdd68670dd9a786ae5 Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Sat, 4 Feb 2023 23:59:46 +0100 Subject: [PATCH 48/94] Fix some typos --- src/child.rs | 2 +- src/command/mod.rs | 4 ++-- src/command/test.rs | 2 +- src/lockfile.rs | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/child.rs b/src/child.rs index 7b8a58c..52249ac 100644 --- a/src/child.rs +++ b/src/child.rs @@ -1,4 +1,4 @@ -//! Utilties for managing child processes. +//! Utilities for managing child processes. //! //! This module helps us ensure that all child processes that we spawn get //! properly logged and their output is logged as well. diff --git a/src/command/mod.rs b/src/command/mod.rs index 86eaf3f..190e873 100644 --- a/src/command/mod.rs +++ b/src/command/mod.rs @@ -31,7 +31,7 @@ pub enum Command { #[structopt(name = "pack")] /// 🍱 create a tar of your npm package but don't publish! Pack { - /// The path to the Rust crate. If not set, searches up the path from the current dirctory. + /// The path to the Rust crate. If not set, searches up the path from the current directory. #[structopt(parse(from_os_str))] path: Option, }, @@ -69,7 +69,7 @@ pub enum Command { #[structopt(long = "tag")] tag: Option, - /// The path to the Rust crate. If not set, searches up the path from the current dirctory. + /// The path to the Rust crate. If not set, searches up the path from the current directory. #[structopt(parse(from_os_str))] path: Option, }, diff --git a/src/command/test.rs b/src/command/test.rs index eed92eb..d7b6642 100644 --- a/src/command/test.rs +++ b/src/command/test.rs @@ -81,7 +81,7 @@ pub struct TestOptions { /// Path to the Rust crate, and extra options to pass to `cargo test`. /// - /// If the path is not provided, this command searches up the path from the current dirctory + /// If the path is not provided, this command searches up the path from the current directory. /// /// This is a workaround to allow wasm pack to provide the same command line interface as `cargo`. /// See for more information. diff --git a/src/lockfile.rs b/src/lockfile.rs index 44cb103..f4a68ea 100644 --- a/src/lockfile.rs +++ b/src/lockfile.rs @@ -65,7 +65,7 @@ impl Lockfile { } } -/// Given the path to the crate that we are buliding, return a `PathBuf` +/// Given the path to the crate that we are building, return a `PathBuf` /// containing the location of the lock file, by finding the workspace root. fn get_lockfile_path(crate_data: &CrateData) -> Result { // Check that a lock file can be found in the directory. Return an error From 0fea409bb48cfdaa52a1be64462557e5cf88be33 Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Sun, 5 Feb 2023 00:02:08 +0100 Subject: [PATCH 49/94] Update actions/checkout in GitHub Actions workflows to v3 --- .github/workflows/book.yml | 2 +- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index 2266adc..9d61adb 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -9,7 +9,7 @@ jobs: name: Build and deploy book runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: toolchain: stable diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 86272ec..1daccc0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,7 +38,7 @@ jobs: rust: stable steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: actions-rs/toolchain@v1 with: toolchain: ${{ matrix.rust }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6b1b81c..6025de7 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -28,7 +28,7 @@ jobs: rust: stable steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: nanasess/setup-chromedriver@master - uses: actions-rs/toolchain@v1 with: From a61a6bc64ed4d28414dd0a0da5950bd19e295925 Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Sun, 5 Feb 2023 00:11:54 +0100 Subject: [PATCH 50/94] Update actions/cache in GitHub Actions workflows to v3 --- .github/workflows/book.yml | 2 +- .github/workflows/test.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index 2266adc..9e3c909 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -16,7 +16,7 @@ jobs: override: true - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 env: cache-name: cache-mdbook with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6b1b81c..947b2b0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,7 +38,7 @@ jobs: - uses: actions/setup-node@v2 - name: Cache dependencies - uses: actions/cache@v2 + uses: actions/cache@v3 env: cache-name: cache-dependencies with: From 4f132ff70d2f9235b16128eb441c948acc1b5b4c Mon Sep 17 00:00:00 2001 From: Dirk Stolle Date: Sun, 5 Feb 2023 00:18:34 +0100 Subject: [PATCH 51/94] Update JamesIves/github-pages-deploy-action in GHA workflow to v4.4.1 --- .github/workflows/book.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml index 2266adc..75e074c 100644 --- a/.github/workflows/book.yml +++ b/.github/workflows/book.yml @@ -42,7 +42,7 @@ jobs: ./build-installer - name: Deploy book - uses: JamesIves/github-pages-deploy-action@4.1.4 + uses: JamesIves/github-pages-deploy-action@v4.4.1 if: ${{ github.ref == 'refs/heads/master' }} with: branch: gh-pages From ad1778031fc15e5947ab89efb6f363baa3d482ed Mon Sep 17 00:00:00 2001 From: Liam Murphy Date: Sun, 5 Feb 2023 19:07:32 +1100 Subject: [PATCH 52/94] Mark snippets and the bundler target's main file as having side effects This is a less extreme version of #1208, which only marks snippets and the main file on the bundler target as having side effects instead of all files. This means that the shim file which contains the vast majority of the JS code is still properly marked as having no side effects, allowing bundlers to get rid of things like unused `new TextEncoder` calls which could theoretically have side effects but don't. Fixes #972. --- src/manifest/mod.rs | 6 +++--- src/manifest/npm/esmodules.rs | 2 +- tests/all/manifest.rs | 7 +++++-- tests/all/utils/manifest.rs | 8 ++------ 4 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/manifest/mod.rs b/src/manifest/mod.rs index 790a6c9..54f7740 100644 --- a/src/manifest/mod.rs +++ b/src/manifest/mod.rs @@ -723,10 +723,10 @@ impl CrateData { url: repo_url, }), files: data.files, - module: data.main, + module: data.main.clone(), homepage: data.homepage, types: data.dts_file, - side_effects: false, + side_effects: vec![format!("./{}", data.main), "./snippets/*".to_owned()], keywords: data.keywords, dependencies, }) @@ -758,7 +758,7 @@ impl CrateData { module: data.main, homepage: data.homepage, types: data.dts_file, - side_effects: false, + side_effects: vec!["./snippets/*".to_owned()], keywords: data.keywords, dependencies, }) diff --git a/src/manifest/npm/esmodules.rs b/src/manifest/npm/esmodules.rs index 2501a6c..7d216bc 100644 --- a/src/manifest/npm/esmodules.rs +++ b/src/manifest/npm/esmodules.rs @@ -22,7 +22,7 @@ pub struct ESModulesPackage { #[serde(skip_serializing_if = "Option::is_none")] pub types: Option, #[serde(rename = "sideEffects")] - pub side_effects: bool, + pub side_effects: Vec, #[serde(skip_serializing_if = "Option::is_none")] pub keywords: Option>, #[serde(skip_serializing_if = "Option::is_none")] diff --git a/tests/all/manifest.rs b/tests/all/manifest.rs index 48d17df..abf0e75 100644 --- a/tests/all/manifest.rs +++ b/tests/all/manifest.rs @@ -93,7 +93,10 @@ fn it_creates_a_package_json_default_path() { ); assert_eq!(pkg.module, "js_hello_world.js"); assert_eq!(pkg.types, "js_hello_world.d.ts"); - assert_eq!(pkg.side_effects, false); + assert_eq!( + pkg.side_effects, + vec!["./js_hello_world.js", "./snippets/*"] + ); let actual_files: HashSet = pkg.files.into_iter().collect(); let expected_files: HashSet = [ @@ -255,7 +258,7 @@ fn it_creates_a_package_json_with_correct_files_when_out_name_is_provided() { ); assert_eq!(pkg.module, "index.js"); assert_eq!(pkg.types, "index.d.ts"); - assert_eq!(pkg.side_effects, false); + assert_eq!(pkg.side_effects, vec!["./index.js", "./snippets/*"]); let actual_files: HashSet = pkg.files.into_iter().collect(); let expected_files: HashSet = diff --git a/tests/all/utils/manifest.rs b/tests/all/utils/manifest.rs index 3a788de..9e34d72 100644 --- a/tests/all/utils/manifest.rs +++ b/tests/all/utils/manifest.rs @@ -21,8 +21,8 @@ pub struct NpmPackage { pub browser: String, #[serde(default = "default_none")] pub types: String, - #[serde(default = "default_false", rename = "sideEffects")] - pub side_effects: bool, + #[serde(default = "Vec::new", rename = "sideEffects")] + pub side_effects: Vec, pub homepage: Option, pub keywords: Option>, pub dependencies: Option>, @@ -32,10 +32,6 @@ fn default_none() -> String { "".to_string() } -fn default_false() -> bool { - false -} - #[derive(Deserialize)] pub struct Repository { #[serde(rename = "type")] From f962a4a0182b5b7872f66c70e8573229d153fbff Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 8 Feb 2023 22:31:17 +0000 Subject: [PATCH 53/94] chore(deps): bump openssl-src from 111.24.0+1.1.1s to 111.25.0+1.1.1t Bumps [openssl-src](https://github.com/alexcrichton/openssl-src-rs) from 111.24.0+1.1.1s to 111.25.0+1.1.1t. - [Release notes](https://github.com/alexcrichton/openssl-src-rs/releases) - [Commits](https://github.com/alexcrichton/openssl-src-rs/commits) --- updated-dependencies: - dependency-name: openssl-src dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3275611..e165e47 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1182,9 +1182,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-src" -version = "111.24.0+1.1.1s" +version = "111.25.0+1.1.1t" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3498f259dab01178c6228c6b00dcef0ed2a2d5e20d648c017861227773ea4abd" +checksum = "3173cd3626c43e3854b1b727422a276e568d9ec5fe8cec197822cf52cfb743d6" dependencies = [ "cc", ] From da3db25e2c75f9ebcde1db02801aca470670333c Mon Sep 17 00:00:00 2001 From: Benedikt Werner <1benediktwerner@gmail.com> Date: Sat, 11 Feb 2023 11:12:43 +0100 Subject: [PATCH 54/94] Update npm installation link --- docs/src/prerequisites/npm.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/src/prerequisites/npm.md b/docs/src/prerequisites/npm.md index 277b8d0..e7cb64b 100644 --- a/docs/src/prerequisites/npm.md +++ b/docs/src/prerequisites/npm.md @@ -21,5 +21,5 @@ your package to the npm registry you'll need an npm account. You can find information about signing up for npm [here][npm-signup-info]. [`npm link`]: https://docs.npmjs.com/cli/link -[npm-install-info]: https://www.npmjs.com/get-npm +[npm-install-info]: https://docs.npmjs.com/downloading-and-installing-node-js-and-npm [npm-signup-info]: https://www.npmjs.com/signup From 50e9410d834229e1ae9fcbdef9d58c8373cc6f73 Mon Sep 17 00:00:00 2001 From: Owen Yamauchi Date: Thu, 16 Mar 2023 18:11:52 -0400 Subject: [PATCH 55/94] Don't hide install options behind link - First, show only the instructions specific to the detected platform. - Then, always display the cargo, npm, and yarn install options below. - Add a note to the unix instructions to say you can use the alternative options if you don't like piping `curl` into `sh`. Fixes #355 --- docs/_installer/index.html | 90 +++++++++++------------------------- docs/_installer/wasm-pack.js | 18 +------- docs/public/custom.css | 11 ++--- 3 files changed, 33 insertions(+), 86 deletions(-) diff --git a/docs/_installer/index.html b/docs/_installer/index.html index 28e0d27..db6cd46 100644 --- a/docs/_installer/index.html +++ b/docs/_installer/index.html @@ -5,10 +5,6 @@