@vltpkg/query 1.0.0-rc.3 → 1.0.0-rc.31

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.
Files changed (253) hide show
  1. package/dist/{esm/attribute.d.ts → attribute.d.ts} +0 -1
  2. package/dist/{esm/attribute.js → attribute.js} +0 -1
  3. package/dist/{esm/combinator.d.ts → combinator.d.ts} +0 -1
  4. package/dist/{esm/combinator.js → combinator.js} +0 -1
  5. package/dist/{esm/id.d.ts → id.d.ts} +0 -1
  6. package/dist/{esm/id.js → id.js} +0 -1
  7. package/dist/{esm/index.d.ts → index.d.ts} +3 -3
  8. package/dist/{esm/index.js → index.js} +4 -2
  9. package/dist/{esm/parser.d.ts → parser.d.ts} +0 -1
  10. package/dist/{esm/parser.js → parser.js} +0 -1
  11. package/dist/{esm/pseudo → pseudo}/abandoned.d.ts +0 -1
  12. package/dist/{esm/pseudo → pseudo}/abandoned.js +0 -1
  13. package/dist/{esm/pseudo → pseudo}/attr.d.ts +0 -1
  14. package/dist/{esm/pseudo → pseudo}/attr.js +0 -1
  15. package/dist/{esm/pseudo → pseudo}/built.d.ts +0 -1
  16. package/dist/{esm/pseudo → pseudo}/built.js +0 -1
  17. package/dist/{esm/pseudo → pseudo}/confused.d.ts +0 -1
  18. package/dist/{esm/pseudo → pseudo}/confused.js +0 -1
  19. package/dist/{esm/pseudo → pseudo}/cve.d.ts +0 -1
  20. package/dist/{esm/pseudo → pseudo}/cve.js +0 -1
  21. package/dist/{esm/pseudo → pseudo}/cwe.d.ts +0 -1
  22. package/dist/{esm/pseudo → pseudo}/cwe.js +0 -1
  23. package/dist/{esm/pseudo → pseudo}/debug.d.ts +0 -1
  24. package/dist/{esm/pseudo → pseudo}/debug.js +0 -1
  25. package/dist/{esm/pseudo → pseudo}/deprecated.d.ts +0 -1
  26. package/dist/{esm/pseudo → pseudo}/deprecated.js +0 -1
  27. package/dist/{esm/pseudo → pseudo}/dev.d.ts +0 -1
  28. package/dist/{esm/pseudo → pseudo}/dev.js +0 -1
  29. package/dist/pseudo/diff.d.ts +26 -0
  30. package/dist/pseudo/diff.js +75 -0
  31. package/dist/{esm/pseudo → pseudo}/dynamic.d.ts +0 -1
  32. package/dist/{esm/pseudo → pseudo}/dynamic.js +0 -1
  33. package/dist/{esm/pseudo → pseudo}/empty.d.ts +0 -1
  34. package/dist/{esm/pseudo → pseudo}/empty.js +0 -1
  35. package/dist/{esm/pseudo → pseudo}/entropic.d.ts +0 -1
  36. package/dist/{esm/pseudo → pseudo}/entropic.js +0 -1
  37. package/dist/{esm/pseudo → pseudo}/env.d.ts +0 -1
  38. package/dist/{esm/pseudo → pseudo}/env.js +0 -1
  39. package/dist/{esm/pseudo → pseudo}/eval.d.ts +0 -1
  40. package/dist/{esm/pseudo → pseudo}/eval.js +0 -1
  41. package/dist/{esm/pseudo → pseudo}/fs.d.ts +0 -1
  42. package/dist/{esm/pseudo → pseudo}/fs.js +0 -1
  43. package/dist/{esm/pseudo → pseudo}/helpers.d.ts +0 -1
  44. package/dist/{esm/pseudo → pseudo}/helpers.js +8 -6
  45. package/dist/{esm/pseudo → pseudo}/host.d.ts +0 -1
  46. package/dist/{esm/pseudo → pseudo}/host.js +0 -1
  47. package/dist/pseudo/hostname.d.ts +11 -0
  48. package/dist/pseudo/hostname.js +138 -0
  49. package/dist/{esm/pseudo → pseudo}/license.d.ts +0 -1
  50. package/dist/{esm/pseudo → pseudo}/license.js +0 -1
  51. package/dist/{esm/pseudo → pseudo}/link.d.ts +0 -1
  52. package/dist/{esm/pseudo → pseudo}/link.js +0 -1
  53. package/dist/{esm/pseudo → pseudo}/malware.d.ts +0 -1
  54. package/dist/{esm/pseudo → pseudo}/malware.js +0 -1
  55. package/dist/{esm/pseudo → pseudo}/minified.d.ts +0 -1
  56. package/dist/{esm/pseudo → pseudo}/minified.js +0 -1
  57. package/dist/{esm/pseudo → pseudo}/missing.d.ts +0 -1
  58. package/dist/{esm/pseudo → pseudo}/missing.js +0 -1
  59. package/dist/{esm/pseudo → pseudo}/native.d.ts +0 -1
  60. package/dist/{esm/pseudo → pseudo}/native.js +0 -1
  61. package/dist/{esm/pseudo → pseudo}/network.d.ts +0 -1
  62. package/dist/{esm/pseudo → pseudo}/network.js +0 -1
  63. package/dist/{esm/pseudo → pseudo}/obfuscated.d.ts +0 -1
  64. package/dist/{esm/pseudo → pseudo}/obfuscated.js +0 -1
  65. package/dist/{esm/pseudo → pseudo}/optional.d.ts +0 -1
  66. package/dist/{esm/pseudo → pseudo}/optional.js +0 -1
  67. package/dist/{esm/pseudo → pseudo}/outdated.d.ts +0 -1
  68. package/dist/{esm/pseudo → pseudo}/outdated.js +0 -1
  69. package/dist/{esm/pseudo → pseudo}/overridden.d.ts +0 -1
  70. package/dist/{esm/pseudo → pseudo}/overridden.js +0 -1
  71. package/dist/{esm/pseudo → pseudo}/path.d.ts +0 -1
  72. package/dist/{esm/pseudo → pseudo}/path.js +1 -4
  73. package/dist/{esm/pseudo → pseudo}/peer.d.ts +0 -1
  74. package/dist/{esm/pseudo → pseudo}/peer.js +0 -1
  75. package/dist/{esm/pseudo → pseudo}/prerelease.d.ts +0 -1
  76. package/dist/{esm/pseudo → pseudo}/prerelease.js +0 -1
  77. package/dist/{esm/pseudo → pseudo}/private.d.ts +0 -1
  78. package/dist/{esm/pseudo → pseudo}/private.js +0 -1
  79. package/dist/{esm/pseudo → pseudo}/prod.d.ts +0 -1
  80. package/dist/{esm/pseudo → pseudo}/prod.js +0 -1
  81. package/dist/{esm/pseudo → pseudo}/published.d.ts +0 -1
  82. package/dist/{esm/pseudo → pseudo}/published.js +0 -1
  83. package/dist/pseudo/registry.d.ts +10 -0
  84. package/dist/pseudo/registry.js +24 -0
  85. package/dist/{esm/pseudo → pseudo}/root.d.ts +0 -1
  86. package/dist/{esm/pseudo → pseudo}/root.js +0 -1
  87. package/dist/{esm/pseudo → pseudo}/scanned.d.ts +0 -1
  88. package/dist/{esm/pseudo → pseudo}/scanned.js +0 -1
  89. package/dist/{esm/pseudo → pseudo}/score.d.ts +0 -1
  90. package/dist/{esm/pseudo → pseudo}/score.js +0 -1
  91. package/dist/{esm/pseudo → pseudo}/scripts.d.ts +0 -1
  92. package/dist/{esm/pseudo → pseudo}/scripts.js +0 -1
  93. package/dist/{esm/pseudo → pseudo}/semver.d.ts +0 -1
  94. package/dist/{esm/pseudo → pseudo}/semver.js +0 -1
  95. package/dist/{esm/pseudo → pseudo}/severity.d.ts +0 -1
  96. package/dist/{esm/pseudo → pseudo}/severity.js +0 -1
  97. package/dist/{esm/pseudo → pseudo}/shell.d.ts +0 -1
  98. package/dist/{esm/pseudo → pseudo}/shell.js +0 -1
  99. package/dist/{esm/pseudo → pseudo}/shrinkwrap.d.ts +0 -1
  100. package/dist/{esm/pseudo → pseudo}/shrinkwrap.js +0 -1
  101. package/dist/{esm/pseudo → pseudo}/spec.d.ts +0 -1
  102. package/dist/{esm/pseudo → pseudo}/spec.js +0 -1
  103. package/dist/{esm/pseudo → pseudo}/squat.d.ts +0 -1
  104. package/dist/{esm/pseudo → pseudo}/squat.js +0 -1
  105. package/dist/{esm/pseudo → pseudo}/suspicious.d.ts +0 -1
  106. package/dist/{esm/pseudo → pseudo}/suspicious.js +0 -1
  107. package/dist/{esm/pseudo → pseudo}/tracker.d.ts +0 -1
  108. package/dist/{esm/pseudo → pseudo}/tracker.js +0 -1
  109. package/dist/{esm/pseudo → pseudo}/trivial.d.ts +0 -1
  110. package/dist/{esm/pseudo → pseudo}/trivial.js +0 -1
  111. package/dist/{esm/pseudo → pseudo}/type.d.ts +0 -1
  112. package/dist/{esm/pseudo → pseudo}/type.js +0 -1
  113. package/dist/{esm/pseudo → pseudo}/undesirable.d.ts +0 -1
  114. package/dist/{esm/pseudo → pseudo}/undesirable.js +0 -1
  115. package/dist/{esm/pseudo → pseudo}/unknown.d.ts +0 -1
  116. package/dist/{esm/pseudo → pseudo}/unknown.js +0 -1
  117. package/dist/{esm/pseudo → pseudo}/unmaintained.d.ts +0 -1
  118. package/dist/{esm/pseudo → pseudo}/unmaintained.js +0 -1
  119. package/dist/{esm/pseudo → pseudo}/unpopular.d.ts +0 -1
  120. package/dist/{esm/pseudo → pseudo}/unpopular.js +0 -1
  121. package/dist/{esm/pseudo → pseudo}/unstable.d.ts +0 -1
  122. package/dist/{esm/pseudo → pseudo}/unstable.js +0 -1
  123. package/dist/{esm/pseudo → pseudo}/workspace.d.ts +0 -1
  124. package/dist/{esm/pseudo → pseudo}/workspace.js +0 -1
  125. package/dist/{esm/pseudo.d.ts → pseudo.d.ts} +0 -1
  126. package/dist/{esm/pseudo.js → pseudo.js} +11 -1
  127. package/dist/{esm/types.d.ts → types.d.ts} +7 -1
  128. package/dist/types.js +1 -0
  129. package/package.json +37 -47
  130. package/dist/esm/attribute.d.ts.map +0 -1
  131. package/dist/esm/attribute.js.map +0 -1
  132. package/dist/esm/combinator.d.ts.map +0 -1
  133. package/dist/esm/combinator.js.map +0 -1
  134. package/dist/esm/id.d.ts.map +0 -1
  135. package/dist/esm/id.js.map +0 -1
  136. package/dist/esm/index.d.ts.map +0 -1
  137. package/dist/esm/index.js.map +0 -1
  138. package/dist/esm/package.json +0 -3
  139. package/dist/esm/parser.d.ts.map +0 -1
  140. package/dist/esm/parser.js.map +0 -1
  141. package/dist/esm/pseudo/abandoned.d.ts.map +0 -1
  142. package/dist/esm/pseudo/abandoned.js.map +0 -1
  143. package/dist/esm/pseudo/attr.d.ts.map +0 -1
  144. package/dist/esm/pseudo/attr.js.map +0 -1
  145. package/dist/esm/pseudo/built.d.ts.map +0 -1
  146. package/dist/esm/pseudo/built.js.map +0 -1
  147. package/dist/esm/pseudo/confused.d.ts.map +0 -1
  148. package/dist/esm/pseudo/confused.js.map +0 -1
  149. package/dist/esm/pseudo/cve.d.ts.map +0 -1
  150. package/dist/esm/pseudo/cve.js.map +0 -1
  151. package/dist/esm/pseudo/cwe.d.ts.map +0 -1
  152. package/dist/esm/pseudo/cwe.js.map +0 -1
  153. package/dist/esm/pseudo/debug.d.ts.map +0 -1
  154. package/dist/esm/pseudo/debug.js.map +0 -1
  155. package/dist/esm/pseudo/deprecated.d.ts.map +0 -1
  156. package/dist/esm/pseudo/deprecated.js.map +0 -1
  157. package/dist/esm/pseudo/dev.d.ts.map +0 -1
  158. package/dist/esm/pseudo/dev.js.map +0 -1
  159. package/dist/esm/pseudo/dynamic.d.ts.map +0 -1
  160. package/dist/esm/pseudo/dynamic.js.map +0 -1
  161. package/dist/esm/pseudo/empty.d.ts.map +0 -1
  162. package/dist/esm/pseudo/empty.js.map +0 -1
  163. package/dist/esm/pseudo/entropic.d.ts.map +0 -1
  164. package/dist/esm/pseudo/entropic.js.map +0 -1
  165. package/dist/esm/pseudo/env.d.ts.map +0 -1
  166. package/dist/esm/pseudo/env.js.map +0 -1
  167. package/dist/esm/pseudo/eval.d.ts.map +0 -1
  168. package/dist/esm/pseudo/eval.js.map +0 -1
  169. package/dist/esm/pseudo/fs.d.ts.map +0 -1
  170. package/dist/esm/pseudo/fs.js.map +0 -1
  171. package/dist/esm/pseudo/helpers.d.ts.map +0 -1
  172. package/dist/esm/pseudo/helpers.js.map +0 -1
  173. package/dist/esm/pseudo/host.d.ts.map +0 -1
  174. package/dist/esm/pseudo/host.js.map +0 -1
  175. package/dist/esm/pseudo/license.d.ts.map +0 -1
  176. package/dist/esm/pseudo/license.js.map +0 -1
  177. package/dist/esm/pseudo/link.d.ts.map +0 -1
  178. package/dist/esm/pseudo/link.js.map +0 -1
  179. package/dist/esm/pseudo/malware.d.ts.map +0 -1
  180. package/dist/esm/pseudo/malware.js.map +0 -1
  181. package/dist/esm/pseudo/minified.d.ts.map +0 -1
  182. package/dist/esm/pseudo/minified.js.map +0 -1
  183. package/dist/esm/pseudo/missing.d.ts.map +0 -1
  184. package/dist/esm/pseudo/missing.js.map +0 -1
  185. package/dist/esm/pseudo/native.d.ts.map +0 -1
  186. package/dist/esm/pseudo/native.js.map +0 -1
  187. package/dist/esm/pseudo/network.d.ts.map +0 -1
  188. package/dist/esm/pseudo/network.js.map +0 -1
  189. package/dist/esm/pseudo/obfuscated.d.ts.map +0 -1
  190. package/dist/esm/pseudo/obfuscated.js.map +0 -1
  191. package/dist/esm/pseudo/optional.d.ts.map +0 -1
  192. package/dist/esm/pseudo/optional.js.map +0 -1
  193. package/dist/esm/pseudo/outdated.d.ts.map +0 -1
  194. package/dist/esm/pseudo/outdated.js.map +0 -1
  195. package/dist/esm/pseudo/overridden.d.ts.map +0 -1
  196. package/dist/esm/pseudo/overridden.js.map +0 -1
  197. package/dist/esm/pseudo/path.d.ts.map +0 -1
  198. package/dist/esm/pseudo/path.js.map +0 -1
  199. package/dist/esm/pseudo/peer.d.ts.map +0 -1
  200. package/dist/esm/pseudo/peer.js.map +0 -1
  201. package/dist/esm/pseudo/prerelease.d.ts.map +0 -1
  202. package/dist/esm/pseudo/prerelease.js.map +0 -1
  203. package/dist/esm/pseudo/private.d.ts.map +0 -1
  204. package/dist/esm/pseudo/private.js.map +0 -1
  205. package/dist/esm/pseudo/prod.d.ts.map +0 -1
  206. package/dist/esm/pseudo/prod.js.map +0 -1
  207. package/dist/esm/pseudo/published.d.ts.map +0 -1
  208. package/dist/esm/pseudo/published.js.map +0 -1
  209. package/dist/esm/pseudo/root.d.ts.map +0 -1
  210. package/dist/esm/pseudo/root.js.map +0 -1
  211. package/dist/esm/pseudo/scanned.d.ts.map +0 -1
  212. package/dist/esm/pseudo/scanned.js.map +0 -1
  213. package/dist/esm/pseudo/score.d.ts.map +0 -1
  214. package/dist/esm/pseudo/score.js.map +0 -1
  215. package/dist/esm/pseudo/scripts.d.ts.map +0 -1
  216. package/dist/esm/pseudo/scripts.js.map +0 -1
  217. package/dist/esm/pseudo/semver.d.ts.map +0 -1
  218. package/dist/esm/pseudo/semver.js.map +0 -1
  219. package/dist/esm/pseudo/severity.d.ts.map +0 -1
  220. package/dist/esm/pseudo/severity.js.map +0 -1
  221. package/dist/esm/pseudo/shell.d.ts.map +0 -1
  222. package/dist/esm/pseudo/shell.js.map +0 -1
  223. package/dist/esm/pseudo/shrinkwrap.d.ts.map +0 -1
  224. package/dist/esm/pseudo/shrinkwrap.js.map +0 -1
  225. package/dist/esm/pseudo/spec.d.ts.map +0 -1
  226. package/dist/esm/pseudo/spec.js.map +0 -1
  227. package/dist/esm/pseudo/squat.d.ts.map +0 -1
  228. package/dist/esm/pseudo/squat.js.map +0 -1
  229. package/dist/esm/pseudo/suspicious.d.ts.map +0 -1
  230. package/dist/esm/pseudo/suspicious.js.map +0 -1
  231. package/dist/esm/pseudo/tracker.d.ts.map +0 -1
  232. package/dist/esm/pseudo/tracker.js.map +0 -1
  233. package/dist/esm/pseudo/trivial.d.ts.map +0 -1
  234. package/dist/esm/pseudo/trivial.js.map +0 -1
  235. package/dist/esm/pseudo/type.d.ts.map +0 -1
  236. package/dist/esm/pseudo/type.js.map +0 -1
  237. package/dist/esm/pseudo/undesirable.d.ts.map +0 -1
  238. package/dist/esm/pseudo/undesirable.js.map +0 -1
  239. package/dist/esm/pseudo/unknown.d.ts.map +0 -1
  240. package/dist/esm/pseudo/unknown.js.map +0 -1
  241. package/dist/esm/pseudo/unmaintained.d.ts.map +0 -1
  242. package/dist/esm/pseudo/unmaintained.js.map +0 -1
  243. package/dist/esm/pseudo/unpopular.d.ts.map +0 -1
  244. package/dist/esm/pseudo/unpopular.js.map +0 -1
  245. package/dist/esm/pseudo/unstable.d.ts.map +0 -1
  246. package/dist/esm/pseudo/unstable.js.map +0 -1
  247. package/dist/esm/pseudo/workspace.d.ts.map +0 -1
  248. package/dist/esm/pseudo/workspace.js.map +0 -1
  249. package/dist/esm/pseudo.d.ts.map +0 -1
  250. package/dist/esm/pseudo.js.map +0 -1
  251. package/dist/esm/types.d.ts.map +0 -1
  252. package/dist/esm/types.js +0 -2
  253. package/dist/esm/types.js.map +0 -1
