@markuplint/file-resolver 4.0.0-dev.10 → 4.0.0-dev.12
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/LICENSE +1 -1
- package/lib/cosmiconfig.js +1 -0
- package/lib/resolve-parser.d.ts +2 -2
- package/lib/resolve-parser.js +6 -2
- package/package.json +12 -12
package/LICENSE
CHANGED
package/lib/cosmiconfig.js
CHANGED
package/lib/resolve-parser.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import type { MLFile } from './ml-file/index.js';
|
|
2
|
-
import type { MLMarkupLanguageParser, ParserOptions } from '@markuplint/ml-ast';
|
|
2
|
+
import type { MLMarkupLanguageParser, MLParser, ParserOptions } from '@markuplint/ml-ast';
|
|
3
3
|
import type { ParserConfig } from '@markuplint/ml-config';
|
|
4
4
|
export declare function resolveParser(file: Readonly<MLFile>, parserConfig?: ParserConfig, parserOptions?: ParserOptions): Promise<{
|
|
5
5
|
parserModName: string;
|
|
6
|
-
parser: MLMarkupLanguageParser;
|
|
6
|
+
parser: MLParser | MLMarkupLanguageParser;
|
|
7
7
|
parserOptions: ParserOptions;
|
|
8
8
|
matched: boolean;
|
|
9
9
|
}>;
|
package/lib/resolve-parser.js
CHANGED
|
@@ -34,6 +34,10 @@ async function importParser(parserModName) {
|
|
|
34
34
|
if (entity) {
|
|
35
35
|
return entity;
|
|
36
36
|
}
|
|
37
|
-
const
|
|
38
|
-
|
|
37
|
+
const parserMod = await import(parserModName);
|
|
38
|
+
// TODO: To be dropped in v5
|
|
39
|
+
if (!('parser' in parserMod)) {
|
|
40
|
+
return parserMod;
|
|
41
|
+
}
|
|
42
|
+
return parserMod.parser;
|
|
39
43
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@markuplint/file-resolver",
|
|
3
|
-
"version": "4.0.0-dev.
|
|
3
|
+
"version": "4.0.0-dev.12+2275fbeb0",
|
|
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>",
|
|
@@ -24,23 +24,23 @@
|
|
|
24
24
|
"clean": "tsc --build --clean"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@types/node": "20.
|
|
27
|
+
"@types/node": "20.11.5"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@markuplint/html-parser": "4.0.0-dev.
|
|
31
|
-
"@markuplint/ml-ast": "4.0.0-dev.
|
|
32
|
-
"@markuplint/ml-config": "4.0.0-dev.
|
|
33
|
-
"@markuplint/ml-core": "4.0.0-dev.
|
|
34
|
-
"@markuplint/ml-spec": "4.0.0-dev.
|
|
35
|
-
"@markuplint/parser-utils": "4.0.0-dev.
|
|
36
|
-
"@markuplint/selector": "4.0.0-dev.
|
|
37
|
-
"@markuplint/shared": "4.0.0-dev.
|
|
38
|
-
"cosmiconfig": "^
|
|
30
|
+
"@markuplint/html-parser": "4.0.0-dev.12+2275fbeb0",
|
|
31
|
+
"@markuplint/ml-ast": "4.0.0-dev.12+2275fbeb0",
|
|
32
|
+
"@markuplint/ml-config": "4.0.0-dev.12+2275fbeb0",
|
|
33
|
+
"@markuplint/ml-core": "4.0.0-dev.12+2275fbeb0",
|
|
34
|
+
"@markuplint/ml-spec": "4.0.0-dev.12+2275fbeb0",
|
|
35
|
+
"@markuplint/parser-utils": "4.0.0-dev.12+2275fbeb0",
|
|
36
|
+
"@markuplint/selector": "4.0.0-dev.12+2275fbeb0",
|
|
37
|
+
"@markuplint/shared": "4.0.0-dev.12+2275fbeb0",
|
|
38
|
+
"cosmiconfig": "^9.0.0",
|
|
39
39
|
"debug": "^4.3.4",
|
|
40
40
|
"glob": "^10.3.6",
|
|
41
41
|
"ignore": "^5.3.0",
|
|
42
42
|
"jsonc": "^2.0.0",
|
|
43
43
|
"minimatch": "^9.0.3"
|
|
44
44
|
},
|
|
45
|
-
"gitHead": "
|
|
45
|
+
"gitHead": "2275fbeb053605b636f080f4fafd7cd4fc57a9a3"
|
|
46
46
|
}
|