@cyclonedx/cyclonedx-library 6.3.1 → 6.3.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.
@@ -17,23 +17,30 @@ SPDX-License-Identifier: Apache-2.0
17
17
  Copyright (c) OWASP Foundation. All Rights Reserved.
18
18
  */
19
19
 
20
+ /* eslint-disable jsdoc/valid-types --
21
+ JSDoc is still missing support for tuples - https://github.com/jsdoc/jsdoc/issues/1703
22
+ */
23
+ /**
24
+ * Prioritized list of possible implementations.
25
+ * @type {[string, function():(Function|*)][]}
26
+ */
20
27
  const possibleStringifiers = [
21
- // prioritized list of possible implementations
22
- 'xmlbuilder2'
28
+ ['xmlbuilder2', () => require('./stringifiers/xmlbuilder2')]
23
29
  ]
30
+ /* eslint-enable jsdoc/valid-types */
24
31
 
25
32
  module.exports.stringify = function () {
26
33
  throw new Error(
27
34
  'No stringifier available.' +
28
35
  ' Please install any of the optional dependencies: ' +
29
- possibleStringifiers.join(', ')
36
+ possibleStringifiers.map(kv => kv[0]).join(', ')
30
37
  )
31
38
  }
32
39
  module.exports.stringify.fails = true
33
40
 
34
- for (const file of possibleStringifiers) {
41
+ for (const [, getStringifier] of possibleStringifiers) {
35
42
  try {
36
- const possibleStringifier = require(`./stringifiers/${file}`)
43
+ const possibleStringifier = getStringifier()
37
44
  if (typeof possibleStringifier === 'function') {
38
45
  module.exports.stringify = possibleStringifier
39
46
  break
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cyclonedx/cyclonedx-library",
3
- "version": "6.3.1",
3
+ "version": "6.3.2",
4
4
  "description": "Core functionality of CycloneDX for JavaScript (Node.js or WebBrowser).",
5
5
  "license": "Apache-2.0",
6
6
  "keywords": [
@@ -34,10 +34,6 @@
34
34
  "url": "https://github.com/CycloneDX/cyclonedx-javascript-library/issues"
35
35
  },
36
36
  "funding": [
37
- {
38
- "type": "github",
39
- "url": "https://github.com/sponsors/jkowalleck"
40
- },
41
37
  {
42
38
  "type": "individual",
43
39
  "url": "https://owasp.org/donate/?reponame=www-project-cyclonedx&title=OWASP+CycloneDX"
@@ -80,23 +76,23 @@
80
76
  "@types/mocha": "^10",
81
77
  "@types/node": "ts5.3",
82
78
  "@types/spdx-expression-parse": "^3",
83
- "c8": "8.0.1",
79
+ "c8": "^8||^9",
84
80
  "deepmerge": "^4.2.2",
85
- "eslint": "8.55.0",
81
+ "eslint": "8.57.0",
86
82
  "eslint-config-standard": "17.1.0",
87
- "eslint-config-standard-with-typescript": "42.0.0",
83
+ "eslint-config-standard-with-typescript": "43.0.1",
88
84
  "eslint-plugin-header": "3.1.1",
89
- "eslint-plugin-jsdoc": "46.9.0",
90
- "eslint-plugin-simple-import-sort": "10.0.0",
85
+ "eslint-plugin-jsdoc": "48.2.0",
86
+ "eslint-plugin-simple-import-sort": "12.0.0",
91
87
  "eslint-plugin-tsdoc": "0.2.17",
92
88
  "fast-glob": "^3.3.1",
93
- "mocha": "10.2.0",
89
+ "mocha": "10.3.0",
94
90
  "npm-run-all": "^4.1.5",
95
91
  "ts-loader": "9.5.1",
96
92
  "typedoc": "^0.25.0",
97
93
  "typedoc-plugin-missing-exports": "^2.0.1",
98
94
  "typescript": "5.3.3",
99
- "webpack": "5.89.0",
95
+ "webpack": "5.90.3",
100
96
  "webpack-cli": "5.1.4",
101
97
  "webpack-node-externals": "3.0.0"
102
98
  },