Fix tests by pinning versions of webpack (#219)

Looks like a newer version of webpack has broken tests, so let's use
package-lock.json to pin to an older version while we wait for a fix.
This commit is contained in:
Alex Crichton 2018-06-01 13:42:59 -05:00 committed by GitHub
parent a4428f01b6
commit ad89d8457e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7539 additions and 9 deletions

View File

@ -19,7 +19,7 @@ build: false
test_script:
- rustup target add wasm32-unknown-unknown
- yarn
- npm install
- cargo test
- cargo build --release -p wasm-bindgen-cli

View File

@ -67,7 +67,7 @@ install:
- curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.8/install.sh | bash
- source ~/.nvm/nvm.sh
- nvm install 10
- yarn
- npm install
notifications:
email:

7527
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,8 @@
{
"license": "MIT",
"scripts": {
"run-webpack": "webpack"
},
"devDependencies": {
"@types/node": "^9.4.6",
"ts-loader": "^4.0.1",

View File

@ -300,10 +300,10 @@ impl Project {
// move files from the root into each test, it looks like this may be
// needed for webpack to work well when invoked concurrently.
fs::hard_link("package.json", root.join("package.json")).unwrap();
if !Path::new("yarn.lock").exists() {
panic!("\n\nfailed to find `yarn.lock`, have you run `yarn` yet?\n\n");
if !Path::new("node_modules").exists() {
panic!("\n\nfailed to find `node_modules`, have you run `npm install` yet?\n\n");
}
fs::hard_link("yarn.lock", root.join("yarn.lock")).unwrap();
fs::hard_link("package-lock.json", root.join("package-lock.json")).unwrap();
let cwd = env::current_dir().unwrap();
symlink_dir(&cwd.join("node_modules"), &root.join("node_modules")).unwrap();
@ -317,13 +317,13 @@ impl Project {
let mut cmd = if cfg!(windows) {
let mut c = Command::new("cmd");
c.arg("/c");
c.arg("yarn");
c.arg("npm");
c
} else {
Command::new("yarn")
Command::new("npm")
};
cmd.arg("webpack").current_dir(&root);
run(&mut cmd, "yarn");
cmd.arg("run").arg("run-webpack").current_dir(&root);
run(&mut cmd, "npm");
let mut cmd = Command::new("node");
cmd.args(&self.node_args);