From 8a263d91c94d81154b8d64e434efca65cb348a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20VIDAL?= Date: Tue, 26 May 2026 20:45:50 +0200 Subject: [PATCH 1/7] add check-node-engine to CI/CD --- .github/workflows/tests.yml | 3 +++ package.json | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 50f6e10..912c36c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -76,6 +76,9 @@ jobs: - name: Run build run: npm run build + - name: Check node engine + run: npm run check-node-engine + - name: Check requires (used-deps-analyzer) run: npm run check-requires diff --git a/package.json b/package.json index c6f3b4e..ce28d7e 100644 --- a/package.json +++ b/package.json @@ -31,12 +31,13 @@ "build-back": "npm run clean-back && npx tsc --project ./tsconfig.json", "build": "npm run build-back", + "check-node-engine": "npx check-node-engine", "check-requires": "npx used-deps-analyzer ./package.json ./lib/src --no-dev", "check-updates": "npx check-version-modules --no-fail-at-major --fail-at-minor --fail-at-patch", "unit-tests": "npx mocha", "unit-tests-local": "npx nyc --reporter=html --reporter=text mocha", - "tests": "npm run lint && npm run check-requires && npm run check-updates && npm run build && npm run unit-tests-local" + "tests": "npm run lint && npm run check-node-engine && npm run check-requires && npm run check-updates && npm run build && npm run unit-tests-local" }, @@ -50,6 +51,7 @@ "dependencies": {}, "devDependencies": { "@types/node": "25.6.0", + "check-node-engine": "1.0.0", "check-version-modules": "2.3.0", "colors": "1.4.0", "eslint-plugin-personnallinter": "git+ssh://git@github.com/Psychopoulet/eslint-plugin-personnallinter", From 53fcabb6843504f34f071363578be87f440e4996 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20VIDAL?= Date: Tue, 26 May 2026 20:47:58 +0200 Subject: [PATCH 2/7] update minimal LTS --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index ce28d7e..0cc29f0 100644 --- a/package.json +++ b/package.json @@ -45,7 +45,7 @@ "lib/cjs" ], "engines": { - "node": ">=22.22.0" + "node": ">=22.22.3" }, "dependencies": {}, From 0d8b03367b506a479592cfc507e4734e557ced1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20VIDAL?= Date: Tue, 26 May 2026 20:48:31 +0200 Subject: [PATCH 3/7] remove useless scripts --- package.json | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/package.json b/package.json index 0cc29f0..11e4166 100644 --- a/package.json +++ b/package.json @@ -19,8 +19,6 @@ "scripts": { - "prepare": "npx husky || true", - "lint-back": "npx eslint --config .eslintrc-back.js --ext .ts,.cts,.mts ./lib/src/**/*", "lint-tests": "npx eslint --config .eslintrc-tests.js --ext .js,.cjs,.mjs ./test/**/*", "lint": "npm run lint-back && npm run lint-tests", @@ -63,12 +61,6 @@ "used-deps-analyzer": "0.3.0" }, - "husky": { - "hooks": { - "pre-commit": "npm run lint", - "pre-push": "npm run build && npm run unit-tests-local" - } - }, "keywords": [ "frame", "Buffer", @@ -93,6 +85,7 @@ "MSB", "LSB" ], + "author": "Sébastien VIDAL", "contributors": [ { From 70497d71cde707486b418fa6211bd798307be626 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20VIDAL?= Date: Tue, 26 May 2026 20:49:54 +0200 Subject: [PATCH 4/7] update github actions versions --- .github/workflows/publish.yml | 6 +++--- .github/workflows/tests.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 2088690..c8445bc 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -55,7 +55,7 @@ jobs: steps: - name: Ensure steps to avoid vulnerabilities - uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # curl -s https://api.github.com/repos/step-security/harden-runner/commits/v2.14.2 | jq -r .sha + uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # curl -s https://api.github.com/repos/step-security/harden-runner/commits/v2.19.3 | jq -r .sha with: egress-policy: audit @@ -71,7 +71,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Setup NodeJS v${{ env.NODE_VERSION }} - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # curl -s https://api.github.com/repos/actions/setup-node/commits/v6.3.0 | jq -r .sha + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # curl -s https://api.github.com/repos/actions/setup-node/commits/v6.4.0 | jq -r .sha with: node-version: ${{ env.NODE_VERSION }} @@ -116,7 +116,7 @@ jobs: fetch-tags: true # so local checks stay consistent; ls-remote still authoritative - name: Setup NodeJS v${{ env.NODE_VERSION }} - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # curl -s https://api.github.com/repos/actions/setup-node/commits/v6.3.0 | jq -r .sha + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # curl -s https://api.github.com/repos/actions/setup-node/commits/v6.4.0 | jq -r .sha with: node-version: ${{ env.NODE_VERSION }} registry-url: 'https://registry.npmjs.org' diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 912c36c..9d7d7f3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -48,7 +48,7 @@ jobs: steps: - name: Ensure steps to avoid vulnerabilities - uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # curl -s https://api.github.com/repos/step-security/harden-runner/commits/v2.14.2 | jq -r .sha + uses: step-security/harden-runner@ab7a9404c0f3da075243ca237b5fac12c98deaa5 # curl -s https://api.github.com/repos/step-security/harden-runner/commits/v2.19.3 | jq -r .sha with: egress-policy: audit @@ -63,7 +63,7 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Setup NodeJS v${{ env.NODE_VERSION }} - uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # curl -s https://api.github.com/repos/actions/setup-node/commits/v6.3.0 | jq -r .sha + uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # curl -s https://api.github.com/repos/actions/setup-node/commits/v6.4.0 | jq -r .sha with: node-version: ${{ env.NODE_VERSION }} From 6d1aa7b0842dda92829c8e02faa28dae2a1e6af5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20VIDAL?= Date: Tue, 26 May 2026 21:04:10 +0200 Subject: [PATCH 5/7] update packages --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 11e4166..878aa57 100644 --- a/package.json +++ b/package.json @@ -48,13 +48,13 @@ "dependencies": {}, "devDependencies": { - "@types/node": "25.6.0", + "@types/node": "25.9.1", "check-node-engine": "1.0.0", - "check-version-modules": "2.3.0", + "check-version-modules": "2.5.0", "colors": "1.4.0", "eslint-plugin-personnallinter": "git+ssh://git@github.com/Psychopoulet/eslint-plugin-personnallinter", "husky": "9.1.7", - "mocha": "11.7.5", + "mocha": "11.7.6", "nyc": "18.0.0", "rimraf": "6.1.3", "typescript": "5.9.3", From 1d06447ac8e6fac3a0c6c0f4d0ac952d318ac74a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20VIDAL?= Date: Tue, 26 May 2026 21:04:20 +0200 Subject: [PATCH 6/7] improve lint --- lib/src/SplitFrames.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/src/SplitFrames.ts b/lib/src/SplitFrames.ts index 47dadf5..bc32ff1 100644 --- a/lib/src/SplitFrames.ts +++ b/lib/src/SplitFrames.ts @@ -168,7 +168,7 @@ export default class SplitFrames extends Transform { KEYS.forEach((key: string): void => { - const size: number = "object" === typeof this._specifics[key] && this._specifics[key] instanceof Buffer ? (this._specifics[key] as Buffer).length : 1; + const size: number = "object" === typeof this._specifics[key] && this._specifics[key] instanceof Buffer ? this._specifics[key].length : 1; for (let foundAt: number = this._searchTags(this._specifics[key]); -1 < foundAt; foundAt = this._searchTags(this._specifics[key])) { @@ -300,7 +300,7 @@ export default class SplitFrames extends Transform { found = true; const size: number = "object" === typeof this._specifics[key] && this._specifics[key] instanceof Buffer - ? (this._specifics[key] as Buffer).length + ? this._specifics[key].length : 1; this.emit(key); @@ -328,7 +328,7 @@ export default class SplitFrames extends Transform { const firstStart: iSearchedBits | undefined = this._searchFirstStart(); - const size: number = "object" === typeof this._specifics[key] && this._specifics[key] instanceof Buffer ? (this._specifics[key] as Buffer).length : 1; + const size: number = "object" === typeof this._specifics[key] && this._specifics[key] instanceof Buffer ? this._specifics[key].length : 1; for ( let foundAt: number = this._searchTags(this._specifics[key]), i = 0; From 10d2bf7d5598a396569de3a7e8a3bfdee97a3cfd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20VIDAL?= Date: Tue, 26 May 2026 21:04:33 +0200 Subject: [PATCH 7/7] 2.8.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 878aa57..b0f4684 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "split-frames", - "version": "2.7.0", + "version": "2.8.0", "description": "Split Buffer frames from streams.", "type": "commonjs",