@markuplint/file-resolver 3.7.0 → 3.9.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.
@@ -4,9 +4,11 @@ exports.load = exports.search = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const path_1 = tslib_1.__importDefault(require("path"));
6
6
  const cosmiconfig_1 = require("cosmiconfig");
7
+ const cosmiconfig_typescript_loader_1 = require("cosmiconfig-typescript-loader");
7
8
  const jsonc_1 = require("jsonc");
8
9
  const explorer = (0, cosmiconfig_1.cosmiconfig)('markuplint', {
9
10
  loaders: {
11
+ '.ts': (0, cosmiconfig_typescript_loader_1.TypeScriptLoader)(),
10
12
  noExt: ((path, content) => {
11
13
  try {
12
14
  return jsonc_1.jsonc.parse(content);
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.getFiles = void 0;
4
- const tslib_1 = require("tslib");
5
- const glob_1 = tslib_1.__importDefault(require("glob"));
4
+ const glob_1 = require("glob");
6
5
  const get_file_1 = require("./get-file");
7
6
  /**
8
7
  * Get files
@@ -12,14 +11,7 @@ const get_file_1 = require("./get-file");
12
11
  * @param filePathOrGlob
13
12
  */
14
13
  async function getFiles(filePathOrGlob) {
15
- const fileList = await new Promise((resolve, reject) => {
16
- (0, glob_1.default)(filePathOrGlob, {}, (err, matches) => {
17
- if (err) {
18
- reject(err);
19
- }
20
- resolve(matches);
21
- });
22
- }).catch(() => []);
14
+ const fileList = await (0, glob_1.glob)(filePathOrGlob, {}).catch(() => []);
23
15
  return fileList.map(fileName => (0, get_file_1.getFile)(fileName));
24
16
  }
25
17
  exports.getFiles = getFiles;
@@ -5,7 +5,7 @@ exports.MLFile = void 0;
5
5
  const tslib_1 = require("tslib");
6
6
  const fs_1 = require("fs");
7
7
  const path_1 = tslib_1.__importDefault(require("path"));
8
- const minimatch_1 = tslib_1.__importDefault(require("minimatch"));
8
+ const minimatch_1 = require("minimatch");
9
9
  class MLFile {
10
10
  constructor(target) {
11
11
  var _a, _b;
@@ -82,7 +82,7 @@ class MLFile {
82
82
  return !!stat && stat.isFile();
83
83
  }
84
84
  matches(globPath) {
85
- return (0, minimatch_1.default)(this.nPath, pathNormalize(globPath));
85
+ return (0, minimatch_1.minimatch)(this.nPath, pathNormalize(globPath));
86
86
  }
87
87
  setCode(code) {
88
88
  if (tslib_1.__classPrivateFieldGet(this, _MLFile_type, "f") === 'file-base') {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@markuplint/file-resolver",
3
- "version": "3.7.0",
3
+ "version": "3.9.0",
4
4
  "description": "The file resolver of markuplint",
5
5
  "repository": "git@github.com:markuplint/markuplint.git",
6
6
  "author": "Yusuke Hirao <yusukehirao@me.com>",
@@ -19,22 +19,22 @@
19
19
  "clean": "tsc --build --clean"
20
20
  },
21
21
  "devDependencies": {
22
- "@types/cosmiconfig": "^6.0.0",
23
- "@types/glob": "^8.0.0",
24
- "@types/node": "latest"
22
+ "@types/node": "18.16.3"
25
23
  },
26
24
  "dependencies": {
27
- "@markuplint/html-parser": "3.6.1",
25
+ "@markuplint/html-parser": "3.7.0",
28
26
  "@markuplint/ml-ast": "3.1.0",
29
- "@markuplint/ml-config": "3.6.1",
30
- "@markuplint/ml-core": "3.7.0",
31
- "@markuplint/ml-spec": "3.6.1",
32
- "@markuplint/shared": "3.5.0",
27
+ "@markuplint/ml-config": "3.8.0",
28
+ "@markuplint/ml-core": "3.9.0",
29
+ "@markuplint/ml-spec": "3.8.0",
30
+ "@markuplint/shared": "3.6.0",
31
+ "@types/cosmiconfig": "^6.0.0",
33
32
  "cosmiconfig": "^8.0.0",
34
- "glob": "^8.0.3",
33
+ "cosmiconfig-typescript-loader": "^4.3.0",
34
+ "glob": "^10.2.2",
35
35
  "jsonc": "^2.0.0",
36
- "minimatch": "^5.1.1",
36
+ "minimatch": "^9.0.0",
37
37
  "tslib": "^2.4.1"
38
38
  },
39
- "gitHead": "884e8dbf60ec2a350761d5cda3cdc0725881b9dc"
39
+ "gitHead": "adc6e432cccba7cfad0dc8bf9f92e5aaf1107359"
40
40
  }