@gjsify/cli 0.62.0 → 0.63.0
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/cli.gjs.mjs +4 -4
- package/lib/utils/install-backend-native.js +42 -3
- package/package.json +20 -20
|
@@ -63,7 +63,7 @@ import * as fs from 'node:fs';
|
|
|
63
63
|
import * as path from 'node:path';
|
|
64
64
|
import * as os from 'node:os';
|
|
65
65
|
import { Range, SemVer, maxSatisfying, satisfies } from '@gjsify/semver';
|
|
66
|
-
import { DEFAULT_REGISTRY, fetchPackument, fetchPackumentConditional, fetchTarball, parseNpmrc, registryFor, } from '@gjsify/npm-registry';
|
|
66
|
+
import { DEFAULT_REGISTRY, fetchPackument, fetchPackumentConditional, fetchTarball, PackageNotFoundError, parseNpmrc, registryFor, } from '@gjsify/npm-registry';
|
|
67
67
|
import { extractTarball } from '@gjsify/tar';
|
|
68
68
|
import { atomicWriteStrict } from './install-cache-fs.js';
|
|
69
69
|
import { acquireInstallLock } from './install-lock.js';
|
|
@@ -229,7 +229,7 @@ async function installPackagesNativeLocked(opts, npmrc, log) {
|
|
|
229
229
|
// tree and the same recorded declarations on every machine (header note,
|
|
230
230
|
// invariant 1), and giving it nothing target-shaped to read is what keeps
|
|
231
231
|
// that true.
|
|
232
|
-
const resolveResult = await resolveDeps(opts.specs, npmrc, log, opts.overrides, opts.skipDeps, opts.signal, progress, preferred, opts.workspaceNames, opts.specOrigins, opts.optionalSpecs);
|
|
232
|
+
const resolveResult = await resolveDeps(opts.specs, npmrc, log, opts.overrides, opts.skipDeps, opts.signal, progress, preferred, opts.workspaceNames, opts.specOrigins, opts.optionalSpecs, opts.linkedNames);
|
|
233
233
|
nodes = resolveResult.nodes;
|
|
234
234
|
skippedEdges = resolveResult.skippedEdges;
|
|
235
235
|
resolved = true;
|
|
@@ -507,7 +507,17 @@ specOrigins,
|
|
|
507
507
|
* so a resolve failure is skipped rather than fatal. The FINAL flag still comes
|
|
508
508
|
* from {@link computeOptionalFlags}, not from this walk.
|
|
509
509
|
*/
|
|
510
|
-
optionalSpecs
|
|
510
|
+
optionalSpecs,
|
|
511
|
+
/**
|
|
512
|
+
* Names provided by a `gjsify link` override — see
|
|
513
|
+
* {@link NativeInstallOptions.linkedNames}. Read ONLY in the failure path: a
|
|
514
|
+
* linked name the registry does not have at all is provided by the local
|
|
515
|
+
* checkout, so the edge is tolerated instead of fatal. Deliberately NOT used to
|
|
516
|
+
* skip the edge up front the way `workspaceNames` is, which is what keeps the
|
|
517
|
+
* designed case — a link over a PUBLISHED package — resolving into the same tree
|
|
518
|
+
* and hence the same lockfile.
|
|
519
|
+
*/
|
|
520
|
+
linkedNames) {
|
|
511
521
|
progress?.beginPhase('resolve', specs.length);
|
|
512
522
|
const applyOverride = (name, range) => {
|
|
513
523
|
if (!overrides)
|
|
@@ -746,6 +756,35 @@ optionalSpecs) {
|
|
|
746
756
|
}
|
|
747
757
|
}
|
|
748
758
|
catch (e) {
|
|
759
|
+
// A dev-linked name the registry does not have AT ALL is provided by
|
|
760
|
+
// the local checkout, and an UNPUBLISHED package is a normal thing to
|
|
761
|
+
// link — a consumer developing against a private sibling repo has
|
|
762
|
+
// nothing on the registry to resolve. Before this branch the resolve
|
|
763
|
+
// died with "Package not found in registry: <name>" and no install
|
|
764
|
+
// could run at all, however correct the symlinks were.
|
|
765
|
+
//
|
|
766
|
+
// Tolerated HERE and not skipped before the fetch, which is the whole
|
|
767
|
+
// difference from `workspaceNames`: in the designed case — a link over
|
|
768
|
+
// a published package — the resolve still succeeds, the node still
|
|
769
|
+
// enters the tree, and the consumer's committed lockfile stays
|
|
770
|
+
// byte-identical (utils/dev-link.ts).
|
|
771
|
+
//
|
|
772
|
+
// A 404 ONLY. A timeout or a dropped connection is not an answer about
|
|
773
|
+
// what the registry holds, and treating it as one would write a
|
|
774
|
+
// lockfile missing the whole linked subtree over a network blip.
|
|
775
|
+
//
|
|
776
|
+
// NOT recorded in `skippedEdges`: that set is re-judged by
|
|
777
|
+
// `assertRequiredEdgesResolved`, which asks whether a MISSING package
|
|
778
|
+
// is required — and this one is not missing. What is genuinely absent
|
|
779
|
+
// is the linked package's own dependency subtree, since the walk never
|
|
780
|
+
// saw a manifest for it; the consumer declares what it needs itself
|
|
781
|
+
// (for `@girs/*` that is the peer-plus-dev-pin shape in lotse's widget
|
|
782
|
+
// package), and a real gap surfaces as an unresolved import, not as a
|
|
783
|
+
// silently incomplete tree.
|
|
784
|
+
if (linkedNames?.has(edge.name) && e instanceof PackageNotFoundError) {
|
|
785
|
+
log('resolve: dev-linked %s not published — provided by the local checkout', edge.name);
|
|
786
|
+
continue;
|
|
787
|
+
}
|
|
749
788
|
// Optional deps that fail to resolve are skipped (yarn/npm behaviour);
|
|
750
789
|
// required deps re-throw.
|
|
751
790
|
if (!edge.required) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gjsify/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.63.0",
|
|
4
4
|
"description": "CLI for Gjsify",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -142,22 +142,22 @@
|
|
|
142
142
|
"cli"
|
|
143
143
|
],
|
|
144
144
|
"dependencies": {
|
|
145
|
-
"@gjsify/blueprint": "^0.
|
|
146
|
-
"@gjsify/buffer": "^0.
|
|
147
|
-
"@gjsify/create-app": "^0.
|
|
148
|
-
"@gjsify/node-globals": "^0.
|
|
149
|
-
"@gjsify/node-polyfills": "^0.
|
|
150
|
-
"@gjsify/npm-registry": "^0.
|
|
151
|
-
"@gjsify/resolve-npm": "^0.
|
|
152
|
-
"@gjsify/rolldown-plugin-gjsify": "^0.
|
|
153
|
-
"@gjsify/vite-plugin-blueprint": "^0.
|
|
154
|
-
"@gjsify/rolldown-plugin-pnp": "^0.
|
|
155
|
-
"@gjsify/semver": "^0.
|
|
156
|
-
"@gjsify/tar": "^0.
|
|
157
|
-
"@gjsify/tsc": "^0.
|
|
158
|
-
"@gjsify/utils": "^0.
|
|
159
|
-
"@gjsify/web-polyfills": "^0.
|
|
160
|
-
"@gjsify/workspace": "^0.
|
|
145
|
+
"@gjsify/blueprint": "^0.63.0",
|
|
146
|
+
"@gjsify/buffer": "^0.63.0",
|
|
147
|
+
"@gjsify/create-app": "^0.63.0",
|
|
148
|
+
"@gjsify/node-globals": "^0.63.0",
|
|
149
|
+
"@gjsify/node-polyfills": "^0.63.0",
|
|
150
|
+
"@gjsify/npm-registry": "^0.63.0",
|
|
151
|
+
"@gjsify/resolve-npm": "^0.63.0",
|
|
152
|
+
"@gjsify/rolldown-plugin-gjsify": "^0.63.0",
|
|
153
|
+
"@gjsify/vite-plugin-blueprint": "^0.63.0",
|
|
154
|
+
"@gjsify/rolldown-plugin-pnp": "^0.63.0",
|
|
155
|
+
"@gjsify/semver": "^0.63.0",
|
|
156
|
+
"@gjsify/tar": "^0.63.0",
|
|
157
|
+
"@gjsify/tsc": "^0.63.0",
|
|
158
|
+
"@gjsify/utils": "^0.63.0",
|
|
159
|
+
"@gjsify/web-polyfills": "^0.63.0",
|
|
160
|
+
"@gjsify/workspace": "^0.63.0",
|
|
161
161
|
"acorn": "^8.17.0",
|
|
162
162
|
"cosmiconfig": "^9.0.2",
|
|
163
163
|
"get-tsconfig": "^4.14.0",
|
|
@@ -166,13 +166,13 @@
|
|
|
166
166
|
"yargs": "^18.0.0"
|
|
167
167
|
},
|
|
168
168
|
"devDependencies": {
|
|
169
|
-
"@gjsify/unit": "^0.
|
|
169
|
+
"@gjsify/unit": "^0.63.0",
|
|
170
170
|
"@types/yargs": "^17.0.35",
|
|
171
171
|
"typescript": "^6.0.3"
|
|
172
172
|
},
|
|
173
173
|
"peerDependencies": {
|
|
174
|
-
"@gjsify/oxfmt-native": "^0.
|
|
175
|
-
"@gjsify/rolldown-native": "^0.
|
|
174
|
+
"@gjsify/oxfmt-native": "^0.63.0",
|
|
175
|
+
"@gjsify/rolldown-native": "^0.63.0"
|
|
176
176
|
},
|
|
177
177
|
"peerDependenciesMeta": {
|
|
178
178
|
"@gjsify/oxfmt-native": {
|