From 6e194daea1b0f1dc56527a29fd776888197166b3 Mon Sep 17 00:00:00 2001 From: Yuki Hattori Date: Tue, 25 Jun 2019 15:41:40 +0900 Subject: [PATCH 1/7] Upgrade `fast-glob` package to v3.0.2 --- index.js | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 029a19e..904338d 100644 --- a/index.js +++ b/index.js @@ -24,7 +24,7 @@ const checkCwdOption = options => { } }; -const getPathString = p => p instanceof fs.Stats ? p.path : p; +const getPathString = p => p.stats instanceof fs.Stats ? p.path : p; const generateGlobTasks = (patterns, taskOptions) => { patterns = arrayUnion([].concat(patterns)); diff --git a/package.json b/package.json index 3c66658..cde6eea 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "@types/glob": "^7.1.1", "array-union": "^2.1.0", "dir-glob": "^2.2.2", - "fast-glob": "^2.2.6", + "fast-glob": "^3.0.2", "glob": "^7.1.3", "ignore": "^5.1.1", "merge2": "^1.2.3", From f7f45abafcf542e3cccac45241fc0a4c8130a3b3 Mon Sep 17 00:00:00 2001 From: Yuki Hattori Date: Tue, 25 Jun 2019 21:15:33 +0900 Subject: [PATCH 2/7] Normalize glob pattern fast-glob v3 does no longer convert slashes in glob pattern. --- index.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 904338d..d2cf390 100644 --- a/index.js +++ b/index.js @@ -1,5 +1,6 @@ 'use strict'; const fs = require('fs'); +const path = require('path'); const arrayUnion = require('array-union'); const merge2 = require('merge2'); const glob = require('glob'); @@ -89,14 +90,16 @@ const getFilterSync = options => { DEFAULT_FILTER; }; +const normalizeGlob = glob => glob.split(path.sep).join(path.posix.sep); + const globToTask = task => glob => { const {options} = task; if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) { - options.ignore = dirGlob.sync(options.ignore); + options.ignore = dirGlob.sync(options.ignore).map(normalizeGlob); } return { - pattern: glob, + pattern: normalizeGlob(glob), options }; }; From b29dc02ddbfdba1b27c7a7b69a7fb2ea1fed5c21 Mon Sep 17 00:00:00 2001 From: Yuki Hattori Date: Thu, 27 Jun 2019 20:15:47 +0900 Subject: [PATCH 3/7] Bump dir-glob version to v3.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cde6eea..3cb9b42 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "dependencies": { "@types/glob": "^7.1.1", "array-union": "^2.1.0", - "dir-glob": "^2.2.2", + "dir-glob": "^3.0.0", "fast-glob": "^3.0.2", "glob": "^7.1.3", "ignore": "^5.1.1", From fc5b74f14b05224681d0ed6c2f7f7970fb086560 Mon Sep 17 00:00:00 2001 From: Yuki Hattori Date: Thu, 27 Jun 2019 20:17:12 +0900 Subject: [PATCH 4/7] Stop normalization of glob pattern --- index.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/index.js b/index.js index d2cf390..904338d 100644 --- a/index.js +++ b/index.js @@ -1,6 +1,5 @@ 'use strict'; const fs = require('fs'); -const path = require('path'); const arrayUnion = require('array-union'); const merge2 = require('merge2'); const glob = require('glob'); @@ -90,16 +89,14 @@ const getFilterSync = options => { DEFAULT_FILTER; }; -const normalizeGlob = glob => glob.split(path.sep).join(path.posix.sep); - const globToTask = task => glob => { const {options} = task; if (options.ignore && Array.isArray(options.ignore) && options.expandDirectories) { - options.ignore = dirGlob.sync(options.ignore).map(normalizeGlob); + options.ignore = dirGlob.sync(options.ignore); } return { - pattern: normalizeGlob(glob), + pattern: glob, options }; }; From 9a1c8d921b4ca4d8c742d8a987fb065a109c6ad7 Mon Sep 17 00:00:00 2001 From: Yuki Hattori Date: Thu, 27 Jun 2019 20:55:59 +0900 Subject: [PATCH 5/7] Remove `.failing` modifier from passed test in Win --- test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.js b/test.js index ffe776b..8fb74f2 100644 --- a/test.js +++ b/test.js @@ -185,7 +185,7 @@ test('expandDirectories and ignores option', t => { }), ['tmp/a.tmp', 'tmp/b.tmp', 'tmp/c.tmp', 'tmp/d.tmp', 'tmp/e.tmp']); }); -test.failing('relative paths and ignores option', t => { +test('relative paths and ignores option', t => { process.chdir(tmp); t.deepEqual(globby.sync('../tmp', { cwd: process.cwd(), From 504df1fa501e243a7e2b04bb46ee1cfadb2754c0 Mon Sep 17 00:00:00 2001 From: Yuki Hattori Date: Sun, 30 Jun 2019 00:08:08 +0900 Subject: [PATCH 6/7] [WIP] Debug with dir-glob which is in fixing --- package.json | 2 +- test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 3cb9b42..80734da 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,7 @@ "dependencies": { "@types/glob": "^7.1.1", "array-union": "^2.1.0", - "dir-glob": "^3.0.0", + "dir-glob": "yhatt/dir-glob#revert-excessive-posix-join", "fast-glob": "^3.0.2", "glob": "^7.1.3", "ignore": "^5.1.1", diff --git a/test.js b/test.js index 8fb74f2..ffe776b 100644 --- a/test.js +++ b/test.js @@ -185,7 +185,7 @@ test('expandDirectories and ignores option', t => { }), ['tmp/a.tmp', 'tmp/b.tmp', 'tmp/c.tmp', 'tmp/d.tmp', 'tmp/e.tmp']); }); -test('relative paths and ignores option', t => { +test.failing('relative paths and ignores option', t => { process.chdir(tmp); t.deepEqual(globby.sync('../tmp', { cwd: process.cwd(), From 809ae47343817533e1c35bf6f2b4be80db14a39e Mon Sep 17 00:00:00 2001 From: Yuki Hattori Date: Sun, 30 Jun 2019 01:29:37 +0900 Subject: [PATCH 7/7] Bump fast-glob to v3.0.3 and dir-glob to v3.0.1 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 80734da..9704f8a 100644 --- a/package.json +++ b/package.json @@ -58,8 +58,8 @@ "dependencies": { "@types/glob": "^7.1.1", "array-union": "^2.1.0", - "dir-glob": "yhatt/dir-glob#revert-excessive-posix-join", - "fast-glob": "^3.0.2", + "dir-glob": "^3.0.1", + "fast-glob": "^3.0.3", "glob": "^7.1.3", "ignore": "^5.1.1", "merge2": "^1.2.3",