From a990a17a1177858433117065be62fa93f627e661 Mon Sep 17 00:00:00 2001 From: Joey Parrish Date: Mon, 21 Mar 2022 18:12:54 -0700 Subject: [PATCH] fix: replace parse-glob (#927) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix: Add module to replace parse-glob (fix 664) * Improve parseGlob for non-glob, path only argument * Minor fix to parseGlob handling backslash * chore: Generate JS * fix: update parse-glob tests to use the same framework as the other tests Co-authored-by: Jørn Andre Sundt --- dist/cli/htmlhint.js | 6 +- dist/cli/parse-glob.js | 23 +++ package-lock.json | 289 +++++++++++++++--------------------- package.json | 5 +- src/cli/htmlhint.ts | 2 +- src/cli/parse-glob.ts | 36 +++++ test/cli/parse-glob.spec.js | 29 ++++ 7 files changed, 214 insertions(+), 176 deletions(-) create mode 100644 dist/cli/parse-glob.js create mode 100644 src/cli/parse-glob.ts create mode 100644 test/cli/parse-glob.spec.js diff --git a/dist/cli/htmlhint.js b/dist/cli/htmlhint.js index a8a17d81c..1b7162053 100644 --- a/dist/cli/htmlhint.js +++ b/dist/cli/htmlhint.js @@ -6,7 +6,7 @@ const chalk = require("chalk"); const commander_1 = require("commander"); const fs_1 = require("fs"); const glob = require("glob"); -const parseGlob = require("parse-glob"); +const parse_glob_1 = require("./parse-glob"); const path_1 = require("path"); const node_fetch_1 = require("node-fetch"); const stripJsonComments = require("strip-json-comments"); @@ -231,7 +231,7 @@ function hintAllFiles(target, options, onFinished) { } function getGlobInfo(target) { target = target.replace(/\\/g, '/'); - const globInfo = parseGlob(target); + const globInfo = (0, parse_glob_1.parseGlob)(target); let base = (0, path_1.resolve)(globInfo.base); base += /\/$/.test(base) ? '' : '/'; let pattern = globInfo.glob; @@ -351,4 +351,4 @@ function hintUrl(url, ruleset, callback) { } }, errorFn); } -//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaHRtbGhpbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyI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BO0FBQ0osQ0FBQztBQUdELFNBQVMsT0FBTyxDQUNkLEdBQVcsRUFDWCxPQUE0QixFQUM1QixRQUFvQztJQUVwQyxNQUFNLE9BQU8sR0FBRyxHQUFHLEVBQUUsQ0FBQyxRQUFRLENBQUMsRUFBRSxDQUFDLENBQUE7SUFDbEMsSUFBQSxvQkFBSyxFQUFDLEdBQUcsQ0FBQyxDQUFDLElBQUksQ0FBQyxDQUFDLFFBQVEsRUFBRSxFQUFFO1FBQzNCLElBQUksUUFBUSxDQUFDLEVBQUUsRUFBRTtZQUNmLFFBQVEsQ0FBQyxJQUFJLEVBQUUsQ0FBQyxJQUFJLENBQUMsQ0FBQyxJQUFJLEVBQUUsRUFBRTtnQkFDNUIsTUFBTSxRQUFRLEdBQUcsUUFBUSxDQUFDLE1BQU0sQ0FBQyxJQUFJLEVBQUUsT0FBTyxDQUFDLENBQUE7Z0JBQy9DLFFBQVEsQ0FBQyxRQUFRLENBQUMsQ0FBQTtZQUNwQixDQUFDLEVBQUUsT0FBTyxDQUFDLENBQUE7U0FDWjthQUFNO1lBQ0wsT0FBTyxFQUFFLENBQUE7U0FDVjtJQUNILENBQUMsRUFBRSxPQUFPLENBQUMsQ0FBQTtBQUNiLENBQUMifQ== \ No newline at end of file diff --git a/dist/cli/parse-glob.js b/dist/cli/parse-glob.js new file mode 100644 index 000000000..a9ca0f4a9 --- /dev/null +++ b/dist/cli/parse-glob.js @@ -0,0 +1,23 @@ +"use strict"; +Object.defineProperty(exports, "__esModule", { value: true }); +exports.parseGlob = void 0; +const isGlob = require("is-glob"); +function parseGlob(target) { + const recursiveTokenIndex = Math.max(target.indexOf('**/'), target.indexOf('**\\')); + const lastSlashIndex = Math.max(target.lastIndexOf('/'), target.lastIndexOf('\\')); + const baseGlobSepIndex = recursiveTokenIndex >= 0 ? recursiveTokenIndex : Math.max(lastSlashIndex, 0); + return { + base: target.substring(0, baseGlobSepIndex).replace(/[/\\]$/, '') || '.', + glob: target.substring(baseGlobSepIndex).replace(/^[/\\]/, ''), + is: { + glob: isGlob(target), + }, + path: { + basename: target + .substring(Math.max(lastSlashIndex, 0)) + .replace(/^[/\\]/, ''), + }, + }; +} +exports.parseGlob = parseGlob; +//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicGFyc2UtZ2xvYi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jbGkvcGFyc2UtZ2xvYi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBQSxrQ0FBaUM7QUFFakMsU0FBZ0IsU0FBUyxDQUFDLE1BQWM7SUFVdEMsTUFBTSxtQkFBbUIsR0FBRyxJQUFJLENBQUMsR0FBRyxDQUNsQyxNQUFNLENBQUMsT0FBTyxDQUFDLEtBQUssQ0FBQyxFQUNyQixNQUFNLENBQUMsT0FBTyxDQUFDLE1BQU0sQ0FBQyxDQUN2QixDQUFBO0lBQ0QsTUFBTSxjQUFjLEdBQUcsSUFBSSxDQUFDLEdBQUcsQ0FDN0IsTUFBTSxDQUFDLFdBQVcsQ0FBQyxHQUFHLENBQUMsRUFDdkIsTUFBTSxDQUFDLFdBQVcsQ0FBQyxJQUFJLENBQUMsQ0FDekIsQ0FBQTtJQUNELE1BQU0sZ0JBQWdCLEdBQ3BCLG1CQUFtQixJQUFJLENBQUMsQ0FBQyxDQUFDLENBQUMsbUJBQW1CLENBQUMsQ0FBQyxDQUFDLElBQUksQ0FBQyxHQUFHLENBQUMsY0FBYyxFQUFFLENBQUMsQ0FBQyxDQUFBO0lBRTlFLE9BQU87UUFDTCxJQUFJLEVBQUUsTUFBTSxDQUFDLFNBQVMsQ0FBQyxDQUFDLEVBQUUsZ0JBQWdCLENBQUMsQ0FBQyxPQUFPLENBQUMsUUFBUSxFQUFFLEVBQUUsQ0FBQyxJQUFJLEdBQUc7UUFDeEUsSUFBSSxFQUFFLE1BQU0sQ0FBQyxTQUFTLENBQUMsZ0JBQWdCLENBQUMsQ0FBQyxPQUFPLENBQUMsUUFBUSxFQUFFLEVBQUUsQ0FBQztRQUM5RCxFQUFFLEVBQUU7WUFDRixJQUFJLEVBQUUsTUFBTSxDQUFDLE1BQU0sQ0FBQztTQUNyQjtRQUNELElBQUksRUFBRTtZQUNKLFFBQVEsRUFBRSxNQUFNO2lCQUNiLFNBQVMsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLGNBQWMsRUFBRSxDQUFDLENBQUMsQ0FBQztpQkFDdEMsT0FBTyxDQUFDLFFBQVEsRUFBRSxFQUFFLENBQUM7U0FDekI7S0FDRixDQUFBO0FBQ0gsQ0FBQztBQWpDRCw4QkFpQ0MifQ== \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 51ac1a76e..c0b4b95cb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,8 +13,8 @@ "chalk": "^4.1.2", "commander": "^8.3.0", "glob": "^7.2.0", + "is-glob": "^4.0.3", "node-fetch": "^2.6.2", - "parse-glob": "3.0.4", "strip-json-comments": "3.1.0", "xml": "1.0.1" }, @@ -28,8 +28,8 @@ "@rollup/plugin-node-resolve": "^13.0.6", "@types/async": "^3.2.10", "@types/glob": "^7.2.0", + "@types/is-glob": "4.0.2", "@types/node-fetch": "^2.5.12", - "@types/parse-glob": "^3.0.29", "@types/xml": "^1.0.6", "@typescript-eslint/eslint-plugin": "^5.10.0", "@typescript-eslint/parser": "^5.10.0", @@ -40,6 +40,7 @@ "husky": "^7.0.4", "jest": "^27.4.3", "lint-staged": "^12.1.2", + "parse-glob": "3.0.4", "prettier": "^2.4.1", "rimraf": "^3.0.2", "rollup": "^2.60.1", @@ -1699,6 +1700,12 @@ "@types/node": "*" } }, + "node_modules/@types/is-glob": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/is-glob/-/is-glob-4.0.2.tgz", + "integrity": "sha512-4j5G9Y5jljDSICQ1R2f/Rcyoj6DZmYGneny+p/cDkjep0rkqNg0W73Ty0bVjMUTZgLXHf8oiMjg1XC3CDwCz+g==", + "dev": true + }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", @@ -1763,12 +1770,6 @@ "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", "dev": true }, - "node_modules/@types/parse-glob": { - "version": "3.0.29", - "resolved": "https://registry.npmjs.org/@types/parse-glob/-/parse-glob-3.0.29.tgz", - "integrity": "sha1-akDsfr0kGO5p7jl+SOQhaSaKEL8=", - "dev": true - }, "node_modules/@types/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", @@ -1978,27 +1979,6 @@ } } }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/@typescript-eslint/typescript-estree/node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/@typescript-eslint/typescript-estree/node_modules/semver": { "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", @@ -3695,27 +3675,6 @@ "node": ">=10.13.0" } }, - "node_modules/eslint/node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/eslint/node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/eslint/node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -3964,27 +3923,6 @@ "node": ">= 6" } }, - "node_modules/fast-glob/node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fast-glob/node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -4095,27 +4033,6 @@ "node": ">= 8" } }, - "node_modules/findup-sync/node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/findup-sync/node_modules/is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, "node_modules/flat-cache": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", @@ -4277,6 +4194,7 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, "dependencies": { "glob-parent": "^2.0.0", "is-glob": "^2.0.0" @@ -4285,14 +4203,39 @@ "node": ">=0.10.0" } }, + "node_modules/glob-base/node_modules/is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "dependencies": { + "is-extglob": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/glob-parent": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, "dependencies": { "is-glob": "^2.0.0" } }, + "node_modules/glob-parent/node_modules/is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "dependencies": { + "is-extglob": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/global-dirs": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/global-dirs/-/global-dirs-0.1.1.tgz", @@ -4671,6 +4614,7 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -4679,6 +4623,7 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -4702,16 +4647,24 @@ } }, "node_modules/is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dependencies": { - "is-extglob": "^1.0.0" + "is-extglob": "^2.1.1" }, "engines": { "node": ">=0.10.0" } }, + "node_modules/is-glob/node_modules/is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/is-module": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", @@ -6710,6 +6663,7 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, "dependencies": { "glob-base": "^0.3.0", "is-dotfile": "^1.0.0", @@ -6720,6 +6674,18 @@ "node": ">=0.10.0" } }, + "node_modules/parse-glob/node_modules/is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "dependencies": { + "is-extglob": "^1.0.0" + }, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/parse-json": { "version": "5.2.0", "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", @@ -9715,6 +9681,12 @@ "@types/node": "*" } }, + "@types/is-glob": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/is-glob/-/is-glob-4.0.2.tgz", + "integrity": "sha512-4j5G9Y5jljDSICQ1R2f/Rcyoj6DZmYGneny+p/cDkjep0rkqNg0W73Ty0bVjMUTZgLXHf8oiMjg1XC3CDwCz+g==", + "dev": true + }, "@types/istanbul-lib-coverage": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", @@ -9779,12 +9751,6 @@ "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", "dev": true }, - "@types/parse-glob": { - "version": "3.0.29", - "resolved": "https://registry.npmjs.org/@types/parse-glob/-/parse-glob-3.0.29.tgz", - "integrity": "sha1-akDsfr0kGO5p7jl+SOQhaSaKEL8=", - "dev": true - }, "@types/parse-json": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/@types/parse-json/-/parse-json-4.0.0.tgz", @@ -9918,21 +9884,6 @@ "tsutils": "^3.21.0" }, "dependencies": { - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, "semver": { "version": "7.3.5", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz", @@ -11160,21 +11111,6 @@ "is-glob": "^4.0.3" } }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -11412,21 +11348,6 @@ "requires": { "is-glob": "^4.0.1" } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } } } }, @@ -11523,23 +11444,6 @@ "is-glob": "^4.0.0", "micromatch": "^4.0.2", "resolve-dir": "^1.0.1" - }, - "dependencies": { - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - } } }, "flat-cache": { @@ -11658,17 +11562,41 @@ "version": "0.3.0", "resolved": "https://registry.npmjs.org/glob-base/-/glob-base-0.3.0.tgz", "integrity": "sha1-27Fk9iIbHAscz4Kuoyi0l98Oo8Q=", + "dev": true, "requires": { "glob-parent": "^2.0.0", "is-glob": "^2.0.0" + }, + "dependencies": { + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } } }, "glob-parent": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", + "dev": true, "requires": { "is-glob": "^2.0.0" + }, + "dependencies": { + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } } }, "global-dirs": { @@ -11955,12 +11883,14 @@ "is-dotfile": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/is-dotfile/-/is-dotfile-1.0.3.tgz", - "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=" + "integrity": "sha1-pqLzL/0t+wT1yiXs0Pa4PPeYoeE=", + "dev": true }, "is-extglob": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", - "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=" + "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", + "dev": true }, "is-fullwidth-code-point": { "version": "2.0.0", @@ -11975,11 +11905,18 @@ "dev": true }, "is-glob": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", - "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", + "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "requires": { - "is-extglob": "^1.0.0" + "is-extglob": "^2.1.1" + }, + "dependencies": { + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=" + } } }, "is-module": { @@ -13496,11 +13433,23 @@ "version": "3.0.4", "resolved": "https://registry.npmjs.org/parse-glob/-/parse-glob-3.0.4.tgz", "integrity": "sha1-ssN2z7EfNVE7rdFz7wu246OIORw=", + "dev": true, "requires": { "glob-base": "^0.3.0", "is-dotfile": "^1.0.0", "is-extglob": "^1.0.0", "is-glob": "^2.0.0" + }, + "dependencies": { + "is-glob": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", + "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", + "dev": true, + "requires": { + "is-extglob": "^1.0.0" + } + } } }, "parse-json": { diff --git a/package.json b/package.json index cc937017c..5a3155593 100644 --- a/package.json +++ b/package.json @@ -61,8 +61,8 @@ "chalk": "^4.1.2", "commander": "^8.3.0", "glob": "^7.2.0", + "is-glob": "^4.0.3", "node-fetch": "^2.6.2", - "parse-glob": "3.0.4", "strip-json-comments": "3.1.0", "xml": "1.0.1" }, @@ -73,8 +73,8 @@ "@rollup/plugin-node-resolve": "^13.0.6", "@types/async": "^3.2.10", "@types/glob": "^7.2.0", + "@types/is-glob": "4.0.2", "@types/node-fetch": "^2.5.12", - "@types/parse-glob": "^3.0.29", "@types/xml": "^1.0.6", "@typescript-eslint/eslint-plugin": "^5.10.0", "@typescript-eslint/parser": "^5.10.0", @@ -85,6 +85,7 @@ "husky": "^7.0.4", "jest": "^27.4.3", "lint-staged": "^12.1.2", + "parse-glob": "3.0.4", "prettier": "^2.4.1", "rimraf": "^3.0.2", "rollup": "^2.60.1", diff --git a/src/cli/htmlhint.ts b/src/cli/htmlhint.ts index 91bfe400a..48039e654 100644 --- a/src/cli/htmlhint.ts +++ b/src/cli/htmlhint.ts @@ -6,7 +6,7 @@ import { Command } from 'commander' import { existsSync, readFileSync, statSync } from 'fs' import * as glob from 'glob' import { IGlob } from 'glob' -import * as parseGlob from 'parse-glob' +import { parseGlob } from './parse-glob' import { dirname, resolve, sep } from 'path' import fetch from 'node-fetch' import * as stripJsonComments from 'strip-json-comments' diff --git a/src/cli/parse-glob.ts b/src/cli/parse-glob.ts new file mode 100644 index 000000000..08a46f01e --- /dev/null +++ b/src/cli/parse-glob.ts @@ -0,0 +1,36 @@ +import * as isGlob from 'is-glob' + +export function parseGlob(target: string): { + base: string + glob: string + is: { + glob: boolean + } + path: { + basename: string + } +} { + const recursiveTokenIndex = Math.max( + target.indexOf('**/'), + target.indexOf('**\\') + ) + const lastSlashIndex = Math.max( + target.lastIndexOf('/'), + target.lastIndexOf('\\') + ) + const baseGlobSepIndex = + recursiveTokenIndex >= 0 ? recursiveTokenIndex : Math.max(lastSlashIndex, 0) + + return { + base: target.substring(0, baseGlobSepIndex).replace(/[/\\]$/, '') || '.', + glob: target.substring(baseGlobSepIndex).replace(/^[/\\]/, ''), + is: { + glob: isGlob(target), + }, + path: { + basename: target + .substring(Math.max(lastSlashIndex, 0)) + .replace(/^[/\\]/, ''), + }, + } +} diff --git a/test/cli/parse-glob.spec.js b/test/cli/parse-glob.spec.js new file mode 100644 index 000000000..01e5a4f5d --- /dev/null +++ b/test/cli/parse-glob.spec.js @@ -0,0 +1,29 @@ +const { parseGlob } = require('../../dist/cli/parse-glob.js') +const parseGlobPkg = require('parse-glob') + +const testGlobs = [ + '!foo.js', + '*.js', + '**/abc.js', + 'abc/*.js', + 'abc/(aaa|bbb).js', + 'abc/[a-z].js', + 'abc/{a,b}.js', + 'abc/def/**/(ghi|jkl)*.{js,html}', + 'abc/def/ghi.js', + 'abc.js', + '/abc/def.js', +] + +describe('parseGlob', () => { + it('should work the same way as parseGlob package', () => { + for (const glob of testGlobs) { + const result = parseGlob(glob) + const pkgResult = parseGlobPkg(glob) + expect(result.base).toEqual(pkgResult.base) + expect(result.glob).toEqual(pkgResult.glob) + expect(result.is.glob).toEqual(pkgResult.is.glob) + expect(result.path.basename).toEqual(pkgResult.path.basename) + } + }) +})