@hapi/topo
Advanced tools
Comparing version 5.1.0 to 6.0.0
@@ -19,10 +19,10 @@ 'use strict'; | ||
options = options || {}; | ||
options = options ?? {}; | ||
// Validate rules | ||
const before = [].concat(options.before || []); | ||
const after = [].concat(options.after || []); | ||
const group = options.group || '?'; | ||
const sort = options.sort || 0; // Used for merging only | ||
const before = [].concat(options.before ?? []); | ||
const after = [].concat(options.after ?? []); | ||
const group = options.group ?? '?'; | ||
const sort = options.sort ?? 0; // Used for merging only | ||
@@ -110,3 +110,3 @@ Assert(!before.includes(group), `Item cannot come before itself: ${group}`); | ||
groups[group] = groups[group] || []; | ||
groups[group] = groups[group] ?? []; | ||
groups[group].push(seq); | ||
@@ -121,3 +121,3 @@ | ||
for (const after of item.after) { | ||
graphAfters[after] = graphAfters[after] || []; | ||
graphAfters[after] = graphAfters[after] ?? []; | ||
graphAfters[after].push(seq); | ||
@@ -134,3 +134,3 @@ } | ||
const group = graph[node][graphNodeItem]; | ||
groups[group] = groups[group] || []; | ||
groups[group] = groups[group] ?? []; | ||
expandedGroups.push(...groups[group]); | ||
@@ -158,3 +158,3 @@ } | ||
for (const child of children) { | ||
ancestors[child] = ancestors[child] || []; | ||
ancestors[child] = ancestors[child] ?? []; | ||
ancestors[child].push(node); | ||
@@ -161,0 +161,0 @@ } |
@@ -1,3 +0,4 @@ | ||
Copyright (c) 2012-2020, Sideway Inc, and project contributors | ||
Copyright (c) 2012-2014, Walmart. | ||
Copyright (c) 2012-2022, Project contributors | ||
Copyright (c) 2012-2020, Sideway Inc | ||
Copyright (c) 2012-2014, Walmart. | ||
All rights reserved. | ||
@@ -4,0 +5,0 @@ |
{ | ||
"name": "@hapi/topo", | ||
"description": "Topological sorting with grouping support", | ||
"version": "5.1.0", | ||
"version": "6.0.0", | ||
"repository": "git://github.com/hapijs/topo", | ||
@@ -17,9 +17,16 @@ "main": "lib/index.js", | ||
], | ||
"eslintConfig": { | ||
"extends": [ | ||
"plugin:@hapi/module" | ||
] | ||
}, | ||
"dependencies": { | ||
"@hapi/hoek": "^9.0.0" | ||
"@hapi/hoek": "^10.0.0" | ||
}, | ||
"devDependencies": { | ||
"@hapi/code": "8.x.x", | ||
"@hapi/lab": "24.x.x", | ||
"typescript": "~4.0.2" | ||
"@hapi/code": "^9.0.0", | ||
"@hapi/eslint-plugin": "*", | ||
"@hapi/lab": "25.0.0-beta.1", | ||
"@types/node": "^17.0.31", | ||
"typescript": "~4.6.4" | ||
}, | ||
@@ -26,0 +33,0 @@ "scripts": { |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
10884
0
5
+ Added@hapi/hoek@10.0.1(transitive)
- Removed@hapi/hoek@9.3.0(transitive)
Updated@hapi/hoek@^10.0.0