editorconfig 1.0.4 → 1.0.7

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/cli.js CHANGED
@@ -15,17 +15,28 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.default = cli;
29
40
  const commander_1 = require("commander");
30
41
  const editorconfig = __importStar(require("./"));
31
42
  const package_json_1 = __importDefault(require("../package.json"));
@@ -106,4 +117,3 @@ async function cli(args, testing) {
106
117
  return parsed;
107
118
  });
108
119
  }
109
- exports.default = cli;
package/lib/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="node" />
2
1
  import { Minimatch } from 'minimatch';
3
2
  export interface KnownProps {
4
3
  end_of_line?: 'lf' | 'crlf' | 'unset';
package/lib/index.js CHANGED
@@ -15,18 +15,33 @@ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (
15
15
  }) : function(o, v) {
16
16
  o["default"] = v;
17
17
  });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
18
+ var __importStar = (this && this.__importStar) || (function () {
19
+ var ownKeys = function(o) {
20
+ ownKeys = Object.getOwnPropertyNames || function (o) {
21
+ var ar = [];
22
+ for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
+ return ar;
24
+ };
25
+ return ownKeys(o);
26
+ };
27
+ return function (mod) {
28
+ if (mod && mod.__esModule) return mod;
29
+ var result = {};
30
+ if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
+ __setModuleDefault(result, mod);
32
+ return result;
33
+ };
34
+ })();
25
35
  var __importDefault = (this && this.__importDefault) || function (mod) {
26
36
  return (mod && mod.__esModule) ? mod : { "default": mod };
27
37
  };
28
38
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.parseSync = exports.parse = exports.parseFromFilesSync = exports.parseFromFiles = exports.parseString = exports.parseBuffer = void 0;
39
+ exports.parseBuffer = parseBuffer;
40
+ exports.parseString = parseString;
41
+ exports.parseFromFiles = parseFromFiles;
42
+ exports.parseFromFilesSync = parseFromFilesSync;
43
+ exports.parse = parse;
44
+ exports.parseSync = parseSync;
30
45
  const fs = __importStar(require("fs"));
31
46
  const path = __importStar(require("path"));
32
47
  const semver = __importStar(require("semver"));
@@ -82,7 +97,6 @@ function parseBuffer(data) {
82
97
  }
83
98
  return res;
84
99
  }
85
- exports.parseBuffer = parseBuffer;
86
100
  /**
87
101
  * Parses a string. If possible, you should always use ParseBuffer instead,
88
102
  * since this function does a UTF16-to-UTF8 conversion first.
@@ -94,7 +108,6 @@ exports.parseBuffer = parseBuffer;
94
108
  function parseString(data) {
95
109
  return parseBuffer(Buffer.from(data));
96
110
  }
97
- exports.parseString = parseString;
98
111
  /**
99
112
  * Gets a list of *potential* filenames based on the path of the target
100
113
  * filename.
@@ -239,7 +252,7 @@ function processFileContents(filepath, contents, options) {
239
252
  name ? buildFullGlob(pathPrefix, name) : null,
240
253
  ]);
241
254
  res = {
242
- root: !!globbed[0][1].root,
255
+ root: !!globbed[0][1].root, // globbed[0] is the global section
243
256
  name: filepath,
244
257
  config: globbed,
245
258
  };
@@ -373,7 +386,6 @@ function opts(filepath, options = {}) {
373
386
  async function parseFromFiles(filepath, files, options = {}) {
374
387
  return parseFromFilesSync(filepath, await files, options);
375
388
  }
376
- exports.parseFromFiles = parseFromFiles;
377
389
  /**
378
390
  * Low-level interface, which exists only for backward-compatibility.
379
391
  * Deprecated.
@@ -401,7 +413,6 @@ function parseFromFilesSync(filepath, files, options = {}) {
401
413
  }
402
414
  return combine(resolvedFilePath, configs, processedOptions);
403
415
  }
404
- exports.parseFromFilesSync = parseFromFilesSync;
405
416
  /**
406
417
  * Combine the pre-parsed results of all matching config file sections, in
407
418
  * order.
@@ -442,7 +453,6 @@ async function parse(filepath, options = {}) {
442
453
  const configs = await getAllConfigs(filepaths, processedOptions);
443
454
  return combine(resolvedFilePath, configs, processedOptions);
444
455
  }
445
- exports.parse = parse;
446
456
  /**
447
457
  * Find all of the properties from matching sections in config files in the
448
458
  * same directory or toward the root of the filesystem. Synchronous.
@@ -457,4 +467,3 @@ function parseSync(filepath, options = {}) {
457
467
  const configs = getAllConfigsSync(filepaths, processedOptions);
458
468
  return combine(resolvedFilePath, configs, processedOptions);
459
469
  }
460
- exports.parseSync = parseSync;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "editorconfig",
3
- "version": "1.0.4",
3
+ "version": "1.0.7",
4
4
  "description": "EditorConfig File Locator and Interpreter for Node.js",
5
5
  "keywords": [
6
6
  "editorconfig",
@@ -17,21 +17,6 @@
17
17
  "bin": "./bin",
18
18
  "lib": "./lib"
19
19
  },
20
- "scripts": {
21
- "clean": "rimraf lib cmake_install.cmake CTestTestfile.cmake Makefile",
22
- "prebuild": "npm run clean",
23
- "build": "cmake . && tsc",
24
- "pretest": "npm run build && npm run lint",
25
- "test": "npm run test:all",
26
- "test:all": "mocha && ctest . --preset Test",
27
- "precoverage": "npm run build -- --inlineSourceMap",
28
- "coverage": "c8 npm run test:all",
29
- "postcoverage": "npm run build",
30
- "ci": "npm run coverage -- -- -VV --output-on-failure",
31
- "lint": "eslint . --ext ts",
32
- "prepub": "npm run lint && npm run build",
33
- "pub": "npm publish"
34
- },
35
20
  "repository": {
36
21
  "type": "git",
37
22
  "url": "git://github.com/editorconfig/editorconfig-core-js.git"
@@ -42,22 +27,11 @@
42
27
  "dependencies": {
43
28
  "@one-ini/wasm": "0.1.1",
44
29
  "commander": "^10.0.0",
45
- "minimatch": "9.0.1",
30
+ "minimatch": "^9.0.1",
46
31
  "semver": "^7.5.3"
47
32
  },
48
- "devDependencies": {
49
- "@types/mocha": "^10.0.1",
50
- "@types/node": "^20.3.1",
51
- "@types/semver": "^7.5.0",
52
- "@typescript-eslint/eslint-plugin": "5.60.0",
53
- "@typescript-eslint/parser": "5.60.0",
54
- "c8": "8.0.0",
55
- "eslint": "8.43.0",
56
- "eslint-plugin-jsdoc": "46.2.6",
57
- "mocha": "^10.2.0",
58
- "rimraf": "^5.0.1",
59
- "should": "^13.2.3",
60
- "typescript": "^5.1.3"
33
+ "publishConfig": {
34
+ "tag": "1.x"
61
35
  },
62
36
  "engines": {
63
37
  "node": ">=14"