Upgrade all the things

This commit is contained in:
Daniil Samoylov 2024-01-30 15:12:05 +13:00
parent e55b1ed57a
commit 2c495ec569
4 changed files with 2338 additions and 8721 deletions

View file

@ -1,6 +1,6 @@
import * as jsyaml from 'js-yaml'
import micromatch from 'micromatch'
import {File, ChangeStatus} from './file'
import {File} from './file'
// Type definition of object we expect to load from YAML
interface FilterYaml {
@ -15,13 +15,6 @@ const MatchOptions: micromatch.Options = {
dot: true
}
// Internal representation of one item in named filter rule
// Created as simplified form of data in FilterItemYaml
interface FilterRuleItem {
/** returns the list of matched files */
matcher: (files: string[]) => string[]
}
export interface FilterResults {
[key: string]: File[]
}
@ -42,7 +35,7 @@ export class Filter {
return
}
const doc = jsyaml.safeLoad(yaml) as FilterYaml
const doc = jsyaml.load(yaml) as FilterYaml
if (typeof doc !== 'object') {
this.throwInvalidFormatError('Root element is not an object')
}