Commit 214f67c
* fix(cli): `os doctor` tells a broken cloud-connection install from an absent one (#5644)
`readInstalledPackageEntries()` reached the installed-package ledger through a
dynamic `import('@objectstack/cloud-connection')` whose `catch` meant "the
optional package is not installed". That covered two states with opposite
remedies: a specifier that does not resolve (genuinely absent — silence is
correct and stays), and a package that IS installed and will not load (unbuilt
or pruned `dist/`, interrupted install, an artefact that throws while it
evaluates). The second was answered with the first one's silence, so the
ADR-0120 D5e advisory saw "no installed packages" and printed
`✓ Unique scope` over a ledger nobody read — the false PASS #5412 removed at
the `readdir` boundary and #5413 at the entry boundary, one boundary up.
The two are separated by resolution, not by the `import()` having thrown:
`isModuleNotFoundError()` first (an error that is not module-not-found came
from the package itself), then `import.meta.resolve()`, which answers "is the
package there" without stating its entry file. New `utils/optional-package.ts`
owns the classification and the measurements behind it; doctor renders the
present-but-broken state as a `Unique scope` warning row through the same
renderer its two siblings use, and withholds the success line.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016FNvXhtSdnEGEfLEsMmvxh
* docs(cli): state what loadOptionalPackage's specifier accepts (#5644)
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016FNvXhtSdnEGEfLEsMmvxh
---------
Co-authored-by: Claude <noreply@anthropic.com>
1 parent 5b60b36 commit 214f67c
5 files changed
Lines changed: 725 additions & 40 deletions
File tree
- .changeset
- packages/cli/src
- commands
- utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
0 commit comments