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:
Johan Haals
2022-04-13 16:54:40 +02:00
parent ea8b3c09ed
commit 12608f8ba8
3 changed files with 9 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
'@backstage/backend-common': patch
---
Add `@types/webpack-env` to dependencies.
+1
View File
@@ -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",
+3 -1
View File
@@ -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]));
}