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
+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]));
}