-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tristan Bastian <tristan.bastian@softwareag.com>
- Loading branch information
Showing
8 changed files
with
1,072 additions
and
536 deletions.
There are no files selected for viewing
1,480 changes: 946 additions & 534 deletions
1,480
tests/integration/__snapshots__/index.test.js.snap
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
* | ||
!/.gitignore | ||
!/.gitattributes | ||
!/README.md | ||
!/package.json | ||
!/package-lock.json | ||
!/webpack.config.js | ||
!/src | ||
!/src/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Test: is copied file's package detected | ||
|
||
This setup is intended to create reproducible results (SBoM). | ||
It might install outdated, unmaintained or vulnerable components, for showcasing purposes. | ||
|
||
Importing `libphonenumber-js/max` should not result in `libphonenumber-js/max` being added to the SBoM without any version. | ||
Instead `libphonenumber-js` should be added with the correct version. | ||
|
||
Importing `luxon` should result in `luxon` being added to the SBoM. |
25 changes: 25 additions & 0 deletions
25
tests/integration/improvement-issue-1284-yarn/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"name": "@cyclonedx-weboack-plugin-tests/improvement-issue-1284-yarn", | ||
"description": "example to verify issue 1284 with yarn", | ||
"private": true, | ||
"main": "index.html", | ||
"scripts": { | ||
"prebuild": "node -r fs -e 'fs.rmSync(\"dist\",{recursive:true,force:true})'", | ||
"build": "webpack build" | ||
}, | ||
"dependencies": { | ||
"libphonenumber-js": "^1.9.19", | ||
"luxon": "3.4.4" | ||
}, | ||
"devDependencies": { | ||
"@cyclonedx/webpack-plugin": "portal:../../..", | ||
"bootstrap": "^5.1.3", | ||
"webpack": "^5.72.0", | ||
"webpack-cli": "^4.9.2" | ||
}, | ||
"engines": { | ||
"node": ">=14.0.0", | ||
"yarn": ">=4.3.0" | ||
}, | ||
"packageManager": "yarn@4.3.0" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
const { parsePhoneNumberFromString } = require("libphonenumber-js/max"); | ||
const { DateTime } = require("luxon"); | ||
|
||
console.log(DateTime.now()); | ||
|
||
console.log(parsePhoneNumberFromString("+12133734253", "US")); |
37 changes: 37 additions & 0 deletions
37
tests/integration/improvement-issue-1284-yarn/webpack.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
/*! | ||
This file is part of CycloneDX Webpack plugin. | ||
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. | ||
*/ | ||
|
||
const path = require('path') | ||
const { CycloneDxWebpackPlugin } = require('@cyclonedx/webpack-plugin') | ||
|
||
module.exports = { | ||
entry: './src/index.js', | ||
output: { | ||
path: path.resolve(__dirname, 'dist'), | ||
filename: 'bundle.js' | ||
}, | ||
plugins: [ | ||
new CycloneDxWebpackPlugin( | ||
{ | ||
outputLocation: '.bom', | ||
reproducibleResults: true | ||
} | ||
) | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters