editorconfig 3.0.1 → 3.0.2
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/lib/index.d.ts +1 -1
- package/lib/index.js +4 -10
- package/package.json +7 -6
package/lib/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -47,9 +47,9 @@ exports.matcher = matcher;
|
|
|
47
47
|
const fs = __importStar(require("node:fs"));
|
|
48
48
|
const path = __importStar(require("node:path"));
|
|
49
49
|
const semver = __importStar(require("semver"));
|
|
50
|
+
const minimatch_1 = require("minimatch");
|
|
50
51
|
const wasm_1 = require("@one-ini/wasm");
|
|
51
52
|
const node_buffer_1 = require("node:buffer");
|
|
52
|
-
const minimatch_1 = require("minimatch");
|
|
53
53
|
const package_json_1 = __importDefault(require("../package.json"));
|
|
54
54
|
const escapedSep = new RegExp(path.sep.replace(/\\/g, '\\\\'), 'g');
|
|
55
55
|
const matchOptions = { matchBase: true, dot: true };
|
|
@@ -242,15 +242,9 @@ function processFileContents(filepath, contents, options) {
|
|
|
242
242
|
// Windows-only
|
|
243
243
|
pathPrefix = pathPrefix.replace(escapedSep, '/');
|
|
244
244
|
}
|
|
245
|
-
//
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
// forced into path names on many file systems. Escape them. Note
|
|
249
|
-
// that these are in the order of the case statement in minimatch.
|
|
250
|
-
pathPrefix = pathPrefix.replace(/[?*+@!()|[\]{}]/g, '\\$&');
|
|
251
|
-
// I can't think of a way for this to happen in the filesystems I've
|
|
252
|
-
// seen (because of the path.dirname above), but let's be thorough.
|
|
253
|
-
pathPrefix = pathPrefix.replace(/^#/, '\\#');
|
|
245
|
+
// Use minimatch's escape() with bracket escaping for the path prefix.
|
|
246
|
+
pathPrefix = (0, minimatch_1.escape)(pathPrefix, { windowsPathsNoEscape: true });
|
|
247
|
+
pathPrefix = pathPrefix.replace(/^#/, '[#]');
|
|
254
248
|
const globbed = parseBuffer(contents).map(([name, body]) => [
|
|
255
249
|
name,
|
|
256
250
|
normalizeProps(body),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "editorconfig",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "EditorConfig File Locator and Interpreter for Node.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"editorconfig",
|
|
@@ -16,7 +16,8 @@
|
|
|
16
16
|
"Jed Mao (https://github.com/jedmao/)",
|
|
17
17
|
"Trey Hunner (http://treyhunner.com)",
|
|
18
18
|
"Joe Hildebrand (https://github.com/hildjj/)",
|
|
19
|
-
"SunsetTechuila (https://github.com/SunsetTechuila/)"
|
|
19
|
+
"SunsetTechuila (https://github.com/SunsetTechuila/)",
|
|
20
|
+
"Rex Lorenzo (https://github.com/rlorenzo/)"
|
|
20
21
|
],
|
|
21
22
|
"directories": {
|
|
22
23
|
"bin": "./bin",
|
|
@@ -30,10 +31,10 @@
|
|
|
30
31
|
"author": "EditorConfig Team",
|
|
31
32
|
"license": "MIT",
|
|
32
33
|
"dependencies": {
|
|
33
|
-
"@one-ini/wasm": "0.2.
|
|
34
|
-
"commander": "^14.0.
|
|
35
|
-
"minimatch": "10.
|
|
36
|
-
"semver": "^7.7.
|
|
34
|
+
"@one-ini/wasm": "0.2.1",
|
|
35
|
+
"commander": "^14.0.3",
|
|
36
|
+
"minimatch": "~10.2.4",
|
|
37
|
+
"semver": "^7.7.4"
|
|
37
38
|
},
|
|
38
39
|
"engines": {
|
|
39
40
|
"node": ">=20"
|