cspell-glob 6.18.0 → 6.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/GlobMatcher.d.ts +1 -1
- package/dist/GlobMatcher.js +5 -2
- package/dist/globHelper.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +4 -4
- package/package.json +5 -6
package/dist/GlobMatcher.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { GlobMatch, GlobPattern, GlobPatternNormalized, GlobPatternWithRoot, PathInterface } from './GlobMatcherTypes';
|
|
2
2
|
type Optional<T> = {
|
|
3
3
|
[P in keyof T]?: T[P] | undefined;
|
|
4
4
|
};
|
package/dist/GlobMatcher.js
CHANGED
|
@@ -22,9 +22,12 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
25
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
29
|
exports.GlobMatcher = void 0;
|
|
27
|
-
const
|
|
30
|
+
const micromatch_1 = __importDefault(require("micromatch"));
|
|
28
31
|
const Path = __importStar(require("path"));
|
|
29
32
|
const globHelper_1 = require("./globHelper");
|
|
30
33
|
class GlobMatcher {
|
|
@@ -89,7 +92,7 @@ function buildMatcherFn(patterns, options) {
|
|
|
89
92
|
const matchNeg = pattern.glob.match(/^!/);
|
|
90
93
|
const glob = pattern.glob.replace(/^!/, '');
|
|
91
94
|
const isNeg = (matchNeg && matchNeg[0].length & 1 && true) || false;
|
|
92
|
-
const reg =
|
|
95
|
+
const reg = micromatch_1.default.makeRe(glob, makeReOptions);
|
|
93
96
|
const fn = (filename) => {
|
|
94
97
|
const match = filename.match(reg);
|
|
95
98
|
return !!match;
|
package/dist/globHelper.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { GlobPattern, GlobPatternNormalized, GlobPatternWithOptionalRoot, GlobPatternWithRoot, PathInterface } from './GlobMatcherTypes';
|
|
1
|
+
import type { GlobPattern, GlobPatternNormalized, GlobPatternWithOptionalRoot, GlobPatternWithRoot, PathInterface } from './GlobMatcherTypes';
|
|
2
2
|
/**
|
|
3
3
|
* This function tries its best to determine if `fileOrGlob` is a path to a file or a glob pattern.
|
|
4
4
|
* @param fileOrGlob - file (with absolute path) or glob.
|
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { GlobMatchOptions, GlobMatcher } from './GlobMatcher';
|
|
2
|
-
export * from './GlobMatcherTypes';
|
|
3
1
|
export { fileOrGlobToGlob, isGlobPatternNormalized, isGlobPatternWithOptionalRoot, isGlobPatternWithRoot, normalizeGlobPatterns, NormalizeOptions, } from './globHelper';
|
|
2
|
+
export { GlobMatcher, GlobMatchOptions } from './GlobMatcher';
|
|
3
|
+
export * from './GlobMatcherTypes';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -14,14 +14,14 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.normalizeGlobPatterns = exports.isGlobPatternWithRoot = exports.isGlobPatternWithOptionalRoot = exports.isGlobPatternNormalized = exports.fileOrGlobToGlob =
|
|
18
|
-
var GlobMatcher_1 = require("./GlobMatcher");
|
|
19
|
-
Object.defineProperty(exports, "GlobMatcher", { enumerable: true, get: function () { return GlobMatcher_1.GlobMatcher; } });
|
|
20
|
-
__exportStar(require("./GlobMatcherTypes"), exports);
|
|
17
|
+
exports.GlobMatcher = exports.normalizeGlobPatterns = exports.isGlobPatternWithRoot = exports.isGlobPatternWithOptionalRoot = exports.isGlobPatternNormalized = exports.fileOrGlobToGlob = void 0;
|
|
21
18
|
var globHelper_1 = require("./globHelper");
|
|
22
19
|
Object.defineProperty(exports, "fileOrGlobToGlob", { enumerable: true, get: function () { return globHelper_1.fileOrGlobToGlob; } });
|
|
23
20
|
Object.defineProperty(exports, "isGlobPatternNormalized", { enumerable: true, get: function () { return globHelper_1.isGlobPatternNormalized; } });
|
|
24
21
|
Object.defineProperty(exports, "isGlobPatternWithOptionalRoot", { enumerable: true, get: function () { return globHelper_1.isGlobPatternWithOptionalRoot; } });
|
|
25
22
|
Object.defineProperty(exports, "isGlobPatternWithRoot", { enumerable: true, get: function () { return globHelper_1.isGlobPatternWithRoot; } });
|
|
26
23
|
Object.defineProperty(exports, "normalizeGlobPatterns", { enumerable: true, get: function () { return globHelper_1.normalizeGlobPatterns; } });
|
|
24
|
+
var GlobMatcher_1 = require("./GlobMatcher");
|
|
25
|
+
Object.defineProperty(exports, "GlobMatcher", { enumerable: true, get: function () { return GlobMatcher_1.GlobMatcher; } });
|
|
26
|
+
__exportStar(require("./GlobMatcherTypes"), exports);
|
|
27
27
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cspell-glob",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.19.0",
|
|
4
4
|
"description": "Glob matcher for cspell",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cspell",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"build": "tsc -p .",
|
|
26
26
|
"build-dev": "tsc -p tsconfig.dev.json",
|
|
27
27
|
"watch": "tsc -p . -w",
|
|
28
|
-
"clean": "
|
|
28
|
+
"clean": "shx rm -rf dist coverage .tsbuildinfo",
|
|
29
29
|
"clean-build": "pnpm run clean && pnpm run build",
|
|
30
30
|
"coverage": "jest --coverage",
|
|
31
31
|
"test-watch": "jest --watch",
|
|
@@ -46,9 +46,8 @@
|
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@types/micromatch": "^4.0.2",
|
|
49
|
-
"@types/node": "^18.11.
|
|
50
|
-
"jest": "^29.3.1"
|
|
51
|
-
"rimraf": "^3.0.2"
|
|
49
|
+
"@types/node": "^18.11.18",
|
|
50
|
+
"jest": "^29.3.1"
|
|
52
51
|
},
|
|
53
|
-
"gitHead": "
|
|
52
|
+
"gitHead": "f643f0cd6384905618dbca950bd65a39a77dc028"
|
|
54
53
|
}
|