@preventive/upstream 1.0.0-alpha.1 → 1.0.0-alpha.10
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/LICENSE-APACHE +202 -0
- package/advisories.d.ts +47 -16
- package/cargo.d.ts +18 -1
- package/cargo.js +2 -1
- package/github.d.ts +67 -13
- package/npm.d.ts +40 -14
- package/npm.js +1 -1
- package/package.d.ts +3 -3
- package/package.json +26 -4
- package/semver.d.ts +8 -2
- package/semver.js +1 -1
- package/src/advisories/common.js +27 -5
- package/src/advisories/github.js +36 -16
- package/src/advisories/index.js +7 -7
- package/src/advisories/npm.js +19 -5
- package/src/advisories/osv.js +34 -15
- package/src/advisories/repos.js +17 -35
- package/src/args.js +36 -2
- package/src/attributes.js +81 -0
- package/src/cache.js +62 -6
- package/src/{cargo.js → cargo/crate.js} +17 -11
- package/src/cargo/repos.js +52 -0
- package/src/download.js +18 -14
- package/src/github/read.js +113 -14
- package/src/http.js +16 -11
- package/src/npm/registry.js +19 -0
- package/src/npm/repos.js +24 -16
- package/src/npm/tarball.js +6 -10
- package/src/package.js +17 -6
- package/src/remote.js +8 -1
- package/src/semver-peer.cjs +8 -0
- package/src/semver.js +28 -12
- package/src/soldeer.js +2 -9
- package/src/tree.js +237 -0
- package/src/weak-edges.js +87 -0
- package/weak-edges.d.ts +36 -0
- package/weak-edges.js +1 -0
- /package/{LICENSE → LICENSE-MIT} +0 -0
package/weak-edges.d.ts
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/** A resolved file, identified by its owning package rather than a display path. */
|
|
2
|
+
export interface WeakEdgeFile {
|
|
3
|
+
/** Exact npm package name, including scope. May be absent for own source. */
|
|
4
|
+
package?: string
|
|
5
|
+
/** Normalized /-separated path relative to the owning package or own-source root. */
|
|
6
|
+
path: string
|
|
7
|
+
/** Authoritative project ownership, not inferred from a package name or path. */
|
|
8
|
+
ownSource?: boolean
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface WeakEdgeSelector {
|
|
12
|
+
/** Absent means any package or own source. Regular expressions match package names. */
|
|
13
|
+
readonly package?: string | RegExp
|
|
14
|
+
readonly path: RegExp
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface WeakEdgeRule {
|
|
18
|
+
readonly id: string
|
|
19
|
+
readonly reason: string
|
|
20
|
+
readonly from: WeakEdgeSelector
|
|
21
|
+
readonly to: WeakEdgeSelector
|
|
22
|
+
readonly ownSourceOnly?: boolean
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/** Curated weak loads: omit these file edges from cycles and default inclusion explanations. */
|
|
26
|
+
export const weakEdges: readonly WeakEdgeRule[]
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Returns the matching inventory rule, or undefined for an unrecognized edge.
|
|
30
|
+
* Own-source importers never match. import-fresh requires to.ownSource === true.
|
|
31
|
+
* Own-source targets only match selectors without a package constraint.
|
|
32
|
+
* Resolve nested installations to their actual owning package before calling;
|
|
33
|
+
* absolute, non-normalized, or nested node_modules paths do not match.
|
|
34
|
+
* Does not remove files, alter raw load records, or change runtime resolution.
|
|
35
|
+
*/
|
|
36
|
+
export function getWeakEdge(from: WeakEdgeFile, to: WeakEdgeFile): WeakEdgeRule | undefined
|
package/weak-edges.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { getWeakEdge, weakEdges } from './src/weak-edges.js'
|
/package/{LICENSE → LICENSE-MIT}
RENAMED
|
File without changes
|