@hominis/fireforge 0.21.4 → 0.23.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.
@@ -8,7 +8,7 @@ import { pathExists, readText } from '../utils/fs.js';
8
8
  import { verbose } from '../utils/logger.js';
9
9
  import { exec } from '../utils/process.js';
10
10
  import { ensureGit, git } from './git-base.js';
11
- import { fileExistsInHead } from './git-file-ops.js';
11
+ import { fileExistsInHead, isBinaryFile } from './git-file-ops.js';
12
12
  import { getUntrackedFiles, getUntrackedFilesInDir } from './git-status.js';
13
13
  async function execGitWithAllowedExitCodes(repoDir, args, allowedExitCodes = [0]) {
14
14
  const result = await exec('git', args, { cwd: repoDir });
@@ -174,7 +174,9 @@ export async function getAllDiff(repoDir) {
174
174
  // Generate diffs for untracked files
175
175
  const untrackedDiffs = [];
176
176
  for (const file of untrackedFiles) {
177
- const diff = await generateNewFileDiff(repoDir, file);
177
+ const diff = (await isBinaryFile(repoDir, file))
178
+ ? await generateBinaryFilePatch(repoDir, file)
179
+ : await generateNewFileDiff(repoDir, file);
178
180
  untrackedDiffs.push(diff);
179
181
  }
180
182
  // Combine all diffs — each already ends with \n, so concatenate directly
@@ -247,7 +249,9 @@ export async function getDiffForFilesAgainstHead(repoDir, files) {
247
249
  }
248
250
  continue;
249
251
  }
250
- const diff = await generateNewFileDiff(repoDir, file);
252
+ const diff = (await isBinaryFile(repoDir, file))
253
+ ? await generateBinaryFilePatch(repoDir, file)
254
+ : await generateNewFileDiff(repoDir, file);
251
255
  if (diff.trim()) {
252
256
  diffs.push(diff);
253
257
  }
@@ -291,9 +291,12 @@ export function forwardedMachArgsIncludeMarionetteClient(machArgs) {
291
291
  * for runs where the pref is ignored anyway.
292
292
  */
293
293
  export function hasExplicitXpcshellFlavor(machArgs) {
294
- for (const arg of machArgs) {
294
+ for (let i = 0; i < machArgs.length; i += 1) {
295
+ const arg = machArgs[i] ?? '';
295
296
  if (/^--flavor=xpcshell\b/.test(arg) || arg === '--flavor=xpcshell-tests')
296
297
  return true;
298
+ if (arg === '--flavor' && /^xpcshell(?:-tests)?$/.test(machArgs[i + 1] ?? ''))
299
+ return true;
297
300
  }
298
301
  return false;
299
302
  }
@@ -552,6 +552,8 @@ export interface PatchCompactOptions {
552
552
  yes?: boolean;
553
553
  /** Print what would happen without writing anything. */
554
554
  dryRun?: boolean;
555
+ /** Bypass force-mode patchPolicy refusals. */
556
+ forceUnsafe?: boolean;
555
557
  }
556
558
  /**
557
559
  * Options for the status command.
@@ -584,6 +586,12 @@ export interface TokenAddOptions {
584
586
  */
585
587
  export interface DoctorOptions {
586
588
  repairPatchesManifest?: boolean;
589
+ /**
590
+ * Clear a stale `pendingResolution` marker, but only after the same
591
+ * read-only queue health checks used by `fireforge verify` report no
592
+ * error-severity findings.
593
+ */
594
+ clearResolution?: boolean;
587
595
  /**
588
596
  * Opt-in repair path for furnace-specific checks. When true, doctor will:
589
597
  * - clear stale `.fireforge/furnace-state.json` entries whose component is
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hominis/fireforge",
3
- "version": "0.21.4",
3
+ "version": "0.23.0",
4
4
  "description": "FireForge — a build tool for customizing Firefox",
5
5
  "type": "module",
6
6
  "main": "./dist/src/index.js",
@@ -66,7 +66,7 @@
66
66
  "@vitest/coverage-v8": "^4.1.2",
67
67
  "eslint": "^10.0.0",
68
68
  "eslint-config-prettier": "^10.1.8",
69
- "eslint-plugin-jsdoc": "^62.9.0",
69
+ "eslint-plugin-jsdoc": "^63.0.0",
70
70
  "eslint-plugin-simple-import-sort": "^13.0.0",
71
71
  "fast-check": "^4.6.0",
72
72
  "husky": "^9.1.7",