Skip to content

Commit 2e7ced9

Browse files
committedJul 15, 2024
Fixes #443 for v4
1 parent 6e807c5 commit 2e7ced9

File tree

6 files changed

+162
-581
lines changed

6 files changed

+162
-581
lines changed
 

‎node/CHANGELOG.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
# Changelog
22

3+
## [4.4.3]
4+
5+
### Bugfix
6+
7+
- JSON format should not include results without vulnerabilities unless `--verbose` is specified.
8+
39
## [4.4.2]
410

511
### Fix
612

713
- Fix matching to include all matches
814

9-
1015
## [4.4.1]
1116

1217
### Chore

‎node/lib/retire.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*/
55

66
var exports = exports || {};
7-
exports.version = '4.4.2';
7+
exports.version = '4.4.3';
88

99
function isDefined(o) {
1010
return typeof o !== 'undefined';
@@ -26,7 +26,7 @@ function scan(data, extractor, repo, matcher = simpleMatch) {
2626
if (!isDefined(extractors)) continue;
2727
for (var i in extractors) {
2828
var matches = matcher(extractors[i], data);
29-
matches.forEach(match => {
29+
matches.forEach((match) => {
3030
match = match.replace(/(\.|-)min$/, '');
3131
detected.push({
3232
version: match,
@@ -42,20 +42,20 @@ function scan(data, extractor, repo, matcher = simpleMatch) {
4242
}
4343

4444
function simpleMatch(regex, data) {
45-
var re = new RegExp(regex, "g");
45+
var re = new RegExp(regex, 'g');
4646
const result = [];
4747
let match;
48-
while (match = re.exec(data)) {
48+
while ((match = re.exec(data))) {
4949
result.push(match[1]);
5050
}
5151
return result;
5252
}
5353
function replacementMatch(regex, data) {
5454
var ar = /^\/(.*[^\\])\/([^\/]+)\/$/.exec(regex);
55-
var re = new RegExp(ar[1], "g");
55+
var re = new RegExp(ar[1], 'g');
5656
const result = [];
5757
let match;
58-
while(match = re.exec(data)) {
58+
while ((match = re.exec(data))) {
5959
var ver = null;
6060
if (match) {
6161
ver = match[0].replace(new RegExp(ar[1]), ar[2]);

0 commit comments

Comments
 (0)
Failed to load comments.