@vltpkg/query 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/id.js +12 -5
- package/package.json +9 -9
package/dist/id.js
CHANGED
|
@@ -10,16 +10,23 @@ export const id = async (state) => {
|
|
|
10
10
|
throw error('Missing identifier name');
|
|
11
11
|
}
|
|
12
12
|
/* c8 ignore stop */
|
|
13
|
-
// Filter out
|
|
14
|
-
// nodes
|
|
13
|
+
// Filter out edges that don't match the id value and their
|
|
14
|
+
// nodes, unless a matching edge still links to them (aliases)
|
|
15
|
+
const unlinked = new Set();
|
|
15
16
|
for (const edge of state.partial.edges) {
|
|
16
17
|
if (edge.name !== value) {
|
|
17
18
|
state.partial.edges.delete(edge);
|
|
18
|
-
if (edge.to)
|
|
19
|
-
|
|
20
|
-
}
|
|
19
|
+
if (edge.to)
|
|
20
|
+
unlinked.add(edge.to);
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
+
for (const edge of state.partial.edges) {
|
|
24
|
+
if (edge.to)
|
|
25
|
+
unlinked.delete(edge.to);
|
|
26
|
+
}
|
|
27
|
+
for (const node of unlinked) {
|
|
28
|
+
state.partial.nodes.delete(node);
|
|
29
|
+
}
|
|
23
30
|
// Filter out importer nodes, this extra step is needed
|
|
24
31
|
// to filter out nodes that have no edges linking to them
|
|
25
32
|
for (const node of state.partial.nodes) {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vltpkg/query",
|
|
3
3
|
"description": "Query syntax parser that retrieves items from a graph",
|
|
4
|
-
"version": "1.6.
|
|
4
|
+
"version": "1.6.1",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/vltpkg/vltpkg.git",
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
"url": "http://vlt.sh"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@vltpkg/dep-id": "1.6.
|
|
17
|
-
"@vltpkg/dss-parser": "1.6.
|
|
18
|
-
"@vltpkg/error-cause": "1.6.
|
|
19
|
-
"@vltpkg/security-archive": "1.6.
|
|
20
|
-
"@vltpkg/semver": "1.6.
|
|
21
|
-
"@vltpkg/types": "1.6.
|
|
22
|
-
"@vltpkg/user-agent": "1.6.
|
|
16
|
+
"@vltpkg/dep-id": "1.6.1",
|
|
17
|
+
"@vltpkg/dss-parser": "1.6.1",
|
|
18
|
+
"@vltpkg/error-cause": "1.6.1",
|
|
19
|
+
"@vltpkg/security-archive": "1.6.1",
|
|
20
|
+
"@vltpkg/semver": "1.6.1",
|
|
21
|
+
"@vltpkg/types": "1.6.1",
|
|
22
|
+
"@vltpkg/user-agent": "1.6.1",
|
|
23
23
|
"minimatch": "^10.1.1",
|
|
24
24
|
"p-retry": "^7.1.1",
|
|
25
25
|
"postcss-selector-parser": "^7.1.1"
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@eslint/js": "^9.39.1",
|
|
29
29
|
"@types/node": "^22.19.2",
|
|
30
|
-
"@vltpkg/spec": "1.6.
|
|
30
|
+
"@vltpkg/spec": "1.6.1",
|
|
31
31
|
"eslint": "^9.39.1",
|
|
32
32
|
"prettier": "^3.7.4",
|
|
33
33
|
"tap": "^21.8.0",
|