From c16695fb86fb58d3a21360ad0c33bd44713f9d73 Mon Sep 17 00:00:00 2001 From: "azure-pipelines[bot]" Date: Sun, 23 Sep 2018 18:01:22 +0000 Subject: [PATCH 01/24] Set up CI with Azure Pipelines --- azure-pipelines.yml | 47 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000000..b589028e9b8 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,47 @@ +# Node.js +# Build a general Node.js project with npm. +# Add steps that analyze code, save build artifacts, deploy, and more: +# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript + +jobs: +- job: Linux + pool: + vmImage: 'ubuntu-16.04' + strategy: + matrix: + node_6_x: + node_version: 6.x + node_8_x: + node_version: 8.x + node_10_x: + node_version: 10.x + steps: + - script: echo hello from Linux + +- job: macOS + pool: + vmImage: 'macOS-10.13' + strategy: + matrix: + node_6_x: + node_version: 6.x + node_8_x: + node_version: 8.x + node_10_x: + node_version: 10.x + steps: + - script: echo hello from macOS + +- job: Windows + pool: + vmImage: 'vs2017-win2016' + strategy: + matrix: + node_6_x: + node_version: 6.x + node_8_x: + node_version: 8.x + node_10_x: + node_version: 10.x + steps: + - script: echo hello from Windows From 2e3c124dbbcc51662a5b0a5a2b567a57d6c92bac Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 11:12:43 -0700 Subject: [PATCH 02/24] Use templates --- azure-pipelines-template.yml | 22 ++++++++++++++ azure-pipelines.yml | 56 ++++++++---------------------------- 2 files changed, 34 insertions(+), 44 deletions(-) create mode 100644 azure-pipelines-template.yml diff --git a/azure-pipelines-template.yml b/azure-pipelines-template.yml new file mode 100644 index 00000000000..d7311413367 --- /dev/null +++ b/azure-pipelines-template.yml @@ -0,0 +1,22 @@ +jobs: +- job: ${{ parameters.name }} + pool: + vmImage: ${{ parameters.vmImage }} + strategy: + matrix: + node_6_x: + node_version: 6.x + node_8_x: + node_version: 8.x + node_10_x: + node_version: 10.x + steps: + - task: NodeTool@0 + inputs: + version: $(node_version) + displayName: 'Install Node.js' + + - script: | + yarn + yarn test-ci + yarn lint diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b589028e9b8..a1d98cf83f8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -1,47 +1,15 @@ -# Node.js -# Build a general Node.js project with npm. -# Add steps that analyze code, save build artifacts, deploy, and more: -# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript - jobs: -- job: Linux - pool: - vmImage: 'ubuntu-16.04' - strategy: - matrix: - node_6_x: - node_version: 6.x - node_8_x: - node_version: 8.x - node_10_x: - node_version: 10.x - steps: - - script: echo hello from Linux +- template: azure-pipelines-template.yml + parameters: + name: macOS + vmImage: macOS-10.13 -- job: macOS - pool: - vmImage: 'macOS-10.13' - strategy: - matrix: - node_6_x: - node_version: 6.x - node_8_x: - node_version: 8.x - node_10_x: - node_version: 10.x - steps: - - script: echo hello from macOS +- template: azure-pipelines-template.yml + parameters: + name: Linux + vmImage: ubuntu-1604 -- job: Windows - pool: - vmImage: 'vs2017-win2016' - strategy: - matrix: - node_6_x: - node_version: 6.x - node_8_x: - node_version: 8.x - node_10_x: - node_version: 10.x - steps: - - script: echo hello from Windows +- template: azure-pipelines-template.yml + parameters: + name: Windows + vmImage: vs2017-win2016 From 10666426e15bec3603856909c58aca02e9929d94 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 11:14:22 -0700 Subject: [PATCH 03/24] Oops --- azure-pipelines-template.yml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/azure-pipelines-template.yml b/azure-pipelines-template.yml index d7311413367..1549c1338d8 100644 --- a/azure-pipelines-template.yml +++ b/azure-pipelines-template.yml @@ -16,7 +16,6 @@ jobs: version: $(node_version) displayName: 'Install Node.js' - - script: | - yarn - yarn test-ci - yarn lint + - script: yarn + - script: yarn test-ci + - script: yarn lint From bee9f08279d7e5e8c1ee933606f6b4ed89adaa74 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 11:35:35 -0700 Subject: [PATCH 04/24] Attempt to run strategy in parallel --- azure-pipelines-template.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/azure-pipelines-template.yml b/azure-pipelines-template.yml index 1549c1338d8..f7d76a5a0f5 100644 --- a/azure-pipelines-template.yml +++ b/azure-pipelines-template.yml @@ -10,12 +10,16 @@ jobs: node_version: 8.x node_10_x: node_version: 10.x + maxParallel: 3 steps: - task: NodeTool@0 inputs: - version: $(node_version) + versionSpec: $(node_version) displayName: 'Install Node.js' - script: yarn + displayName: 'Install dependencies' - script: yarn test-ci + displayName: 'Run tests' - script: yarn lint + displayName: 'Lint' From ed6c61c8b069defb5c2dcb61584dcbf2216ae49b Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 16:26:46 -0700 Subject: [PATCH 05/24] Fix race condition loading JS and WASM in parallel --- src/packagers/JSPackager.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/packagers/JSPackager.js b/src/packagers/JSPackager.js index 3cb5585e302..339e0c5155a 100644 --- a/src/packagers/JSPackager.js +++ b/src/packagers/JSPackager.js @@ -62,12 +62,14 @@ class JSPackager extends Packager { // If the dep isn't in this bundle, add it to the list of external modules to preload. // Only do this if this is the root JS bundle, otherwise they will have already been // loaded in parallel with this bundle as part of a dynamic import. - if ( - !this.bundle.assets.has(mod) && - (!this.bundle.parentBundle || this.bundle.parentBundle.type !== 'js') - ) { + if (!this.bundle.assets.has(mod)) { this.externalModules.add(mod); - this.bundleLoaders.add(mod.type); + if ( + !this.bundle.parentBundle || + this.bundle.parentBundle.type !== 'js' + ) { + this.bundleLoaders.add(mod.type); + } } } } From 03f7d8d234717c0887efbbe096b721eaf9229ca9 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 16:28:05 -0700 Subject: [PATCH 06/24] Remove travis and appveyor --- .travis.yml | 15 --------------- README.md | 29 ++++++++++++++--------------- appveyor.yml | 36 ------------------------------------ 3 files changed, 14 insertions(+), 66 deletions(-) delete mode 100644 .travis.yml delete mode 100644 appveyor.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 5e12984abf4..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: node_js -node_js: - - '6' - - '8' - - '10' -cache: - yarn: true - cargo: true -before_install: - - curl https://sh.rustup.rs -sSf | sh -s -- -y - - export PATH=/home/travis/.cargo/bin:$PATH -script: - - yarn test-ci - - yarn lint -sudo: false diff --git a/README.md b/README.md index bae64944141..68c4d2000f0 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,7 @@

