From 0225b02d0f3f8dbf2d2d52577455bf9817e925ca Mon Sep 17 00:00:00 2001 From: Toru Nagashima Date: Thu, 3 Jan 2019 23:12:11 +0900 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20rename=20a=20function?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/util/get-npmignore.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/util/get-npmignore.js b/lib/util/get-npmignore.js index 0e8699e6..9940e3f8 100644 --- a/lib/util/get-npmignore.js +++ b/lib/util/get-npmignore.js @@ -24,7 +24,7 @@ const NEVER_IGNORED = /^(?:readme\.[^.]*|(?:licen[cs]e|changes|changelog|history * @returns {boolean} `true` if the file name is a relative path to a ancestor * directory. */ -function notAncestorFiles(filePath) { +function isAncestorFiles(filePath) { return PARENT_RELATIVE_PATH.test(filePath) } @@ -124,7 +124,7 @@ function parseNpmignore(basedir, filesFieldExists) { } /** - * Gets an object to check whether or not a given path should be ignored. + * Gets an object to check whether a given path should be ignored or not. * The object is created from: * * - `files` field of `package.json` @@ -137,7 +137,7 @@ function parseNpmignore(basedir, filesFieldExists) { * `match` returns `true` if a given file path should be ignored. */ module.exports = function getNpmignore(startPath) { - const retv = { match: notAncestorFiles } + const retv = { match: isAncestorFiles } const p = getPackageJson(startPath) if (p) { @@ -155,17 +155,17 @@ module.exports = function getNpmignore(startPath) { if (filesIgnore && npmignoreIgnore) { retv.match = and( filterNeverIgnoredFiles(p), - or(notAncestorFiles, filesIgnore, npmignoreIgnore) + or(isAncestorFiles, filesIgnore, npmignoreIgnore) ) } else if (filesIgnore) { retv.match = and( filterNeverIgnoredFiles(p), - or(notAncestorFiles, filesIgnore) + or(isAncestorFiles, filesIgnore) ) } else if (npmignoreIgnore) { retv.match = and( filterNeverIgnoredFiles(p), - or(notAncestorFiles, npmignoreIgnore) + or(isAncestorFiles, npmignoreIgnore) ) }