Skip to content

Commit 952e7a7

Browse files
authored
Docs: announce random serial number in README (#598)
Signed-off-by: Jan Kowalleck <[email protected]>
1 parent c032d28 commit 952e7a7

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

HISTORY.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
44

55
## unreleased
66

7+
* Docs
8+
* Announce and annotate the generator for BOM's SerialNumber ([#588] via [#598])
9+
10+
[#598]: https://github.com/CycloneDX/cyclonedx-javascript-library/pull/598
11+
712
## 1.13.0 - 2023-03-28
813

914
* Fixed
@@ -14,7 +19,8 @@ All notable changes to this project will be documented in this file.
1419
Also, the setter no longer throws exceptions, since no string format is illegal.
1520
This is considered a non-breaking behavior change, because the corresponding normalizers assure valid data results.
1621
* Added
17-
* Bom serialNumber generator: `Utils.BomUtility.randomSerialNumber()` ([#588] via [#597])
22+
* Published generator for BOM's SerialNumber: `Utils.BomUtility.randomSerialNumber()` ([#588] via [#597])
23+
The code was donated from [cyclonedx-node-npm](https://github.com/CycloneDX/cyclonedx-node-npm/).
1824
* Deprecation
1925
* Type alias `Types.UrnUuid = string` became deprecated (via [#597])
2026
Use type `string` instead.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ written in _TypeScript_ and compiled for the target.
7272
* `Reference`, `ReferenceRepository`
7373
* `Source`
7474
* `Vulnerability`, `VulnerabilityRepository`
75+
* Utilities for the following use cases:
76+
* Generate valid random SerialNumbers for `Bom.serialNumber`
7577
* Factories for the following use cases:
7678
* Create data models from any license descriptor string
7779
* Create `PackageURL` from `Component` data models
@@ -85,7 +87,7 @@ written in _TypeScript_ and compiled for the target.
8587
* Normalizers that convert data models to JSON structures
8688
* Normalizers that convert data models to XML structures
8789
* Universal serializer that converts `Bom` data models to JSON string
88-
* Serializer that converts `Bom` data models to XML string:
90+
* Specific Serializer that converts `Bom` data models to XML string:
8991
* Specific to _WebBrowsers_: implementation utilizes browser-specific document generators and printers.
9092
* Specific to _Node.js_: implementation plugs/requires/utilizes one of the following _optional_ libraries
9193
* [xmlbuilder2](https://www.npmjs.com/package/xmlbuilder2)

src/utils/bomUtility.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,12 @@ limitations under the License.
1616
SPDX-License-Identifier: Apache-2.0
1717
Copyright (c) OWASP Foundation. All Rights Reserved.
1818
*/
19+
20+
/**
21+
* Generate valid random SerialNumbers for {@link Models.Bom.serialNumber | Models.Bom.serialNumber}.
22+
*
23+
* @since 1.13.0
24+
*/
1925
export function randomSerialNumber (): string {
2026
const b = [
2127
Math.round(Math.random() * 0xFFFF),

0 commit comments

Comments
 (0)