From 007ece5fae2cdb55a01ec2b497cca434d01fb4ae Mon Sep 17 00:00:00 2001 From: curben <2809763-curben@users.noreply.gitlab.com> Date: Tue, 30 Jul 2019 15:54:06 +0930 Subject: [PATCH] refactor: replace nanomatch with micromatch https://github.com/hexojs/hexo/pull/3538 --- themes/typing/scripts/sitemap/generator.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/typing/scripts/sitemap/generator.js b/themes/typing/scripts/sitemap/generator.js index 98db685..5a1fe17 100644 --- a/themes/typing/scripts/sitemap/generator.js +++ b/themes/typing/scripts/sitemap/generator.js @@ -1,6 +1,6 @@ 'use strict' -const nanomatch = require('nanomatch') +const micromatch = require('micromatch') const template = require('./template') const moment = require('moment') @@ -59,7 +59,7 @@ module.exports = function (locals) { function isMatch (path, patterns) { if (patterns && patterns.length) { - if (nanomatch.some(path, patterns, { matchBase: true })) return true + if (micromatch.isMatch(path, patterns, { matchBase: true })) return true } return false