Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
8e2fed3
v1.0 kickoff
jkowalleck Jul 23, 2022
a2c3996
v1.0 initial setup
jkowalleck Jul 23, 2022
59be04c
reproducible demos basics
jkowalleck Jul 24, 2022
e191e56
Merge pull request #3 from CycloneDX/basic-integration-tests
jkowalleck Jul 25, 2022
4a49e8d
docs: fix typos and instructions
jkowalleck Jul 25, 2022
a4195d9
implement cli options
jkowalleck Jul 25, 2022
0583fe5
implement cli options
jkowalleck Jul 25, 2022
be7355f
implement cli options
jkowalleck Jul 25, 2022
69f54dd
implement cli options
jkowalleck Jul 25, 2022
a206f37
cli encapsulation
jkowalleck Jul 26, 2022
3b14d88
publish shrinkwrap
jkowalleck Jul 26, 2022
0af9090
Merge pull request #7 from CycloneDX/publish-shrinkwrap
jkowalleck Jul 26, 2022
cedde35
initial implementation (#5)
jkowalleck Aug 14, 2022
0348c00
docs (#54)
jkowalleck Aug 14, 2022
0852a11
docs: bundled dependencies (#13)
jkowalleck Aug 14, 2022
d433852
fix typo
jkowalleck Aug 14, 2022
9ebe2c1
fix typo
jkowalleck Aug 14, 2022
052d66e
bumped @cyclonedx/cyclonedx-library 1.3.1 -> 1.3.2
jkowalleck Aug 15, 2022
0720925
chore: clean up todos
jkowalleck Aug 15, 2022
620fed2
prefix nested component's bomRef (#55)
jkowalleck Aug 15, 2022
3fdb7ff
bump @cyclonedx/cyclonedx-library 1.3.2 -> 1.3.3
jkowalleck Aug 15, 2022
4221912
announce beta stat
jkowalleck Aug 16, 2022
412eeff
bump @cyclonedx/cyclonedx-library 1.3.3 -> 1.3.4
jkowalleck Aug 16, 2022
bd5440a
cleanup research & development file
jkowalleck Aug 16, 2022
cbee2dd
demo: workspaces and insights (#57)
jkowalleck Aug 18, 2022
0c34ed4
custom property to indicate devDependencies (#58)
jkowalleck Aug 19, 2022
003f066
shorter fallback bomrefs (#59)
jkowalleck Aug 19, 2022
d777743
Beta release prep (#60)
jkowalleck Aug 20, 2022
18fc1c1
chore: tighten release process
jkowalleck Aug 20, 2022
c72320e
chore: allow release without preid
jkowalleck Aug 20, 2022
58a55f2
1.0.0-beta.1
jkowalleck Aug 20, 2022
3f5314f
chore: allow release without preid
jkowalleck Aug 20, 2022
9aa1058
chore: allow release without preid
jkowalleck Aug 20, 2022
01434fd
less debug (#69)
jkowalleck Aug 21, 2022
f8290b6
1.0.0-beta.2
jkowalleck Aug 21, 2022
ebb594d
docs: known dirs and trim node version
jkowalleck Aug 22, 2022
435d6ca
use lock instead of shrinkwrap (#72)
jkowalleck Aug 23, 2022
cc1bcd4
prepare 1.0.0-beta.3
jkowalleck Aug 23, 2022
a848867
1.0.0-beta.3
jkowalleck Aug 23, 2022
3ed8f01
fix: runner on windows should be working (#74)
jkowalleck Aug 25, 2022
cb7c22e
fix: make debug output clearer (#75)
jkowalleck Aug 25, 2022
df3ce55
improve-error-detection (#76)
jkowalleck Aug 25, 2022
e25d5b9
chore: prepare v1.0.0-beta.4
jkowalleck Aug 25, 2022
8c8ea71
1.0.0-beta.4
jkowalleck Aug 25, 2022
07edf6f
docs: descrbe lockfile situation
jkowalleck Aug 25, 2022
fb6955c
docs: npm property taxonomy
jkowalleck Aug 26, 2022
e579907
integration test for the cli (#56)
jkowalleck Aug 26, 2022
6f75568
support node14 (#80)
jkowalleck Sep 5, 2022
d01fa95
docs: explain call for local install and usage better (#105)
jkowalleck Sep 5, 2022
a340d16
chore(deps-dev): bump typescript from 4.7.4 to 4.8.2 (#86)
dependabot[bot] Sep 5, 2022
e322dc0
chore(deps-dev): bump @types/node from 18.7.11 to 18.7.14 (#104)
dependabot[bot] Sep 5, 2022
69d62bd
docs: improved the HISTORY
jkowalleck Sep 5, 2022
bbd821b
chore(deps-dev): bump jest-junit from 14.0.0 to 14.0.1 (#87)
dependabot[bot] Sep 6, 2022
df4630d
fix: find npm when run by npx (#91)
Codex- Sep 6, 2022
1457be2
style: block-comment for `eslint-disable-next-line`
jkowalleck Sep 6, 2022
08c82cc
chore(deps): bump @types/yargs from 17.0.11 to 17.0.12 (#98)
dependabot[bot] Sep 6, 2022
9fe24cd
chore(deps): bump caniuse-lite from 1.0.30001382 to 1.0.30001388 (#94)
dependabot[bot] Sep 6, 2022
ace774b
chore(deps): bump @types/babel__traverse from 7.18.0 to 7.18.1 (#95)
dependabot[bot] Sep 6, 2022
4c6ca88
chore(deps): bump @sinclair/typebox from 0.24.28 to 0.24.34 (#99)
dependabot[bot] Sep 6, 2022
b165f16
chore(deps): bump update-browserslist-db from 1.0.5 to 1.0.7 (#100)
dependabot[bot] Sep 6, 2022
510074d
chore(deps): bump es-abstract from 1.20.1 to 1.20.2 (#103)
dependabot[bot] Sep 6, 2022
2280472
chore(deps): bump eslint-plugin-react from 7.30.1 to 7.31.4 (#102)
dependabot[bot] Sep 6, 2022
b49270a
chore(deps): bump electron-to-chromium from 1.4.227 to 1.4.241 (#101)
dependabot[bot] Sep 6, 2022
2da5d20
chode(deps): bump dependencies (#106)
jkowalleck Sep 6, 2022
0fd07e9
chore: prepare v1.0.0-beta.5
jkowalleck Sep 6, 2022
d130de8
1.0.0-beta.5
jkowalleck Sep 6, 2022
64b7dc4
docs: made install instructions more clear and precise
jkowalleck Sep 6, 2022
48b0d40
feat: add CLI switch `--ignore-npm-errors` to ignore/suppress NPM err…
jkowalleck Sep 6, 2022
35fd0c8
chore: prepare v1.0.0-beta.6
jkowalleck Sep 6, 2022
773e7b9
1.0.0-beta.6
jkowalleck Sep 6, 2022
7a8d9d0
feat: shorter purls (#108)
jkowalleck Sep 7, 2022
75dd824
chore: prepare v1.0.0-beta.7
jkowalleck Sep 7, 2022
d4a29f0
1.0.0-beta.7
jkowalleck Sep 7, 2022
8e5927a
improve usage of `npm_execpath` (#110)
jkowalleck Sep 7, 2022
bd0ee3a
chore: remove unused dependency `packageurl-js`
jkowalleck Sep 7, 2022
59e4d65
QA: eslint plugins (#111)
jkowalleck Sep 9, 2022
afeb123
chore(deps): bump @cyclonedx/cyclonedx-library from 1.4.0 to 1.4.1 (#…
dependabot[bot] Sep 10, 2022
4cac14d
chore(deps-dev): bump @types/node from 18.7.15 to 18.7.16 (#118)
dependabot[bot] Sep 10, 2022
2a47f5d
chore(deps): bump ci-info from 3.3.2 to 3.4.0 (#116)
dependabot[bot] Sep 10, 2022
73f1544
chore(deps): bump @sinclair/typebox from 0.24.35 to 0.24.39 (#115)
dependabot[bot] Sep 10, 2022
705a23b
chore(deps): bump caniuse-lite from 1.0.30001390 to 1.0.30001393 (#112)
dependabot[bot] Sep 10, 2022
83b9e36
chore(deps): bump electron-to-chromium from 1.4.242 to 1.4.247 (#114)
dependabot[bot] Sep 10, 2022
42da763
chore(deps-dev): bump typescript from 4.8.2 to 4.8.3 (#117)
dependabot[bot] Sep 10, 2022
286e3ab
chore(deps-dev): bump fast-glob from 3.2.11 to 3.2.12 (#119)
dependabot[bot] Sep 10, 2022
d28be5b
docs: write HISTORY
jkowalleck Sep 10, 2022
1b9a1c8
chore: prepare v1.0.0-beta.8
jkowalleck Sep 10, 2022
fc8f5c5
1.0.0-beta.8
jkowalleck Sep 10, 2022
f24e97e
Demo example results (#123)
jkowalleck Sep 10, 2022
c48eb66
chore(deps): bump @cyclonedx/cyclonedx-library from 1.4.1 to 1.4.2 (#…
dependabot[bot] Sep 10, 2022
203f592
chore(deps): bump packageurl-js from 0.0.7 to 1.0.0 (#120)
dependabot[bot] Sep 10, 2022
4067a6a
chore(deps): bump @cyclonedx/cyclonedx-library from 1.4.2 to 1.5.1 (#…
dependabot[bot] Sep 18, 2022
97c3848
chore(deps): bump eslint-plugin-n from 15.2.5 to 15.3.0 (#157)
dependabot[bot] Sep 24, 2022
3848e82
chore(deps-dev): bump @types/node from 18.7.16 to 18.7.19 (#155)
dependabot[bot] Sep 24, 2022
9b63150
chore(deps): bump @typescript-eslint/parser from 5.36.2 to 5.38.0 (#151)
dependabot[bot] Sep 24, 2022
f07d26b
chore(deps): bump @typescript-eslint/eslint-plugin from 5.36.2 to 5.3…
dependabot[bot] Sep 24, 2022
46a1355
chore(deps): bump @babel/helper-compilation-targets (#126)
dependabot[bot] Sep 24, 2022
a98e7fb
chore(deps): bump @babel/traverse from 7.19.0 to 7.19.1 (#127)
dependabot[bot] Sep 24, 2022
30708ee
chore(deps-dev): bump eslint-config-standard-with-typescript (#129)
dependabot[bot] Sep 24, 2022
7183b45
chore(deps): bump @babel/parser from 7.19.0 to 7.19.1 (#131)
dependabot[bot] Sep 24, 2022
3787f8c
chore(deps): bump get-intrinsic from 1.1.2 to 1.1.3 (#132)
dependabot[bot] Sep 24, 2022
250d549
chore(deps): bump @babel/helper-validator-identifier (#133)
dependabot[bot] Sep 24, 2022
66943b2
chore(deps): bump @eslint/eslintrc from 1.3.1 to 1.3.2 (#134)
dependabot[bot] Sep 24, 2022
ecf978d
chore(deps): bump @babel/compat-data from 7.19.0 to 7.19.1 (#135)
dependabot[bot] Sep 24, 2022
0bb3a5d
chore(deps): bump update-browserslist-db from 1.0.7 to 1.0.9 (#138)
dependabot[bot] Sep 24, 2022
c0380eb
chore(deps): bump @sinclair/typebox from 0.24.39 to 0.24.42 (#140)
dependabot[bot] Sep 24, 2022
27e56a8
chore(deps): bump es-abstract from 1.20.2 to 1.20.3 (#156)
dependabot[bot] Sep 24, 2022
da31755
chore(deps): bump electron-to-chromium from 1.4.247 to 1.4.260 (#154)
dependabot[bot] Sep 24, 2022
16492aa
chore(deps): bump @humanwhocodes/config-array from 0.10.4 to 0.10.5 (…
dependabot[bot] Sep 24, 2022
28787ad
chore(deps): bump fb-watchman from 2.0.1 to 2.0.2 (#152)
dependabot[bot] Sep 24, 2022
431a17f
chore(deps): bump caniuse-lite from 1.0.30001393 to 1.0.30001410 (#149)
dependabot[bot] Sep 24, 2022
6207984
chore(deps): bump @types/yargs from 17.0.12 to 17.0.13 (#147)
dependabot[bot] Sep 24, 2022
b163380
chore(deps): bump @types/babel__traverse from 7.18.1 to 7.18.2 (#145)
dependabot[bot] Sep 24, 2022
7346bb5
chore(deps): bump @types/prettier from 2.7.0 to 2.7.1 (#148)
dependabot[bot] Sep 24, 2022
9229c4e
chore(deps-dev): bump eslint from 8.23.0 to 8.24.0 (#150)
dependabot[bot] Sep 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
35 changes: 35 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# EditorConfig is awesome: https://EditorConfig.org

root = true

[*]
end_of_line = lf
insert_final_newline = true

[*.md]
# trailing white spaces are used for linebreaks in paragraphs.
trim_trailing_whitespace = false

[*.sh]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true

[*.{ts,js,cjs,mjs}]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true

[*.{json,json5,cjson,cjsn}]
charset = utf-8
end_of_line = lf
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
5 changes: 5 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/dist/**
/dist.*/**
/node_modules/**

!/src/**
62 changes: 62 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
'use strict'
/*!
This file is part of CycloneDX generator for NPM projects.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

SPDX-License-Identifier: Apache-2.0
Copyright (c) OWASP Foundation. All Rights Reserved.
*/

/**
* @see {@link https://eslint.org/}
* @type {import('eslint').Linter.Config}
*/
module.exports = {
root: true,
/** @see https://github.com/standard/ts-standard */
extends: 'standard-with-typescript',
parserOptions: {
project: './tsconfig.json'
},
plugins: [
'simple-import-sort'
],
env: {
commonjs: true,
node: true
},
overrides: [
{
files: [
'*.spec.*',
'*.test.*'
],
env: {
jest: true,
commonjs: true,
node: true
}
}
],
rules: {
// region sort imports/exports
/** disable other sorters in favour of `simple-import-sort` **/
'import/order': 0,
'sort-imports': 0,
/** @see https://github.com/lydell/eslint-plugin-simple-import-sort/ */
'simple-import-sort/imports': 'error',
'simple-import-sort/exports': 'error'
// endregion sort imports/exports
}
}
3 changes: 3 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

tsconfig.json linguist-language=JSON-with-Comments
tsconfig.*.json linguist-language=JSON-with-Comments
27 changes: 27 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: 'npm'
directory: '/'
schedule:
interval: 'weekly'
day: 'saturday'
allow:
- dependency-type: 'all'
versioning-strategy: 'auto'
labels: [ 'dependencies' ]
commit-message:
prefix: 'chore' ## prefix maximum string length of 15
include: 'scope'
open-pull-requests-limit: 999
- package-ecosystem: 'github-actions'
directory: '/'
schedule:
interval: 'weekly'
day: 'saturday'
labels: [ 'dependencies' ]
commit-message:
prefix: 'chore' ## prefix maximum string length of 15
include: 'scope'
open-pull-requests-limit: 999
120 changes: 120 additions & 0 deletions .github/workflows/nodejs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
# For details of what checks are run for PRs please refer below
# docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions

name: Node CI

on:
push:
branches: [ 'master', '1.0-dev' ]
pull_request:
workflow_dispatch:

env:
DIST_DIR: dist
REPORTS_DIR: reports
NODE_ACTIVE_LTS: '16' # https://nodejs.org/en/about/releases/

jobs:
build:
name: build
runs-on: 'ubuntu-latest'
timeout-minutes: 10
steps:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@v3
- name: Setup Node.js ${{ env.NODE_ACTIVE_LTS }}
# see https://github.com/actions/setup-node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_ACTIVE_LTS }}
cache: 'npm'
- name: setup subject
run: npm ci --ignore-scripts
- name: build
run: npm run build
- name: artifact build result
# see https://github.com/actions/upload-artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.DIST_DIR }}
path: ${{ env.DIST_DIR }}
if-no-files-found: error
test-standards:
name: test standards
timeout-minutes: 30
runs-on: 'ubuntu-latest'
steps:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@v3
- name: Setup Node.js ${{ env.NODE_ACTIVE_LTS }}
# see https://github.com/actions/setup-node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_ACTIVE_LTS }}
cache: 'npm'
- name: install subject
run: npm ci
- name: run tests
run: npm run test:standard
test-jest:
needs: [ 'build' ]
name: jest (node${{ matrix.node-version }} ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
node-version:
## action based on https://github.com/actions/node-versions/releases
## see also: https://nodejs.org/en/about/releases/
- '18' # Current
- '16' # Active LTS
- '14' # Maintenance LTS
- '14.0.0' # Lowest supported by this project
os:
- ubuntu-latest
- windows-latest
# - macos-latest # hanging for unknown reasons. but is unix-like so "ubuntu-latest" should be enough
timeout-minutes: 10
steps:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@v3
- name: Setup Node.js ${{ matrix.node-version }}
# see https://github.com/actions/setup-node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: setup subject
run: npm ci --ignore-scripts
- name: fetch build artifact
# see https://github.com/actions/download-artifact
uses: actions/download-artifact@v3
with:
name: ${{ env.DIST_DIR }}
path: ${{ env.DIST_DIR }}
- name: test
run: >
npm run test:jest --
--ci
--verbose
--runInBand
--logHeapUsage
- name: artifact test logs
if: ${{ failure() }}
# see https://github.com/actions/upload-artifact
uses: actions/upload-artifact@v3
with:
name: logs-jest-node${{ matrix.node-version }}-${{ matrix.os }}
path: tests/_log
if-no-files-found: error
- name: artifact test reports
if: ${{ failure() }}
# see https://github.com/actions/upload-artifact
uses: actions/upload-artifact@v3
with:
name: reports-jest-node${{ matrix.node-version }}-${{ matrix.os }}
path: ${{ env.REPORTS_DIR }}
if-no-files-found: error
96 changes: 96 additions & 0 deletions .github/workflows/npm-ls_demo-results.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# For details of what checks are run for PRs please refer below
# docs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions

name: npm-ls demo results

on:
#push:
# branches: [ 'master', '1.0-dev' ]
# paths:
# - '!**'
# - 'demos/*/project/*'
# - '.github/workflows/npm-ls_demo-results.yml' # this file
#pull_request:
# paths:
# - '!**'
# - 'demos/*/project/**'
# - '.github/workflows/npm-ls_demo-results.yml' # this file
workflow_dispatch:

env:
DEMO_ROOT_DIR: demo
RESULTS_DIR: CI_results
RESULTS_ARTIFACT: npm-ls-results

jobs:
demo-results:
name: ${{ matrix.subject }} npm${{ matrix.npm-version }} node${{ matrix.node-version }} ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false # gather all the results !
matrix:
subject:
- bundled-dependencies
- dev-dependencies
- local-dependencies
- local-workspaces
- juice-shop
npm-version:
- '8' # Current
- '7' # Legacy
- '6' # Legacy
- '6.0.0' # Lowest supported by this project
node-version:
## action based on https://github.com/actions/node-versions/releases
## see also: https://nodejs.org/en/about/releases/
- '18' # Current
- '16' # Active LTS
- '14' # Maintenance LTS
os:
- ubuntu-latest
- windows-latest
- macos-latest
exclude:
- # juice-shop might not be node14 compatible
subject: juice-shop
node-version: '14'
timeout-minutes: 10 # this is a large matrix, just don't waste time!
steps:
- name: Checkout
# see https://github.com/actions/checkout
uses: actions/checkout@v3
- name: prepare output
run: |
mkdir -p '${{ env.RESULTS_DIR }}'
echo 'OUT_FILE_PREFIX=${{ env.RESULTS_DIR }}/npm-ls_npm${{ matrix.npm-version }}_node${{ matrix.node-version }}_${{ matrix.os }}' >> $GITHUB_ENV
working-directory: ${{ env.DEMO_ROOT_DIR}}/${{ matrix.subject }}
shell: bash # don't want to write tht code twice, windows and unix-like
- name: Setup Node.js ${{ matrix.node-version }}
# see https://github.com/actions/setup-node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
cache-dependency-path: ${{ env.DEMO_ROOT_DIR }}/${{ matrix.subject }}/project/package.json
- name: report versions
run: |
node --version
npm --version
- name: setup reproducible demo
run: npm i --no-audit --no-fund
working-directory: ${{ env.DEMO_ROOT_DIR }}/${{ matrix.subject }}/project
- name: npm-ls --all --long --json
# important: the command in use is the same used by the internal builders of this project
run: >
npm --prefix project
ls --all --long --json
2> ${{ env.OUT_FILE_PREFIX }}.err.log
> ${{ env.OUT_FILE_PREFIX }}.json
working-directory: ${{ env.DEMO_ROOT_DIR}}/${{ matrix.subject }}
- name: Artifact RESULTS
# see https://github.com/actions/upload-artifact
uses: actions/upload-artifact@v3
with:
name: ${{ env.RESULTS_ARTIFACT }}
path: ${{ env.DEMO_ROOT_DIR}}/*/${{ env.RESULTS_DIR }}
if-no-files-found: error
Loading