@@ -184,4 +184,3 @@ export const malware = async (state) => {
184
184
  removeDanglingEdges(state);
185
185
  return state;
186
186
  };
187
- //# sourceMappingURL=malware.js.map
@@ -4,4 +4,3 @@
4
4
  export declare const minified: (state: import("../types.ts").ParserState) => Promise<import("../types.ts").ParserState & {
5
5
  securityArchive: NonNullable<import("../types.ts").ParserState["securityArchive"]>;
6
6
  }>;
7
- //# sourceMappingURL=minified.d.ts.map
@@ -3,4 +3,3 @@ import { createSecuritySelectorFilter } from "./helpers.js";
3
3
  * Filters out any node that does not have a **minifiedFile** report alert.
4
4
  */
5
5
  export const minified = createSecuritySelectorFilter('minified', 'minifiedFile');
6
- //# sourceMappingURL=minified.js.map
@@ -5,4 +5,3 @@ import type { ParserState } from '../types.ts';
5
5
  * and clears all nodes from the result.
6
6
  */
7
7
  export declare const missing: (state: ParserState) => Promise<ParserState>;
8
- //# sourceMappingURL=missing.d.ts.map
@@ -12,4 +12,3 @@ export const missing = async (state) => {
12
12
  state.partial.nodes.clear();
13
13
  return state;
14
14
  };
