From 7b962a70f980baa567d6b989123cda898d2644ab Mon Sep 17 00:00:00 2001 From: Kael Zhang Date: Tue, 14 Aug 2018 08:21:31 +0800 Subject: [PATCH] 5.0.1: fixes for win32 --- .eslintrc.js | 2 +- index.js | 6 +++--- package.json | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.eslintrc.js b/.eslintrc.js index 51cc18d..ce931b1 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -9,7 +9,7 @@ module.exports = { allowAfterThis: true, enforceInMethodNames: false, // node-ignore only - allow: ['_rules', '_filter'] + allow: ['_rules', '_test'] }], 'indent': ['error', 2, { diff --git a/index.js b/index.js index 06e9d1f..99f9682 100755 --- a/index.js +++ b/index.js @@ -543,7 +543,7 @@ if ( || process.platform === 'win32' ) ) { - const filter = Ignore.prototype._filter + const test = Ignore.prototype._test /* eslint no-control-regex: "off" */ const make_posix = str => /^\\\\\?\\/.test(str) @@ -551,9 +551,9 @@ if ( ? str : str.replace(/\\/g, '/') - Ignore.prototype._filter = function filterWin32 (path, slices) { + Ignore.prototype._test = function testWin32 (path, ...args) { path = make_posix(path) - return filter.call(this, path, slices) + return test.call(this, path, ...args) } } diff --git a/package.json b/package.json index 0ef2db8..1ab1d37 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ignore", - "version": "5.0.0", + "version": "5.0.1", "description": "Ignore is a manager and filter for .gitignore rules.", "files": [ "legacy.js",