@ember-template-lint/todo-utils
Advanced tools
Comparing version 10.0.0-beta.1 to 10.0.0-beta.2
@@ -0,1 +1,10 @@ | ||
## v10.0.0-beta.2 (2021-07-23) | ||
#### :bug: Bug Fix | ||
* [#269](https://github.com/ember-template-lint/ember-template-lint-todo-utils/pull/269) Converts the remove Set back to a Map, which is required for consumers ([@scalvert](https://github.com/scalvert)) | ||
#### Committers: 1 | ||
- Steve Calvert ([@scalvert](https://github.com/scalvert)) | ||
## v10.0.0-beta.1 (2021-07-21) | ||
@@ -2,0 +11,0 @@ |
@@ -90,3 +90,3 @@ import { TodoFileHash, LintResult, TodoDataV2, TodoBatchCounts, WriteTodoOptions, TodoFilePathHash, TodoBatches } from './types'; | ||
*/ | ||
export declare function applyTodoChanges(todoStorageDir: string, add: Map<TodoFileHash, TodoDataV2>, remove: Set<TodoFileHash>): void; | ||
export declare function applyTodoChanges(todoStorageDir: string, add: Map<TodoFileHash, TodoDataV2>, remove: Map<TodoFileHash, TodoDataV2>): void; | ||
//# sourceMappingURL=io.d.ts.map |
@@ -180,3 +180,3 @@ "use strict"; | ||
} | ||
for (const fileHash of remove) { | ||
for (const [fileHash] of remove) { | ||
const { dir } = path_1.posix.parse(fileHash); | ||
@@ -183,0 +183,0 @@ const todoDir = path_1.posix.join(todoStorageDir, dir); |
@@ -60,3 +60,3 @@ "use strict"; | ||
const stable = new Map(); | ||
let remove = new Set(); | ||
let remove = new Map(); | ||
const unmatched = builders_1.buildTodoData(this.baseDir, lintResults, (_a = this.options) === null || _a === void 0 ? void 0 : _a.todoConfig); | ||
@@ -104,3 +104,3 @@ for (const unmatchedTodoData of unmatched) { | ||
for (const matcher of [...existingTodos.values()]) { | ||
remove = new Set([...remove, ...matcher.unmatched((_f = this.options) === null || _f === void 0 ? void 0 : _f.shouldRemove)]); | ||
remove = new Map([...remove, ...matcher.unmatched((_f = this.options) === null || _f === void 0 ? void 0 : _f.shouldRemove)]); | ||
} | ||
@@ -107,0 +107,0 @@ return { |
@@ -5,3 +5,3 @@ import { TodoDataV2, TodoFilePathHash } from './types'; | ||
constructor(); | ||
unmatched(predicate?: (todoDatum: TodoDataV2) => boolean): string[]; | ||
unmatched(predicate?: (todoDatum: TodoDataV2) => boolean): Map<TodoFilePathHash, TodoDataV2>; | ||
add(todoDatum: TodoDataV2): void; | ||
@@ -8,0 +8,0 @@ find(todoFilePathHash: TodoFilePathHash): TodoDataV2 | undefined; |
@@ -37,7 +37,7 @@ "use strict"; | ||
unmatched(predicate = () => false) { | ||
return [...this.unprocessed] | ||
return new Map([...this.unprocessed] | ||
.filter((todoDatum) => predicate(todoDatum)) | ||
.map((todoDatum) => { | ||
return io_1.todoFilePathFor(todoDatum); | ||
}); | ||
return [io_1.todoFilePathFor(todoDatum), todoDatum]; | ||
})); | ||
} | ||
@@ -44,0 +44,0 @@ add(todoDatum) { |
@@ -34,3 +34,3 @@ import { PackageJson } from 'type-fest'; | ||
stable: Map<TodoFileHash, TodoDataV2>; | ||
remove: Set<TodoFileHash>; | ||
remove: Map<TodoFileHash, TodoDataV2>; | ||
}; | ||
@@ -37,0 +37,0 @@ export declare enum TodoFileFormat { |
{ | ||
"name": "@ember-template-lint/todo-utils", | ||
"version": "10.0.0-beta.1", | ||
"version": "10.0.0-beta.2", | ||
"repository": "https://github.com/ember-template-lint/ember-template-lint-todo-utils.git", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
117805