Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ export class CycloneDxWebpackPlugin {
}
}

compilation.fileDependencies

compilation.hooks.afterOptimizeTree.tap(
pluginName,
(_, modules) => {
Expand Down
18 changes: 18 additions & 0 deletions tests/integration/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,24 @@ describe('integration', () => {
file: 'dist/.well-known/sbom'
}
]
},
{
dir: 'webpack5-CopyWebpackPlugin',
purpose: 'webpack5 with CopyWebpackPlugin',
results: [ // paths relative to `dir`
{
format: 'xml',
file: 'dist/.bom/bom.xml'
},
{
format: 'json',
file: 'dist/.bom/bom.json'
},
{
format: 'json',
file: 'dist/.well-known/sbom'
}
]
}
]
)('$purpose', ({ dir, results }) => {
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ const path = require('path');
const REQUIRES_NPM_INSTALL = [
'webpack5-vue2',
'webpack5-angular13',
'webpack5-react18'
'webpack5-react18',
'webpack5-CopyWebpackPlugin'
]

console.warn(`
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
** linguist-vendored
9 changes: 9 additions & 0 deletions tests/integration/webpack5-CopyWebpackPlugin/.gitignore
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/*
4 changes: 4 additions & 0 deletions tests/integration/webpack5-CopyWebpackPlugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# 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.
Loading