[![Backers on Open Collective](https://opencollective.com/parcel/backers/badge.svg)](#backers) [![Sponsors on Open Collective](https://opencollective.com/parcel/sponsors/badge.svg)](#sponsors) -[![Travis CI Build Status](https://travis-ci.org/parcel-bundler/parcel.svg?branch=master)](https://travis-ci.org/parcel-bundler/parcel) -[![Appveyor Build status](https://ci.appveyor.com/api/projects/status/nr7d6qjxj3wwsw6n/branch/master?svg=true)](https://ci.appveyor.com/project/devongovett/parcel) +[![Build Status](https://dev.azure.com/devongovett/devongovett/_apis/build/status/parcel-bundler.parcel?branchName=master)](https://dev.azure.com/devongovett/devongovett/_build/latest?definitionId=1) [![Coverage](https://img.shields.io/codecov/c/github/parcel-bundler/parcel/master.svg)](https://codecov.io/github/parcel-bundler/parcel/) [![David Dependency Status](https://david-dm.org/parcel-bundler/parcel.svg)](https://david-dm.org/parcel-bundler/parcel) [![npm package](https://img.shields.io/npm/v/parcel-bundler.svg)](https://www.npmjs.com/package/parcel-bundler) @@ -16,16 +15,16 @@ ## Features -* 🚀 **Blazing fast** bundle times - multicore compilation, and a filesystem cache for fast rebuilds even after a restart. -* 📦 Out of the box support for JS, CSS, HTML, file assets, and more - **no plugins to install**. -* 🐠 **Automatically transforms modules** using Babel, PostCSS, and PostHTML when needed - even `node_modules`. -* ✂️ Zero configuration **code splitting** using dynamic `import()` statements. -* 🔥 Built in support for **hot module replacement** -* 🚨 Friendly error logging experience - syntax highlighted code frames help pinpoint the problem. +- 🚀 **Blazing fast** bundle times - multicore compilation, and a filesystem cache for fast rebuilds even after a restart. +- 📦 Out of the box support for JS, CSS, HTML, file assets, and more - **no plugins to install**. +- 🐠 **Automatically transforms modules** using Babel, PostCSS, and PostHTML when needed - even `node_modules`. +- ✂️ Zero configuration **code splitting** using dynamic `import()` statements. +- 🔥 Built in support for **hot module replacement** +- 🚨 Friendly error logging experience - syntax highlighted code frames help pinpoint the problem. ## Getting started -1. Install with yarn: +1. Install with yarn: ```shell yarn global add parcel-bundler @@ -37,7 +36,7 @@ or with npm: npm install -g parcel-bundler ``` -2. Parcel can take any type of file as an entry point, but an HTML or JavaScript file is a good place to start. If you link your main JavaScript file in the HTML using a relative path, Parcel will also process it for you, and replace the reference with a URL to the output file. +2. Parcel can take any type of file as an entry point, but an HTML or JavaScript file is a good place to start. If you link your main JavaScript file in the HTML using a relative path, Parcel will also process it for you, and replace the reference with a URL to the output file. ```html @@ -47,13 +46,13 @@ npm install -g parcel-bundler ``` -3. Parcel has a development server built in, which will automatically rebuild your app as you change files and supports hot module replacement for fast development. Just point it at your entry file: +3. Parcel has a development server built in, which will automatically rebuild your app as you change files and supports hot module replacement for fast development. Just point it at your entry file: ```shell parcel index.html ``` -4. Now open http://localhost:1234/ in your browser. If needed, you can also override the default port with the `-p` option. Add `--open` to automatically open a browser. +4. Now open http://localhost:1234/ in your browser. If needed, you can also override the default port with the `-p` option. Add `--open` to automatically open a browser. See [parceljs.org](https://parceljs.org) for more documentation! @@ -74,7 +73,7 @@ There are many web application bundlers out there with huge adoption, including Many bundlers are built around configuration and plugins, and it is not uncommon to see applications with upwards of 500 lines of configuration just to get things working. This configuration is not just tedious and time consuming, but is also hard to get right and must be duplicated for each application. Oftentimes, this can lead to sub-optimized apps shipping to production. `parcel` is designed to need zero configuration: just point it at the entry point of your application, and it does the right thing. -Existing bundlers are also _very_ slow. Large applications with lots of files and many dependencies can take minutes to build, which is especially painful during development, when things change all the time. File watchers can help with rebuilds, but the initial launch is often still very slow. +Existing bundlers are also _very_ slow. Large applications with lots of files and many dependencies can take minutes to build, which is especially painful during development, when things change all the time. File watchers can help with rebuilds, but the initial launch is often still very slow. `parcel` utilizes worker processes to compile your code in parallel, utilizing modern multicore processors. This results in a huge boost in speed for initial builds. It also has a file system cache, which saves the compiled results per file, for even faster subsequent startups. @@ -94,8 +93,8 @@ After the bundle tree is constructed, each bundle is written to a file by a pack All feedback and suggestions are welcome! -* 💬 Join the community on [Spectrum](https://spectrum.chat/parcel) -* 📣 Stay up to date on new features and announcements on [@parceljs](https://twitter.com/parceljs). +- 💬 Join the community on [Spectrum](https://spectrum.chat/parcel) +- 📣 Stay up to date on new features and announcements on [@parceljs](https://twitter.com/parceljs). ## Contributors diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 5eb7846d386..00000000000 --- a/appveyor.yml +++ /dev/null @@ -1,36 +0,0 @@ -# Test against the latest version of this Node.js version -environment: - matrix: - - nodejs_version: "6" - - nodejs_version: "8" - -# Install scripts. (runs after repo cloning) -install: - # Get the latest stable version of Node.js or io.js - - ps: Install-Product node $env:nodejs_version - # install modules - - yarn install - - # Install Rust and Cargo - # (Based on from https://github.com/rust-lang/libc/blob/master/appveyor.yml) - - curl -sSf -o rustup-init.exe https://win.rustup.rs - - rustup-init.exe -y - - set PATH=%PATH%;C:\Users\appveyor\.cargo\bin - - rustc -Vv - - cargo -V - -# Post-install test scripts. -test_script: - # Output useful info for debugging. - - node --version - - yarn --version - # run tests - - yarn test-ci - # run ESlint - - yarn lint - -cache: - - "%LOCALAPPDATA%\\Yarn" - -# Don't actually build. -build: off From ad2101c8fb35ede46bc78bc17c2ebfc3fe4d2fa6 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 16:39:44 -0700 Subject: [PATCH 07/24] Fix linux vm spec --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index a1d98cf83f8..5666af58f91 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -7,7 +7,7 @@ jobs: - template: azure-pipelines-template.yml parameters: name: Linux - vmImage: ubuntu-1604 + vmImage: ubuntu-16.04 - template: azure-pipelines-template.yml parameters: From 043a00e439e1e266ef745867fac64bfb99371b0f Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 16:42:19 -0700 Subject: [PATCH 08/24] await stop --- test/watcher.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/watcher.js b/test/watcher.js index 438a1063c07..b9777f2c978 100644 --- a/test/watcher.js +++ b/test/watcher.js @@ -23,9 +23,9 @@ describe('watcher', function() { await sleep(100); }); - afterEach(function() { + afterEach(async function() { if (b) { - b.stop(); + await b.stop(); } }); From 017e272a626e1126657a459762104c3d5bb69dd3 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 17:16:18 -0700 Subject: [PATCH 09/24] Attempt to install rust --- azure-pipelines-template.yml | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/azure-pipelines-template.yml b/azure-pipelines-template.yml index f7d76a5a0f5..ba5b14f6c79 100644 --- a/azure-pipelines-template.yml +++ b/azure-pipelines-template.yml @@ -17,6 +17,23 @@ jobs: versionSpec: $(node_version) displayName: 'Install Node.js' + # Install Rust + - ${{ if ne(parameters.name, 'Windows') }}: + - script: | + curl https://sh.rustup.rs -sSf | sh -s -- -y + export $PATH=~/.cargo/bin:$PATH + rustc -Vv + cargo -V + displayName: Install Rust + - ${{ if eq(parameters.name, 'Windows') }}: + - script: | + curl -sSf -o rustup-init.exe https://win.rustup.rs + rustup-init.exe -y + set PATH=%PATH%;C:\agent\.cargo\bin + rustc -Vv + cargo -V + displayName: Install Rust + - script: yarn displayName: 'Install dependencies' - script: yarn test-ci From de7ecede4595ddfc0b8bab3242ee4b74feff1fb7 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 17:19:55 -0700 Subject: [PATCH 10/24] FIx paths --- azure-pipelines-template.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines-template.yml b/azure-pipelines-template.yml index ba5b14f6c79..ab4249d3d1a 100644 --- a/azure-pipelines-template.yml +++ b/azure-pipelines-template.yml @@ -21,7 +21,7 @@ jobs: - ${{ if ne(parameters.name, 'Windows') }}: - script: | curl https://sh.rustup.rs -sSf | sh -s -- -y - export $PATH=~/.cargo/bin:$PATH + export PATH="$HOME/.cargo/bin:$PATH" rustc -Vv cargo -V displayName: Install Rust @@ -29,7 +29,7 @@ jobs: - script: | curl -sSf -o rustup-init.exe https://win.rustup.rs rustup-init.exe -y - set PATH=%PATH%;C:\agent\.cargo\bin + set PATH=%PATH%;%USERPROFILE%\.cargo\bin rustc -Vv cargo -V displayName: Install Rust From 95a74ac60631e67d05eadcb696892d722ed4c1c4 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 17:58:52 -0700 Subject: [PATCH 11/24] expose environment variable? --- azure-pipelines-template.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines-template.yml b/azure-pipelines-template.yml index ab4249d3d1a..7363ce658c2 100644 --- a/azure-pipelines-template.yml +++ b/azure-pipelines-template.yml @@ -22,6 +22,7 @@ jobs: - script: | curl https://sh.rustup.rs -sSf | sh -s -- -y export PATH="$HOME/.cargo/bin:$PATH" + echo '##vso[task.setvariable variable=PATH]$PATH' rustc -Vv cargo -V displayName: Install Rust @@ -30,6 +31,7 @@ jobs: curl -sSf -o rustup-init.exe https://win.rustup.rs rustup-init.exe -y set PATH=%PATH%;%USERPROFILE%\.cargo\bin + echo '##vso[task.setvariable variable=PATH]%PATH%' rustc -Vv cargo -V displayName: Install Rust From a3fd5db53a718992097f1d44cdb32c82fcecbb70 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 18:06:24 -0700 Subject: [PATCH 12/24] again? --- azure-pipelines-template.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines-template.yml b/azure-pipelines-template.yml index 7363ce658c2..21e4d0a5928 100644 --- a/azure-pipelines-template.yml +++ b/azure-pipelines-template.yml @@ -22,7 +22,7 @@ jobs: - script: | curl https://sh.rustup.rs -sSf | sh -s -- -y export PATH="$HOME/.cargo/bin:$PATH" - echo '##vso[task.setvariable variable=PATH]$PATH' + echo "##vso[task.setvariable variable=PATH]$PATH" rustc -Vv cargo -V displayName: Install Rust @@ -31,7 +31,7 @@ jobs: curl -sSf -o rustup-init.exe https://win.rustup.rs rustup-init.exe -y set PATH=%PATH%;%USERPROFILE%\.cargo\bin - echo '##vso[task.setvariable variable=PATH]%PATH%' + echo "##vso[task.setvariable variable=PATH]%PATH%" rustc -Vv cargo -V displayName: Install Rust From 679876c7468ab57e0dae76a194030d5976b13dfa Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 18:17:07 -0700 Subject: [PATCH 13/24] Upgrade fswatcher-child --- yarn.lock | 173 ++++++++++++++++++------------------------------------ 1 file changed, 56 insertions(+), 117 deletions(-) diff --git a/yarn.lock b/yarn.lock index 6f3554a3983..55691853d2d 100644 --- a/yarn.lock +++ b/yarn.lock @@ -791,8 +791,8 @@ archy@^1.0.0: resolved "https://registry.yarnpkg.com/archy/-/archy-1.0.0.tgz#f9c8c13757cc1dd7bc379ac77b2c62a5c2868c40" are-we-there-yet@~1.1.2: - version "1.1.4" - resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.4.tgz#bb5dca382bb94f05e15194373d16fd3ba1ca110d" + version "1.1.5" + resolved "https://registry.yarnpkg.com/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz#4b35c2944f062a8bfcda66410760350fe9ddfc21" dependencies: delegates "^1.0.0" readable-stream "^2.0.6" @@ -898,8 +898,8 @@ asynckit@^0.4.0: resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" atob@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.1.tgz#ae2d5a729477f289d60dd7f96a6314a22dd6c22a" + version "2.1.2" + resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" autoprefixer@^6.3.1: version "6.7.7" @@ -1421,8 +1421,8 @@ big.js@^3.1.3: resolved "https://registry.yarnpkg.com/big.js/-/big.js-3.2.0.tgz#a5fc298b81b9e0dca2e458824784b65c52ba588e" binary-extensions@^1.0.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" + version "1.12.0" + resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.12.0.tgz#c2d780f53d45bba8317a8902d4ceeaf3a6385b14" bindings@~1.2.1: version "1.2.1" @@ -1751,7 +1751,7 @@ chardet@^0.4.0: version "0.4.2" resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2" -chokidar@^2.0.0: +chokidar@^2.0.0, chokidar@^2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.4.tgz#356ff4e2b0e8e43e322d18a372460bbcf3accd26" dependencies: @@ -1770,27 +1770,9 @@ chokidar@^2.0.0: optionalDependencies: fsevents "^1.2.2" -chokidar@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.0.3.tgz#dcbd4f6cbb2a55b4799ba8a840ac527e5f4b1176" - dependencies: - anymatch "^2.0.0" - async-each "^1.0.0" - braces "^2.3.0" - glob-parent "^3.1.0" - inherits "^2.0.1" - is-binary-path "^1.0.0" - is-glob "^4.0.0" - normalize-path "^2.1.1" - path-is-absolute "^1.0.0" - readdirp "^2.0.0" - upath "^1.0.0" - optionalDependencies: - fsevents "^1.1.2" - chownr@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" + version "1.1.1" + resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.1.1.tgz#54726b8b8fff4df053c42187e801fb4412df1494" ci-info@^1.0.0: version "1.1.3" @@ -2451,10 +2433,6 @@ dedent@^0.7.0: version "0.7.0" resolved "https://registry.yarnpkg.com/dedent/-/dedent-0.7.0.tgz#2495ddbaf6eb874abb0e1be9df22d2e5a544326c" -deep-extend@^0.5.1: - version "0.5.1" - resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.5.1.tgz#b894a9dd90d3023fbf1c55a394fb858eb2066f1f" - deep-extend@^0.6.0: version "0.6.0" resolved "https://registry.yarnpkg.com/deep-extend/-/deep-extend-0.6.0.tgz#c4fa7c95404a17a9c3e8ca7e1537312b736330ac" @@ -3162,13 +3140,6 @@ fs.realpath@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f" -fsevents@^1.1.2: - version "1.2.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.3.tgz#08292982e7059f6674c93d8b829c1e8604979ac0" - dependencies: - nan "^2.9.2" - node-pre-gyp "^0.9.0" - fsevents@^1.2.2: version "1.2.4" resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.4.tgz#f41dcb1af2582af3692da36fc55cbd8e1041c426" @@ -3177,8 +3148,8 @@ fsevents@^1.2.2: node-pre-gyp "^0.10.0" fswatcher-child@^1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/fswatcher-child/-/fswatcher-child-1.0.5.tgz#134d012ffa74918975617e00e56e4139f36cb140" + version "1.1.1" + resolved "https://registry.yarnpkg.com/fswatcher-child/-/fswatcher-child-1.1.1.tgz#264dd95f9c4b5f8615327d7d7567884591846b9b" dependencies: chokidar "^2.0.3" @@ -3649,12 +3620,18 @@ iconv-lite@0.4.19: version "0.4.19" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b" -iconv-lite@^0.4.17, iconv-lite@^0.4.4: +iconv-lite@^0.4.17: version "0.4.23" resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.23.tgz#297871f63be507adcfbfca715d0cd0eed84e9a63" dependencies: safer-buffer ">= 2.1.2 < 3" +iconv-lite@^0.4.4: + version "0.4.24" + resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b" + dependencies: + safer-buffer ">= 2.1.2 < 3" + icss-replace-symbols@1.1.0, icss-replace-symbols@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/icss-replace-symbols/-/icss-replace-symbols-1.1.0.tgz#06ea6f83679a7749e386cfe1fe812ae5db223ded" @@ -3929,10 +3906,6 @@ is-number@^3.0.0: dependencies: kind-of "^3.0.2" -is-number@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/is-number/-/is-number-4.0.0.tgz#0026e37f5454d73e356dfe6564699867c6a7f0ff" - is-obj@^1.0.0, is-obj@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-1.0.1.tgz#3e4729ac1f5fde025cd7d83a896dab9f4f67db0f" @@ -3943,12 +3916,6 @@ is-observable@^1.1.0: dependencies: symbol-observable "^1.1.0" -is-odd@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/is-odd/-/is-odd-2.0.0.tgz#7646624671fd7ea558ccd9a2795182f2958f1b24" - dependencies: - is-number "^4.0.0" - is-path-cwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" @@ -4975,7 +4942,7 @@ minimatch@3.0.4, minimatch@^3.0.2, minimatch@^3.0.4: minimist@0.0.8: version "0.0.8" - resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" + resolved "http://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d" minimist@^1.1.3, minimist@^1.2.0: version "1.2.0" @@ -4985,11 +4952,11 @@ minimist@~0.0.1: version "0.0.10" resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.10.tgz#de3f98543dbf96082be48ad1a0c7cda836301dcf" -minipass@^2.2.1, minipass@^2.2.4: - version "2.3.0" - resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.0.tgz#2e11b1c46df7fe7f1afbe9a490280add21ffe384" +minipass@^2.2.1, minipass@^2.3.3: + version "2.3.4" + resolved "https://registry.yarnpkg.com/minipass/-/minipass-2.3.4.tgz#4768d7605ed6194d6d576169b9e12ef71e9d9957" dependencies: - safe-buffer "^5.1.1" + safe-buffer "^5.1.2" yallist "^3.0.0" minizlib@^1.1.0: @@ -5039,20 +5006,23 @@ mute-stream@0.0.7: version "0.0.7" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.7.tgz#3075ce93bc21b8fab43e1bc4da7e8115ed1e7bab" -nan@^2.0.7, nan@^2.9.2: +nan@^2.0.7: version "2.10.0" resolved "https://registry.yarnpkg.com/nan/-/nan-2.10.0.tgz#96d0cd610ebd58d4b4de9cc0c6828cda99c7548f" +nan@^2.9.2: + version "2.11.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.0.tgz#574e360e4d954ab16966ec102c0c049fd961a099" + nanomatch@^1.2.9: - version "1.2.9" - resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.9.tgz#879f7150cb2dab7a471259066c104eee6e0fa7c2" + version "1.2.13" + resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" dependencies: arr-diff "^4.0.0" array-unique "^0.3.2" define-property "^2.0.2" extend-shallow "^3.0.2" fragment-cache "^0.2.1" - is-odd "^2.0.0" is-windows "^1.0.2" kind-of "^6.0.2" object.pick "^1.3.0" @@ -5068,7 +5038,7 @@ ncp@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3" -needle@^2.2.0, needle@^2.2.1: +needle@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.1.tgz#b5e325bd3aae8c2678902fa296f729455d1d3a7d" dependencies: @@ -5147,21 +5117,6 @@ node-pre-gyp@^0.10.0: semver "^5.3.0" tar "^4" -node-pre-gyp@^0.9.0: - version "0.9.1" - resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.9.1.tgz#f11c07516dd92f87199dbc7e1838eab7cd56c9e0" - dependencies: - detect-libc "^1.0.2" - mkdirp "^0.5.1" - needle "^2.2.0" - nopt "^4.0.1" - npm-packlist "^1.1.6" - npmlog "^4.0.2" - rc "^1.1.7" - rimraf "^2.6.1" - semver "^5.3.0" - tar "^4" - node-releases@^1.0.0-alpha.10: version "1.0.0-alpha.10" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.0-alpha.10.tgz#61c8d5f9b5b2e05d84eba941d05b6f5202f68a2a" @@ -5224,12 +5179,12 @@ normalize-url@^3.0.0: resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-3.1.0.tgz#c3cbb2b09fbf1485e92935d603d9ee7156c61937" npm-bundled@^1.0.1: - version "1.0.3" - resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.3.tgz#7e71703d973af3370a9591bafe3a63aca0be2308" + version "1.0.5" + resolved "https://registry.yarnpkg.com/npm-bundled/-/npm-bundled-1.0.5.tgz#3c1732b7ba936b3a10325aef616467c0ccbcc979" npm-packlist@^1.1.6: - version "1.1.10" - resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.10.tgz#1039db9e985727e464df066f4cf0ab6ef85c398a" + version "1.1.11" + resolved "https://registry.yarnpkg.com/npm-packlist/-/npm-packlist-1.1.11.tgz#84e8c683cbe7867d34b1d357d893ce29e28a02de" dependencies: ignore-walk "^3.0.1" npm-bundled "^1.0.1" @@ -6453,15 +6408,6 @@ range-parser@~1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" -rc@^1.1.7: - version "1.2.7" - resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.7.tgz#8a10ca30d588d00464360372b890d06dacd02297" - dependencies: - deep-extend "^0.5.1" - ini "~1.3.0" - minimist "^1.2.0" - strip-json-comments "~2.0.1" - rc@^1.2.7: version "1.2.8" resolved "https://registry.yarnpkg.com/rc/-/rc-1.2.8.tgz#cd924bf5200a075b83c188cd6b9e211b7fc0d3ed" @@ -6508,13 +6454,12 @@ readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.5, readable util-deprecate "~1.0.1" readdirp@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.1.0.tgz#4ed0ad060df3073300c48440373f72d1cc642d78" + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" dependencies: - graceful-fs "^4.1.2" - minimatch "^3.0.2" + graceful-fs "^4.1.11" + micromatch "^3.1.10" readable-stream "^2.0.2" - set-immediate-shim "^1.0.1" reduce-css-calc@^1.2.6: version "1.3.0" @@ -6638,8 +6583,8 @@ remove-trailing-separator@^1.0.1: resolved "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef" repeat-element@^1.1.2: - version "1.1.2" - resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.2.tgz#ef089a178d1483baae4d93eb98b4f9e4e11d990a" + version "1.1.3" + resolved "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.3.tgz#782e0d825c0c5a3bb39731f84efee6b742e6b1ce" repeat-string@^1.5.2, repeat-string@^1.6.1: version "1.6.1" @@ -6848,10 +6793,14 @@ semver-compare@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc" -"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.3.0, semver@^5.4.1, semver@^5.5.0: +"semver@2 || 3 || 4 || 5", semver@^5.1.0, semver@^5.4.1, semver@^5.5.0: version "5.5.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.0.tgz#dc4bbc7a6ca9d916dee5d43516f0092b58f7b8ab" +semver@^5.3.0: + version "5.5.1" + resolved "https://registry.yarnpkg.com/semver/-/semver-5.5.1.tgz#7dfdd8814bdb7cabc7be0fb1d734cfb66c940477" + send@0.16.2: version "0.16.2" resolved "https://registry.yarnpkg.com/send/-/send-0.16.2.tgz#6ecca1e0f8c156d141597559848df64730a6bbc1" @@ -6890,10 +6839,6 @@ set-blocking@^2.0.0, set-blocking@~2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" -set-immediate-shim@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/set-immediate-shim/-/set-immediate-shim-1.0.1.tgz#4b2b1b27eb808a9f8dcc481a58e5e56f599f3f61" - set-value@^0.4.3: version "0.4.3" resolved "https://registry.yarnpkg.com/set-value/-/set-value-0.4.3.tgz#7db08f9d3d22dc7f78e53af3c3bf4666ecdfccf1" @@ -7233,7 +7178,7 @@ string-hash@^1.1.1: version "1.1.3" resolved "https://registry.yarnpkg.com/string-hash/-/string-hash-1.1.3.tgz#e8aafc0ac1855b4666929ed7dd1275df5d6c811b" -string-width@^1.0.1, string-width@^1.0.2: +string-width@^1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/string-width/-/string-width-1.0.2.tgz#118bdf5b8cdc51a2a7e70d211e07e2b0b9b107d3" dependencies: @@ -7241,7 +7186,7 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^1.0.0" strip-ansi "^3.0.0" -string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: +"string-width@^1.0.2 || 2", string-width@^2.0.0, string-width@^2.1.0, string-width@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/string-width/-/string-width-2.1.1.tgz#ab93f27a8dc13d28cac815c462143a6d9012ae9e" dependencies: @@ -7398,12 +7343,12 @@ table@4.0.2: string-width "^2.1.1" tar@^4: - version "4.4.2" - resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.2.tgz#60685211ba46b38847b1ae7ee1a24d744a2cd462" + version "4.4.6" + resolved "https://registry.yarnpkg.com/tar/-/tar-4.4.6.tgz#63110f09c00b4e60ac8bcfe1bf3c8660235fbc9b" dependencies: chownr "^1.0.1" fs-minipass "^1.2.5" - minipass "^2.2.4" + minipass "^2.3.3" minizlib "^1.1.0" mkdirp "^0.5.0" safe-buffer "^5.1.2" @@ -7650,10 +7595,6 @@ unset-value@^1.0.0: has-value "^0.3.1" isobject "^3.0.0" -upath@^1.0.0: - version "1.0.5" - resolved "https://registry.yarnpkg.com/upath/-/upath-1.0.5.tgz#02cab9ecebe95bbec6d5fc2566325725ab6d1a73" - upath@^1.0.5: version "1.1.0" resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" @@ -7674,10 +7615,8 @@ urlgrey@0.4.4: resolved "https://registry.yarnpkg.com/urlgrey/-/urlgrey-0.4.4.tgz#892fe95960805e85519f1cd4389f2cb4cbb7652f" use@^3.1.0: - version "3.1.0" - resolved "https://registry.yarnpkg.com/use/-/use-3.1.0.tgz#14716bf03fdfefd03040aef58d8b4b85f3a7c544" - dependencies: - kind-of "^6.0.2" + version "3.1.1" + resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f" util-deprecate@~1.0.1: version "1.0.2" @@ -7801,10 +7740,10 @@ which@^1.2.10, which@^1.2.9, which@^1.3.0: isexe "^2.0.0" wide-align@^1.1.0: - version "1.1.2" - resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.2.tgz#571e0f1b0604636ebc0dfc21b0339bbe31341710" + version "1.1.3" + resolved "https://registry.yarnpkg.com/wide-align/-/wide-align-1.1.3.tgz#ae074e6bdc0c14a431e804e624549c633b000457" dependencies: - string-width "^1.0.2" + string-width "^1.0.2 || 2" window-size@0.1.0: version "0.1.0" From 61ea0c7adb85da7814896915a2d6e7b409561674 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 18:17:40 -0700 Subject: [PATCH 14/24] Wait for watcher to stop --- src/Bundler.js | 2 +- src/Watcher.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Bundler.js b/src/Bundler.js index 77736d180a6..97064a08b9e 100644 --- a/src/Bundler.js +++ b/src/Bundler.js @@ -384,7 +384,7 @@ class Bundler extends EventEmitter { async stop() { if (this.watcher) { - this.watcher.stop(); + await this.watcher.stop(); } if (this.hmr) { diff --git a/src/Watcher.js b/src/Watcher.js index ca51e191225..a7b7fc67ce9 100644 --- a/src/Watcher.js +++ b/src/Watcher.js @@ -129,9 +129,9 @@ class Watcher { /** * Stop watching all paths */ - stop() { + async stop() { this.stopped = true; - this.watcher.close(); + await this.watcher.close(); } } From fd0280e862f673f99999182b4fdbd09bc515cfd6 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 18:21:18 -0700 Subject: [PATCH 15/24] windows why you so silly? --- azure-pipelines-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-template.yml b/azure-pipelines-template.yml index 21e4d0a5928..bbd12aaa328 100644 --- a/azure-pipelines-template.yml +++ b/azure-pipelines-template.yml @@ -31,7 +31,7 @@ jobs: curl -sSf -o rustup-init.exe https://win.rustup.rs rustup-init.exe -y set PATH=%PATH%;%USERPROFILE%\.cargo\bin - echo "##vso[task.setvariable variable=PATH]%PATH%" + @echo "##vso[task.setvariable variable=PATH]%PATH%" rustc -Vv cargo -V displayName: Install Rust From 3e456994d4220822fc5a28275782af8c9d9a0cb0 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 18:31:02 -0700 Subject: [PATCH 16/24] No default rust toolchain --- azure-pipelines-template.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines-template.yml b/azure-pipelines-template.yml index bbd12aaa328..60bdbb210b3 100644 --- a/azure-pipelines-template.yml +++ b/azure-pipelines-template.yml @@ -20,7 +20,7 @@ jobs: # Install Rust - ${{ if ne(parameters.name, 'Windows') }}: - script: | - curl https://sh.rustup.rs -sSf | sh -s -- -y + curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none export PATH="$HOME/.cargo/bin:$PATH" echo "##vso[task.setvariable variable=PATH]$PATH" rustc -Vv @@ -29,7 +29,7 @@ jobs: - ${{ if eq(parameters.name, 'Windows') }}: - script: | curl -sSf -o rustup-init.exe https://win.rustup.rs - rustup-init.exe -y + rustup-init.exe -y --default-toolchain none set PATH=%PATH%;%USERPROFILE%\.cargo\bin @echo "##vso[task.setvariable variable=PATH]%PATH%" rustc -Vv From 4b8ff5736a42cde58a9ff800637992615ec7461d Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 18:31:42 -0700 Subject: [PATCH 17/24] no quotes? --- azure-pipelines-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-template.yml b/azure-pipelines-template.yml index 60bdbb210b3..d1c772c4adb 100644 --- a/azure-pipelines-template.yml +++ b/azure-pipelines-template.yml @@ -31,7 +31,7 @@ jobs: curl -sSf -o rustup-init.exe https://win.rustup.rs rustup-init.exe -y --default-toolchain none set PATH=%PATH%;%USERPROFILE%\.cargo\bin - @echo "##vso[task.setvariable variable=PATH]%PATH%" + @echo ##vso[task.setvariable variable=PATH]%PATH% rustc -Vv cargo -V displayName: Install Rust From 766b5f96b94ea3870dc67e1789f841ab9c53f07d Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 18:33:47 -0700 Subject: [PATCH 18/24] ?? --- azure-pipelines-template.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/azure-pipelines-template.yml b/azure-pipelines-template.yml index d1c772c4adb..ab78201c23d 100644 --- a/azure-pipelines-template.yml +++ b/azure-pipelines-template.yml @@ -23,8 +23,6 @@ jobs: curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none export PATH="$HOME/.cargo/bin:$PATH" echo "##vso[task.setvariable variable=PATH]$PATH" - rustc -Vv - cargo -V displayName: Install Rust - ${{ if eq(parameters.name, 'Windows') }}: - script: | @@ -32,8 +30,6 @@ jobs: rustup-init.exe -y --default-toolchain none set PATH=%PATH%;%USERPROFILE%\.cargo\bin @echo ##vso[task.setvariable variable=PATH]%PATH% - rustc -Vv - cargo -V displayName: Install Rust - script: yarn From b067497a0be9e1a112f6848d3327a6b931a9159d Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 18:40:50 -0700 Subject: [PATCH 19/24] default to nightly --- azure-pipelines-template.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/azure-pipelines-template.yml b/azure-pipelines-template.yml index ab78201c23d..cff30b53270 100644 --- a/azure-pipelines-template.yml +++ b/azure-pipelines-template.yml @@ -20,16 +20,20 @@ jobs: # Install Rust - ${{ if ne(parameters.name, 'Windows') }}: - script: | - curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain none + curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain nightly export PATH="$HOME/.cargo/bin:$PATH" echo "##vso[task.setvariable variable=PATH]$PATH" + rustc -Vv + cargo -V displayName: Install Rust - ${{ if eq(parameters.name, 'Windows') }}: - script: | curl -sSf -o rustup-init.exe https://win.rustup.rs - rustup-init.exe -y --default-toolchain none + rustup-init.exe -y --default-toolchain nightly set PATH=%PATH%;%USERPROFILE%\.cargo\bin - @echo ##vso[task.setvariable variable=PATH]%PATH% + @echo ##vso[task.setvariable variable=PATH]%PATH%;%USERPROFILE%\.cargo\bin + rustc -Vv + cargo -V displayName: Install Rust - script: yarn From e82c17d9ea09a8b12de36fa72f60487b1841d736 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 18:59:51 -0700 Subject: [PATCH 20/24] Attempt to not wait for write file --- test/watcher.js | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/test/watcher.js b/test/watcher.js index b9777f2c978..faf3c0d7400 100644 --- a/test/watcher.js +++ b/test/watcher.js @@ -37,7 +37,7 @@ describe('watcher', function() { let output = await run(bundle); assert.equal(output(), 3); - await fs.writeFile( + fs.writeFile( path.join(inputDir, '/local.js'), 'exports.a = 5; exports.b = 5;' ); @@ -91,7 +91,7 @@ describe('watcher', function() { // change b.js so that it no longer depends on common.js. // This should cause common.js and dependencies to no longer be hoisted to the root bundle. - await fs.writeFile(path.join(inputDir, '/b.js'), 'module.exports = 5;'); + fs.writeFile(path.join(inputDir, '/b.js'), 'module.exports = 5;'); bundle = await nextBundle(b); await assertBundleTree(bundle, { @@ -137,7 +137,7 @@ describe('watcher', function() { ); await sleep(1100); // mtime only has second level precision - await fs.writeFile( + fs.writeFile( path.join(inputDir, '/b.js'), 'module.exports = require("./common")' ); @@ -197,10 +197,7 @@ describe('watcher', function() { assert(b.loadedAssets.has(path.join(inputDir, '/common-dep.js'))); // Get rid of common-dep.js - await fs.writeFile( - path.join(inputDir, '/common.js'), - 'module.exports = 5;' - ); + fs.writeFile(path.join(inputDir, '/common.js'), 'module.exports = 5;'); bundle = await nextBundle(b); await assertBundleTree(bundle, { @@ -261,10 +258,7 @@ describe('watcher', function() { await sleep(100); - await fs.writeFile( - path.join(inputDir, '/.babelrc'), - JSON.stringify(babelrc) - ); + fs.writeFile(path.join(inputDir, '/.babelrc'), JSON.stringify(babelrc)); await nextBundle(b); file = await fs.readFile(path.join(__dirname, '/dist/index.js'), 'utf8'); @@ -293,7 +287,7 @@ describe('watcher', function() { assert.equal(output(), 3); - await fs.writeFile( + fs.writeFile( path.join(inputDir, '/local.js'), 'exports.a = 5; exports.b = 5;' ); From 9597dbfe59072964c26317c4b28920a237e875f0 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 19:02:02 -0700 Subject: [PATCH 21/24] wtf --- azure-pipelines-template.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines-template.yml b/azure-pipelines-template.yml index cff30b53270..5da679fd7f8 100644 --- a/azure-pipelines-template.yml +++ b/azure-pipelines-template.yml @@ -31,7 +31,7 @@ jobs: curl -sSf -o rustup-init.exe https://win.rustup.rs rustup-init.exe -y --default-toolchain nightly set PATH=%PATH%;%USERPROFILE%\.cargo\bin - @echo ##vso[task.setvariable variable=PATH]%PATH%;%USERPROFILE%\.cargo\bin + echo "##vso[task.setvariable variable=PATH]%PATH%;%USERPROFILE%\.cargo\bin" rustc -Vv cargo -V displayName: Install Rust From 1db90538a3087883c5a3733fdbcc4757ed83dccf Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 19:12:24 -0700 Subject: [PATCH 22/24] sleep --- test/watcher.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/watcher.js b/test/watcher.js index faf3c0d7400..571ea7b65f4 100644 --- a/test/watcher.js +++ b/test/watcher.js @@ -287,6 +287,7 @@ describe('watcher', function() { assert.equal(output(), 3); + await sleep(100); fs.writeFile( path.join(inputDir, '/local.js'), 'exports.a = 5; exports.b = 5;' From a1cc5817a939b11a236477a60364b47d1b30ba5e Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 19:49:40 -0700 Subject: [PATCH 23/24] More sleeps --- test/watcher.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/watcher.js b/test/watcher.js index 571ea7b65f4..87607512784 100644 --- a/test/watcher.js +++ b/test/watcher.js @@ -37,6 +37,7 @@ describe('watcher', function() { let output = await run(bundle); assert.equal(output(), 3); + await sleep(100); fs.writeFile( path.join(inputDir, '/local.js'), 'exports.a = 5; exports.b = 5;' @@ -91,6 +92,7 @@ describe('watcher', function() { // change b.js so that it no longer depends on common.js. // This should cause common.js and dependencies to no longer be hoisted to the root bundle. + await sleep(100); fs.writeFile(path.join(inputDir, '/b.js'), 'module.exports = 5;'); bundle = await nextBundle(b); @@ -197,6 +199,7 @@ describe('watcher', function() { assert(b.loadedAssets.has(path.join(inputDir, '/common-dep.js'))); // Get rid of common-dep.js + await sleep(100); fs.writeFile(path.join(inputDir, '/common.js'), 'module.exports = 5;'); bundle = await nextBundle(b); @@ -257,7 +260,6 @@ describe('watcher', function() { babelrc.presets[0][1].targets.browsers.push('IE >= 11'); await sleep(100); - fs.writeFile(path.join(inputDir, '/.babelrc'), JSON.stringify(babelrc)); await nextBundle(b); From bd2296a24fd9e6ff9c44ca0778107b2975622c98 Mon Sep 17 00:00:00 2001 From: Devon Govett Date: Sun, 23 Sep 2018 20:13:24 -0700 Subject: [PATCH 24/24] Always sleep --- test/hmr.js | 98 ++++++++++++++++------------------------------------- 1 file changed, 30 insertions(+), 68 deletions(-) diff --git a/test/hmr.js b/test/hmr.js index 6ba75c04b01..a7b0fee1f68 100644 --- a/test/hmr.js +++ b/test/hmr.js @@ -54,12 +54,8 @@ describe('hmr', function() { ws = new WebSocket('ws://localhost:' + b.options.hmrPort); const buildEnd = nextEvent(b, 'buildEnd'); - - if (process.platform === 'win32') { - await sleep(100); - } - - await fs.writeFile( + await sleep(100); + fs.writeFile( path.join(__dirname, '/input/local.js'), 'exports.a = 5;\nexports.b = 5;' ); @@ -110,11 +106,8 @@ describe('hmr', function() { const buildEnd = nextEvent(b, 'buildEnd'); - if (process.platform === 'win32') { - await sleep(100); - } - - await fs.writeFile( + await sleep(100); + fs.writeFile( path.join(__dirname, '/input/local.js'), 'exports.a = 5; exports.b = 5;' ); @@ -144,11 +137,8 @@ describe('hmr', function() { const buildEnd = nextEvent(b, 'buildEnd'); - if (process.platform === 'win32') { - await sleep(100); - } - - await fs.writeFile( + await sleep(100); + fs.writeFile( path.join(__dirname, '/input/local.js'), 'require("fs"); exports.a = 5; exports.b = 5;' ); @@ -176,11 +166,8 @@ describe('hmr', function() { const buildEnd = nextEvent(b, 'buildEnd'); - if (process.platform === 'win32') { - await sleep(100); - } - - await fs.writeFile( + await sleep(100); + fs.writeFile( path.join(__dirname, '/input/local.js'), 'require("fs"; exports.a = 5; exports.b = 5;' ); @@ -214,11 +201,8 @@ describe('hmr', function() { }); await b.bundle(); - if (process.platform === 'win32') { - await sleep(100); - } - - await fs.writeFile( + await sleep(100); + fs.writeFile( path.join(__dirname, '/input/local.js'), 'require("fs"; exports.a = 5; exports.b = 5;' ); @@ -246,11 +230,8 @@ describe('hmr', function() { const firstBuildEnd = nextEvent(b, 'buildEnd'); - if (process.platform === 'win32') { - await sleep(100); - } - - await fs.writeFile( + await sleep(100); + fs.writeFile( path.join(__dirname, '/input/local.js'), 'require("fs"; exports.a = 5; exports.b = 5;' ); @@ -262,7 +243,8 @@ describe('hmr', function() { const secondBuildEnd = nextEvent(b, 'buildEnd'); - await fs.writeFile( + await sleep(100); + fs.writeFile( path.join(__dirname, '/input/local.js'), 'require("fs"); exports.a = 5; exports.b = 5;' ); @@ -294,11 +276,8 @@ describe('hmr', function() { assert.deepEqual(outputs, [3]); - if (process.platform === 'win32') { - await sleep(100); - } - - await fs.writeFile( + await sleep(100); + fs.writeFile( path.join(__dirname, '/input/local.js'), 'exports.a = 5; exports.b = 5;' ); @@ -332,11 +311,8 @@ describe('hmr', function() { assert.deepEqual(outputs, [3]); - if (process.platform === 'win32') { - await sleep(100); - } - - await fs.writeFile( + await sleep(100); + fs.writeFile( path.join(__dirname, '/input/local.js'), 'exports.a = 5; exports.b = 5;' ); @@ -373,11 +349,8 @@ describe('hmr', function() { await sleep(50); assert.deepEqual(outputs, [3]); - if (process.platform === 'win32') { - await sleep(100); - } - - await fs.writeFile( + await sleep(100); + fs.writeFile( path.join(__dirname, '/input/local.js'), 'exports.a = 5; exports.b = 5;' ); @@ -415,11 +388,8 @@ describe('hmr', function() { let spy = sinon.spy(ctx.document.body, 'appendChild'); - if (process.platform === 'win32') { - await sleep(100); - } - - await fs.writeFile( + await sleep(100); + fs.writeFile( path.join(__dirname, '/input/local.js'), 'require("fs"; exports.a = 5; exports.b = 5;' ); @@ -463,11 +433,8 @@ describe('hmr', function() { let appendSpy = sinon.spy(ctx.document.body, 'appendChild'); let removeSpy = sinon.spy(ctx.document.getElementById('tmp'), 'remove'); - if (process.platform === 'win32') { - await sleep(100); - } - - await fs.writeFile( + await sleep(100); + fs.writeFile( path.join(__dirname, '/input/local.js'), 'require("fs"; exports.a = 5; exports.b = 5;' ); @@ -476,7 +443,8 @@ describe('hmr', function() { assert(appendSpy.called); - await fs.writeFile( + await sleep(100); + fs.writeFile( path.join(__dirname, '/input/local.js'), 'require("fs"); exports.a = 5; exports.b = 5;' ); @@ -509,11 +477,8 @@ describe('hmr', function() { const buildEnd = nextEvent(b, 'buildEnd'); - if (process.platform === 'win32') { - await sleep(100); - } - - await fs.writeFile( + await sleep(100); + fs.writeFile( path.join(__dirname, '/input/local.js'), 'exports.a = 5;\nexports.b = 5;' ); @@ -549,11 +514,8 @@ describe('hmr', function() { const buildEnd = nextEvent(b, 'buildEnd'); - if (process.platform === 'win32') { - await sleep(100); - } - - await fs.writeFile( + await sleep(100); + fs.writeFile( path.join(__dirname, '/input/local.js'), 'exports.a = 5;\nexports.b = 5;' );