From fc20313fc9b457d6676ad273227f6bad3c652b92 Mon Sep 17 00:00:00 2001 From: littleblack111 Date: Mon, 15 Jan 2024 18:39:22 +0800 Subject: upgrade for package --- .../stream-shift/.github/workflows/test.yml | 23 ++++++++++++++++++++++ node_modules/stream-shift/.travis.yml | 6 ------ node_modules/stream-shift/index.js | 4 ++-- node_modules/stream-shift/package.json | 2 +- node_modules/stream-shift/test.js | 8 ++++---- 5 files changed, 30 insertions(+), 13 deletions(-) create mode 100644 node_modules/stream-shift/.github/workflows/test.yml delete mode 100644 node_modules/stream-shift/.travis.yml (limited to 'node_modules/stream-shift') diff --git a/node_modules/stream-shift/.github/workflows/test.yml b/node_modules/stream-shift/.github/workflows/test.yml new file mode 100644 index 00000000..9b94272e --- /dev/null +++ b/node_modules/stream-shift/.github/workflows/test.yml @@ -0,0 +1,23 @@ +name: Build Status +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + build: + strategy: + matrix: + node-version: [lts/*] + os: [ubuntu-latest, macos-latest, windows-latest] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + - run: npm install + - run: npm test diff --git a/node_modules/stream-shift/.travis.yml b/node_modules/stream-shift/.travis.yml deleted file mode 100644 index ecd4193f..00000000 --- a/node_modules/stream-shift/.travis.yml +++ /dev/null @@ -1,6 +0,0 @@ -language: node_js -node_js: - - "0.10" - - "0.12" - - "4" - - "6" diff --git a/node_modules/stream-shift/index.js b/node_modules/stream-shift/index.js index 33cc4d74..ea267c8c 100644 --- a/node_modules/stream-shift/index.js +++ b/node_modules/stream-shift/index.js @@ -11,9 +11,9 @@ function getStateLength (state) { // Since node 6.3.0 state.buffer is a BufferList not an array if (state.buffer.head) { return state.buffer.head.data.length + } else if (state.buffer.length > 0 && state.buffer[0]) { + return state.buffer[0].length } - - return state.buffer[0].length } return state.length diff --git a/node_modules/stream-shift/package.json b/node_modules/stream-shift/package.json index fe7347a0..26bfc982 100644 --- a/node_modules/stream-shift/package.json +++ b/node_modules/stream-shift/package.json @@ -1,6 +1,6 @@ { "name": "stream-shift", - "version": "1.0.1", + "version": "1.0.2", "description": "Returns the next buffer/object in a stream's readable queue", "main": "index.js", "dependencies": {}, diff --git a/node_modules/stream-shift/test.js b/node_modules/stream-shift/test.js index c0222c37..bf4ed668 100644 --- a/node_modules/stream-shift/test.js +++ b/node_modules/stream-shift/test.js @@ -9,8 +9,8 @@ tape('shifts next', function (t) { passthrough.write('hello') passthrough.write('world') - t.same(shift(passthrough), Buffer('hello')) - t.same(shift(passthrough), Buffer('world')) + t.same(shift(passthrough), Buffer.from('hello')) + t.same(shift(passthrough), Buffer.from('world')) t.end() }) @@ -20,8 +20,8 @@ tape('shifts next with core', function (t) { passthrough.write('hello') passthrough.write('world') - t.same(shift(passthrough), Buffer('hello')) - t.same(shift(passthrough), Buffer('world')) + t.same(shift(passthrough), Buffer.from('hello')) + t.same(shift(passthrough), Buffer.from('world')) t.end() }) -- cgit v1.2.3