imdone-core 2.3.0 → 2.3.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/adapters/yaml.js +9 -2
- package/lib/repository.js +2 -0
- package/package.json +8 -8
- package/types/file.d.ts +1 -3
- package/types/project.d.ts +1 -5
- package/vitest.config.js +4 -6
package/lib/adapters/yaml.js
CHANGED
|
@@ -1,9 +1,16 @@
|
|
|
1
|
-
import YAML from 'js-yaml'
|
|
1
|
+
import YAML, { DEFAULT_SCHEMA, Type } from 'js-yaml'
|
|
2
|
+
|
|
3
|
+
const legacyJsFunctionType = new Type('tag:yaml.org,2002:js/function', {
|
|
4
|
+
kind: 'scalar',
|
|
5
|
+
construct: (data) => data || '',
|
|
6
|
+
})
|
|
7
|
+
|
|
8
|
+
const schema = DEFAULT_SCHEMA.extend([legacyJsFunctionType])
|
|
2
9
|
|
|
3
10
|
export function dumpYAML(obj, opts) {
|
|
4
11
|
return YAML.dump(obj, opts)
|
|
5
12
|
}
|
|
6
13
|
|
|
7
14
|
export function loadYAML(str, opts) {
|
|
8
|
-
return YAML.load(str, opts)
|
|
15
|
+
return YAML.load(str, { schema, ...opts })
|
|
9
16
|
}
|
package/lib/repository.js
CHANGED
|
@@ -109,6 +109,8 @@ function toFileTask({ file, streamTask, config }) {
|
|
|
109
109
|
type,
|
|
110
110
|
hasColon: !!parsedTask.colon,
|
|
111
111
|
content: file.getContent().substring(linePos),
|
|
112
|
+
inBlockComment: parsedTask.inBlockComment,
|
|
113
|
+
singleLineBlockComment: parsedTask.singleLineBlockComment,
|
|
112
114
|
pos: linePos + taskStartOnLine,
|
|
113
115
|
})
|
|
114
116
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "imdone-core",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.2",
|
|
4
4
|
"description": "imdone-core",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -56,11 +56,11 @@
|
|
|
56
56
|
"eta": "^3.5.0",
|
|
57
57
|
"fast-sort": "^3.4.1",
|
|
58
58
|
"find-up-simple": "^1.0.1",
|
|
59
|
-
"gray-matter": "^
|
|
59
|
+
"gray-matter": "^2.0.1",
|
|
60
60
|
"ignore": "^5.2.0",
|
|
61
61
|
"imdone-api": "^2.0.4",
|
|
62
62
|
"isbinaryfile": "^5.0.4",
|
|
63
|
-
"js-yaml": "^
|
|
63
|
+
"js-yaml": "^4.2.0",
|
|
64
64
|
"json-fns": "^1.0.0",
|
|
65
65
|
"lodash.assign": "^4.2.0",
|
|
66
66
|
"lodash.debounce": "^4.0.8",
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
"markdown-it-emoji": "^2.0.0",
|
|
85
85
|
"markdown-it-mark": "^3.0.1",
|
|
86
86
|
"moment": "^2.29.1",
|
|
87
|
-
"monquery": "github
|
|
87
|
+
"monquery": "https://github.com/imdone/node-monquery/archive/refs/tags/0.2.2.tar.gz",
|
|
88
88
|
"multilang-extract-comments": "^0.4.0",
|
|
89
89
|
"open": "^9.1.0",
|
|
90
90
|
"ora": "^8.2.0",
|
|
@@ -100,19 +100,19 @@
|
|
|
100
100
|
},
|
|
101
101
|
"devDependencies": {
|
|
102
102
|
"@types/node": "^22.13.13",
|
|
103
|
-
"@vitest/coverage-istanbul": "^
|
|
104
|
-
"@vitest/coverage-v8": "^
|
|
103
|
+
"@vitest/coverage-istanbul": "^4.1.9",
|
|
104
|
+
"@vitest/coverage-v8": "^4.1.9",
|
|
105
105
|
"chai": "^5.2.0",
|
|
106
106
|
"colors": "^1.4.0",
|
|
107
107
|
"dependency-cruiser": "^16.10.0",
|
|
108
108
|
"doctoc": "^2.1.0",
|
|
109
|
-
"esbuild": "^0.
|
|
109
|
+
"esbuild": "^0.28.1",
|
|
110
110
|
"expect.js": "~0.3.1",
|
|
111
111
|
"fs-extra": "^11.1.0",
|
|
112
112
|
"husky": "^9.1.7",
|
|
113
113
|
"json-stringify-safe": "~5.0.0",
|
|
114
114
|
"prettier": "^2.5.1",
|
|
115
115
|
"typescript": "^5.8.2",
|
|
116
|
-
"vitest": "^
|
|
116
|
+
"vitest": "^4.1.9"
|
|
117
117
|
}
|
|
118
118
|
}
|
package/types/file.d.ts
CHANGED
|
@@ -348,9 +348,7 @@ export class File extends Emitter<[never]> {
|
|
|
348
348
|
isInBlockComment(content: any): any;
|
|
349
349
|
startsWithCommentOrSpace(pos: any): boolean;
|
|
350
350
|
isSingleLineBlockComment(content: any): boolean;
|
|
351
|
-
parseFrontMatter(config: any):
|
|
352
|
-
[key: string]: any;
|
|
353
|
-
};
|
|
351
|
+
parseFrontMatter(config: any): any;
|
|
354
352
|
getSource(): {
|
|
355
353
|
path: any;
|
|
356
354
|
id: any;
|
package/types/project.d.ts
CHANGED
|
@@ -129,11 +129,7 @@ export class WorkerProject {
|
|
|
129
129
|
deleteTasks(tasks: any): Promise<void>;
|
|
130
130
|
setFilter(filter: any): void;
|
|
131
131
|
getNewCardTemplate(file: any, isFile: any): Promise<any>;
|
|
132
|
-
getNewCardFileFrontMatter(file: any, isFile: any): Promise<
|
|
133
|
-
props: any;
|
|
134
|
-
computed: any;
|
|
135
|
-
template: any;
|
|
136
|
-
}>;
|
|
132
|
+
getNewCardFileFrontMatter(file: any, isFile: any): Promise<any>;
|
|
137
133
|
getNewCardsFile(opts?: {
|
|
138
134
|
relPath: boolean;
|
|
139
135
|
}): string;
|
package/vitest.config.js
CHANGED
|
@@ -6,9 +6,7 @@ export default defineConfig({
|
|
|
6
6
|
coverage: {
|
|
7
7
|
provider: "v8",
|
|
8
8
|
reporter: ["text"],
|
|
9
|
-
clean: false,
|
|
10
9
|
reportOnFailure: true,
|
|
11
|
-
include: ['lib/**/*.js'],
|
|
12
10
|
exclude: [
|
|
13
11
|
'_lib',
|
|
14
12
|
'lib/**/index.*',
|
|
@@ -16,10 +14,10 @@ export default defineConfig({
|
|
|
16
14
|
'lib/**/*.spec.js',
|
|
17
15
|
],
|
|
18
16
|
thresholds: {
|
|
19
|
-
statements:
|
|
20
|
-
branches:
|
|
21
|
-
functions:
|
|
22
|
-
lines:
|
|
17
|
+
statements: -968,
|
|
18
|
+
branches: -708,
|
|
19
|
+
functions: -243,
|
|
20
|
+
lines: -756,
|
|
23
21
|
},
|
|
24
22
|
},
|
|
25
23
|
},
|