15
- //# sourceMappingURL=missing.js.map
@@ -4,4 +4,3 @@
4
4
  export declare const nativeParser: (state: import("../types.ts").ParserState) => Promise<import("../types.ts").ParserState & {
5
5
  securityArchive: NonNullable<import("../types.ts").ParserState["securityArchive"]>;
6
6
  }>;
7
- //# sourceMappingURL=native.d.ts.map
@@ -3,4 +3,3 @@ import { createSecuritySelectorFilter } from "./helpers.js";
3
3
  * Filters out any node that does not have a **hasNativeCode** report alert.
4
4
  */
5
5
  export const nativeParser = createSecuritySelectorFilter('native', 'hasNativeCode');
6
- //# sourceMappingURL=native.js.map
@@ -4,4 +4,3 @@
4
4
  export declare const network: (state: import("../types.ts").ParserState) => Promise<import("../types.ts").ParserState & {
5
5
  securityArchive: NonNullable<import("../types.ts").ParserState["securityArchive"]>;
6
6
  }>;
7
- //# sourceMappingURL=network.d.ts.map
@@ -3,4 +3,3 @@ import { createSecuritySelectorFilter } from "./helpers.js";
3
3
  * Filters out any node that does not have a **networkAccess** report alert.
4
4
  */
5
5
  export const network = createSecuritySelectorFilter('network', 'networkAccess');
