editorconfig 1.0.1 → 1.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 +6 -6
- package/lib/index.js +2 -2
- package/package.json +14 -15
package/lib/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
|
-
import
|
|
2
|
+
import { Minimatch } from 'minimatch';
|
|
3
3
|
export interface KnownProps {
|
|
4
4
|
end_of_line?: 'lf' | 'crlf' | 'unset';
|
|
5
5
|
indent_style?: 'tab' | 'space' | 'unset';
|
|
@@ -12,13 +12,13 @@ export interface KnownProps {
|
|
|
12
12
|
interface UnknownMap {
|
|
13
13
|
[index: string]: unknown;
|
|
14
14
|
}
|
|
15
|
-
export
|
|
15
|
+
export type Props = KnownProps & UnknownMap;
|
|
16
16
|
export interface ECFile {
|
|
17
17
|
name: string;
|
|
18
18
|
contents?: Buffer;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
|
-
|
|
20
|
+
type SectionGlob = Minimatch | null;
|
|
21
|
+
type GlobbedProps = [SectionName, Props, SectionGlob][];
|
|
22
22
|
export interface ProcessedFileConfig {
|
|
23
23
|
root: boolean;
|
|
24
24
|
name: string;
|
|
@@ -40,11 +40,11 @@ export interface ParseOptions {
|
|
|
40
40
|
files?: Visited[];
|
|
41
41
|
cache?: Cache;
|
|
42
42
|
}
|
|
43
|
-
export
|
|
43
|
+
export type SectionName = string | null;
|
|
44
44
|
export interface SectionBody {
|
|
45
45
|
[key: string]: string;
|
|
46
46
|
}
|
|
47
|
-
export
|
|
47
|
+
export type ParseStringResult = [SectionName, SectionBody][];
|
|
48
48
|
/**
|
|
49
49
|
* Parse a buffer using the faster one-ini WASM approach into something
|
|
50
50
|
* relatively easy to deal with in JS.
|
package/lib/index.js
CHANGED
|
@@ -30,7 +30,7 @@ exports.parseSync = exports.parse = exports.parseFromFilesSync = exports.parseFr
|
|
|
30
30
|
const fs = __importStar(require("fs"));
|
|
31
31
|
const path = __importStar(require("path"));
|
|
32
32
|
const semver = __importStar(require("semver"));
|
|
33
|
-
const minimatch_1 =
|
|
33
|
+
const minimatch_1 = require("minimatch");
|
|
34
34
|
const wasm_1 = require("@one-ini/wasm");
|
|
35
35
|
// @ts-ignore So we can set the rootDir to be 'lib', without processing
|
|
36
36
|
// package.json
|
|
@@ -160,7 +160,7 @@ function buildFullGlob(pathPrefix, glob) {
|
|
|
160
160
|
// star_star_over_separator{1,3,5,6,9,15}
|
|
161
161
|
glob = glob.replace(/\*\*/g, '{*,**/**/**}');
|
|
162
162
|
// NOT path.join. Must stay in forward slashes.
|
|
163
|
-
return new minimatch_1.
|
|
163
|
+
return new minimatch_1.Minimatch(`${pathPrefix}/${glob}`, matchOptions);
|
|
164
164
|
}
|
|
165
165
|
/**
|
|
166
166
|
* Normalize the properties read from a config file so that their key names
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "editorconfig",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "EditorConfig File Locator and Interpreter for Node.js",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"editorconfig",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"lib": "./lib"
|
|
19
19
|
},
|
|
20
20
|
"scripts": {
|
|
21
|
-
"clean": "rimraf lib
|
|
21
|
+
"clean": "rimraf lib cmake_install.cmake CTestTestfile.cmake Makefile",
|
|
22
22
|
"prebuild": "npm run clean",
|
|
23
23
|
"build": "cmake . && tsc",
|
|
24
24
|
"pretest": "npm run build && npm run lint",
|
|
@@ -41,24 +41,23 @@
|
|
|
41
41
|
"license": "MIT",
|
|
42
42
|
"dependencies": {
|
|
43
43
|
"@one-ini/wasm": "0.1.1",
|
|
44
|
-
"commander": "^
|
|
45
|
-
"minimatch": "
|
|
44
|
+
"commander": "^10.0.0",
|
|
45
|
+
"minimatch": "6.1.6",
|
|
46
46
|
"semver": "^7.3.8"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@types/
|
|
50
|
-
"@types/
|
|
51
|
-
"@types/
|
|
52
|
-
"@
|
|
53
|
-
"@typescript-eslint/
|
|
54
|
-
"@typescript-eslint/parser": "5.41.0",
|
|
49
|
+
"@types/mocha": "^10.0.1",
|
|
50
|
+
"@types/node": "^18.11.18",
|
|
51
|
+
"@types/semver": "^7.3.13",
|
|
52
|
+
"@typescript-eslint/eslint-plugin": "5.50.0",
|
|
53
|
+
"@typescript-eslint/parser": "5.50.0",
|
|
55
54
|
"c8": "7.12.0",
|
|
56
|
-
"eslint": "8.
|
|
57
|
-
"eslint-plugin-jsdoc": "39.
|
|
58
|
-
"mocha": "^10.
|
|
59
|
-
"rimraf": "^
|
|
55
|
+
"eslint": "8.33.0",
|
|
56
|
+
"eslint-plugin-jsdoc": "39.7.5",
|
|
57
|
+
"mocha": "^10.2.0",
|
|
58
|
+
"rimraf": "^4.1.2",
|
|
60
59
|
"should": "^13.2.3",
|
|
61
|
-
"typescript": "^4.
|
|
60
|
+
"typescript": "^4.9.5"
|
|
62
61
|
},
|
|
63
62
|
"engines": {
|
|
64
63
|
"node": ">=14"
|