@springfield/ham-radio-utils 3.2.0 → 3.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/package.json +8 -8
- package/dist/utils/bcd-to-number.d.ts +0 -2
- package/dist/utils/bcd-to-number.d.ts.map +0 -1
- package/dist/utils/bcd-to-number.js +0 -9
- package/dist/utils/bcd-to-number.js.map +0 -1
- package/dist/utils/number-to-bcd.d.ts +0 -2
- package/dist/utils/number-to-bcd.d.ts.map +0 -1
- package/dist/utils/number-to-bcd.js +0 -12
- package/dist/utils/number-to-bcd.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,23 @@
|
|
|
1
|
+
## <small>3.2.2 (2025-11-01)</small>
|
|
2
|
+
|
|
3
|
+
* Merge branch 'renovate/chai-5.x' into 'main' ([2c843db](https://gitlab.com/springfield-ham-radio/app/ham-radio-utils/commit/2c843db))
|
|
4
|
+
* Merge branch 'renovate/chai-6.x' into 'main' ([9546de7](https://gitlab.com/springfield-ham-radio/app/ham-radio-utils/commit/9546de7))
|
|
5
|
+
* Merge branch 'renovate/oxlint-1.x' into 'main' ([27fee77](https://gitlab.com/springfield-ham-radio/app/ham-radio-utils/commit/27fee77))
|
|
6
|
+
* Merge branch 'renovate/springfield-ham-radio-api-16.x' into 'main' ([c4d2cb3](https://gitlab.com/springfield-ham-radio/app/ham-radio-utils/commit/c4d2cb3))
|
|
7
|
+
* chore(deps): update dependency @types/chai to v5.2.3 ([ce690d4](https://gitlab.com/springfield-ham-radio/app/ham-radio-utils/commit/ce690d4))
|
|
8
|
+
* chore(deps): update dependency chai to v6.2.0 ([0e36648](https://gitlab.com/springfield-ham-radio/app/ham-radio-utils/commit/0e36648))
|
|
9
|
+
* chore(deps): update dependency oxlint to v1.24.0 ([2545952](https://gitlab.com/springfield-ham-radio/app/ham-radio-utils/commit/2545952))
|
|
10
|
+
* fix(deps): update dependency @springfield/ham-radio-api to ^16.3.2 ([ab53bbb](https://gitlab.com/springfield-ham-radio/app/ham-radio-utils/commit/ab53bbb))
|
|
11
|
+
|
|
12
|
+
## <small>3.2.1 (2025-10-15)</small>
|
|
13
|
+
|
|
14
|
+
* Merge branch 'renovate/loglayer-6.x' into 'main' ([146abba](https://gitlab.com/springfield-ham-radio/app/ham-radio-utils/commit/146abba))
|
|
15
|
+
* Merge branch 'renovate/semantic-release-monorepo' into 'main' ([15acc48](https://gitlab.com/springfield-ham-radio/app/ham-radio-utils/commit/15acc48))
|
|
16
|
+
* Merge branch 'renovate/yarn-monorepo' into 'main' ([594bf44](https://gitlab.com/springfield-ham-radio/app/ham-radio-utils/commit/594bf44))
|
|
17
|
+
* fix(deps): update dependency loglayer to ^6.9.1 ([bc734cc](https://gitlab.com/springfield-ham-radio/app/ham-radio-utils/commit/bc734cc))
|
|
18
|
+
* chore(deps): update dependency @semantic-release/gitlab to v13.2.9 ([c07f157](https://gitlab.com/springfield-ham-radio/app/ham-radio-utils/commit/c07f157))
|
|
19
|
+
* chore(deps): update yarn to v4.10.3 ([1187dba](https://gitlab.com/springfield-ham-radio/app/ham-radio-utils/commit/1187dba))
|
|
20
|
+
|
|
1
21
|
## 3.2.0 (2025-09-14)
|
|
2
22
|
|
|
3
23
|
* feat: update @springfield/ham-radio-api to ^16.3.0 and add addressEndianness to radio protocol schem ([6b8d9da](https://gitlab.com/springfield-ham-radio/app/ham-radio-utils/commit/6b8d9da))
|
package/package.json
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@springfield/ham-radio-utils",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.2",
|
|
4
4
|
"author": "Bryan Hunt",
|
|
5
5
|
"license": "MIT",
|
|
6
|
-
"packageManager": "yarn@4.
|
|
6
|
+
"packageManager": "yarn@4.10.3",
|
|
7
7
|
"readme": "README.md",
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "dist/index.js",
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"dependencies": {
|
|
54
|
-
"@springfield/ham-radio-api": "^16.3.
|
|
54
|
+
"@springfield/ham-radio-api": "^16.3.2",
|
|
55
55
|
"ajv": "^8.17.1",
|
|
56
56
|
"ajv-formats": "^3.0.1",
|
|
57
57
|
"fishery": "^2.3.1",
|
|
58
|
-
"loglayer": "^6.
|
|
58
|
+
"loglayer": "^6.9.1",
|
|
59
59
|
"sprintf-js": "^1.1.3"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
@@ -63,12 +63,12 @@
|
|
|
63
63
|
"@commitlint/config-conventional": "19.8.1",
|
|
64
64
|
"@semantic-release/changelog": "6.0.3",
|
|
65
65
|
"@semantic-release/git": "10.0.1",
|
|
66
|
-
"@semantic-release/gitlab": "13.2.
|
|
67
|
-
"@types/chai": "5.2.
|
|
66
|
+
"@semantic-release/gitlab": "13.2.9",
|
|
67
|
+
"@types/chai": "5.2.3",
|
|
68
68
|
"@types/sprintf-js": "1.1.4",
|
|
69
|
-
"chai": "6.0
|
|
69
|
+
"chai": "6.2.0",
|
|
70
70
|
"husky": "9.1.7",
|
|
71
|
-
"oxlint": "1.
|
|
71
|
+
"oxlint": "1.24.0",
|
|
72
72
|
"semantic-release": "24.2.8",
|
|
73
73
|
"semantic-release-yarn": "3.0.2",
|
|
74
74
|
"typescript": "5.9.2"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bcd-to-number.d.ts","sourceRoot":"","sources":["../../src/utils/bcd-to-number.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,MAAM,UAAU,EAAE,SAAS,MAAM,EAAE,SAAS,MAAM,KAAG,MAShF,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export const bcdToNumber = (data, offset, length) => {
|
|
2
|
-
let bcd = 0;
|
|
3
|
-
const size = length ?? data.length;
|
|
4
|
-
for (let i = offset ?? 0; i < size; i++) {
|
|
5
|
-
bcd |= data[i] << (8 * i);
|
|
6
|
-
}
|
|
7
|
-
return parseInt(bcd.toString(16), 10) * 10;
|
|
8
|
-
};
|
|
9
|
-
//# sourceMappingURL=bcd-to-number.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"bcd-to-number.js","sourceRoot":"","sources":["../../src/utils/bcd-to-number.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAgB,EAAE,MAAe,EAAE,MAAe,EAAU,EAAE;IACxF,IAAI,GAAG,GAAG,CAAC,CAAC;IACZ,MAAM,IAAI,GAAG,MAAM,IAAI,IAAI,CAAC,MAAM,CAAC;IAEnC,KAAK,IAAI,CAAC,GAAG,MAAM,IAAI,CAAC,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC;QACxC,GAAG,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,CAAC;IAED,OAAO,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,GAAG,EAAE,CAAC;AAC7C,CAAC,CAAC","sourcesContent":["export const bcdToNumber = (data: Uint8Array, offset?: number, length?: number): number => {\n let bcd = 0;\n const size = length ?? data.length;\n\n for (let i = offset ?? 0; i < size; i++) {\n bcd |= data[i] << (8 * i);\n }\n\n return parseInt(bcd.toString(16), 10) * 10;\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"number-to-bcd.d.ts","sourceRoot":"","sources":["../../src/utils/number-to-bcd.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,UAc3C,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export const numberToBcd = (value) => {
|
|
2
|
-
const digits = value.toString(10);
|
|
3
|
-
const numberOfBytes = Math.ceil(digits.length / 2);
|
|
4
|
-
const data = new Uint8Array(numberOfBytes);
|
|
5
|
-
let bcd = parseInt(digits, 16);
|
|
6
|
-
for (let i = 0; i < numberOfBytes; i++) {
|
|
7
|
-
data[i] = bcd & 0xff;
|
|
8
|
-
bcd >>= 8;
|
|
9
|
-
}
|
|
10
|
-
return data;
|
|
11
|
-
};
|
|
12
|
-
//# sourceMappingURL=number-to-bcd.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"number-to-bcd.js","sourceRoot":"","sources":["../../src/utils/number-to-bcd.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAa,EAAc,EAAE;IACvD,MAAM,MAAM,GAAG,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;IAClC,MAAM,aAAa,GAAG,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;IAEnD,MAAM,IAAI,GAAG,IAAI,UAAU,CAAC,aAAa,CAAC,CAAC;IAE3C,IAAI,GAAG,GAAG,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAE/B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,aAAa,EAAE,CAAC,EAAE,EAAE,CAAC;QACvC,IAAI,CAAC,CAAC,CAAC,GAAG,GAAG,GAAG,IAAI,CAAC;QACrB,GAAG,KAAK,CAAC,CAAC;IACZ,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC","sourcesContent":["export const numberToBcd = (value: number): Uint8Array => {\n const digits = value.toString(10);\n const numberOfBytes = Math.ceil(digits.length / 2);\n\n const data = new Uint8Array(numberOfBytes);\n\n let bcd = parseInt(digits, 16);\n\n for (let i = 0; i < numberOfBytes; i++) {\n data[i] = bcd & 0xff;\n bcd >>= 8;\n }\n\n return data;\n};\n"]}
|