Skip to content

Commit 1065484

Browse files
jkowalleckAugustusKlingdependabot[bot]rart
authored
v1.0.0 (#6)
First feature complete version. ## Responsibilities - Provide a yarn plugin that generates CycloneDX SBOM for current workspace - Provide a CLI wrapper got said plugin ## Capabilities - Supports yarn3 and yarn4 - Can output in XML and JSON format, CycloneDX v1.2 - v1.6 spec - Can omit dev dependencies --------- Signed-off-by: Jan Kowalleck <[email protected]> Signed-off-by: Augustus Kling <[email protected]> Signed-off-by: dependabot[bot] <[email protected]> Signed-off-by: rart <[email protected]> Signed-off-by: jkowalleck <[email protected]> Co-authored-by: Augustus Kling <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Roy Art <[email protected]> Co-authored-by: jkowalleck <[email protected]>
1 parent 11426ea commit 1065484

File tree

187 files changed

+252588
-11
lines changed

Some content is hidden

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

187 files changed

+252588
-11
lines changed

.c8rc.json

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"all": true,
3+
"src": ["src", "bin"],
4+
"exclude": [
5+
"**/*.{spec,test}.{js,cjs,mjs}",
6+
"**/*.cache/**",
7+
"{,CI_}reports/**",
8+
"test{,s}/**",
9+
"**/{ava,babel,nyc}.config.{js,cjs,mjs}",
10+
"**/jest.config.{js,cjs,mjs,ts}",
11+
"**/{karma,rollup,webpack}.config.js",
12+
"**/.{eslint,mocha}rc.{js,cjs}",
13+
".yarn/**", ".pnp.*"
14+
],
15+
"exclude-after-remap": true,
16+
"reporter": ["text", "clover", "html"],
17+
"reporterOptions": {
18+
"clover": {"file": "coverage.clover.xml"},
19+
"html": {"subdir": "coverage.html"}
20+
},
21+
"reports-dir": "./reports/coverage",
22+
"temp-directory": "./.c8.cache"
23+
}

.codacy.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Config for Codacy
2+
# See https://docs.codacy.com/repositories-configure/codacy-configuration-file/
3+
---
4+
engines:
5+
# engine `eslint-8` shall be disabled, since it fails due to incapability to load custom/own plugins
6+
# this engine is run via CI/CT anyway...
7+
exclude_paths:
8+
# ignore all non-shipped files
9+
- "docs/dev/**"
10+
- "examples/**"
11+
## tests
12+
- "tests/**"
13+
- "**/*.test.*"
14+
- "**/*.spec.*"
15+
## dot-files & dot-folders
16+
- ".*"
17+
- ".*/**"

.editorconfig

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
root = true
4+
5+
[*]
6+
end_of_line = lf
7+
insert_final_newline = true
8+
9+
[*.md]
10+
# trailing white spaces are used for linebreaks in paragraphs.
11+
trim_trailing_whitespace = false
12+
13+
[*.{ts,js,cjs,mjs}]
14+
charset = utf-8
15+
end_of_line = lf
16+
indent_style = space
17+
indent_size = 2
18+
trim_trailing_whitespace = true
19+
insert_final_newline = true
20+
21+
[*.{json,cjson,cjsn}]
22+
charset = utf-8
23+
end_of_line = lf
24+
indent_style = space
25+
indent_size = 2
26+
trim_trailing_whitespace = true
27+
insert_final_newline = true

