Releases: kaelzhang/node-ignore
7.0.0
Minor feature
The primary feature introduced by 7.0.0
is the .checkIgnore()
method, which is most equivalent to git check-ignore -v
. And also it allows to pass {pattern, mark?}
as the parameter of .add()
so that we could imitate the mechanism of git check-ignore
as:
ig.add({
pattern: 'foo/*',
mark: '60'
})
const {
ignored,
rule
} = checkIgnore('foo/')
if (ignored) {
console.log(`.gitignore:${result}:${rule.mark}:${rule.pattern} foo/`)
}
// .gitignore:60:foo/* foo/
Potential Incompatibilities
The only situation that 7.0.0
might bring incompatibility is to .add()
a < 7.0.0
instance into a >= 7.0.0
instance, which might occur when the current workspace has multiple node-ignore
versions installed, please be careful.
const {anotherIgnoreInstance} = require('./ignore-6.0-instance')
// A 7.0.0 instance
ignore().add(anotherIgnoreInstance)
// It will break your code
Otherwise, in most cases, if you never do something above or there is only one version of node-ignore
installed in the current workspace, it is quite safe to upgrade to 7.0.0
.
6.x (== 5.3.2)
6.x
- The release of
6.x
is due to a mistake. - Making an upgrade from
5.x
to 6.x for now actually changes nothing and does no harm, everyone could just upgrade or ignore the version.- Actually
6.0.2
is5.3.2
- Actually
- The next major release will be
7.0.0
5.3.0
5.2.4
- PATCH fixes normal single asterisk and normal consecutive asterisks defined in gitignore spec (#57)
- PATCH invalid trailing backslash will not throw unexpectedly
An upgrade is recommended for all dependents
The following rules could be not properly parsed with previous ignore
versions
**foo
*bar
qu*ux
abc\ # `ignore` would throw if no whitespace after `\`
5.2.0
- PATCH support readonly arrays of typescript. (#70)
- MINOR bring backward compatibility with relative paths. (#75)
An upgrade is recommended for all dependents.
ignore().ignores('../foo/bar.js') // will throw
And the code below will not throw, however it is not recommended
ignore({
allowRelativePaths: true
}).ignores('../foo/bar.js')
Recommend:
ignore().ignores('foo/bar.js')
5.1.9
5.1.5
5.1.3
5.1.1
2019-04-14, Version 5.1.0
- FEATURE: Typescript: export interface Ignore (#53)