Ignore node & react from dependency check
Co-authored-by: Patrik Oldsberg <poldsberg@gmail.com> Co-authored-by: blam <ben@blam.sh> Co-authored-by: Fredrik Adelöw <freben@gmail.com> Signed-off-by: Johan Haals <johan.haals@gmail.com>
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
'@backstage/backend-common': patch
|
||||
---
|
||||
|
||||
Add `@types/webpack-env` to dependencies.
|
||||
@@ -47,6 +47,7 @@
|
||||
"@types/dockerode": "^3.3.0",
|
||||
"@types/express": "^4.17.6",
|
||||
"@types/luxon": "^2.0.4",
|
||||
"@types/webpack-env": "^1.15.2",
|
||||
"archiver": "^5.0.2",
|
||||
"aws-sdk": "^2.840.0",
|
||||
"compression": "^1.7.4",
|
||||
|
||||
@@ -79,7 +79,9 @@ function findAllDeps(declSrc) {
|
||||
.filter(n => !n.startsWith('.'));
|
||||
const referencedDeps = (declSrc.match(/types=".*"/g) || [])
|
||||
.map(match => match.replace(/types="(.*)"/, '$1'))
|
||||
.filter(n => !n.startsWith('.'));
|
||||
.filter(n => !n.startsWith('.'))
|
||||
// We allow references to these without an explicit dependency.
|
||||
.filter(n => !['node', 'react'].includes(n));
|
||||
return Array.from(new Set([...importedDeps, ...referencedDeps]));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user