6
- //# sourceMappingURL=network.js.map
@@ -4,4 +4,3 @@
4
4
  export declare const obfuscated: (state: import("../types.ts").ParserState) => Promise<import("../types.ts").ParserState & {
5
5
  securityArchive: NonNullable<import("../types.ts").ParserState["securityArchive"]>;
6
6
  }>;
7
- //# sourceMappingURL=obfuscated.d.ts.map
@@ -3,4 +3,3 @@ import { createSecuritySelectorFilter } from "./helpers.js";
3
3
  * Filters out any node that does not have an **obfuscatedFile** report alert.
4
4
  */
5
5
  export const obfuscated = createSecuritySelectorFilter('obfuscated', 'obfuscatedFile');
6
- //# sourceMappingURL=obfuscated.js.map
@@ -3,4 +3,3 @@ import type { ParserState } from '../types.ts';
3
3
  * :optional Pseudo-Selector will only match optional dependencies.
4
4
  */
5
5
  export declare const optional: (state: ParserState) => Promise<ParserState>;
6
- //# sourceMappingURL=optional.d.ts.map
@@ -12,4 +12,3 @@ export const optional = async (state) => {
12
12
  removeUnlinkedNodes(state);
13
13
  return state;
14
14
  };
15
- //# sourceMappingURL=optional.js.map
@@ -51,4 +51,3 @@ export declare const queueNode: (state: ParserState, node: NodeLike, kind: Outda
51
51
  * that does not satisfy any of the available remote versions.
52
52
  */
53
53
  export declare const outdated: (state: ParserState) => Promise<ParserState>;
54
- //# sourceMappingURL=outdated.d.ts.map
@@ -209,4 +209,3 @@ export const outdated = async (state) => {
209
209
  }
210
210
  return state;
211
211
  };
