File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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 )
Original file line number Diff line number Diff line change @@ -16,6 +16,12 @@ limitations under the License.
1616SPDX-License-Identifier: Apache-2.0
1717Copyright (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+ */
1925export function randomSerialNumber ( ) : string {
2026 const b = [
2127 Math . round ( Math . random ( ) * 0xFFFF ) ,
You can’t perform that action at this time.
0 commit comments