Skip to content

Commit

Permalink
Merge branch 'current' into web-streams-example
Browse files Browse the repository at this point in the history
  • Loading branch information
metcoder95 authored Jun 14, 2023
2 parents 5de9f60 + 1069a3d commit 93402e4
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 15 deletions.
13 changes: 10 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
interval: "monthly"
open-pull-requests-limit: 10

- package-ecosystem: "npm"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10
25 changes: 19 additions & 6 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,43 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install Node.js 17
- name: Install Node.js
uses: actions/setup-node@v1
with:
node-version: v17.x
node-version: v20.x
- name: Install dependencies
run: npm install
- name: Check linting
run: npm run lint

test:
needs: [lint]
name: Test
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
node-version: [12.x, 14.x, 16.x, 17.x]
node-version: [16.x, 18.x, 20.x]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
persist-credentials: false

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}

- uses: actions/cache@v3
id: check-cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}-
- name: Install Dependencies
run: npm install
- name: Test
- name: Run Tests
run: npm test
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

Written in TypeScript.

For Node.js 12.x and higher.
For Node.js 16.x and higher.

[MIT Licensed][].

Expand Down Expand Up @@ -787,6 +787,11 @@ as a configuration option in lieu of always creating their own.
## Release Notes
### 4.0.0
* Drop Node.js 14.x support
* Add Node.js 20.x to CI
### 3.2.0
* Adds a new `PISCINA_DISABLE_ATOMICS` environment variable as an alternative way of
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "piscina",
"version": "3.3.0",
"version": "4.0.0",
"description": "A fast, efficient Node.js Worker Thread Pool implementation",
"main": "./dist/src/index.js",
"exports": {
Expand Down
6 changes: 4 additions & 2 deletions test/simple-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,10 @@ test('passing valid workerData works', async ({ equal }) => {
test('passing invalid workerData does not work', async ({ throws }) => {
throws(() => new Piscina(({
filename: resolve(__dirname, 'fixtures/simple-workerdata.ts'),
workerData: process.env
}) as any), /Cannot transfer object of unsupported type./);
workerData: {
hello () {}
}
}) as any), /could not be cloned./);
});

test('filename can be a file:// URL', async ({ equal }) => {
Expand Down

0 comments on commit 93402e4

Please sign in to comment.