@biffo/cli 0.278.3 → 0.278.4

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/dist/index.js +10 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -13257,6 +13257,10 @@ async function runDoctor(options, deps = { git: new GitAdapter() }) {
13257
13257
  behind,
13258
13258
  hasUpstream,
13259
13259
  isDirty,
13260
+ // localCoreVersion and remoteCoreVersion are deliberately decoded through
13261
+ // DIFFERENT code (#1544) — see readLocalCoreVersion's doc comment for why
13262
+ // a shared decode step here would make checkCoreVersionCurrency blind to
13263
+ // a fault in it.
13260
13264
  localCoreVersion: readLocalCoreVersion(options.cwd),
13261
13265
  remoteCoreVersion: parseCoreRecord(
13262
13266
  await git.showFileAtRef(options.cwd, `origin/${INTEGRATION_BRANCH}`, INSTANCE_CORE_FILE)
@@ -13271,7 +13275,7 @@ function readLocalCoreVersion(cwd) {
13271
13275
  const path = join54(cwd, INSTANCE_CORE_FILE);
13272
13276
  if (!existsSync44(path)) return null;
13273
13277
  try {
13274
- return parseCoreRecord(readFileSync38(path, "utf8"));
13278
+ return extractVersionField(readFileSync38(path, "utf8"));
13275
13279
  } catch {
13276
13280
  return null;
13277
13281
  }
@@ -13285,6 +13289,11 @@ function parseCoreRecord(contents) {
13285
13289
  return null;
13286
13290
  }
13287
13291
  }
13292
+ function extractVersionField(contents) {
13293
+ if (contents === null) return null;
13294
+ const match = /"version"\s*:\s*"(\d+\.\d+\.\d+)"/.exec(contents);
13295
+ return match?.[1] ?? null;
13296
+ }
13288
13297
  function readFossil(cwd) {
13289
13298
  const path = join54(cwd, CORE_VERSION_FILE);
13290
13299
  if (!existsSync44(path)) return null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@biffo/cli",
3
- "version": "0.278.3",
3
+ "version": "0.278.4",
4
4
  "description": "Biffo project scaffolding CLI",
5
5
  "license": "MIT",
6
6
  "type": "module",