Skip to content

Commit

Permalink
fix node 16 for v2 (#309)
Browse files Browse the repository at this point in the history
* move to github actions (#306)

# Conflicts:
#	.travis.yml

* add node 12 14 and 16 to test matrix

* Fix ERR_INVALID_ARG_TYPE on Node.js nightly (#230)

# Conflicts:
#	src/WorkerHandler.js

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
  • Loading branch information
mansona and aduh95 authored Jun 17, 2021
1 parent cfa5680 commit ac32508
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Node.js CI

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
include:
- node-version: 6.x
install-command: npm install
- node-version: 8.x
install-command: npm ci
- node-version: 10.x
install-command: npm ci
- node-version: 12.x
install-command: npm ci
- node-version: 14.x
install-command: npm ci
- node-version: 16.x
install-command: npm ci

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: ${{ matrix.install-command }}
- run: npm test
5 changes: 0 additions & 5 deletions .travis.yml

This file was deleted.

5 changes: 3 additions & 2 deletions lib/WorkerHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,9 @@ function WorkerHandler(script, options) {
// send all queued requests to worker
function dispatchQueuedRequests()
{
me.requestQueue.forEach(me.worker.send.bind(me.worker));
me.requestQueue = [];
for(const request of me.requestQueue.splice(0)) {
me.worker.send(request);
}
}

// listen for worker messages error and exit
Expand Down

0 comments on commit ac32508

Please sign in to comment.