@crossberryweb/mozhi 3.7.0 → 3.7.1

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.
Files changed (2) hide show
  1. package/lib/pkgman.js +9 -3
  2. package/package.json +1 -1
package/lib/pkgman.js CHANGED
@@ -499,9 +499,15 @@ function uninstall(name, opts = {}) {
499
499
  }
500
500
 
501
501
  function readManifestDir(dir) {
502
- const mp = path.join(dir, MANIFEST);
503
- if (!fs.existsSync(mp)) return null;
504
- return parseManifest(fs.readFileSync(mp, 'utf8'));
502
+ /* Try every supported manifest name — legacy packages ship
503
+ * package.toml, current scaffolds write mozhi.toml. Without the
504
+ * fallback, `mz list` silently hid legacy packages after the
505
+ * mozhi.toml migration. */
506
+ for (const m of MANIFESTS) {
507
+ const mp = path.join(dir, m);
508
+ if (fs.existsSync(mp)) return parseManifest(fs.readFileSync(mp, 'utf8'));
509
+ }
510
+ return null;
505
511
  }
506
512
 
507
513
  function listInstalled() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossberryweb/mozhi",
3
- "version": "3.7.0",
3
+ "version": "3.7.1",
4
4
  "description": "Mozhi programming language interpreter \u2014 native web, JSON, fs, math, SQLite, templates \u2014 with the built-in package manager (`mz install`). Install once, get both commands: `mozhi` and the short alias `mz` (identical behavior).",
5
5
  "license": "MIT",
6
6
  "repository": {