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:
@@ -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