imdone-core 2.3.1 → 2.3.3

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.
@@ -0,0 +1,12 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(npm test:*)",
5
+ "Bash(node test-debug.js:*)",
6
+ "Bash(cat:*)",
7
+ "Bash(node test-ignore-patterns.js:*)",
8
+ "Bash(node test-ignore-patterns-detailed.js:*)",
9
+ "Bash(node test-ignore-patterns-fixed.js:*)"
10
+ ]
11
+ }
12
+ }
package/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ## 2.3.3
2
+
3
+ - Update `adm-zip` to `0.6.0` to address a high-severity ZIP parsing memory allocation vulnerability.
4
+
1
5
  ## 2.1.11
2
6
 
3
7
  - Load extension and installed plugin modules through file URL import specifiers, so Windows users no longer see `ERR_UNSUPPORTED_ESM_URL_SCHEME` when project paths start with drive letters like `C:\`
@@ -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.1",
3
+ "version": "2.3.3",
4
4
  "description": "imdone-core",
5
5
  "repository": {
6
6
  "type": "git",
@@ -43,7 +43,7 @@
43
43
  },
44
44
  "homepage": "https://github.com/imdone/imdone-core",
45
45
  "dependencies": {
46
- "adm-zip": "^0.5.16",
46
+ "adm-zip": "^0.6.0",
47
47
  "async": "^3.2.6",
48
48
  "async-es": "^3.2.6",
49
49
  "chalk": "^5.4.1",
@@ -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": "^4.0.2",
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": "^3.14.1",
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",
@@ -100,19 +100,19 @@
100
100
  },
101
101
  "devDependencies": {
102
102
  "@types/node": "^22.13.13",
103
- "@vitest/coverage-istanbul": "^3.2.6",
104
- "@vitest/coverage-v8": "^3.2.6",
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.25.1",
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": "^3.2.6"
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;
@@ -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: 87,
20
- branches: 83,
21
- functions: 80,
22
- lines: 87,
17
+ statements: -968,
18
+ branches: -708,
19
+ functions: -243,
20
+ lines: -756,
23
21
  },
24
22
  },
25
23
  },