diff --git a/snapshots/updates.test.js.snap b/snapshots/updates.test.js.snap index a2ff425..73fbc2b 100644 --- a/snapshots/updates.test.js.snap +++ b/snapshots/updates.test.js.snap @@ -108,7 +108,19 @@ exports[`dual 2`] = ` } `; -exports[`exclude 1`] = `undefined`; +exports[`exclude 1`] = ` +{ + "npm": { + "dependencies": { + "updates": { + "info": "https://github.com/silverwind/updates", + "new": "537ccb7", + "old": "6941e05", + }, + }, + }, +} +`; exports[`exclude 2`] = ` { diff --git a/updates.js b/updates.js index 9f9a61b..3ce1da9 100755 --- a/updates.js +++ b/updates.js @@ -673,7 +673,7 @@ function canInclude(name, mode, {include, exclude}) { for (const re of include) { if (re.test(name)) return true; } - return false; + return include.size ? false : true; } function resolveFiles(filesArg) {