@antongolub/lockfile 0.0.0-snapshot.73 → 0.0.0-snapshot.74
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/README.md +8 -2
- package/dist/enrich.js +4 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -101,7 +101,11 @@ format-agnostically:
|
|
|
101
101
|
- **`modify`** applies a `Primitive[]` — `replaceVersion`, `pinOverride`,
|
|
102
102
|
`addDependency`, `removeDependency`, `applyPatch`, `filterLicense` — the
|
|
103
103
|
building blocks of audit-fix, override-pinning and license filtering.
|
|
104
|
-
- **`optimize`** runs orphan GC / dedup over the graph
|
|
104
|
+
- **`optimize`** runs orphan GC / dedup over the graph (a production-reachability
|
|
105
|
+
sweep). **`pruneOrphans`** (via `@antongolub/lockfile/optimize`) is the
|
|
106
|
+
reference-count sibling: it retires only nodes that lost their *last* incoming
|
|
107
|
+
edge of any kind — post-bump cleanup that, unlike reachability, never
|
|
108
|
+
over-collects a still-referenced dev/optional/peer dep.
|
|
105
109
|
- **`overridesOf(graph)`** reads the canonical overrides back out.
|
|
106
110
|
|
|
107
111
|
### Options
|
|
@@ -132,7 +136,9 @@ ships as opt-in adapters (see [Sub-imports](#sub-imports)).
|
|
|
132
136
|
|---------|---------------|----------|
|
|
133
137
|
| Root | `@antongolub/lockfile` | `detect`, `check`, `parse`, `stringify`, `convert`, `modify`, `optimize`, `overridesOf`, plus types `Graph`, `FormatId`, `ParseOptions`, `StringifyOptions`, `ConvertOptions`, `Manifest` |
|
|
134
138
|
| Modifiers | `@antongolub/lockfile/modify` | the individual `Primitive` functions behind `modify` (audit-fix, override-pin, license-filter) |
|
|
135
|
-
|
|
|
139
|
+
| Complete | `@antongolub/lockfile/complete` | `completeTransitives` — registry-backed tree completion that wires the transitive deps a modify introduced |
|
|
140
|
+
| Optimize | `@antongolub/lockfile/optimize` | `optimize` (reachability orphan GC) and `pruneOrphans` (reference-count orphan GC) |
|
|
141
|
+
| Enrich | `@antongolub/lockfile/enrich` | `refurbish` — monotone field-fill (e.g. recomputes a yarn-berry zip `checksum` from a tarball source so a patched lock installs without `yarn install`) |
|
|
136
142
|
| Registry | `@antongolub/lockfile/registry` | `frozenRegistry`, `liveRegistry`, `fsCache`, `npmCache`, `pnpmCache` |
|
|
137
143
|
| Per-format | `@antongolub/lockfile/formats/<id>` | a single adapter directly (test surface; not a primary user API) |
|
|
138
144
|
|
package/dist/enrich.js
CHANGED
|
@@ -214,6 +214,10 @@ async function refurbish(graph, format, source, opts = {}) {
|
|
|
214
214
|
if (node.workspacePath !== void 0) continue;
|
|
215
215
|
const payload = graph.tarballOf(node.id) ?? {};
|
|
216
216
|
if (emitBerryChecksum(payload.integrity ?? emptyIntegrity()) !== void 0) continue;
|
|
217
|
+
if (node.patch !== void 0) {
|
|
218
|
+
record(enrichChecksumDeferred(node.id));
|
|
219
|
+
continue;
|
|
220
|
+
}
|
|
217
221
|
if (!isStore) {
|
|
218
222
|
record(enrichChecksumDeferred(node.id));
|
|
219
223
|
continue;
|