Skip to content

Commit d1ef01c

Browse files
authored
v4.0 (#321)
This became a so-called **meta-package**, it does not ship any own functionality, but it is a collection of dependencies. This package's dependencies are tools with one purpose: generate _CycloneDX_ Software Bill-of-Materials (SBOM) from _node_-based projects. * for _npm_-based projects: [`@cyclonedx/cyclonedx-npm`](https://www.npmjs.com/package/%40cyclonedx/cyclonedx-npm) * for _yarn_-based projects: to be announced * for _pnpm_-based projects: to be announced * for _parcel_-based projects: to be announced You should not depend on this very package, but the actual tool that suites your specific ecosystem. If you are looking for a JavaScript/TypeScript library for working with CycloneDX, its data models or serialization, then you might want to try [`@cyclonedx/cyclonedx-library`](https://www.npmjs.com/package/%40cyclonedx/cyclonedx-library). Signed-off-by: Jan Kowalleck <[email protected]>
1 parent e19e598 commit d1ef01c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+137
-34677
lines changed

.dockerignore

Lines changed: 0 additions & 14 deletions
This file was deleted.

.editorconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
insert_final_newline = true
6+
7+
[*.{js,json,yml}]
8+
charset = utf-8
9+
indent_style = space
10+
indent_size = 2

.eslintrc.js

Lines changed: 0 additions & 6 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,9 @@
22

33
version: 2
44
updates:
5-
- package-ecosystem: "npm"
6-
directory: "/"
7-
schedule:
8-
interval: 'weekly'
9-
day: 'saturday'
10-
115
- package-ecosystem: "github-actions"
126
directory: "/"
137
schedule:
148
interval: 'weekly'
159
day: 'saturday'
16-
17-
- package-ecosystem: "docker"
18-
directory: "/"
19-
schedule:
20-
interval: 'weekly'
21-
day: 'saturday'
10+
# this is a meta-package for npm - we dont update our dependencies

.github/workflows/docker.yml

Lines changed: 0 additions & 62 deletions
This file was deleted.

.github/workflows/nodejs.yml

Lines changed: 62 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -3,118 +3,104 @@
33

44
name: Node CI
55

6-
on:
6+
on:
77
push:
88
branches: ["master"]
99
pull_request:
1010
workflow_dispatch:
1111

12-
13-
env:
14-
REPORTS_DIR: CI_reports
15-
NODE_ACTIVE_LTS: "16" # https://nodejs.org/en/about/releases/
16-
12+
## As this project is a meta-package, there are no functionalities nor tests.
13+
## So the only responsibility that must be assured is: this project can be installed under all circumstances.
1714
jobs:
18-
unit-test:
19-
name: UnitTest (node${{ matrix.node-version }}, ${{ matrix.os }})
20-
timeout-minutes: 30
15+
test-npm-install:
16+
name: NPM install (node${{ matrix.node-version }}, ${{ matrix.os }})
17+
timeout-minutes: 5
2118
runs-on: ${{ matrix.os }}
2219
strategy:
2320
fail-fast: false
2421
matrix:
2522
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
26-
node-version:
23+
node-version:
2724
# action based on https://github.com/actions/node-versions/releases
2825
# see also: https://nodejs.org/en/about/releases/
29-
- "18" # current
30-
- "16" # active LTS
31-
- "14"
32-
- "12"
33-
- "12.0.0" # lowest supported
34-
env:
35-
REPORTS_ARTIFACT: tests-reports
26+
- "18" # Current
27+
- "16" # Active LTS
28+
- "14" # Maintenance
3629
steps:
3730
- name: Checkout
3831
# see https://github.com/actions/checkout
3932
uses: actions/checkout@v3
40-
- name: dir setup
41-
run: mkdir ${{ env.REPORTS_DIR }}
4233
- name: Setup Node.js ${{ matrix.node-version }}
4334
# see https://github.com/actions/setup-node
4435
uses: actions/setup-node@v3
4536
with:
4637
node-version: ${{ matrix.node-version }}
47-
cache: "npm"
48-
cache-dependency-path: "**/package-lock.json"
49-
- name: display node version
50-
run: node --version
5138
- name: install project
52-
run: npm ci
53-
- name: setup tests
54-
run: npm run setup-tests
55-
- name: run tests
5639
run: >
57-
npm run test:jest --
58-
--ci
59-
--no-cache
60-
--all
61-
--reporters=default
62-
--reporters=jest-junit
63-
--coverage
64-
--coverageDirectory="$JEST_COVERAGE_OUTPUT_DIR"
65-
--coverageReporters="text"
66-
--coverageReporters="clover"
67-
env:
68-
JEST_COVERAGE_OUTPUT_DIR: ${{ env.REPORTS_DIR }}/${{ matrix.os }}_${{ matrix.node-version }}
69-
## see https://www.npmjs.com/package/jest-junit
70-
JEST_JUNIT_OUTPUT_DIR: ${{ env.REPORTS_DIR }}/${{ matrix.os }}_${{ matrix.node-version }}
71-
JEST_JUNIT_OUTPUT_NAME: junit.xml
72-
## ! no npm build at the moment
73-
- name: Artifact reports
74-
if: ${{ ! cancelled() }}
75-
# see https://github.com/actions/upload-artifact
76-
uses: actions/upload-artifact@v3
77-
with:
78-
name: ${{ env.REPORTS_ARTIFACT }}
79-
path: ${{ env.REPORTS_DIR }}
80-
if-no-files-found: error
81-
82-
standards:
83-
name: Standards
84-
timeout-minutes: 30
85-
runs-on: "ubuntu-latest"
40+
npm install
41+
--no-audit
42+
--no-package-lock
43+
--verbose
44+
# proven: the package can be installed. that's enough for a meta-package
45+
test-yarn-install:
46+
name: YARN install (node${{ matrix.node-version }}, ${{ matrix.os }})
47+
timeout-minutes: 5
48+
runs-on: ${{ matrix.os }}
49+
strategy:
50+
fail-fast: false
51+
matrix:
52+
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
53+
node-version:
54+
# action based on https://github.com/actions/node-versions/releases
55+
# see also: https://nodejs.org/en/about/releases/
56+
- "18" # Current
57+
- "16" # Active LTS
58+
- "14" # Maintenance
8659
steps:
8760
- name: Checkout
88-
# see https://github.com/actions/checkout
61+
## see https://github.com/actions/checkout
8962
uses: actions/checkout@v3
90-
- name: Setup Node.js ${{ env.NODE_ACTIVE_LTS }}
63+
- name: Setup Node.js ${{ matrix.node-version }}
9164
# see https://github.com/actions/setup-node
9265
uses: actions/setup-node@v3
9366
with:
94-
node-version: ${{ env.NODE_ACTIVE_LTS }}
95-
cache: "npm"
96-
cache-dependency-path: "**/package-lock.json"
67+
node-version: ${{ matrix.node-version }}
9768
- name: install project
98-
run: npm ci
99-
- name: run tests
100-
run: npm run test:standard
101-
102-
jsdoc:
103-
name: JSDoc
104-
timeout-minutes: 30
105-
runs-on: "ubuntu-latest"
69+
run: >
70+
yarn install
71+
--inline-builds
72+
# proven: the package can be installed. that's enough for a meta-package
73+
test-pnpm-install:
74+
name: PNPM install (node${{ matrix.node-version }}, ${{ matrix.os }})
75+
timeout-minutes: 5
76+
runs-on: ${{ matrix.os }}
77+
strategy:
78+
fail-fast: false
79+
matrix:
80+
os: [ "ubuntu-latest", "windows-latest", "macos-latest" ]
81+
node-version:
82+
# action based on https://github.com/actions/node-versions/releases
83+
# see also: https://nodejs.org/en/about/releases/
84+
- "18" # Current
85+
- "16" # Active LTS
86+
- "14" # Maintenance
10687
steps:
10788
- name: Checkout
10889
# see https://github.com/actions/checkout
10990
uses: actions/checkout@v3
110-
- name: Setup Node.js ${{ env.NODE_ACTIVE_LTS }}
91+
- name: Setup Node.js ${{ matrix.node-version }}
11192
# see https://github.com/actions/setup-node
11293
uses: actions/setup-node@v3
11394
with:
114-
node-version: ${{ env.NODE_ACTIVE_LTS }}
115-
cache: "npm"
116-
cache-dependency-path: "**/package-lock.json"
95+
node-version: ${{ matrix.node-version }}
96+
- name: setup pnpm
97+
## see https://github.com/pnpm/action-setup
98+
uses: pnpm/[email protected]
99+
with:
100+
version: latest
117101
- name: install project
118-
run: npm ci
119-
- name: generate JSDoc
120-
run: npm run generate-jsdocs
102+
run: >
103+
pnpm install
104+
--no-lockfile
105+
--verbose
106+
# proven: the package can be installed. that's enough for a meta-package

0 commit comments

Comments
 (0)