diff --git a/.gitattributes b/.gitattributes index 68ecb66..dca3e58 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,5 @@ -* text eol=lf +# Set the default behavior, in case people don't have core.autocrlf set. +* text=auto + +# JS files should always have LF line endings on checkout. +*.js text eol=lf diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..465167d --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: CI + +on: + push: + branches: + - master + - 'v*' # older version branches + tags: + - '*' + + pull_request: {} + schedule: + - cron: '0 6 * * 0' # weekly, on sundays + +jobs: + test: + name: "Node ${{ matrix.node }} - ${{ matrix.os }}" + runs-on: "${{matrix.os}}-latest" + + strategy: + matrix: + os: ['ubuntu', 'windows', 'macOS'] + node: ['10', '12', '14'] + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node }} + - name: install dependencies + run: yarn install --frozen-lockfile + - name: test + run: yarn test + + floating-test: + name: Floating dependencies + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v1 + - uses: actions/setup-node@v1 + with: + node-version: '14.x' + - name: install dependencies + run: yarn install --no-lockfile + - name: test + run: yarn test + diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ec9203a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,36 +0,0 @@ -language: node_js -node_js: - - "lts/argon" - - "lts/boron" - - "lts/carbon" - - "10" - -sudo: false -dist: trusty - -cache: - yarn: true - -before_install: - - curl -o- -L https://yarnpkg.com/install.sh | bash - - export PATH=$HOME/.yarn/bin:$PATH - -install: - - yarn install --no-lockfile - -script: - - yarn test:all - -before_deploy: - - yarn global add auto-dist-tag - - auto-dist-tag --write - -deploy: - provider: npm - email: stefan.penner+ember-cli@gmail.com - api_key: - secure: MGME3tiODyEWOdBlWDXJW8pYbN8Ltz8rgnWSqthv5nCY/oN1SVm0mUOvGydCgoHxtszqUpvfExoBmnD/tcaXXVSzajfAWsa+DDx3zKvAcAbsNRsmPgBuWV8/Ptpq6bglx8kwGHeCatqQgghv0Mm7UrpMEZwbq3u7pzAVjNnUeSo= - skip_cleanup: true - on: - tags: true - repo: babel/broccoli-babel-transpiler diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 4c638dd..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,29 +0,0 @@ -# http://www.appveyor.com/docs/appveyor-yml - -# Test against these versions of Node.js. -environment: - matrix: - - nodejs_version: "10" - -# Install scripts. (runs after repo cloning) -install: - - git rev-parse HEAD - # Get the latest stable version of Node 0.STABLE.latest - - ps: Install-Product node $env:nodejs_version - # Typical npm stuff. - - md C:\nc - - npm config set cache C:\nc - - npm version - - npm install --no-optional - -# Post-install test scripts. -test_script: - # Output useful info for debugging. - - npm version - - cmd: npm run test:all - -# Don't actually build. -build: off - -# Set build version format here instead of in the admin panel. -version: "{build}" diff --git a/lib/parallel-api.js b/lib/parallel-api.js index 9a521a9..91dad50 100644 --- a/lib/parallel-api.js +++ b/lib/parallel-api.js @@ -26,7 +26,10 @@ function getWorkerPool() { if (existingPool) { pool = existingPool; } else { - pool = workerpool.pool(path.join(__dirname, 'worker.js'), { maxWorkers: JOBS }); + pool = workerpool.pool(path.join(__dirname, 'worker.js'), { + maxWorkers: JOBS, + workerType: 'process' + }); process[globalPoolID] = pool; } return pool; diff --git a/package.json b/package.json index 0ce06a1..0384ac7 100644 --- a/package.json +++ b/package.json @@ -44,7 +44,7 @@ "heimdalljs-logger": "^0.1.7", "json-stable-stringify": "^1.0.0", "rsvp": "^4.8.2", - "workerpool": "^2.3.0" + "workerpool": "^6.1.4" }, "devDependencies": { "amd-name-resolver": "1.2.0", diff --git a/tests/test.js b/tests/test.js index 63c8142..07e5087 100644 --- a/tests/test.js +++ b/tests/test.js @@ -961,7 +961,7 @@ describe('on error', function() { expect.fail('', '', 'babel should throw an error'); }, function onFailure(err) { - expect(err.message).to.eql('Worker terminated unexpectedly'); + expect(err.message).to.include('Workerpool Worker terminated Unexpectedly'); } ); }); @@ -1377,7 +1377,7 @@ describe('buildFromParallelApiInfo()', function() { expect.fail('', '', 'should have thrown an error'); } catch (err) { - expect(err.message).to.eql("Cannot find module 'some/file/that/does/not/exist'"); + expect(err.message).to.include("Cannot find module 'some/file/that/does/not/exist'"); } }); diff --git a/yarn.lock b/yarn.lock index 1b9f9b5..6ee1643 100644 --- a/yarn.lock +++ b/yarn.lock @@ -941,7 +941,7 @@ number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" -object-assign@4.1.1, object-assign@^4.1.0: +object-assign@^4.1.0: version "4.1.1" resolved "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" @@ -1212,11 +1212,10 @@ wordwrap@~0.0.2: version "0.0.3" resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz#a3d5da6cd5c0bc0008d37234bbaf1bed63059107" -workerpool@^2.3.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-2.3.0.tgz#86c5cbe946b55e7dc9d12b1936c8801a6e2d744d" - dependencies: - object-assign "4.1.1" +workerpool@^6.1.4: + version "6.1.4" + resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.1.4.tgz#6a972b6df82e38d50248ee2820aa98e2d0ad3090" + integrity sha512-jGWPzsUqzkow8HoAvqaPWTUPCrlPJaJ5tY8Iz7n1uCz3tTp6s3CDG0FF1NsX42WNlkRSW6Mr+CDZGnNoSsKa7g== wrappy@1: version "1.0.2"