@cyclonedx/cdxgen 8.5.3 → 8.6.0

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/utils.test.js CHANGED
@@ -786,7 +786,7 @@ test("get dart metadata", async () => {
786
786
  url: "https://github.com/dart-lang/async"
787
787
  }
788
788
  });
789
- });
789
+ }, 120000);
790
790
 
791
791
  test("parse cabal freeze", async () => {
792
792
  expect(await utils.parseCabalData(null)).toEqual([]);
@@ -1629,7 +1629,6 @@ test("parseGemspecData", async () => {
1629
1629
  });
1630
1630
 
1631
1631
  test("parse requirements.txt", async () => {
1632
- jest.setTimeout(120000);
1633
1632
  let deps = await utils.parseReqFile(
1634
1633
  fs.readFileSync("./test/data/requirements.comments.txt", {
1635
1634
  encoding: "utf-8"
@@ -1661,6 +1660,10 @@ test("parse poetry.lock", async () => {
1661
1660
  fs.readFileSync("./test/data/poetry1.lock", { encoding: "utf-8" })
1662
1661
  );
1663
1662
  expect(deps.length).toEqual(67);
1663
+ deps = await utils.parsePoetrylockData(
1664
+ fs.readFileSync("./test/data/poetry-cpggen.lock", { encoding: "utf-8" })
1665
+ );
1666
+ expect(deps.length).toEqual(68);
1664
1667
  });
1665
1668
 
1666
1669
  test("parse wheel metadata", () => {
@@ -2082,3 +2085,51 @@ test("parse swift deps files", () => {
2082
2085
  repository: { url: "https://github.com/apple/swift-argument-parser.git" }
2083
2086
  });
2084
2087
  });
2088
+
2089
+ test("pypi version solver tests", () => {
2090
+ const versionsList = [
2091
+ "1.0.0",
2092
+ "1.0.1",
2093
+ "1.1.0",
2094
+ "1.2.0.dev1+hg.5.b11e5e6f0b0b",
2095
+ "2.0.3",
2096
+ "3.0.12-alpha.12",
2097
+ "4.0.0"
2098
+ ];
2099
+ expect(utils.guessPypiMatchingVersion(versionsList, "<4")).toEqual(
2100
+ "3.0.12-alpha.12"
2101
+ );
2102
+ expect(utils.guessPypiMatchingVersion(versionsList, ">1.0.0 <3.0.0")).toEqual(
2103
+ "2.0.3"
2104
+ );
2105
+ expect(utils.guessPypiMatchingVersion(versionsList, "== 1.0.1")).toEqual(
2106
+ "1.0.1"
2107
+ );
2108
+ expect(utils.guessPypiMatchingVersion(versionsList, "~= 1.0.1")).toEqual(
2109
+ "1.0.1"
2110
+ );
2111
+ expect(
2112
+ utils.guessPypiMatchingVersion(versionsList, ">= 2.0.1, == 2.8.*")
2113
+ ).toEqual(null);
2114
+ expect(
2115
+ utils.guessPypiMatchingVersion(
2116
+ ["2.0.0", "2.0.1", "2.4.0", "2.8.4", "2.9.0", "3.0.1"],
2117
+ ">= 2.0.1, == 2.8.*"
2118
+ )
2119
+ ).toEqual("2.8.4");
2120
+ expect(
2121
+ utils.guessPypiMatchingVersion(
2122
+ versionsList,
2123
+ "== 1.1.0; python_version < '3.8'"
2124
+ )
2125
+ ).toEqual("1.1.0");
2126
+ expect(
2127
+ utils.guessPypiMatchingVersion(versionsList, "<3.6,>1.9,!=1.9.6,<4.0a0")
2128
+ ).toEqual("3.0.12-alpha.12");
2129
+ expect(
2130
+ utils.guessPypiMatchingVersion(versionsList, ">=1.4.2,<2.2,!=1.5.*,!=1.6.*")
2131
+ ).toEqual("2.0.3");
2132
+ expect(utils.guessPypiMatchingVersion(versionsList, ">=1.21.1,<3")).toEqual(
2133
+ "2.0.3"
2134
+ );
2135
+ });
@@ -1,27 +0,0 @@
1
- [
2
- {"license": "Apache-2.0", "group": "cloud.google.com", "name": "go"},
3
- {"license": "Apache-2.0", "group": "cloud.google.com/go", "name": "*"},
4
- {"license": "Apache-2.0", "group": "cuelang.org", "name": "go"},
5
- {"license": "MIT", "group": "pack.ag", "name": "amqp"},
6
- {"license": "Apache-2.0", "group": "google.golang.org", "name": "*"},
7
- {"license": "BSD-3-Clause", "group": "golang.org/x", "name": "*"},
8
- {"license": "BSD-3-Clause", "group": "dmitri.shuralyov.com/gpu", "name": "*"},
9
- {"license": "Apache-2.0", "group": "contrib.go.opencensus.io", "name": "*"},
10
- {"license": "Apache-2.0", "group": "git.apache.org", "name": "*"},
11
- {"license": "Apache-2.0", "group": ".", "name": "go.opencensus.io"},
12
- {"license": "MIT", "group": "sigs.k8s.io", "name": "*"},
13
- {"license": "BSD-3-Clause", "group": "rsc.io", "name": "*"},
14
- {"license": "Apache-2.0", "group": "openpitrix.io", "name": "*"},
15
- {"license": "BSD-3-Clause", "group": "modernc.org", "name": "*"},
16
- {"license": "Apache-2.0", "group": "kubesphere.io", "name": "*"},
17
- {"license": "Apache-2.0", "group": "k8s.io", "name": "*"},
18
- {"license": "Apache-2.0", "group": "istio.io", "name": "*"},
19
- {"license": "MIT", "group": "honnef.co/go", "name": "*"},
20
- {"license": "Apache-2.0", "group": ".", "name": "gotest.tools"},
21
- {"license": "Apache-2.0", "group": "gopkg.in", "name": "*"},
22
- {"license": "Apache-2.0", "group": "code.cloudfoundry.org", "name": "*"},
23
- {"license": "BSD-3-Clause", "group": "gonum.org/v1", "name": "*"},
24
- {"license": "Apache-2.0", "group": "gomodules.xyz/jsonpatch", "name": "*"},
25
- {"license": "MIT", "group": "go.uber.org", "name": "*"},
26
- {"license": "MIT", "group": "go.etcd.io", "name": "*"}
27
- ]
package/vendor-alias.json DELETED
@@ -1,10 +0,0 @@
1
- {
2
- "commons-": "org.apache.commons",
3
- "spring-": "org.springframework",
4
- "jackson-dataformat-": "com.fasterxml.jackson.dataformat",
5
- "jackson-databind": "com.fasterxml.jackson.core",
6
- "jackson-core": "com.fasterxml.jackson.core",
7
- "jackson-annotations": "com.fasterxml.jackson.core",
8
- "jackson-jaxrs-": "com.fasterxml.jackson.jaxrs",
9
- "spring.boot": "org.springframework.boot"
10
- }
File without changes