.eslintignore

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# yarn stuff
2+
/.yarn/**
3+
/.pnp.*
4+
5+
# generated files: dist and docs
6+
/reports/**
7+
/bundles/**
8+
/dist/**
9+
/docs/**
10+
11+
12+
!/src/**
13+
/src/buildtime*

.eslintrc.js

+92
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
/*!
2+
This file is part of CycloneDX SBOM plugin for yarn.
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
16+
SPDX-License-Identifier: Apache-2.0
17+
Copyright (c) OWASP Foundation. All Rights Reserved.
18+
*/
19+
20+
/**
21+
* @type {import('eslint').Linter.Config}
22+
* @see https://eslint.org/
23+
*/
24+
module.exports = {
25+
root: true,
26+
plugins: [
27+
/* see https://github.com/lydell/eslint-plugin-simple-import-sort#readme */
28+
'simple-import-sort',
29+
/* see https://github.com/Stuk/eslint-plugin-header#readme */
30+
'header'
31+
],
32+
env: {
33+
commonjs: true,
34+
node: true
35+
},
36+
rules: {
37+
// region sort imports/exports
38+
/** disable other sorters in favour of `simple-import-sort` */
39+
'import/order': 0,
40+
'sort-imports': 0,
41+
/** @see https://github.com/lydell/eslint-plugin-simple-import-sort/ */
42+
'simple-import-sort/imports': 'error',
43+
'simple-import-sort/exports': 'error',
44+
// endregion sort imports/exports
45+
// region license-header
46+
/* see https://github.com/Stuk/eslint-plugin-header#readme */
47+
'header/header': ['error', '.license-header.js']
48+
// endregion license-header
49+
},
50+
overrides: [
51+
{
52+
files: ['*.spec.*', '*.test.*'],
53+
env: {
54+
mocha: true,
55+
commonjs: true,
56+
node: true
57+
}
58+
},
59+
{
60+
files: ['*.ts'],
61+
extends: [
62+
/** @see https://www.npmjs.com/package/eslint-config-love */
63+
'love'
64+
],
65+
parserOptions: {
66+
project: './tsconfig.json'
67+
},
68+
rules: {
69+
/* @see https://typescript-eslint.io/rules/unbound-method/ */
70+
'@typescript-eslint/unbound-method': ['error', {
71+
ignoreStatic: true
72+
}]
73+
}
74+
},
75+
{
76+
files: ['*.js', '*.mjs', '*.cjs'],
77+
extends: [
78+
/* see https://www.npmjs.com/package/eslint-config-standard */
79+
'standard'
80+
]
81+
},
82+
{
83+
files: ['bin/*.js'],
84+
rules: {
85+
// region license-header
86+
/* see https://github.com/Stuk/eslint-plugin-header#readme */
87+
'header/header': 'off'
88+
// endregion license-header
89+
}
90+
}
91+
]
92+
}

.gitattributes

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
tsconfig.json linguist-language=JSON-with-Comments
3+
tsconfig.*.json linguist-language=JSON-with-Comments
4+
5+
.yarn/** linguist-vendored
6+
.yarn/releases/* binary
7+
.yarn/plugins/**/* binary
8+
.pnp.* binary linguist-generated
9+
10+
yarn.lock linguist-generated linguist-language=YAML
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
## Is your feature request related to a problem? Please describe.
11+
12+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
13+
14+
## Describe the solution you'd like
15+
16+
A clear and concise description of what you want to happen.
17+
18+
## Describe alternatives you've considered
19+
20+
A clear and concise description of any alternative solutions or features you've considered.
21+
22+
## Additional context
23+
24+
Add any other context or screenshots about the feature request here.
+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: "[BUG]"
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
## Describe the bug
11+
12+
A clear and concise description of what the bug is.
13+
14+
## To Reproduce
15+
16+
Steps to reproduce the behavior
17+
18+
## Expected behavior
19+
20+
A clear and concise description of what you expected to happen.
21+
22+
## Screenshots or output-paste
23+
24+
If applicable, add screenshots or past the output to help explain your problem.
25+
26+
## Environment
27+
28+
- _@cyclonedx/yarn-plugin-cyclonedx_ version: <!-- e.g. `v1.0.0+git.1337f00`, get via `[tool call method] --version` -->
29+
- yarn version: <!-- get via `yarn --version` -->
30+
- Node version: <!-- get via `node --version` -->
31+
- OS: <!-- e.g. windows 11, ubuntu linux, ... -->
32+
33+
## Additional context
34+
35+
Add any other context about the problem here.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: ValidationError report
3+
about: Report a ValidationError to help us improve
4+
title: "[ValidationError]"
5+
labels: ValidationError
6+
assignees: ''
7+
8+
---
9+
10+
## To Reproduce
11+
12+
Steps to reproduce the behavior:
13+
14+
1. How was _@cyclonedx/yarn-plugin-cyclonedx_ called?
15+
<!-- e.g. `yarn cyclonedx --production ...` -->
16+
2. What kind of evidence was processed?
17+
<!-- upload a complete project or set of `package.json` and `yarn.lock` to this issue, or a pastebin of you choice and put the link here. -->
18+
3. Error report:
19+
<!-- upload the complete output to this issue, or a pastebin of you choice and put the link here. -->
20+
4. Expected result:
21+
<!-- run the original call again
22+
with parameters `-vvv --output-reproducible --output-file=-`,
23+
then upload all output to this issue, or to a pastebin of you choice and put the link here. -->
24+
25+
## Environment
26+
27+
- _@cyclonedx/yarn-plugin-cyclonedx_ version: <!-- e.g. `v1.0.0+git.1337f00`, get via `[tool call method] --version` -->
28+
- yarn version: <!-- get via `yarn --version` -->
29+
- Node version: <!-- get via `node --version` -->
30+
- OS: <!-- e.g. windows 11, ubuntu linux, ... -->
31+
32+
## Additional context
33+
34+
Add any other context about the problem here.

