master
Jesper Håkansson 4 years ago
parent d908dcb1be
commit 8d1ea111ea
  1. 10
      .github/workflows/release.yml
  2. 6
      .github/workflows/test.yml
  3. 112
      CHANGELOG.md
  4. 992
      Cargo.lock
  5. 6
      Cargo.toml
  6. 2
      README.md
  7. 6
      docs/index.html
  8. 14
      npm/README.md
  9. 4
      npm/package-lock.json
  10. 2
      npm/package.json
  11. 2
      src/test/webdriver/chromedriver.rs
  12. 7
      src/test/webdriver/geckodriver.rs

@ -14,7 +14,7 @@ env:
LINUX_TARGET: x86_64-unknown-linux-musl LINUX_TARGET: x86_64-unknown-linux-musl
# Space separated paths to include in the archive. # Space separated paths to include in the archive.
RELEASE_ADDS: README.md RELEASE_ADDS: README.md LICENSE-APACHE LICENSE-MIT
jobs: jobs:
build: build:
@ -40,7 +40,7 @@ jobs:
with: with:
toolchain: ${{ matrix.rust }} toolchain: ${{ matrix.rust }}
override: true override: true
target: wasm32-unknown-unknow target: wasm32-unknown-unknown
- name: Query version number - name: Query version number
id: get_version id: get_version
@ -85,7 +85,7 @@ jobs:
run: | run: |
mv ./target/${{ env.LINUX_TARGET }}/release/${{ env.RELEASE_BIN }} ./dist/${{ env.RELEASE_BIN }} mv ./target/${{ env.LINUX_TARGET }}/release/${{ env.RELEASE_BIN }} ./dist/${{ env.RELEASE_BIN }}
mv ${{ env.RELEASE_ADDS }} ./dist mv ${{ env.RELEASE_ADDS }} ./dist
7z a -ttar -so -an ./dist | 7z a -si ./${{ env.RELEASE_DIR }}/${{ env.RELEASE_BIN }}-${{ steps.get_version.outputs.VERSION }}-${{ env.LINUX_TARGET }}.tar.gz 7z a -ttar -so -an ./dist/* | 7z a -si ./${{ env.RELEASE_DIR }}/${{ env.RELEASE_BIN }}-${{ steps.get_version.outputs.VERSION }}-${{ env.LINUX_TARGET }}.tar.gz
- name: Create tarball (Windows) - name: Create tarball (Windows)
if: matrix.build == 'windows' if: matrix.build == 'windows'
@ -93,14 +93,14 @@ jobs:
run: | run: |
mv ./target/release/${{ env.RELEASE_BIN }}.exe ./dist/${{ env.RELEASE_BIN }}.exe mv ./target/release/${{ env.RELEASE_BIN }}.exe ./dist/${{ env.RELEASE_BIN }}.exe
mv ${{ env.RELEASE_ADDS }} ./dist mv ${{ env.RELEASE_ADDS }} ./dist
7z a -ttar -so -an ./dist | 7z a -si ./${{ env.RELEASE_DIR }}/${{ env.RELEASE_BIN }}-${{ steps.get_version.outputs.VERSION }}-${{ env.WINDOWS_TARGET }}.tar.gz 7z a -ttar -so -an ./dist/* | 7z a -si ./${{ env.RELEASE_DIR }}/${{ env.RELEASE_BIN }}-${{ steps.get_version.outputs.VERSION }}-${{ env.WINDOWS_TARGET }}.tar.gz
- name: Create tarball (MacOS) - name: Create tarball (MacOS)
if: matrix.build == 'macos' if: matrix.build == 'macos'
run: | run: |
mv ./target/release/${{ env.RELEASE_BIN }} ./dist/${{ env.RELEASE_BIN }} mv ./target/release/${{ env.RELEASE_BIN }} ./dist/${{ env.RELEASE_BIN }}
mv ${{ env.RELEASE_ADDS }} ./dist mv ${{ env.RELEASE_ADDS }} ./dist
7z a -ttar -so -an ./dist | 7z a -si ./${{ env.RELEASE_DIR }}/${{ env.RELEASE_BIN }}-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS_TARGET }}.tar.gz 7z a -ttar -so -an ./dist/* | 7z a -si ./${{ env.RELEASE_DIR }}/${{ env.RELEASE_BIN }}-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS_TARGET }}.tar.gz
- name: Upload Zip - name: Upload Zip
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1

@ -51,12 +51,6 @@ jobs:
target target
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }} key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }}
- name: Update rust
run: |
rustup update ${{ matrix.rust }} --no-self-update
rustup default ${{ matrix.rust }}
rustup target add wasm32-unknown-unknown --toolchain stable
- name: Run Tests - name: Run Tests
run: cargo test --features "strict" --all --locked run: cargo test --features "strict" --all --locked
env: env:

@ -2,8 +2,42 @@
## 🤍 Unreleased ## 🤍 Unreleased
## 🌦 0.10.0
- ### ✨ Features
- **Added keywords - [lucashorward], [issue/707] [pull/838]**
`package.json` files usually contain a keywords array so that npm can make searching easier.
This PR extracts keywords from `Cargo.toml` and puts them into `package.json`.
[lucashorward]: https://github.com/lucashorward
[pull/838]: https://github.com/rustwasm/wasm-pack/pull/838
[issue/707]: https://github.com/rustwasm/wasm-pack/issues/707
- ### 🤕 Fixes - ### 🤕 Fixes
- **Update binary-install to get fix for axios security vulnerability - [simlay], [Rizary], [issue/958] [pull/973] [pull/1012]**
Updates `binary-install` npm package to version `^0.1.0` in order to get security fix for a security vulnerability in axios.
[simlay]: https://github.com/simlay
[rizary]: https://github.com/Rizary
[pull/973]: https://github.com/rustwasm/wasm-pack/pull/973
[pull/1012]: https://github.com/rustwasm/wasm-pack/pull/1012
[issue/958]: https://github.com/rustwasm/wasm-pack/issues/958
- **Fix cargo-generate installation - [bradyjoslin], [issue/975] [issue/907] [pull/983]**
`wasm-pack new hello-wasm` didn't work due to a bad link when trying to install `cargo-generate`.
This PR points the installation to the correct place and makes `wasm-pack new` working again!
[bradyjoslin]: https://github.com/bradyjoslin
[pull/983]: https://github.com/rustwasm/wasm-pack/pull/983
[issue/975]: https://github.com/rustwasm/wasm-pack/issues/975
[issue/907]: https://github.com/rustwasm/wasm-pack/issues/907
- **Pass through extra options when building tests - [azriel91], [issue/698] [pull/851]** - **Pass through extra options when building tests - [azriel91], [issue/698] [pull/851]**
`wasm-pack test` accepts extra options to pass through to `cargo` when running tests. `wasm-pack test` accepts extra options to pass through to `cargo` when running tests.
@ -15,6 +49,84 @@
[pull/851]: https://github.com/rustwasm/wasm-pack/pull/851 [pull/851]: https://github.com/rustwasm/wasm-pack/pull/851
[issue/698]: https://github.com/rustwasm/wasm-pack/issues/698 [issue/698]: https://github.com/rustwasm/wasm-pack/issues/698
- **Corrected files included in package.json for bundler / no target - [lucashorward], [issue/837] [pull/839]**
`wasm-pack build` and `wasm-pack build --target bundler` generates a \_bg.js file, but it was not added to the `package.json`.
The file that is added, \*.js will however reference the \_bg.js, so when the package was distributed (both through pack or publish) it is not usable.
This PR includes that \_bg.js file in `package.json`.
[pull/839]: https://github.com/rustwasm/wasm-pack/pull/839
[issue/837]: https://github.com/rustwasm/wasm-pack/issues/837
- **Find the main package if multiple packages have the same name - [ghost], [pull/830]**
If there were 2 packages with the same name, `wasm-pack` would sometimes use the wrong one and errored.
[ghost]: https://github.com/ghost
[pull/830]: https://github.com/rustwasm/wasm-pack/pull/830
[issue/829]: https://github.com/rustwasm/wasm-pack/issues/829
- ### 📖 Documentation
- **Remove duplicated "is" in the wee_alloc tutorial- [pione30], [issue/1003] [pull/1004]**
[pione30]: https://github.com/pione30
[pull/1004]: https://github.com/rustwasm/wasm-pack/pull/1004
[issue/1003]: https://github.com/rustwasm/wasm-pack/issues/1003
- **Fix TOC links - [Swaagie], [pull/1007]**
[swaagie]: https://github.com/Swaagie
[pull/1007]: https://github.com/rustwasm/wasm-pack/pull/1007
- **Remove outdated TOC heading- [gthb], [pull/1011]**
[gthb]: https://github.com/gthb
[pull/1011]: https://github.com/rustwasm/wasm-pack/pull/1011
- **Add link to template repo - [milahu], [pull/942]**
[milahu]: https://github.com/milahu
[pull/942]: https://github.com/rustwasm/wasm-pack/pull/942
- **Remove greenkeeper reference - [cdvv7788], [crotwell], [issue/1001] [pull/844] [pull/1002]**
[cdvv7788]: https://github.com/cdvv7788
[crotwell]: https://github.com/crotwell
[pull/844]: https://github.com/rustwasm/wasm-pack/pull/844
[pull/1002]: https://github.com/rustwasm/wasm-pack/pull/1002
[issue/1001]: https://github.com/rustwasm/wasm-pack/issues/1001
- ### 🛠 Maintenance
- **Fix CI. Remove appveyor and travis and use Github actions - [ashleygwilliams], [drager], [issue/594] [issue/979] [pull/947]**
[pull/947]: https://github.com/rustwasm/wasm-pack/pull/947
[issue/594]: https://github.com/rustwasm/wasm-pack/issues/594
[issue/979]: https://github.com/rustwasm/wasm-pack/issues/979
- **Cargo update - [ashleygwilliams], [pull/800]**
[ashleygwilliams]: https://github.com/ashleygwilliams
[pull/800]: https://github.com/rustwasm/wasm-pack/pull/800
- **Remove dirs dependency - [brightly-salty], [issue/943] [pull/944]**
[brightly-salty]: https://github.com/brightly-salty
[pull/944]: https://github.com/rustwasm/wasm-pack/pull/944
[issue/943]: https://github.com/rustwasm/wasm-pack/issues/943
- **Fix logs for uniformity - [petosorus], [issue/716] [pull/723]**
[petosorus]: https://github.com/petosorus
[pull/723]: https://github.com/rustwasm/wasm-pack/pull/723
[issue/716]: https://github.com/rustwasm/wasm-pack/issues/716
- **Fixing build error - [Pauan], [pull/841]**
[pull/841]: https://github.com/rustwasm/wasm-pack/pull/841
## ☁ 0.9.1 ## ☁ 0.9.1
- ### 🤕 Fixes - ### 🤕 Fixes

992
Cargo.lock generated

File diff suppressed because it is too large Load Diff

@ -1,9 +1,9 @@
[package] [package]
name = "wasm-pack" name = "wasm-pack"
description = "📦✨ your favorite rust -> wasm workflow tool!" description = "📦✨ your favorite rust -> wasm workflow tool!"
version = "0.9.1" version = "0.10.0"
authors = ["Ashley Williams <ashley666ashley@gmail.com>"] authors = ["Ashley Williams <ashley666ashley@gmail.com>", "Jesper Håkansson <jesper@jesperh.se>"]
repository = "https://github.com/ashleygwilliams/wasm-pack.git" repository = "https://github.com/rustwasm/wasm-pack.git"
license = "MIT/Apache-2.0" license = "MIT/Apache-2.0"
readme = "README.md" readme = "README.md"
categories = ["wasm"] categories = ["wasm"]

@ -8,7 +8,7 @@
<p> <p>
<a href="https://github.com/rustwasm/wasm-pack/actions/workflows/test.yml"><img alt="Build Status" src="https://github.com/rustwasm/wasm-pack/actions/workflows/test.yml/badge.svg?branch=master"/></a> <a href="https://github.com/rustwasm/wasm-pack/actions/workflows/test.yml"><img alt="Build Status" src="https://github.com/rustwasm/wasm-pack/actions/workflows/test.yml/badge.svg?branch=master"/></a>
<a href="https://crates.io/crates/wasm-pack"><img alt="crates.io" src="https://meritbadge.herokuapp.com/wasm-pack"/></a> <a href="https://crates.io/crates/wasm-pack"><img alt="crates.io" src="https://img.shields.io/crates/v/wasm-pack"/></a>
</p> </p>
<h3> <h3>

@ -42,9 +42,9 @@
<h2>📦✨ your favorite rust -> wasm workflow tool!</h2> <h2>📦✨ your favorite rust -> wasm workflow tool!</h2>
</div> </div>
<div class="five columns" id="installer"> <div class="five columns" id="installer">
<a class="button button-primary" href="/wasm-pack/installer">✨ Install wasm-pack 0.9.1</a> <a class="button button-primary" href="/wasm-pack/installer">✨ Install wasm-pack 0.10.0</a>
<p>7 Feb 2020 | <p>2 Jul 2021 |
<a href="https://github.com/rustwasm/wasm-pack/releases/tag/v0.9.1"> <a href="https://github.com/rustwasm/wasm-pack/releases/tag/v0.10.0">
Release Notes Release Notes
</a> </a>
</p> </p>

@ -7,9 +7,8 @@
</p> </p>
<p> <p>
<a href="https://travis-ci.com/rustwasm/wasm-pack"><img alt="Build Status" src="https://travis-ci.com/rustwasm/wasm-pack.svg?branch=master"/></a> <a href="https://github.com/rustwasm/wasm-pack/actions/workflows/test.yml"><img alt="Build Status" src="https://github.com/rustwasm/wasm-pack/actions/workflows/test.yml/badge.svg?branch=master"/></a>
<a href="https://ci.appveyor.com/project/ashleygwilliams/wasm-pack-071k0"><img alt="Build status" src="https://ci.appveyor.com/api/projects/status/iv1qtnqtv168ef8h?svg=true"/></a> <a href="https://crates.io/crates/wasm-pack"><img alt="crates.io" src="https://img.shields.io/crates/v/wasm-pack"/></a>
<a href="https://crates.io/crates/wasm-pack"><img alt="crates.io" src="https://meritbadge.herokuapp.com/wasm-pack"/></a>
</p> </p>
<h3> <h3>
@ -20,7 +19,8 @@
<a href="https://discordapp.com/channels/442252698964721669/443151097398296587">Chat</a> <a href="https://discordapp.com/channels/442252698964721669/443151097398296587">Chat</a>
</h3> </h3>
<sub>Built with 🦀🕸 by <a href="https://rustwasm.github.io/">The Rust and WebAssembly Working Group</a></sub> <sub>Built with 🦀🕸 by <a href="https://rustwasm.github.io/">The Rust and WebAssembly Working Group</a></sub>
</div> </div>
## About ## About
@ -29,12 +29,10 @@ This tool seeks to be a one-stop shop for building and working with rust-
generated WebAssembly that you would like to interop with JavaScript, in the generated WebAssembly that you would like to interop with JavaScript, in the
browser or with Node.js. `wasm-pack` helps you build rust-generated browser or with Node.js. `wasm-pack` helps you build rust-generated
WebAssembly packages that you could publish to the npm registry, or otherwise use WebAssembly packages that you could publish to the npm registry, or otherwise use
alongside any javascript packages in workflows that you already use, such as [webpack] alongside any javascript packages in workflows that you already use, such as [webpack].
or [greenkeeper].
[bundler-support]: https://github.com/rustwasm/team/blob/master/goals/bundler-integration.md#details [bundler-support]: https://github.com/rustwasm/team/blob/master/goals/bundler-integration.md#details
[webpack]: https://webpack.js.org/ [webpack]: https://webpack.js.org/
[greenkeeper]: https://greenkeeper.io/
This project is a part of the [rust-wasm] group. You can find more info by This project is a part of the [rust-wasm] group. You can find more info by
visiting that repo! visiting that repo!
@ -91,4 +89,4 @@ This project was started by [ashleygwilliams] and is co-maintained by [ashleygwi
[ashleygwilliams]: https://github.com/ashleygwilliams [ashleygwilliams]: https://github.com/ashleygwilliams
[drager]: https://github.com/drager [drager]: https://github.com/drager
[rustwasm Working Group]: https://github.com/rustwasm/team [rustwasm working group]: https://github.com/rustwasm/team

@ -1,12 +1,12 @@
{ {
"name": "wasm-pack", "name": "wasm-pack",
"version": "0.9.1", "version": "0.10.0",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "wasm-pack", "name": "wasm-pack",
"version": "0.9.1", "version": "0.10.0",
"hasInstallScript": true, "hasInstallScript": true,
"license": "MIT OR Apache-2.0", "license": "MIT OR Apache-2.0",
"dependencies": { "dependencies": {

@ -1,6 +1,6 @@
{ {
"name": "wasm-pack", "name": "wasm-pack",
"version": "0.9.1", "version": "0.10.0",
"description": "📦✨ your favorite rust -> wasm workflow tool!", "description": "📦✨ your favorite rust -> wasm workflow tool!",
"main": "binary.js", "main": "binary.js",
"scripts": { "scripts": {

@ -9,7 +9,7 @@ use target;
// Keep it up to date with each `wasm-pack` release. // Keep it up to date with each `wasm-pack` release.
// https://chromedriver.storage.googleapis.com/LATEST_RELEASE // https://chromedriver.storage.googleapis.com/LATEST_RELEASE
const DEFAULT_CHROMEDRIVER_VERSION: &str = "79.0.3945.36"; const DEFAULT_CHROMEDRIVER_VERSION: &str = "91.0.4472.101";
const CHROMEDRIVER_LAST_UPDATED_STAMP: &str = "chromedriver_last_updated"; const CHROMEDRIVER_LAST_UPDATED_STAMP: &str = "chromedriver_last_updated";
const CHROMEDRIVER_VERSION_STAMP: &str = "chromedriver_version"; const CHROMEDRIVER_VERSION_STAMP: &str = "chromedriver_version";

@ -9,7 +9,7 @@ use target;
// Keep it up to date with each `wasm-pack` release. // Keep it up to date with each `wasm-pack` release.
// https://github.com/mozilla/geckodriver/releases/latest // https://github.com/mozilla/geckodriver/releases/latest
const DEFAULT_GECKODRIVER_VERSION: &str = "v0.26.0"; const DEFAULT_GECKODRIVER_VERSION: &str = "v0.29.1";
const DEFAULT_WINDOWS_GECKODRIVER_VERSION: &str = "v0.24.0"; const DEFAULT_WINDOWS_GECKODRIVER_VERSION: &str = "v0.24.0";
const GECKODRIVER_LAST_UPDATED_STAMP: &str = "geckodriver_last_updated"; const GECKODRIVER_LAST_UPDATED_STAMP: &str = "geckodriver_last_updated";
@ -186,11 +186,10 @@ fn get_version_from_json(json: impl AsRef<str>) -> Result<String, failure::Error
}) })
} }
fn assemble_geckodriver_url(_tag: &str, target: &str, ext: &str) -> String { fn assemble_geckodriver_url(tag: &str, target: &str, ext: &str) -> String {
format!( format!(
"https://github.com/mozilla/geckodriver/releases/download/{tag}/geckodriver-{tag}-{target}.{ext}", "https://github.com/mozilla/geckodriver/releases/download/{tag}/geckodriver-{tag}-{target}.{ext}",
// TODO: Temporary use v0.24.0 instead of latest. Latest is currently not working... tag=tag,
tag="v0.24.0",
target=target, target=target,
ext=ext, ext=ext,
) )

Loading…
Cancel
Save