-
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] feat: Builders.FromPath.LicenseEvidenceBuilder
#1158
Conversation
Signed-off-by: Jan Kowalleck <[email protected]>
builders.FromPath.LicenseEvidenceBuilder
builders.FromPath.LicenseEvidenceBuilder
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
builders.FromPath.LicenseEvidenceBuilder
Builders.FromPath.LicenseEvidenceBuilder
src/builders/fromPath.node.ts
Outdated
lname = `file: ${file}` | ||
} else { | ||
// `file` could be absolute or relative path - lets resolve it anyway | ||
file = resolve(relativeFrom, file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unsure if this is a good idea ...
src/builders/fromPath.node.ts
Outdated
public * fromDir(dir: string, relativeFrom: string | undefined = undefined): Generator<NamedLicense> { | ||
if ( relativeFrom !== undefined) { | ||
// `dir` could be absolute or relative path - lets resolve it anyway | ||
dir = resolve(relativeFrom, dir) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unsure if this is a good idea ...
Signed-off-by: Jan Kowalleck <[email protected]>
Signed-off-by: Jan Kowalleck <[email protected]>
Signed-off-by: Jan Kowalleck <[email protected]>
Signed-off-by: Jan Kowalleck <[email protected]>
Signed-off-by: Jan Kowalleck <[email protected]>
Signed-off-by: Jan Kowalleck <[email protected]>
Signed-off-by: Jan Kowalleck <[email protected]>
Signed-off-by: Jan Kowalleck <[email protected]>
Signed-off-by: Jan Kowalleck <[email protected]>
Signed-off-by: Jan Kowalleck <[email protected]>
this is the feature for license evidence builder. |
@jkowalleck thanks for refactoring this to live in the library. The code in this pull requests is can be consumed as long as packages are extracted into the file system before your code runs. This is not the case in the cyclonedx-node-yarn plugin which would mean it couldn't consume this part of the library. Yarn supports 3 different linkers as explained in https://yarnpkg.com/features/linkers of which projects can freely choose:
In other words, I think the In the cyclonedx-node-yarn plugin I need to use Yarn's file system abstraction ( What do you think about exposing a |
The work on this generalization with the goal to make it available in the library ... I will postpone it until additional art exists. |
fixes #1162
Note
on hold - see #1158 (comment)
refactored the evidence collection from our sister project https://github.com/CycloneDX/cyclonedx-webpack-plugin.
original:
https://github.com/CycloneDX/cyclonedx-webpack-plugin/blob/72700f06d00eac79fa3b91fe838bd78c583346a2/src/extractor.ts#L133-L173
the original file is under Apache-2.0 license, and rights owner is OWASP.
All the same applies to this very project. Therefore, no legal issues exist -> we are free to copy/paste/modify the code without the slightest concerns.
need to see if there are additional requirements from CycloneDX/cyclonedx-node-yarn#193