zyrk 0.8.3 → 0.8.5

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 CHANGED
@@ -191,6 +191,12 @@ paths. Older platform-pruned locks need an intentional non-frozen refresh; incom
191
191
  npm locks must be freshly resolved before portable adoption. macOS, Windows, and
192
192
  broad framework compatibility have not passed their release gates.
193
193
 
194
+ Zyrk writes the npm-compatible lock layout alongside its portable graph. Peer
195
+ dependencies are placed beside or above their consumers, as npm requires. If
196
+ an older Zyrk lock makes `npm ci` report missing peer packages, run
197
+ `zyrk install --lockfile-only` with the updated CLI to refresh that layout
198
+ without installing dependencies or running lifecycle scripts.
199
+
194
200
  ### Workspaces
195
201
 
196
202
  Standard `package.json` workspaces use one root lock and a recoverable transaction
package/VERSION CHANGED
@@ -1 +1 @@
1
- v0.8.3
1
+ v0.8.5
@@ -1 +1 @@
1
- {"version":3,"file":"write.d.ts","sourceRoot":"","sources":["../../src/lockfile/write.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAGjE,OAAO,EAGL,KAAK,UAAU,EAGhB,MAAM,YAAY,CAAC;AAEpB,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,kBAAkB,EAAE,CAAC;IAC5B,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChD,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,oDAAoD;IACpD,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,sEAAsE;IACtE,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACrC,eAAe,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA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MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACzC,oBAAoB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC9C,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,QAAQ,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC1D,QAAQ,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;IAC7B,UAAU,EAAE,mBAAmB,CAAC;IAChC,YAAY,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACpE,eAAe,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC;CACzB,CAAC;AAEF,wBAAsB,aAAa,CACjC,OAAO,EAAE,gBAAgB,GACxB,OAAO,CAAC,UAAU,CAAC,CAiQrB"}
@@ -123,13 +123,19 @@ export async function writeLockfile(options) {
123
123
  ...node.platform,
124
124
  ...(node.engines === undefined ? {} : { engines: node.engines }),
125
125
  };
126
- for (const edge of node.edges) {
127
- const found = lookup(location, edge.name);
126
+ // Establish peers before descending into ordinary children. A peer must be
127
+ // visible beside or above its consumer; its own node_modules is invalid to
128
+ // npm even if that directory already contains the requested version.
129
+ const placementEdges = [...node.edges].sort((a, b) => Number(b.kind === "peer") - Number(a.kind === "peer"));
130
+ for (const edge of placementEdges) {
131
+ const base = edge.kind === "peer"
132
+ ? location.slice(0, Math.max(0, location.lastIndexOf("/node_modules/")))
133
+ : location;
134
+ const found = lookup(base, edge.name);
128
135
  if (found !== undefined && placements.get(found) === edge.target)
129
136
  continue;
130
137
  if (edge.kind === "peer") {
131
- const parent = location.slice(0, Math.max(0, location.lastIndexOf("node_modules/")));
132
- populate(`${parent}node_modules/${edge.name}`, edge.target);
138
+ populate(`${base ? `${base}/` : ""}node_modules/${edge.name}`, edge.target);
133
139
  }
134
140
  else {
135
141
  populate(`${location}/node_modules/${edge.name}`, edge.target);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zyrk",
3
- "version": "0.8.3",
3
+ "version": "0.8.5",
4
4
  "description": "Storage-efficient Node package manager: one verified store per user, shared across projects through links.",
5
5
  "license": "MIT",
6
6
  "type": "module",