From 7ff401a5bcceb434bacb71b450a29ec63729980f Mon Sep 17 00:00:00 2001 From: Daniel Lando Date: Tue, 7 Nov 2023 13:27:35 +0000 Subject: [PATCH 1/3] chore: bump deps and actions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit bl ^5.0.0 → ^6.0.8 debug ^4.1.1 → ^4.3.4 readable-stream ^3.6.0 → ^4.4.2 standard ^16.0.0 → ^17.1.0 tape ^5.0.1 → ^5.7.2 --- .github/workflows/ci.yml | 6 +++--- .npmrc | 1 + benchmarks/generateNet.js | 1 - benchmarks/parse.js | 1 - benchmarks/writeToStream.js | 1 - package.json | 10 +++++----- test.js | 8 ++++---- 7 files changed, 13 insertions(+), 15 deletions(-) create mode 100644 .npmrc diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5ae70cb..121e4b8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,13 +8,13 @@ jobs: strategy: matrix: - node-version: [12.x, 14.x, 16.x] + node-version: [16.x, 18.x, 20.x] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v3 - name: Use Node.js - uses: actions/setup-node@v1 + uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..43c97e7 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +package-lock=false diff --git a/benchmarks/generateNet.js b/benchmarks/generateNet.js index 852ac94..43d81ac 100644 --- a/benchmarks/generateNet.js +++ b/benchmarks/generateNet.js @@ -1,4 +1,3 @@ - const mqtt = require('../') const max = 1000000 let i = 0 diff --git a/benchmarks/parse.js b/benchmarks/parse.js index e6df8ee..d43d1f0 100644 --- a/benchmarks/parse.js +++ b/benchmarks/parse.js @@ -1,4 +1,3 @@ - const mqtt = require('../') const parser = mqtt.parser() const max = 10000000 diff --git a/benchmarks/writeToStream.js b/benchmarks/writeToStream.js index 919b53d..f6934ea 100644 --- a/benchmarks/writeToStream.js +++ b/benchmarks/writeToStream.js @@ -1,4 +1,3 @@ - const mqtt = require('../') const max = 1000000 let i = 0 diff --git a/package.json b/package.json index 7d75bba..ebcc74f 100644 --- a/package.json +++ b/package.json @@ -35,14 +35,14 @@ "homepage": "https://github.com/mqttjs/mqtt-packet", "devDependencies": { "pre-commit": "^1.2.2", - "readable-stream": "^3.6.0", - "standard": "^16.0.0", + "readable-stream": "^4.4.2", + "standard": "^17.1.0", "tap-spec": "^5.0.0", - "tape": "^5.0.1" + "tape": "^5.7.2" }, "dependencies": { - "bl": "^5.0.0", - "debug": "^4.1.1", + "bl": "^6.0.8", + "debug": "^4.3.4", "process-nextick-args": "^2.0.1" } } diff --git a/test.js b/test.js index dfe741a..78c9455 100644 --- a/test.js +++ b/test.js @@ -1786,8 +1786,8 @@ test('split publish longer', t => { retain: false, qos: 0, dup: false, - length: length, - topic: topic, + length, + topic, payload: Buffer.from('a'.repeat(payloadLength)) } @@ -1818,8 +1818,8 @@ test('split length parse', t => { retain: false, qos: 0, dup: false, - length: length, - topic: topic, + length, + topic, payload: Buffer.from('a'.repeat(payloadLength)) } From 9369135768b9a766751f8d35650a6cceba4dc5f9 Mon Sep 17 00:00:00 2001 From: Daniel Lando Date: Tue, 7 Nov 2023 13:31:14 +0000 Subject: [PATCH 2/3] chore: add release script --- package.json | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index ebcc74f..7403e8c 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,31 @@ ], "scripts": { "test": "tape test.js | tap-spec && standard", - "ci": "tape test.js && node testRandom && standard" + "ci": "tape test.js && node testRandom && standard", + "release": "read -p 'GITHUB_TOKEN: ' GITHUB_TOKEN && export GITHUB_TOKEN=$GITHUB_TOKEN && release-it" + }, + "release-it": { + "github": { + "release": true + }, + "git": { + "tagName": "v${version}", + "commitMessage": "chore(release): ${version}" + }, + "hooks": { + "before:init": [ + "npm run test" + ] + }, + "npm": { + "publish": true + }, + "plugins": { + "@release-it/conventional-changelog": { + "preset": "angular", + "infile": "CHANGELOG.md" + } + } }, "pre-commit": "test", "repository": { @@ -34,8 +58,10 @@ }, "homepage": "https://github.com/mqttjs/mqtt-packet", "devDependencies": { + "@release-it/conventional-changelog": "^7.0.2", "pre-commit": "^1.2.2", "readable-stream": "^4.4.2", + "release-it": "^16.2.1", "standard": "^17.1.0", "tap-spec": "^5.0.0", "tape": "^5.7.2" From b3df2918fb482581eccddf0e4c9dddaa8d912443 Mon Sep 17 00:00:00 2001 From: Daniel Lando Date: Tue, 7 Nov 2023 16:50:19 +0000 Subject: [PATCH 3/3] chore: remove release script --- package.json | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/package.json b/package.json index 7403e8c..ebcc74f 100644 --- a/package.json +++ b/package.json @@ -13,31 +13,7 @@ ], "scripts": { "test": "tape test.js | tap-spec && standard", - "ci": "tape test.js && node testRandom && standard", - "release": "read -p 'GITHUB_TOKEN: ' GITHUB_TOKEN && export GITHUB_TOKEN=$GITHUB_TOKEN && release-it" - }, - "release-it": { - "github": { - "release": true - }, - "git": { - "tagName": "v${version}", - "commitMessage": "chore(release): ${version}" - }, - "hooks": { - "before:init": [ - "npm run test" - ] - }, - "npm": { - "publish": true - }, - "plugins": { - "@release-it/conventional-changelog": { - "preset": "angular", - "infile": "CHANGELOG.md" - } - } + "ci": "tape test.js && node testRandom && standard" }, "pre-commit": "test", "repository": { @@ -58,10 +34,8 @@ }, "homepage": "https://github.com/mqttjs/mqtt-packet", "devDependencies": { - "@release-it/conventional-changelog": "^7.0.2", "pre-commit": "^1.2.2", "readable-stream": "^4.4.2", - "release-it": "^16.2.1", "standard": "^17.1.0", "tap-spec": "^5.0.0", "tape": "^5.7.2"