Comparing version 0.6.0 to 0.6.1
@@ -9,2 +9,14 @@ # Changelog | ||
## [0.6.1] - 2024-07-25 | ||
### Added | ||
- The `-v`, `--invert` toggle ([#37](https://github.com/imcotton/pkg-fence/pull/37)) | ||
The same behavior as in `grep`. | ||
## [0.6.0] - 2024-07-19 | ||
@@ -11,0 +23,0 @@ |
// src/cli/main.ts | ||
import { parseArgs } from "node:util"; | ||
import { createInterface } from "node:readline"; | ||
@@ -125,3 +124,3 @@ import { argv, stdin, exit } from "node:process"; | ||
// src/presets/nolyfill.ts | ||
const list = Array.of( | ||
const list = [ | ||
"abab", | ||
@@ -227,7 +226,7 @@ "array-buffer-byte-length", | ||
"which-typed-array" | ||
); | ||
]; | ||
const check2 = lookup(list); | ||
// src/presets/relief.ts | ||
const native_list = Array.of( | ||
const native_list = [ | ||
// -native | ||
@@ -365,5 +364,5 @@ "date", | ||
"last-index-of" | ||
); | ||
]; | ||
const native_check = lookup(native_list); | ||
const micro_list = Array.of( | ||
const micro_list = [ | ||
// -micro | ||
@@ -392,5 +391,5 @@ "call-bind", | ||
"is-even" | ||
); | ||
]; | ||
const micro_check = lookup(micro_list); | ||
const preferred_list = Array.of( | ||
const preferred_list = [ | ||
// -preferred | ||
@@ -743,3 +742,3 @@ "bluebird", | ||
"readable-stream" | ||
); | ||
]; | ||
const preferred_check = lookup(preferred_list); | ||
@@ -776,8 +775,9 @@ | ||
function collect({ flags, lines }) { | ||
const { format, extra = [], ignore = [], ...rest } = flags; | ||
const pred = make_predicate({ | ||
const { format, extra = [], ignore = [], invert, ...rest } = flags; | ||
const refine = invert ? not : id; | ||
const pred = refine(make_predicate({ | ||
extra: lookup(extra.flatMap(split_by_comma)), | ||
ignore: lookup(ignore.flatMap(split_by_comma)), | ||
presets: gen_presets(rest) | ||
}); | ||
})); | ||
const result = filter(pred)( | ||
@@ -828,2 +828,4 @@ make_scanner(format)( | ||
-v, --invert | ||
`; | ||
@@ -854,3 +856,4 @@ | ||
// src/cli/main.ts | ||
// src/cli/parse.ts | ||
import { parseArgs } from "node:util"; | ||
function parse(args) { | ||
@@ -871,2 +874,6 @@ const { values } = parseArgs({ | ||
}, | ||
invert: { | ||
type: "boolean", | ||
short: "v" | ||
}, | ||
// presets | ||
@@ -893,2 +900,4 @@ lodash: { | ||
} | ||
// src/cli/main.ts | ||
async function main({ | ||
@@ -922,4 +931,3 @@ args = argv.slice(2), | ||
export { | ||
main, | ||
parse | ||
main | ||
}; |
{ | ||
"name": "pkg-fence", | ||
"version": "0.6.0", | ||
"version": "0.6.1", | ||
"description": "A command line tool that glance over package dependencies.", | ||
@@ -5,0 +5,0 @@ "license": "AGPL-3.0-only", |
@@ -8,3 +8,3 @@ pkg-fence | ||
> A command line tool that glance over package lockfile. | ||
> A command line tool that glance over package dependencies. | ||
@@ -85,2 +85,10 @@ | ||
### --invert <sup>(-v)</sup> | ||
invert the search result | ||
Available | ||
@@ -87,0 +95,0 @@ --------- |
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
57843
892
139