Merge pull request #10816 from backstage/jhaals/fix-scriptz

Ignore node & react from dependency check
This commit is contained in:
Fredrik Adelöw
2022-04-13 17:19:43 +02:00
committed by GitHub
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]));
}