From e41b147c021b1b92c5043611802cbf7be79d8761 Mon Sep 17 00:00:00 2001 From: Robin Bolscher Date: Wed, 20 May 2026 16:26:31 +0200 Subject: [PATCH 1/4] chore: use npm run build --if-present instead of jq guard --- .github/workflows/publish-package-npm.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/workflows/publish-package-npm.yml b/.github/workflows/publish-package-npm.yml index 674483d..ca7b448 100644 --- a/.github/workflows/publish-package-npm.yml +++ b/.github/workflows/publish-package-npm.yml @@ -63,13 +63,7 @@ jobs: run: npm ci --ignore-scripts --audit=false - name: Build - run: | - if jq --exit-status '(.scripts // {}) | has("build")' package.json > /dev/null; then - echo "Running npm run build..." - npm run build - else - echo "No build script; skipping." - fi + run: npm run build --if-present - name: Publish dry run if: github.event_name == 'workflow_dispatch' From 162a922c876d6b81f1394d54e47f6a9cf5a77f56 Mon Sep 17 00:00:00 2001 From: Bob van de Vijver Date: Thu, 27 Aug 2026 12:14:19 +0200 Subject: [PATCH 2/4] Add UTC data type support ZCL Spec definition: > UTCTime is an unsigned 32-bit value representing the number of seconds since 0 hours, 0 minutes, 0 seconds, on the 1st of January, 2000 UTC (Universal Coordinated Time). > Note that UTCTime does not hold a standard textual representation of Universal Coordinated Time (UTC). However, UTC (to a precision of one second) may be derived from it. Which means it can be implemented using the default unsigned number converters. --- index.d.ts | 2 +- lib/DataTypes.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.d.ts b/index.d.ts index 57a46c8..3384135 100644 --- a/index.d.ts +++ b/index.d.ts @@ -82,7 +82,7 @@ declare module "@athombv/data-types" { // ToD // date - // UTC + UTC: DataType; // clusterId // attribId diff --git a/lib/DataTypes.js b/lib/DataTypes.js index 4a8d2f2..726ed9c 100644 --- a/lib/DataTypes.js +++ b/lib/DataTypes.js @@ -496,7 +496,7 @@ const DataTypes = { // ToD : new DataType(224, 'ToD' , 4 , ), // date : new DataType(225, 'date' , 4 , ), -// UTC : new DataType(226, 'UTC' , 4 , ), + UTC : new DataType(226, 'UTC' , 4 , uintToBuf , uintFromBuf ), // clusterId : new DataType(232, 'clusterId' , 2 , ), // attribId : new DataType(233, 'attribId' , 2 , ), From c0f39a66d412712b122272dcaf8dd69333d1447c Mon Sep 17 00:00:00 2001 From: Robin Bolscher Date: Fri, 28 Aug 2026 15:28:16 +0200 Subject: [PATCH 3/4] test: Pin UTC data type to number in type regression tests The UTC data type was added without a type-level assertion, so a regression in its index.d.ts declaration would go unnoticed. Add it to the primitives struct alongside the other numeric types. Refs #49 --- test/types-test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/types-test.ts b/test/types-test.ts index 1bf4dfa..ae1d451 100644 --- a/test/types-test.ts +++ b/test/types-test.ts @@ -42,6 +42,7 @@ const ints = Struct("Ints", { i8: DataTypes.int8, i32: DataTypes.int32, u4: DataTypes.uint4, + utc: DataTypes.UTC, sng: DataTypes.single, dbl: DataTypes.double, }).fromBuffer(emptyBuf()); @@ -51,6 +52,7 @@ const _intU32: number = ints.u32; const _intI8: number = ints.i8; const _intI32: number = ints.i32; const _intU4: number = ints.u4; +const _intUtc: number = ints.utc; const _intSng: number = ints.sng; const _intDbl: number = ints.dbl; From 0e4c60bdf5240a87c62fe7083f5caa88bd357dfd Mon Sep 17 00:00:00 2001 From: Homey Github Actions Bot Date: Fri, 28 Aug 2026 13:30:15 +0000 Subject: [PATCH 4/4] 1.3.0 --- package-lock.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3fb2fe2..cf62f56 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@athombv/data-types", - "version": "1.2.2", + "version": "1.3.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 6d79103..50374ac 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@athombv/data-types", - "version": "1.2.2", + "version": "1.3.0", "description": "Binary Data Parsers", "main": "index.js", "types": "index.d.ts",