212
- //# sourceMappingURL=outdated.js.map
@@ -5,4 +5,3 @@ import type { ParserState } from '../types.ts';
5
5
  * and removes any unlinked nodes from the result.
6
6
  */
7
7
  export declare const overridden: (state: ParserState) => Promise<ParserState>;
8
- //# sourceMappingURL=overridden.d.ts.map
@@ -14,4 +14,3 @@ export const overridden = async (state) => {
14
14
  removeUnlinkedNodes(state);
15
15
  return state;
16
16
  };
17
- //# sourceMappingURL=overridden.js.map
@@ -16,4 +16,3 @@ export declare function createPathMatcher(pattern: string, loose?: boolean): (pa
16
16
  * parser conflicts with special characters.
17
17
  */
18
18
  export declare const path: (state: ParserState) => Promise<ParserState>;
19
- //# sourceMappingURL=path.d.ts.map
@@ -9,12 +9,10 @@ import { removeNode, removeDanglingEdges, removeQuotes, clear, } from "./helpers
9
9
  * This ensures consistent path comparison regardless of how paths are specified.
10
10
  */
11
11
  export function normalizePath(path) {
12
- const trimmed = path.trim();
13
- // Handle root path case - normalize '.' to empty string for consistency
12
+ const trimmed = path.trim().replaceAll('\\', '/');
14
13
  if (trimmed === '.') {
15
14
  return '';
16
15
  }
17
- // Remove leading './' prefix
18
16
  if (trimmed.startsWith('./')) {
19
17
  return trimmed.slice(2);
20
18
  }
@@ -110,4 +108,3 @@ export const path = async (state) => {
110
108
  removeDanglingEdges(state);
111
109
  return state;
112
110
  };
113
- //# sourceMappingURL=path.js.map
@@ -3,4 +3,3 @@ import type { ParserState } from '../types.ts';
3
3
  * :peer Pseudo-Selector will only match peer dependencies.
4
4
  */
5
5
  export declare const peer: (state: ParserState) => Promise<ParserState>;
6
- //# sourceMappingURL=peer.d.ts.map
@@ -12,4 +12,3 @@ export const peer = async (state) => {
12
12
  removeUnlinkedNodes(state);
13
13
  return state;
14
14
  };
15
- //# sourceMappingURL=peer.js.map
@@ -15,4 +15,3 @@ import type { ParserState } from '../types.ts';
15
15
  * - 0.0.1
16
16
  */
17
17
  export declare const prerelease: (state: ParserState) => Promise<ParserState>;
18
- //# sourceMappingURL=prerelease.d.ts.map
@@ -38,4 +38,3 @@ export const prerelease = async (state) => {
38
38
  removeDanglingEdges(state);
39
39
  return state;
40
40
  };
41
- //# sourceMappingURL=prerelease.js.map
@@ -4,4 +4,3 @@ import type { ParserState } from '../types.ts';
4
4
  * a `private: true` key set in their `package.json` metadata.
5
5
  */
6
6
  export declare const privateParser: (state: ParserState) => Promise<ParserState>;
7
- //# sourceMappingURL=private.d.ts.map
@@ -13,4 +13,3 @@ export const privateParser = async (state) => {
13
13
  removeDanglingEdges(state);
14
14
  return state;
15
15
  };
16
- //# sourceMappingURL=private.js.map
@@ -3,4 +3,3 @@ import type { ParserState } from '../types.ts';
3
3
  * :prod Pseudo-Selector will only match production dependencies.
4
4
  */
5
5
  export declare const prod: (state: ParserState) => Promise<ParserState>;
6
- //# sourceMappingURL=prod.d.ts.map
@@ -12,4 +12,3 @@ export const prod = async (state) => {
12
12
  removeUnlinkedNodes(state);
13
13
  return state;
14
14
  };
15
- //# sourceMappingURL=prod.js.map
@@ -37,4 +37,3 @@ export declare const queueNode: (state: ParserState, node: NodeLike, relativeDat
37
37
  * - :published("<=2023-12-31") - Matches packages published on or before December 31st, 2023
38
38
  */
39
39
  export declare const published: (state: ParserState) => Promise<ParserState>;
40
- //# sourceMappingURL=published.d.ts.map
@@ -177,4 +177,3 @@ export const published = async (state) => {
177
177
  removeDanglingEdges(state);
178
178
  return state;
179
179
  };
180
- //# sourceMappingURL=published.js.map
@@ -0,0 +1,10 @@
1
+ import type { ParserState } from '../types.ts';
2
+ /**
3
+ * :registry(name) Pseudo-Selector, matches only nodes that
4
+ * belong to the specified registry configuration alias.
5
+ *
6
+ * For example, `:registry(npm)` matches deps from the default
7
+ * npm registry, and `:registry(custom)` matches deps from a
8
+ * custom-named registry.
9
+ */
10
+ export declare const registry: (state: ParserState) => Promise<ParserState>;
@@ -0,0 +1,24 @@
1
+ import { splitDepID } from '@vltpkg/dep-id/browser';
2
+ import { asPostcssNodeWithChildren, asTagNode, } from '@vltpkg/dss-parser';
3
+ import { removeDanglingEdges, removeNode } from "./helpers.js";
4
+ /**
5
+ * :registry(name) Pseudo-Selector, matches only nodes that
6
+ * belong to the specified registry configuration alias.
7
+ *
8
+ * For example, `:registry(npm)` matches deps from the default
9
+ * npm registry, and `:registry(custom)` matches deps from a
10
+ * custom-named registry.
11
+ */
12
+ export const registry = async (state) => {
13
+ const top = asPostcssNodeWithChildren(state.current);
14
+ const selector = asPostcssNodeWithChildren(top.nodes[0]);
15
+ const name = asTagNode(selector.nodes[0]).value;
16
+ for (const node of state.partial.nodes) {
17
+ const tuple = splitDepID(node.id);
18
+ if (tuple[0] !== 'registry' || tuple[1] !== name) {
19
+ removeNode(state, node);
20
+ }
21
+ }
22
+ removeDanglingEdges(state);
23
+ return state;
24
+ };
@@ -4,4 +4,3 @@ import type { ParserState } from '../types.ts';
4
4
  * It matches only nodes marked as `mainImporter`.
5
5
  */
6
6
  export declare const root: (state: ParserState) => Promise<ParserState>;
7
- //# sourceMappingURL=root.d.ts.map
@@ -15,4 +15,3 @@ export const root = async (state) => {
15
15
  }
16
16
  return state;
17
17
  };
18
- //# sourceMappingURL=root.js.map
@@ -6,4 +6,3 @@ import type { ParserState } from '../types.ts';
6
6
  * in the security archive.
7
7
  */
8
8
  export declare const scanned: (state: ParserState) => Promise<ParserState>;
9
- //# sourceMappingURL=scanned.d.ts.map
@@ -14,4 +14,3 @@ export const scanned = async (state) => {
14
14
  removeDanglingEdges(state);
15
15
  return state;
16
16
  };
17
- //# sourceMappingURL=scanned.js.map
@@ -13,4 +13,3 @@ export declare const parseInternals: (nodes: PostcssNode[]) => {
13
13
  export declare const score: (state: ParserState) => Promise<ParserState & {
14
14
  securityArchive: NonNullable<ParserState["securityArchive"]>;
15
15
  }>;
16
- //# sourceMappingURL=score.d.ts.map
@@ -130,4 +130,3 @@ export const score = async (state) => {
130
130
  removeDanglingEdges(state);
131
131
  return state;
132
132
  };
133
- //# sourceMappingURL=score.js.map
@@ -7,4 +7,3 @@ import type { ParserState } from '../types.ts';
7
7
  * - Prepare scripts on importers or git dependencies (prepare, preprepare, postprepare)
8
8
  */
9
9
  export declare const scripts: (state: ParserState) => Promise<ParserState>;
10
- //# sourceMappingURL=scripts.d.ts.map
@@ -41,4 +41,3 @@ export const scripts = async (state) => {
41
41
  removeDanglingEdges(state);
42
42
  return state;
43
43
  };
44
- //# sourceMappingURL=scripts.js.map
@@ -14,4 +14,3 @@ export declare const isSemverFunctionName: (name: string) => name is SemverFunct
14
14
  export declare const asSemverFunctionName: (name: string) => SemverFunctionNames;
15
15
  export declare const parseInternals: (nodes: PostcssNode[], loose: boolean) => SemverInternals;
16
16
  export declare const semverParser: (state: ParserState) => Promise<ParserState>;
17
- //# sourceMappingURL=semver.d.ts.map
@@ -164,4 +164,3 @@ export const semverParser = async (state) => {
164
164
  }
165
165
  return state;
166
166
  };
167
- //# sourceMappingURL=semver.js.map
@@ -12,4 +12,3 @@ export declare const parseInternals: (nodes: PostcssNode[]) => {
12
12
  export declare const severity: (state: ParserState) => Promise<ParserState & {
13
13
  securityArchive: NonNullable<ParserState["securityArchive"]>;
14
14
  }>;
15
- //# sourceMappingURL=severity.d.ts.map
@@ -157,4 +157,3 @@ export const severity = async (state) => {
157
157
  removeDanglingEdges(state);
158
158
  return state;
159
159
  };
160
- //# sourceMappingURL=severity.js.map
@@ -4,4 +4,3 @@
4
4
  export declare const shell: (state: import("../types.ts").ParserState) => Promise<import("../types.ts").ParserState & {
5
5
  securityArchive: NonNullable<import("../types.ts").ParserState["securityArchive"]>;
6
6
  }>;
7
- //# sourceMappingURL=shell.d.ts.map
@@ -3,4 +3,3 @@ import { createSecuritySelectorFilter } from "./helpers.js";
3
3
  * Filters out any node that does not have a **shellAccess** report alert.
4
4
  */
5
5
  export const shell = createSecuritySelectorFilter('shell', 'shellAccess');
6
- //# sourceMappingURL=shell.js.map
@@ -4,4 +4,3 @@
4
4
  export declare const shrinkwrap: (state: import("../types.ts").ParserState) => Promise<import("../types.ts").ParserState & {
5
5
  securityArchive: NonNullable<import("../types.ts").ParserState["securityArchive"]>;
6
6
  }>;
7
- //# sourceMappingURL=shrinkwrap.d.ts.map
@@ -3,4 +3,3 @@ import { createSecuritySelectorFilter } from "./helpers.js";
3
3
  * Filters out any node that does not have a **shrinkwrap** report alert.
4
4
  */
5
5
  export const shrinkwrap = createSecuritySelectorFilter('shrinkwrap', 'shrinkwrap');
6
- //# sourceMappingURL=shrinkwrap.js.map
@@ -14,4 +14,3 @@ export declare const parseInternals: (nodes: PostcssNode[]) => SpecInternals;
14
14
  * - :spec("workspace:dev") matches edges with a package specifier equal to "workspace:dev"
15
15
  */
16
16
  export declare const spec: (state: ParserState) => Promise<ParserState>;
17
- //# sourceMappingURL=spec.d.ts.map
@@ -99,4 +99,3 @@ export const spec = async (state) => {
99
99
  removeUnlinkedNodes(state);
100
100
  return state;
101
101
  };
102
- //# sourceMappingURL=spec.js.map
@@ -12,4 +12,3 @@ export declare const parseInternals: (nodes: PostcssNode[]) => {
12
12
  export declare const squat: (state: ParserState) => Promise<ParserState & {
13
13
  securityArchive: NonNullable<ParserState["securityArchive"]>;
14
14
  }>;
15
- //# sourceMappingURL=squat.d.ts.map
@@ -169,4 +169,3 @@ export const squat = async (state) => {
169
169
  removeDanglingEdges(state);
170
170
  return state;
171
171
  };
172
- //# sourceMappingURL=squat.js.map
@@ -4,4 +4,3 @@
4
4
  export declare const suspicious: (state: import("../types.ts").ParserState) => Promise<import("../types.ts").ParserState & {
5
5
  securityArchive: NonNullable<import("../types.ts").ParserState["securityArchive"]>;
6
6
  }>;
7
- //# sourceMappingURL=suspicious.d.ts.map
@@ -3,4 +3,3 @@ import { createSecuritySelectorFilter } from "./helpers.js";
3
3
  * Filters out any node that does not have a **suspiciousStarActivity** report alert.
4
4
  */
5
5
  export const suspicious = createSecuritySelectorFilter('suspicious', 'suspiciousStarActivity');
6
- //# sourceMappingURL=suspicious.js.map
@@ -4,4 +4,3 @@
4
4
  export declare const tracker: (state: import("../types.ts").ParserState) => Promise<import("../types.ts").ParserState & {
5
5
  securityArchive: NonNullable<import("../types.ts").ParserState["securityArchive"]>;
6
6
  }>;
7
- //# sourceMappingURL=tracker.d.ts.map
@@ -3,4 +3,3 @@ import { createSecuritySelectorFilter } from "./helpers.js";
3
3
  * Filters out any node that does not have a **telemetry** report alert.
4
4
  */
5
5
  export const tracker = createSecuritySelectorFilter('tracker', 'telemetry');
6
- //# sourceMappingURL=tracker.js.map
@@ -4,4 +4,3 @@
4
4
  export declare const trivial: (state: import("../types.ts").ParserState) => Promise<import("../types.ts").ParserState & {
5
5
  securityArchive: NonNullable<import("../types.ts").ParserState["securityArchive"]>;
6
6
  }>;
7
- //# sourceMappingURL=trivial.d.ts.map
@@ -3,4 +3,3 @@ import { createSecuritySelectorFilter } from "./helpers.js";
3
3
  * Filters out any node that does not have a **trivialPackage** report alert.
4
4
  */
5
5
  export const trivial = createSecuritySelectorFilter('trivial', 'trivialPackage');
6
- //# sourceMappingURL=trivial.js.map
@@ -5,4 +5,3 @@ import type { ParserState } from '../types.ts';
5
5
  * first part of the dependency ID.
6
6
  */
7
7
  export declare const type: (state: ParserState) => Promise<ParserState>;
8
- //# sourceMappingURL=type.d.ts.map
@@ -19,4 +19,3 @@ export const type = async (state) => {
19
19
  removeDanglingEdges(state);
20
20
  return state;
21
21
  };
22
- //# sourceMappingURL=type.js.map
@@ -4,4 +4,3 @@
4
4
  export declare const undesirable: (state: import("../types.ts").ParserState) => Promise<import("../types.ts").ParserState & {
5
5
  securityArchive: NonNullable<import("../types.ts").ParserState["securityArchive"]>;
6
6
  }>;
7
- //# sourceMappingURL=undesirable.d.ts.map
@@ -3,4 +3,3 @@ import { createSecuritySelectorFilter } from "./helpers.js";
3
3
  * Filters out any node that does not have a **troll** report alert.
4
4
  */
5
5
  export const undesirable = createSecuritySelectorFilter('undesirable', 'troll');
6
- //# sourceMappingURL=undesirable.js.map
@@ -4,4 +4,3 @@
4
4
  export declare const unknown: (state: import("../types.ts").ParserState) => Promise<import("../types.ts").ParserState & {
5
5
  securityArchive: NonNullable<import("../types.ts").ParserState["securityArchive"]>;
6
6
  }>;
7
- //# sourceMappingURL=unknown.d.ts.map
@@ -3,4 +3,3 @@ import { createSecuritySelectorFilter } from "./helpers.js";
3
3
  * Filters out any node that does not have a **newAuthor** report alert.
4
4
  */
5
5
  export const unknown = createSecuritySelectorFilter('unknown', 'newAuthor');
6
- //# sourceMappingURL=unknown.js.map
@@ -4,4 +4,3 @@
4
4
  export declare const unmaintained: (state: import("../types.ts").ParserState) => Promise<import("../types.ts").ParserState & {
5
5
  securityArchive: NonNullable<import("../types.ts").ParserState["securityArchive"]>;
6
6
  }>;
7
- //# sourceMappingURL=unmaintained.d.ts.map
@@ -3,4 +3,3 @@ import { createSecuritySelectorFilter } from "./helpers.js";
3
3
  * Filters out any node that does not have a **unmaintained** report alert.
4
4
  */
5
5
  export const unmaintained = createSecuritySelectorFilter('unmaintained', 'unmaintained');
6
- //# sourceMappingURL=unmaintained.js.map
@@ -4,4 +4,3 @@
4
4
  export declare const unpopular: (state: import("../types.ts").ParserState) => Promise<import("../types.ts").ParserState & {
5
5
  securityArchive: NonNullable<import("../types.ts").ParserState["securityArchive"]>;
6
6
  }>;
7
- //# sourceMappingURL=unpopular.d.ts.map
@@ -3,4 +3,3 @@ import { createSecuritySelectorFilter } from "./helpers.js";
3
3
  * Filters out any node that does not have a **unpopularPackage** report alert.
4
4
  */
5
5
  export const unpopular = createSecuritySelectorFilter('unpopular', 'unpopularPackage');
6
- //# sourceMappingURL=unpopular.js.map
@@ -4,4 +4,3 @@
4
4
  export declare const unstable: (state: import("../types.ts").ParserState) => Promise<import("../types.ts").ParserState & {
5
5
  securityArchive: NonNullable<import("../types.ts").ParserState["securityArchive"]>;
6
6
  }>;
7
- //# sourceMappingURL=unstable.d.ts.map
@@ -3,4 +3,3 @@ import { createSecuritySelectorFilter } from "./helpers.js";
3
3
  * Filters out any node that does not have a **unstableOwnership** report alert.
4
4
  */
5
5
  export const unstable = createSecuritySelectorFilter('unstable', 'unstableOwnership');
6
- //# sourceMappingURL=unstable.js.map
@@ -3,4 +3,3 @@ import type { ParserState } from '../types.ts';
3
3
  * :workspace Pseudo-Selector will only match workspace dependencies.
4
4
  */
5
5
  export declare const workspace: (state: ParserState) => Promise<ParserState>;
6
- //# sourceMappingURL=workspace.d.ts.map
@@ -17,4 +17,3 @@ export const workspace = async (state) => {
17
17
  }
18
18
  return state;
19
19
  };
20
- //# sourceMappingURL=workspace.js.map
@@ -3,4 +3,3 @@ import type { ParserState } from './types.ts';
3
3
  * Parsers the `pseudo` node types.
4
4
  */
5
5
  export declare const pseudo: (state: ParserState) => Promise<ParserState>;
6
- //# sourceMappingURL=pseudo.d.ts.map
@@ -11,6 +11,7 @@ import { cwe } from "./pseudo/cwe.js";
11
11
  import { debug } from "./pseudo/debug.js";
12
12
  import { deprecated } from "./pseudo/deprecated.js";
13
13
  import { dev } from "./pseudo/dev.js";
14
+ import { diff } from "./pseudo/diff.js";
14
15
  import { dynamic } from "./pseudo/dynamic.js";
15
16
  import { empty } from "./pseudo/empty.js";
16
17
  import { entropic } from "./pseudo/entropic.js";
@@ -18,6 +19,7 @@ import { env } from "./pseudo/env.js";
18
19
  import { evalParser } from "./pseudo/eval.js";
19
20
  import { fs } from "./pseudo/fs.js";
20
21
  import { hostContext } from "./pseudo/host.js";
22
+ import { hostname } from "./pseudo/hostname.js";
21
23
  import { license } from "./pseudo/license.js";
22
24
  import { link } from "./pseudo/link.js";
23
25
  import { malware } from "./pseudo/malware.js";
@@ -34,6 +36,7 @@ import { peer } from "./pseudo/peer.js";
34
36
  import { prerelease } from "./pseudo/prerelease.js";
35
37
  import { published } from "./pseudo/published.js";
36
38
  import { privateParser } from "./pseudo/private.js";
39
+ import { registry } from "./pseudo/registry.js";
37
40
  import { prod } from "./pseudo/prod.js";
38
41
  import { root } from "./pseudo/root.js";
39
42
  import { scanned } from "./pseudo/scanned.js";
@@ -81,6 +84,8 @@ const has = async (state) => {
81
84
  edges: new Set(state.partial.edges),
82
85
  nodes: new Set(state.partial.nodes),
83
86
  },
87
+ diffFiles: state.diffFiles,
88
+ loose: state.loose,
84
89
  hostContexts: state.hostContexts,
85
90
  importers: state.importers,
86
91
  retries: state.retries,
@@ -155,6 +160,7 @@ const is = async (state) => {
155
160
  nodes: new Set(),
156
161
  },
157
162
  current: node,
163
+ diffFiles: state.diffFiles,
158
164
  initial: state.initial,
159
165
  loose: true,
160
166
  partial: {
@@ -200,7 +206,9 @@ const not = async (state) => {
200
206
  nodes: new Set(),
201
207
  },
202
208
  current: node,
209
+ diffFiles: state.diffFiles,
203
210
  initial: state.initial,
211
+ loose: state.loose,
204
212
  partial: {
205
213
  nodes: new Set(state.partial.nodes),
206
214
  edges: new Set(state.partial.edges),
@@ -277,6 +285,7 @@ const pseudoSelectors = new Map(Object.entries({
277
285
  debug,
278
286
  deprecated,
279
287
  dev,
288
+ diff,
280
289
  dynamic,
281
290
  eval: evalParser,
282
291
  empty,
@@ -285,6 +294,7 @@ const pseudoSelectors = new Map(Object.entries({
285
294
  fs,
286
295
  has,
287
296
  host: hostContext,
297
+ hostname,
288
298
  is,
289
299
  license,
290
300
  link,
@@ -304,6 +314,7 @@ const pseudoSelectors = new Map(Object.entries({
304
314
  published,
305
315
  private: privateParser,
306
316
  prod,
317
+ registry,
307
318
  project,
308
319
  root,
309
320
  scanned,
@@ -358,4 +369,3 @@ export const pseudo = async (state) => {
358
369
  }
359
370
  return result;
360
371
  };
361
- //# sourceMappingURL=pseudo.js.map
@@ -18,11 +18,18 @@ export type GraphSelectionState = {
18
18
  nodes: Set<NodeLike>;
19
19
  edges: Set<EdgeLike>;
20
20
  };
21
+ /**
22
+ * Callback that returns changed file paths for a given
23
+ * commitish reference. Used by the :diff() pseudo selector.
24
+ * The returned paths should be relative to the project root.
25
+ */
26
+ export type DiffFilesProvider = (commitish: string) => Set<string>;
21
27
  export type ParserState = {
22
28
  cancellable: () => Promise<void>;
23
29
  collect: GraphSelectionState;
24
30
  comment: string;
25
31
  current: PostcssNode;
32
+ diffFiles?: DiffFilesProvider;
26
33
  hostContexts?: HostContextsMap;
27
34
  importers: Set<NodeLike>;
28
35
  initial: GraphSelectionState;
@@ -115,4 +122,3 @@ export type ParserFn = (opt: ParserState) => Promise<ParserState>;
115
122
  export type ParsedSelectorToken = PostcssNode & {
116
123
  token: string;
117
124
  };
118
- //# sourceMappingURL=types.d.ts.map
package/dist/types.js ADDED
@@ -0,0 +1 @@
1
+ export {};