Skip to content

Commit 63b3557

Browse files
XhmikosRlukekarrys
authored andcommittedFeb 23, 2022
fix(arborist): fix superfluous arguments (npm#4464)
1 parent d9b6378 commit 63b3557

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed
 

‎workspaces/arborist/test/audit-report.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ const sortReport = report => {
3030
{
3131
...vuln,
3232
via: (vuln.via || []).sort((a, b) =>
33-
String(a.source || a).localeCompare(String(b.source || b, 'en'))),
33+
String(a.source || a).localeCompare(String(b.source || b), 'en')),
3434
effects: (vuln.effects || []).sort((a, b) => a.localeCompare(b, 'en')),
3535
},
3636
])

‎workspaces/arborist/test/diff.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const formatDiff = obj =>
3131
removed: obj.removed.map(d => normalizePath(d.path).split(normalizedCWD).join('{CWD}')),
3232
children: [...obj.children]
3333
.map(formatDiff)
34-
.sort((a, b) => path(a).localeCompare(path(b, 'en'))),
34+
.sort((a, b) => path(a).localeCompare(path(b), 'en')),
3535
})
3636

3737
t.formatSnapshot = obj => format(formatDiff(obj), { sort: false })

‎workspaces/arborist/test/inventory.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ t.test('basic operations', t => {
2121
i.get('y'),
2222
], 'filter returns an iterable of all matching nodes')
2323

24-
t.same([...i.query('license')].sort((a, b) => String(a).localeCompare(String(b, 'en'))),
24+
t.same([...i.query('license')].sort((a, b) => String(a).localeCompare(String(b), 'en')),
2525
['ISC', 'MIT', undefined])
2626
t.same([...i.query('license', 'MIT')], [
2727
{ location: 'x', name: 'x', package: { licence: 'MIT', funding: 'foo' } },
@@ -33,7 +33,7 @@ t.test('basic operations', t => {
3333
{ location: 'x', name: 'x', package: { licence: 'MIT', funding: 'foo' } },
3434
{ location: 'y', name: 'x', package: { licenses: [{ type: 'ISC' }], funding: { url: 'foo' } } },
3535
], 'can query by name')
36-
t.same([...i.query('funding')].sort((a, b) => String(a).localeCompare(String(b, 'en'))),
36+
t.same([...i.query('funding')].sort((a, b) => String(a).localeCompare(String(b), 'en')),
3737
['bar', 'foo', undefined])
3838
t.same([...i.query('funding', 'foo')], [
3939
{ location: 'x', name: 'x', package: { licence: 'MIT', funding: 'foo' } },

0 commit comments

Comments
 (0)
Please sign in to comment.