.github/ISSUE_TEMPLATE/config.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: true
2+
contact_links:
3+
- name: Discussions
4+
url: https://github.com/CycloneDX/cyclonedx-node-yarn/discussions
5+
about: Please ask and answer questions here.
6+
- name: Community slack support channel
7+
url: https://cyclonedx.slack.com/archives/C04PK6JRUS3
8+
about: Community slack channel.
9+
- name: Community slack invite
10+
url: https://cyclonedx.org/slack/invite
11+
about: Community slack invite.

.github/dependabot.yml

+58
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
2+
3+
version: 2
4+
updates:
5+
- package-ecosystem: 'npm'
6+
directory: '/'
7+
schedule:
8+
interval: 'weekly'
9+
day: 'saturday'
10+
allow:
11+
- dependency-type: 'all'
12+
versioning-strategy: 'auto'
13+
labels: [ 'dependencies' ]
14+
commit-message:
15+
prefix: 'chore' ## prefix maximum string length of 15
16+
include: 'scope'
17+
open-pull-requests-limit: 999
18+
ignore:
19+
- dependency-name: "@types/node"
20+
# version is like `ts.X.Y` -- need to maintain manually
21+
groups:
22+
eslint:
23+
patterns:
24+
- 'eslint'
25+
- '@eslint/*'
26+
- '@types/eslint'
27+
- 'eslint-*'
28+
- '@types/eslint-*'
29+
- '@eslint-community/*'
30+
- '@typescript-eslint/*'
31+
ajv:
32+
patterns:
33+
- 'ajv'
34+
- 'ajv-*'
35+
typescript:
36+
patterns:
37+
- 'typescript'
38+
- '@types/*'
39+
- 'typedoc'
40+
- 'typedoc-*'
41+
- '@microsoft/tsdoc'
42+
- '@microsoft/tsdoc-*'
43+
- 'ts-loader'
44+
- 'tslib'
45+
mocha:
46+
patterns:
47+
- 'mocha'
48+
- '@types/mocha'
49+
- package-ecosystem: 'github-actions'
50+
directory: '/'
51+
schedule:
52+
interval: 'weekly'
53+
day: 'saturday'
54+
labels: [ 'dependencies' ]
55+
commit-message:
56+
prefix: 'chore' ## prefix maximum string length of 15
57+
include: 'scope'
58+
open-pull-requests-limit: 999

0 commit comments

Comments
 (0)