@hominis/fireforge 0.46.0 → 0.46.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.
- package/CHANGELOG.md +381 -498
- package/dist/bin/fireforge.d.ts +1 -1
- package/dist/bin/fireforge.js +17 -17
- package/dist/build-info.json +4 -4
- package/dist/src/cli-usage-error.d.ts +9 -9
- package/dist/src/cli-usage-error.js +12 -12
- package/dist/src/cli.d.ts +3 -2
- package/dist/src/cli.js +29 -28
- package/dist/src/commands/bootstrap-checks.js +2 -1
- package/dist/src/commands/bootstrap.js +2 -2
- package/dist/src/commands/build.js +12 -11
- package/dist/src/commands/config.js +9 -9
- package/dist/src/commands/destructive-decision.d.ts +4 -4
- package/dist/src/commands/destructive-decision.js +4 -4
- package/dist/src/commands/discard.js +5 -5
- package/dist/src/commands/doctor-check-core.d.ts +4 -4
- package/dist/src/commands/doctor-external-toolchains.js +2 -2
- package/dist/src/commands/doctor-furnace-config-sync.d.ts +2 -2
- package/dist/src/commands/doctor-furnace-config-sync.js +20 -20
- package/dist/src/commands/doctor-furnace-jar.d.ts +1 -1
- package/dist/src/commands/doctor-furnace-jar.js +1 -1
- package/dist/src/commands/doctor-furnace.js +22 -22
- package/dist/src/commands/doctor-orphaned-harness.d.ts +10 -11
- package/dist/src/commands/doctor-orphaned-harness.js +10 -11
- package/dist/src/commands/doctor-patch-manifest.d.ts +2 -1
- package/dist/src/commands/doctor-patch-manifest.js +7 -6
- package/dist/src/commands/doctor-post-rebase-audit.js +2 -2
- package/dist/src/commands/doctor-source-pin.d.ts +12 -12
- package/dist/src/commands/doctor-source-pin.js +14 -14
- package/dist/src/commands/doctor-working-tree.d.ts +3 -3
- package/dist/src/commands/doctor-working-tree.js +3 -3
- package/dist/src/commands/doctor.d.ts +2 -2
- package/dist/src/commands/doctor.js +9 -9
- package/dist/src/commands/download.js +15 -13
- package/dist/src/commands/export-all.js +8 -8
- package/dist/src/commands/export-flow.d.ts +5 -5
- package/dist/src/commands/export-flow.js +14 -14
- package/dist/src/commands/export-placement-conflicts.d.ts +3 -3
- package/dist/src/commands/export-placement-conflicts.js +9 -9
- package/dist/src/commands/export-placement-gate.d.ts +2 -2
- package/dist/src/commands/export-placement-gate.js +5 -5
- package/dist/src/commands/export-placement-policy.d.ts +1 -1
- package/dist/src/commands/export-placement-policy.js +1 -1
- package/dist/src/commands/export-shared.d.ts +10 -10
- package/dist/src/commands/export-shared.js +13 -13
- package/dist/src/commands/export.js +4 -4
- package/dist/src/commands/furnace/apply.js +16 -16
- package/dist/src/commands/furnace/chrome-doc-remove.d.ts +1 -1
- package/dist/src/commands/furnace/chrome-doc-remove.js +1 -1
- package/dist/src/commands/furnace/chrome-doc-templates.d.ts +14 -14
- package/dist/src/commands/furnace/chrome-doc-templates.js +17 -17
- package/dist/src/commands/furnace/chrome-doc-tests.d.ts +2 -2
- package/dist/src/commands/furnace/chrome-doc-tests.js +4 -4
- package/dist/src/commands/furnace/chrome-doc.d.ts +8 -8
- package/dist/src/commands/furnace/chrome-doc.js +18 -18
- package/dist/src/commands/furnace/create-browser-test.d.ts +1 -1
- package/dist/src/commands/furnace/create-browser-test.js +4 -4
- package/dist/src/commands/furnace/create-dry-run.d.ts +4 -4
- package/dist/src/commands/furnace/create-dry-run.js +4 -4
- package/dist/src/commands/furnace/create-features.d.ts +2 -2
- package/dist/src/commands/furnace/create-features.js +2 -2
- package/dist/src/commands/furnace/create-mochikit.d.ts +4 -4
- package/dist/src/commands/furnace/create-mochikit.js +7 -7
- package/dist/src/commands/furnace/create-templates.d.ts +14 -14
- package/dist/src/commands/furnace/create-templates.js +18 -18
- package/dist/src/commands/furnace/create-xpcshell.d.ts +5 -5
- package/dist/src/commands/furnace/create-xpcshell.js +8 -8
- package/dist/src/commands/furnace/create.d.ts +1 -1
- package/dist/src/commands/furnace/create.js +10 -10
- package/dist/src/commands/furnace/deploy.js +4 -4
- package/dist/src/commands/furnace/diff.js +7 -7
- package/dist/src/commands/furnace/index.js +1 -1
- package/dist/src/commands/furnace/init.js +15 -15
- package/dist/src/commands/furnace/list.js +2 -2
- package/dist/src/commands/furnace/override.d.ts +1 -1
- package/dist/src/commands/furnace/override.js +15 -15
- package/dist/src/commands/furnace/preview.js +17 -17
- package/dist/src/commands/furnace/refresh.js +6 -6
- package/dist/src/commands/furnace/remove-mutations.d.ts +3 -3
- package/dist/src/commands/furnace/remove-mutations.js +19 -18
- package/dist/src/commands/furnace/remove-state.d.ts +1 -1
- package/dist/src/commands/furnace/remove-state.js +1 -1
- package/dist/src/commands/furnace/remove.js +2 -2
- package/dist/src/commands/furnace/rename-browser-test.js +9 -8
- package/dist/src/commands/furnace/rename-xpcshell.d.ts +2 -2
- package/dist/src/commands/furnace/rename-xpcshell.js +3 -3
- package/dist/src/commands/furnace/rename.js +9 -9
- package/dist/src/commands/furnace/scan.js +3 -3
- package/dist/src/commands/furnace/status.js +7 -7
- package/dist/src/commands/furnace/sync.js +6 -6
- package/dist/src/commands/furnace/test-file-name.d.ts +2 -2
- package/dist/src/commands/furnace/test-file-name.js +2 -2
- package/dist/src/commands/furnace/validate.js +11 -12
- package/dist/src/commands/import.js +20 -20
- package/dist/src/commands/lint-per-patch.js +8 -8
- package/dist/src/commands/lint-per-run-checkjs.d.ts +12 -13
- package/dist/src/commands/lint-per-run-checkjs.js +14 -15
- package/dist/src/commands/lint-report.d.ts +3 -3
- package/dist/src/commands/lint-report.js +4 -4
- package/dist/src/commands/lint.d.ts +3 -3
- package/dist/src/commands/lint.js +35 -35
- package/dist/src/commands/manifest.d.ts +4 -4
- package/dist/src/commands/package.js +2 -2
- package/dist/src/commands/patch/compact.d.ts +2 -2
- package/dist/src/commands/patch/compact.js +8 -8
- package/dist/src/commands/patch/delete.d.ts +1 -1
- package/dist/src/commands/patch/delete.js +8 -8
- package/dist/src/commands/patch/lint-ignore.d.ts +3 -4
- package/dist/src/commands/patch/lint-ignore.js +14 -15
- package/dist/src/commands/patch/move-files-create.d.ts +2 -2
- package/dist/src/commands/patch/move-files-create.js +5 -5
- package/dist/src/commands/patch/move-files-into.d.ts +2 -2
- package/dist/src/commands/patch/move-files-into.js +3 -3
- package/dist/src/commands/patch/move-files.js +1 -1
- package/dist/src/commands/patch/patch-context.d.ts +1 -1
- package/dist/src/commands/patch/rename.d.ts +4 -4
- package/dist/src/commands/patch/rename.js +8 -8
- package/dist/src/commands/patch/reorder.js +10 -10
- package/dist/src/commands/patch/split-plan.d.ts +3 -3
- package/dist/src/commands/patch/split-plan.js +6 -5
- package/dist/src/commands/patch/split.d.ts +2 -2
- package/dist/src/commands/patch/split.js +5 -5
- package/dist/src/commands/patch/staged-dependency-validate.d.ts +1 -1
- package/dist/src/commands/patch/staged-dependency-validate.js +3 -3
- package/dist/src/commands/patch/staged-dependency.d.ts +1 -1
- package/dist/src/commands/patch/staged-dependency.js +6 -6
- package/dist/src/commands/patch/tier.d.ts +2 -2
- package/dist/src/commands/patch/tier.js +5 -5
- package/dist/src/commands/patch-rename-map.d.ts +1 -1
- package/dist/src/commands/patch-rename-map.js +1 -1
- package/dist/src/commands/pending-resolution.d.ts +5 -5
- package/dist/src/commands/pending-resolution.js +5 -5
- package/dist/src/commands/re-export-adjacent.d.ts +3 -3
- package/dist/src/commands/re-export-adjacent.js +8 -8
- package/dist/src/commands/re-export-bulk-scan.d.ts +3 -3
- package/dist/src/commands/re-export-bulk-scan.js +17 -17
- package/dist/src/commands/re-export-drift.d.ts +10 -10
- package/dist/src/commands/re-export-drift.js +29 -29
- package/dist/src/commands/re-export-files.js +14 -15
- package/dist/src/commands/re-export-lint.d.ts +26 -26
- package/dist/src/commands/re-export-lint.js +27 -27
- package/dist/src/commands/re-export-options.d.ts +1 -1
- package/dist/src/commands/re-export-options.js +1 -1
- package/dist/src/commands/re-export-register.d.ts +1 -1
- package/dist/src/commands/re-export-register.js +1 -1
- package/dist/src/commands/re-export-scan.d.ts +1 -1
- package/dist/src/commands/re-export-scan.js +7 -7
- package/dist/src/commands/re-export-single.d.ts +1 -1
- package/dist/src/commands/re-export-single.js +20 -20
- package/dist/src/commands/re-export.js +7 -6
- package/dist/src/commands/rebase/abort.js +6 -6
- package/dist/src/commands/rebase/continue.js +8 -7
- package/dist/src/commands/rebase/index.d.ts +1 -1
- package/dist/src/commands/rebase/index.js +3 -3
- package/dist/src/commands/rebase/patch-loop.js +18 -17
- package/dist/src/commands/register.js +5 -5
- package/dist/src/commands/reset.js +1 -1
- package/dist/src/commands/resolve.d.ts +2 -2
- package/dist/src/commands/resolve.js +3 -3
- package/dist/src/commands/run.js +26 -26
- package/dist/src/commands/setup-support.js +4 -4
- package/dist/src/commands/setup.js +1 -1
- package/dist/src/commands/source.js +1 -1
- package/dist/src/commands/status-check.d.ts +3 -3
- package/dist/src/commands/status-check.js +4 -4
- package/dist/src/commands/status-json.d.ts +14 -13
- package/dist/src/commands/status-json.js +9 -8
- package/dist/src/commands/status-output.d.ts +3 -3
- package/dist/src/commands/status-output.js +3 -3
- package/dist/src/commands/status-ownership.d.ts +3 -3
- package/dist/src/commands/status-ownership.js +3 -3
- package/dist/src/commands/status.js +22 -22
- package/dist/src/commands/test-build-phase.d.ts +1 -1
- package/dist/src/commands/test-build-phase.js +17 -17
- package/dist/src/commands/test-diagnose.d.ts +1 -1
- package/dist/src/commands/test-diagnose.js +20 -20
- package/dist/src/commands/test-modes.d.ts +2 -2
- package/dist/src/commands/test-modes.js +4 -4
- package/dist/src/commands/test-run.d.ts +11 -11
- package/dist/src/commands/test-run.js +15 -15
- package/dist/src/commands/test-stale-gate.d.ts +12 -12
- package/dist/src/commands/test-stale-gate.js +13 -13
- package/dist/src/commands/test-verdict.d.ts +6 -6
- package/dist/src/commands/test-verdict.js +11 -11
- package/dist/src/commands/test.d.ts +3 -3
- package/dist/src/commands/test.js +36 -36
- package/dist/src/commands/token-coverage.js +3 -3
- package/dist/src/commands/token-list.js +5 -5
- package/dist/src/commands/token.js +9 -9
- package/dist/src/commands/tree.js +19 -19
- package/dist/src/commands/typecheck.d.ts +6 -6
- package/dist/src/commands/typecheck.js +7 -7
- package/dist/src/commands/verify.d.ts +3 -3
- package/dist/src/commands/verify.js +10 -10
- package/dist/src/commands/watch.js +11 -11
- package/dist/src/commands/wire.js +13 -13
- package/dist/src/core/ast-utils.d.ts +7 -7
- package/dist/src/core/ast-utils.js +8 -8
- package/dist/src/core/branding.d.ts +5 -5
- package/dist/src/core/branding.js +3 -3
- package/dist/src/core/browser-wire.d.ts +1 -1
- package/dist/src/core/browser-wire.js +4 -4
- package/dist/src/core/build-audit-platform.d.ts +6 -6
- package/dist/src/core/build-audit-platform.js +26 -26
- package/dist/src/core/build-audit-registration.d.ts +5 -5
- package/dist/src/core/build-audit-registration.js +7 -7
- package/dist/src/core/build-audit-resolve.d.ts +5 -5
- package/dist/src/core/build-audit-resolve.js +6 -6
- package/dist/src/core/build-audit-skip.d.ts +8 -8
- package/dist/src/core/build-audit-skip.js +12 -12
- package/dist/src/core/build-audit-transforms.d.ts +2 -2
- package/dist/src/core/build-audit-transforms.js +3 -3
- package/dist/src/core/build-audit.d.ts +8 -8
- package/dist/src/core/build-audit.js +39 -37
- package/dist/src/core/build-baseline-types.d.ts +19 -18
- package/dist/src/core/build-baseline-types.js +1 -1
- package/dist/src/core/build-baseline.d.ts +8 -8
- package/dist/src/core/build-baseline.js +14 -14
- package/dist/src/core/build-jar-escalation.d.ts +8 -8
- package/dist/src/core/build-jar-escalation.js +15 -15
- package/dist/src/core/build-overwrite-guard.d.ts +4 -4
- package/dist/src/core/build-overwrite-guard.js +13 -13
- package/dist/src/core/build-prepare.d.ts +4 -4
- package/dist/src/core/build-prepare.js +16 -15
- package/dist/src/core/config-mutate.js +4 -4
- package/dist/src/core/config-state.js +2 -2
- package/dist/src/core/config-validate-build-audit.js +3 -3
- package/dist/src/core/config-validate-file-size.d.ts +1 -1
- package/dist/src/core/config-validate-file-size.js +2 -2
- package/dist/src/core/config-validate.js +8 -9
- package/dist/src/core/config.d.ts +10 -10
- package/dist/src/core/config.js +10 -10
- package/dist/src/core/coverage-extend.d.ts +16 -16
- package/dist/src/core/coverage-extend.js +16 -16
- package/dist/src/core/destructive.d.ts +14 -14
- package/dist/src/core/destructive.js +9 -9
- package/dist/src/core/diff-hunks.d.ts +2 -2
- package/dist/src/core/diff-hunks.js +7 -7
- package/dist/src/core/discard-baseline.d.ts +10 -10
- package/dist/src/core/discard-baseline.js +15 -16
- package/dist/src/core/display-state.d.ts +11 -11
- package/dist/src/core/display-state.js +12 -12
- package/dist/src/core/engine-changes.d.ts +2 -2
- package/dist/src/core/engine-changes.js +2 -2
- package/dist/src/core/engine-precondition.d.ts +4 -4
- package/dist/src/core/engine-precondition.js +2 -2
- package/dist/src/core/engine-session-lock.d.ts +18 -18
- package/dist/src/core/engine-session-lock.js +37 -37
- package/dist/src/core/export-moved-code-shape.d.ts +7 -7
- package/dist/src/core/export-moved-code-shape.js +8 -8
- package/dist/src/core/file-lock-owner.d.ts +11 -11
- package/dist/src/core/file-lock-owner.js +18 -18
- package/dist/src/core/file-lock.d.ts +12 -12
- package/dist/src/core/file-lock.js +52 -39
- package/dist/src/core/firefox-cache.d.ts +1 -1
- package/dist/src/core/firefox-cache.js +10 -10
- package/dist/src/core/firefox-download.d.ts +3 -3
- package/dist/src/core/firefox-download.js +6 -6
- package/dist/src/core/firefox-extract.d.ts +2 -2
- package/dist/src/core/firefox-extract.js +13 -13
- package/dist/src/core/firefox.d.ts +5 -5
- package/dist/src/core/firefox.js +8 -8
- package/dist/src/core/furnace-apply-dry-run.js +1 -1
- package/dist/src/core/furnace-apply-ftl.d.ts +5 -5
- package/dist/src/core/furnace-apply-ftl.js +8 -8
- package/dist/src/core/furnace-apply-helpers.d.ts +9 -9
- package/dist/src/core/furnace-apply-helpers.js +21 -21
- package/dist/src/core/furnace-apply-output.js +1 -1
- package/dist/src/core/furnace-apply-overwrite-warn.d.ts +9 -9
- package/dist/src/core/furnace-apply-overwrite-warn.js +9 -9
- package/dist/src/core/furnace-apply-undeploy-actions.d.ts +1 -1
- package/dist/src/core/furnace-apply-undeploy-actions.js +1 -1
- package/dist/src/core/furnace-apply.d.ts +3 -3
- package/dist/src/core/furnace-apply.js +22 -21
- package/dist/src/core/furnace-checksum-utils.d.ts +5 -5
- package/dist/src/core/furnace-checksum-utils.js +5 -5
- package/dist/src/core/furnace-config-custom.d.ts +1 -1
- package/dist/src/core/furnace-config-custom.js +2 -2
- package/dist/src/core/furnace-config-order.js +1 -1
- package/dist/src/core/furnace-config-tokens.d.ts +3 -3
- package/dist/src/core/furnace-config-tokens.js +3 -3
- package/dist/src/core/furnace-config-validate.js +2 -2
- package/dist/src/core/furnace-config.d.ts +4 -4
- package/dist/src/core/furnace-config.js +18 -18
- package/dist/src/core/furnace-constants.d.ts +6 -6
- package/dist/src/core/furnace-constants.js +6 -6
- package/dist/src/core/furnace-css-fragments.d.ts +6 -6
- package/dist/src/core/furnace-css-fragments.js +11 -11
- package/dist/src/core/furnace-dir-entry.d.ts +1 -1
- package/dist/src/core/furnace-dir-entry.js +1 -1
- package/dist/src/core/furnace-jsconfig.d.ts +7 -7
- package/dist/src/core/furnace-jsconfig.js +22 -20
- package/dist/src/core/furnace-operation.d.ts +21 -20
- package/dist/src/core/furnace-operation.js +36 -34
- package/dist/src/core/furnace-precondition.d.ts +10 -10
- package/dist/src/core/furnace-precondition.js +8 -8
- package/dist/src/core/furnace-refresh.js +2 -2
- package/dist/src/core/furnace-registration-ast.d.ts +2 -2
- package/dist/src/core/furnace-registration-ast.js +9 -9
- package/dist/src/core/furnace-registration-remove.d.ts +4 -4
- package/dist/src/core/furnace-registration-remove.js +6 -6
- package/dist/src/core/furnace-registration-validate.d.ts +2 -2
- package/dist/src/core/furnace-registration-validate.js +2 -2
- package/dist/src/core/furnace-registration.d.ts +5 -5
- package/dist/src/core/furnace-registration.js +7 -7
- package/dist/src/core/furnace-rollback.d.ts +1 -1
- package/dist/src/core/furnace-rollback.js +5 -5
- package/dist/src/core/furnace-stale-export.d.ts +17 -16
- package/dist/src/core/furnace-stale-export.js +16 -15
- package/dist/src/core/furnace-staleness.d.ts +2 -2
- package/dist/src/core/furnace-staleness.js +2 -2
- package/dist/src/core/furnace-state-persist.d.ts +10 -10
- package/dist/src/core/furnace-state-persist.js +10 -10
- package/dist/src/core/furnace-step-errors.d.ts +6 -6
- package/dist/src/core/furnace-step-errors.js +6 -6
- package/dist/src/core/furnace-validate-accessibility.js +14 -14
- package/dist/src/core/furnace-validate-compatibility.js +9 -9
- package/dist/src/core/furnace-validate-registration.d.ts +2 -2
- package/dist/src/core/furnace-validate-registration.js +13 -13
- package/dist/src/core/furnace-validate-structure.d.ts +1 -1
- package/dist/src/core/furnace-validate-structure.js +4 -4
- package/dist/src/core/furnace-validate.js +9 -9
- package/dist/src/core/furnace-version-drift.d.ts +5 -5
- package/dist/src/core/furnace-version-drift.js +5 -5
- package/dist/src/core/git-base.d.ts +4 -4
- package/dist/src/core/git-base.js +9 -9
- package/dist/src/core/git-diff-new-file.d.ts +4 -4
- package/dist/src/core/git-diff-new-file.js +8 -8
- package/dist/src/core/git-diff.d.ts +4 -4
- package/dist/src/core/git-diff.js +35 -34
- package/dist/src/core/git-file-ops.d.ts +6 -6
- package/dist/src/core/git-file-ops.js +7 -7
- package/dist/src/core/git-readonly-index.d.ts +12 -12
- package/dist/src/core/git-readonly-index.js +12 -12
- package/dist/src/core/git-status.d.ts +4 -4
- package/dist/src/core/git-status.js +4 -4
- package/dist/src/core/git.d.ts +3 -3
- package/dist/src/core/git.js +14 -14
- package/dist/src/core/harness-orphans.d.ts +17 -17
- package/dist/src/core/harness-orphans.js +20 -20
- package/dist/src/core/history-log.d.ts +3 -3
- package/dist/src/core/history-log.js +3 -3
- package/dist/src/core/license-headers.d.ts +19 -18
- package/dist/src/core/license-headers.js +29 -28
- package/dist/src/core/mach-build-artifacts.d.ts +21 -21
- package/dist/src/core/mach-build-artifacts.js +23 -23
- package/dist/src/core/mach-error-hints.d.ts +5 -5
- package/dist/src/core/mach-error-hints.js +13 -13
- package/dist/src/core/mach-known-noise-filter.d.ts +41 -38
- package/dist/src/core/mach-known-noise-filter.js +53 -50
- package/dist/src/core/mach-mozconfig.d.ts +6 -6
- package/dist/src/core/mach-mozconfig.js +15 -15
- package/dist/src/core/mach-python.d.ts +2 -1
- package/dist/src/core/mach-python.js +4 -3
- package/dist/src/core/mach-resource-shim.d.ts +12 -12
- package/dist/src/core/mach-resource-shim.js +20 -20
- package/dist/src/core/mach.d.ts +23 -23
- package/dist/src/core/mach.js +36 -36
- package/dist/src/core/marionette-port.d.ts +15 -13
- package/dist/src/core/marionette-port.js +34 -31
- package/dist/src/core/marionette-preflight.d.ts +6 -6
- package/dist/src/core/marionette-preflight.js +23 -23
- package/dist/src/core/markdown-table.d.ts +9 -9
- package/dist/src/core/markdown-table.js +14 -14
- package/dist/src/core/mochitest-server-port.d.ts +8 -8
- package/dist/src/core/mochitest-server-port.js +14 -14
- package/dist/src/core/module-resolution-preflight.d.ts +8 -8
- package/dist/src/core/module-resolution-preflight.js +11 -11
- package/dist/src/core/moz-manifest-helpers.d.ts +7 -7
- package/dist/src/core/moz-manifest-helpers.js +7 -7
- package/dist/src/core/moz-manifest-register.d.ts +1 -1
- package/dist/src/core/moz-manifest-register.js +2 -2
- package/dist/src/core/moz-manifest-rules.js +11 -11
- package/dist/src/core/moz-manifest-tokenizers.js +1 -1
- package/dist/src/core/ownership-table.d.ts +5 -5
- package/dist/src/core/ownership-table.js +7 -7
- package/dist/src/core/parser-fallback.d.ts +3 -3
- package/dist/src/core/parser-fallback.js +3 -3
- package/dist/src/core/patch-apply-fuzz.d.ts +5 -5
- package/dist/src/core/patch-apply-fuzz.js +9 -9
- package/dist/src/core/patch-apply.d.ts +9 -9
- package/dist/src/core/patch-apply.js +30 -30
- package/dist/src/core/patch-export-update.d.ts +4 -4
- package/dist/src/core/patch-export-update.js +3 -3
- package/dist/src/core/patch-export.d.ts +10 -10
- package/dist/src/core/patch-export.js +13 -13
- package/dist/src/core/patch-identifier-suggest.d.ts +1 -1
- package/dist/src/core/patch-identifier-suggest.js +4 -4
- package/dist/src/core/patch-lint-binary.d.ts +7 -7
- package/dist/src/core/patch-lint-cache.d.ts +2 -2
- package/dist/src/core/patch-lint-cache.js +13 -13
- package/dist/src/core/patch-lint-checkjs.d.ts +26 -26
- package/dist/src/core/patch-lint-checkjs.js +42 -41
- package/dist/src/core/patch-lint-chrome-jsdoc.d.ts +8 -9
- package/dist/src/core/patch-lint-chrome-jsdoc.js +10 -11
- package/dist/src/core/patch-lint-creators.d.ts +3 -3
- package/dist/src/core/patch-lint-creators.js +3 -3
- package/dist/src/core/patch-lint-cross.d.ts +13 -13
- package/dist/src/core/patch-lint-cross.js +21 -21
- package/dist/src/core/patch-lint-css.d.ts +1 -1
- package/dist/src/core/patch-lint-css.js +5 -5
- package/dist/src/core/patch-lint-diff-tag.d.ts +5 -5
- package/dist/src/core/patch-lint-diff-tag.js +5 -5
- package/dist/src/core/patch-lint-diff.d.ts +4 -4
- package/dist/src/core/patch-lint-diff.js +4 -4
- package/dist/src/core/patch-lint-file-size.d.ts +3 -3
- package/dist/src/core/patch-lint-file-size.js +3 -3
- package/dist/src/core/patch-lint-forward-registration.d.ts +4 -4
- package/dist/src/core/patch-lint-forward-registration.js +12 -12
- package/dist/src/core/patch-lint-jsdoc.d.ts +2 -2
- package/dist/src/core/patch-lint-jsdoc.js +11 -11
- package/dist/src/core/patch-lint-module-registration.d.ts +1 -1
- package/dist/src/core/patch-lint-module-registration.js +1 -1
- package/dist/src/core/patch-lint-mozbuild.d.ts +1 -1
- package/dist/src/core/patch-lint-mozbuild.js +10 -10
- package/dist/src/core/patch-lint-observer.d.ts +3 -3
- package/dist/src/core/patch-lint-observer.js +7 -7
- package/dist/src/core/patch-lint-ownership.d.ts +6 -6
- package/dist/src/core/patch-lint-ownership.js +6 -6
- package/dist/src/core/patch-lint-prettier.d.ts +6 -6
- package/dist/src/core/patch-lint-prettier.js +6 -6
- package/dist/src/core/patch-lint-queue-types.d.ts +1 -1
- package/dist/src/core/patch-lint-queue-types.js +1 -1
- package/dist/src/core/patch-lint-staged-registration.d.ts +2 -2
- package/dist/src/core/patch-lint-staged-registration.js +6 -6
- package/dist/src/core/patch-lint-unmanaged-companion.d.ts +23 -23
- package/dist/src/core/patch-lint-unmanaged-companion.js +26 -26
- package/dist/src/core/patch-lint.d.ts +27 -26
- package/dist/src/core/patch-lint.js +48 -46
- package/dist/src/core/patch-lock.d.ts +1 -1
- package/dist/src/core/patch-lock.js +8 -8
- package/dist/src/core/patch-manifest-consistency.d.ts +7 -7
- package/dist/src/core/patch-manifest-consistency.js +16 -17
- package/dist/src/core/patch-manifest-files-affected.d.ts +1 -1
- package/dist/src/core/patch-manifest-files-affected.js +3 -3
- package/dist/src/core/patch-manifest-io.d.ts +14 -14
- package/dist/src/core/patch-manifest-io.js +27 -27
- package/dist/src/core/patch-manifest-query.d.ts +1 -1
- package/dist/src/core/patch-manifest-query.js +4 -4
- package/dist/src/core/patch-manifest-resolve.d.ts +5 -5
- package/dist/src/core/patch-manifest-resolve.js +7 -7
- package/dist/src/core/patch-manifest-validate.js +3 -3
- package/dist/src/core/patch-manifest.d.ts +2 -2
- package/dist/src/core/patch-manifest.js +2 -2
- package/dist/src/core/patch-parse.d.ts +14 -14
- package/dist/src/core/patch-parse.js +16 -16
- package/dist/src/core/patch-registration-refs.d.ts +4 -4
- package/dist/src/core/patch-registration-refs.js +7 -7
- package/dist/src/core/patch-transform.d.ts +8 -8
- package/dist/src/core/patch-transform.js +13 -13
- package/dist/src/core/process-cpu-time.d.ts +1 -1
- package/dist/src/core/process-cpu-time.js +5 -5
- package/dist/src/core/rebase-session.d.ts +7 -7
- package/dist/src/core/rebase-session.js +8 -8
- package/dist/src/core/register-result.d.ts +1 -1
- package/dist/src/core/register-result.js +1 -1
- package/dist/src/core/register-scaffold.d.ts +2 -2
- package/dist/src/core/register-scaffold.js +3 -3
- package/dist/src/core/register-shared-css.d.ts +3 -3
- package/dist/src/core/register-shared-css.js +4 -4
- package/dist/src/core/register-xpcshell-test.d.ts +2 -2
- package/dist/src/core/register-xpcshell-test.js +2 -2
- package/dist/src/core/run-log-redact.d.ts +12 -12
- package/dist/src/core/run-log-redact.js +16 -16
- package/dist/src/core/run-log.d.ts +9 -9
- package/dist/src/core/run-log.js +14 -14
- package/dist/src/core/shared-ftl.d.ts +2 -2
- package/dist/src/core/shared-ftl.js +6 -6
- package/dist/src/core/signal-critical.d.ts +2 -2
- package/dist/src/core/signal-critical.js +2 -2
- package/dist/src/core/smoke-patterns.d.ts +5 -5
- package/dist/src/core/smoke-patterns.js +9 -9
- package/dist/src/core/state-file.d.ts +3 -3
- package/dist/src/core/status-binary.d.ts +8 -8
- package/dist/src/core/status-binary.js +12 -12
- package/dist/src/core/status-classify.d.ts +17 -17
- package/dist/src/core/status-classify.js +11 -11
- package/dist/src/core/test-changed-prefs.d.ts +12 -12
- package/dist/src/core/test-changed-prefs.js +15 -15
- package/dist/src/core/test-harness-crash.d.ts +39 -39
- package/dist/src/core/test-harness-crash.js +67 -67
- package/dist/src/core/test-harness-output.d.ts +7 -7
- package/dist/src/core/test-harness-output.js +7 -7
- package/dist/src/core/test-harness-verdict-notes.d.ts +13 -14
- package/dist/src/core/test-harness-verdict-notes.js +4 -4
- package/dist/src/core/test-path-scope.d.ts +8 -8
- package/dist/src/core/test-path-scope.js +11 -11
- package/dist/src/core/test-stale-check.d.ts +22 -21
- package/dist/src/core/test-stale-check.js +29 -28
- package/dist/src/core/test-stale-symlink.d.ts +1 -1
- package/dist/src/core/test-stale-symlink.js +1 -1
- package/dist/src/core/test-stall-triage.d.ts +9 -9
- package/dist/src/core/test-stall-triage.js +22 -22
- package/dist/src/core/token-category.d.ts +4 -4
- package/dist/src/core/token-category.js +13 -12
- package/dist/src/core/token-coverage.js +4 -5
- package/dist/src/core/token-dark-mode.d.ts +9 -9
- package/dist/src/core/token-dark-mode.js +11 -11
- package/dist/src/core/token-docs.d.ts +1 -1
- package/dist/src/core/token-inventory.d.ts +6 -6
- package/dist/src/core/token-inventory.js +7 -7
- package/dist/src/core/token-manager.d.ts +3 -3
- package/dist/src/core/token-manager.js +21 -21
- package/dist/src/core/token-scaffold.d.ts +4 -4
- package/dist/src/core/token-scaffold.js +4 -4
- package/dist/src/core/token-variant.d.ts +14 -14
- package/dist/src/core/token-variant.js +32 -32
- package/dist/src/core/toolchain-preflight.d.ts +15 -15
- package/dist/src/core/toolchain-preflight.js +22 -22
- package/dist/src/core/tree-cow.d.ts +3 -3
- package/dist/src/core/tree-cow.js +6 -6
- package/dist/src/core/tree-guard.d.ts +3 -3
- package/dist/src/core/tree-guard.js +23 -23
- package/dist/src/core/tree-store.d.ts +15 -15
- package/dist/src/core/tree-store.js +35 -33
- package/dist/src/core/typecheck-shim.d.ts +16 -15
- package/dist/src/core/typecheck-shim.js +26 -25
- package/dist/src/core/typecheck.d.ts +12 -12
- package/dist/src/core/typecheck.js +31 -31
- package/dist/src/core/wire-destroy.d.ts +2 -2
- package/dist/src/core/wire-destroy.js +5 -5
- package/dist/src/core/wire-dom-fragment.d.ts +3 -3
- package/dist/src/core/wire-dom-fragment.js +6 -6
- package/dist/src/core/wire-init.d.ts +2 -2
- package/dist/src/core/wire-init.js +7 -7
- package/dist/src/core/wire-subscript.d.ts +1 -1
- package/dist/src/core/wire-subscript.js +3 -3
- package/dist/src/core/wire-utils.d.ts +9 -9
- package/dist/src/core/wire-utils.js +11 -11
- package/dist/src/core/xpcshell-appdir.d.ts +20 -20
- package/dist/src/core/xpcshell-appdir.js +26 -26
- package/dist/src/core/xpcshell-profile-dir.d.ts +3 -3
- package/dist/src/core/xpcshell-profile-dir.js +7 -7
- package/dist/src/errors/base.d.ts +22 -21
- package/dist/src/errors/base.js +22 -21
- package/dist/src/errors/build.d.ts +6 -6
- package/dist/src/errors/build.js +6 -6
- package/dist/src/errors/codes.d.ts +10 -10
- package/dist/src/errors/codes.js +10 -10
- package/dist/src/errors/furnace.d.ts +2 -2
- package/dist/src/errors/git.d.ts +1 -1
- package/dist/src/errors/git.js +1 -1
- package/dist/src/errors/patch.d.ts +3 -3
- package/dist/src/errors/patch.js +3 -3
- package/dist/src/errors/rebase.d.ts +1 -1
- package/dist/src/errors/rebase.js +1 -1
- package/dist/src/errors/run.d.ts +1 -1
- package/dist/src/errors/run.js +1 -1
- package/dist/src/index.d.ts +4 -4
- package/dist/src/index.js +4 -4
- package/dist/src/types/commands/options.d.ts +86 -85
- package/dist/src/types/commands/patches.d.ts +19 -19
- package/dist/src/types/commands/project.d.ts +3 -3
- package/dist/src/types/config.d.ts +24 -23
- package/dist/src/types/furnace.d.ts +17 -17
- package/dist/src/types/json.d.ts +3 -3
- package/dist/src/types/json.js +2 -2
- package/dist/src/types/typecheck.d.ts +3 -3
- package/dist/src/utils/assert.d.ts +1 -1
- package/dist/src/utils/assert.js +6 -6
- package/dist/src/utils/build-info.d.ts +5 -5
- package/dist/src/utils/build-info.js +6 -6
- package/dist/src/utils/child-env.d.ts +5 -5
- package/dist/src/utils/child-env.js +5 -5
- package/dist/src/utils/concurrency.d.ts +2 -2
- package/dist/src/utils/concurrency.js +2 -2
- package/dist/src/utils/elapsed.js +1 -1
- package/dist/src/utils/errors.d.ts +8 -8
- package/dist/src/utils/errors.js +8 -8
- package/dist/src/utils/fs.d.ts +1 -1
- package/dist/src/utils/fs.js +8 -8
- package/dist/src/utils/line-dispatch.d.ts +3 -3
- package/dist/src/utils/line-dispatch.js +5 -5
- package/dist/src/utils/logger.d.ts +4 -4
- package/dist/src/utils/logger.js +11 -11
- package/dist/src/utils/machine-output.js +2 -2
- package/dist/src/utils/options.d.ts +13 -13
- package/dist/src/utils/options.js +20 -20
- package/dist/src/utils/package-root.js +2 -2
- package/dist/src/utils/paths.d.ts +4 -4
- package/dist/src/utils/paths.js +4 -4
- package/dist/src/utils/process-group.d.ts +8 -8
- package/dist/src/utils/process-group.js +19 -19
- package/dist/src/utils/process.d.ts +34 -33
- package/dist/src/utils/process.js +20 -19
- package/dist/src/utils/ps-duration.d.ts +4 -4
- package/dist/src/utils/ps-duration.js +6 -6
- package/dist/src/utils/regex.d.ts +4 -4
- package/dist/src/utils/regex.js +7 -7
- package/dist/src/utils/sleep.d.ts +7 -7
- package/dist/src/utils/sleep.js +7 -7
- package/dist/src/utils/stdio-drain.d.ts +7 -7
- package/dist/src/utils/stdio-drain.js +8 -8
- package/dist/src/utils/validation.d.ts +11 -12
- package/dist/src/utils/validation.js +20 -21
- package/docs/README.md +2 -2
- package/docs/configuration.md +120 -114
- package/docs/exit-codes.md +63 -58
- package/docs/furnace.md +20 -19
- package/docs/lifecycle-invariants.md +412 -251
- package/docs/machine-output.md +33 -32
- package/docs/patch-workflow.md +48 -45
- package/docs/run-logs.md +62 -58
- package/docs/testing.md +101 -101
- package/docs/verification-trees.md +23 -22
- package/package.json +2 -2
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* `String(order).padStart(3, '0')`, so the padding width lived in eleven
|
|
8
8
|
* places while the filenames it has to agree with are produced in one.
|
|
9
9
|
* @param order - Numeric patch order.
|
|
10
|
-
* @param width - Prefix width
|
|
10
|
+
* @param width - Prefix width. Defaults to the on-disk convention.
|
|
11
11
|
* @returns The zero-padded order, e.g. `007`.
|
|
12
12
|
*/
|
|
13
13
|
export declare function formatPatchOrder(order: number, width?: number): string;
|
|
@@ -35,7 +35,7 @@ export declare function extractOrder(filename: string): number;
|
|
|
35
35
|
* `Infinity` for a prefix-less filename, which sorts such a patch last and
|
|
36
36
|
* is the right answer for a read: an unparseable name should not crash a
|
|
37
37
|
* status listing. Persisting `Infinity` (or the `0` some call sites used to
|
|
38
|
-
* fall back to) is a different matter
|
|
38
|
+
* fall back to) is a different matter: it puts an order in the manifest
|
|
39
39
|
* that no filename on disk agrees with, and the queue then applies in an
|
|
40
40
|
* order the operator cannot see. Callers here have always just built or
|
|
41
41
|
* looked up a real prefixed filename, so absence is a bug, not input.
|
|
@@ -52,7 +52,7 @@ export declare function requirePatchOrder(filename: string): number;
|
|
|
52
52
|
export interface DiffGitHeader {
|
|
53
53
|
/** Old-side (`a/`) path. */
|
|
54
54
|
sourcePath: string;
|
|
55
|
-
/** New-side (`b/`) path
|
|
55
|
+
/** New-side (`b/`) path: the file the patch produces. */
|
|
56
56
|
targetPath: string;
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
@@ -62,8 +62,8 @@ export interface DiffGitHeader {
|
|
|
62
62
|
* (`diff --git "a/x y" "b/x y"`), and disambiguates the unquoted form for
|
|
63
63
|
* paths that themselves contain ` b/`: for the overwhelmingly common
|
|
64
64
|
* non-rename case the two paths are identical, so a symmetric split
|
|
65
|
-
* (`a/<p> b/<p>`) is tried first
|
|
66
|
-
* lines at the
|
|
65
|
+
* (`a/<p> b/<p>`) is tried first: a greedy `a\/.+ b\/(.+)$` splits such
|
|
66
|
+
* lines at the last ` b/` and returns a truncated path. Falls back to a
|
|
67
67
|
* non-greedy split for renames.
|
|
68
68
|
*
|
|
69
69
|
* @returns null when the line is not a diff --git header.
|
|
@@ -73,7 +73,7 @@ export declare function parseDiffGitHeader(line: string): DiffGitHeader | null;
|
|
|
73
73
|
* One `diff --git` section of a unified diff, fully structured.
|
|
74
74
|
*/
|
|
75
75
|
export interface DiffSection {
|
|
76
|
-
/** New-side (`b/`) path
|
|
76
|
+
/** New-side (`b/`) path: the file this section produces. */
|
|
77
77
|
targetPath: string;
|
|
78
78
|
/** Old-side (`a/`) path. */
|
|
79
79
|
sourcePath: string;
|
|
@@ -83,21 +83,21 @@ export interface DiffSection {
|
|
|
83
83
|
isDeletedFile: boolean;
|
|
84
84
|
/**
|
|
85
85
|
* True for binary sections (`GIT binary patch` or `Binary files … differ`).
|
|
86
|
-
* Binary sections have no parseable hunks
|
|
86
|
+
* Binary sections have no parseable hunks. Text-oriented consumers must
|
|
87
87
|
* refuse them rather than treat base85 lines starting with `+` as content.
|
|
88
88
|
*/
|
|
89
89
|
isBinary: boolean;
|
|
90
90
|
/**
|
|
91
|
-
* True
|
|
91
|
+
* True only for `GIT binary patch` sections, whose body carries a
|
|
92
92
|
* reconstructable literal/delta payload. False for `Binary files … differ`,
|
|
93
|
-
* which records
|
|
93
|
+
* which records that the bytes changed but carries none of them and cannot
|
|
94
94
|
* be replayed by `git apply`.
|
|
95
95
|
*
|
|
96
96
|
* The distinction is not cosmetic: the stub form still carries a correct
|
|
97
97
|
* `index <old>..<new>` line, so identity checks keyed on {@link indexNewHash}
|
|
98
98
|
* alone happily conclude "the recorded bytes match the live file" for a body
|
|
99
99
|
* that can no longer produce those bytes. Consumers deciding whether a patch
|
|
100
|
-
* can
|
|
100
|
+
* can recreate a file must read this flag, never `isBinary` plus a hash.
|
|
101
101
|
*/
|
|
102
102
|
hasBinaryDelta: boolean;
|
|
103
103
|
/**
|
|
@@ -106,14 +106,14 @@ export interface DiffSection {
|
|
|
106
106
|
* parseable index line (hand-written diffs, `Binary files … differ`).
|
|
107
107
|
*/
|
|
108
108
|
indexOldHash?: string;
|
|
109
|
-
/** New-side blob hash from the `index` line
|
|
109
|
+
/** New-side blob hash from the `index` line. See {@link indexOldHash}. */
|
|
110
110
|
indexNewHash?: string;
|
|
111
111
|
/** Parsed hunks, in file order. Empty for binary or metadata-only sections. */
|
|
112
112
|
hunks: ParsedHunk[];
|
|
113
113
|
}
|
|
114
114
|
/**
|
|
115
|
-
* Parses a unified diff into structured per-file sections
|
|
116
|
-
* shared walker every diff consumer builds on.
|
|
115
|
+
* Parses a unified diff into structured per-file sections. This is the
|
|
116
|
+
* single shared walker every diff consumer builds on.
|
|
117
117
|
*/
|
|
118
118
|
export declare function parseDiffSections(diffContent: string): DiffSection[];
|
|
119
119
|
/**
|
|
@@ -132,7 +132,7 @@ export declare function isNewFileInPatch(patchContent: string, targetFile: strin
|
|
|
132
132
|
export declare function extractAffectedFiles(diffContent: string): string[];
|
|
133
133
|
/**
|
|
134
134
|
* A single parsed hunk. `noNewlineAtEndOld` / `noNewlineAtEndNew` track the
|
|
135
|
-
* `` marker per side
|
|
135
|
+
* `` marker per side. The marker is a trailing
|
|
136
136
|
* annotation on the immediately preceding body line, and a `-` precedent
|
|
137
137
|
* sets only the old-side flag, a `+` sets only the new-side flag, and a
|
|
138
138
|
* context ` ` line sets both. Collapsing the two into one boolean makes the
|
|
@@ -4,7 +4,7 @@ import { assert } from '../utils/assert.js';
|
|
|
4
4
|
* Pure parsing functions for extracting information from patch files. All
|
|
5
5
|
* functions are synchronous and operate on string content.
|
|
6
6
|
*
|
|
7
|
-
* This module is the
|
|
7
|
+
* This module is the one unified-diff walker in the codebase. Hand-rolled
|
|
8
8
|
* `diff --git` walkers diverge in ways that matter: CRLF handling (a
|
|
9
9
|
* CRLF-saved patch file silently fails target-file matching and
|
|
10
10
|
* `\ No newline` detection on Windows), quoted-path support, and greedy path
|
|
@@ -22,7 +22,7 @@ const PATCH_ORDER_WIDTH = 3;
|
|
|
22
22
|
* `String(order).padStart(3, '0')`, so the padding width lived in eleven
|
|
23
23
|
* places while the filenames it has to agree with are produced in one.
|
|
24
24
|
* @param order - Numeric patch order.
|
|
25
|
-
* @param width - Prefix width
|
|
25
|
+
* @param width - Prefix width. Defaults to the on-disk convention.
|
|
26
26
|
* @returns The zero-padded order, e.g. `007`.
|
|
27
27
|
*/
|
|
28
28
|
export function formatPatchOrder(order, width = PATCH_ORDER_WIDTH) {
|
|
@@ -57,7 +57,7 @@ export function extractOrder(filename) {
|
|
|
57
57
|
* `Infinity` for a prefix-less filename, which sorts such a patch last and
|
|
58
58
|
* is the right answer for a read: an unparseable name should not crash a
|
|
59
59
|
* status listing. Persisting `Infinity` (or the `0` some call sites used to
|
|
60
|
-
* fall back to) is a different matter
|
|
60
|
+
* fall back to) is a different matter: it puts an order in the manifest
|
|
61
61
|
* that no filename on disk agrees with, and the queue then applies in an
|
|
62
62
|
* order the operator cannot see. Callers here have always just built or
|
|
63
63
|
* looked up a real prefixed filename, so absence is a bug, not input.
|
|
@@ -83,8 +83,8 @@ function unquoteGitPath(quoted) {
|
|
|
83
83
|
for (let i = 0; i < quoted.length; i++) {
|
|
84
84
|
const ch = quoted[i];
|
|
85
85
|
if (ch !== '\\') {
|
|
86
|
-
// Plain character
|
|
87
|
-
// contains raw UTF-8
|
|
86
|
+
// Plain character, which may itself be multi-byte when the diff already
|
|
87
|
+
// contains raw UTF-8. Push its bytes.
|
|
88
88
|
const encoded = Buffer.from(quoted[i] ?? '', 'utf-8');
|
|
89
89
|
for (const b of encoded)
|
|
90
90
|
bytes.push(b);
|
|
@@ -112,8 +112,8 @@ function unquoteGitPath(quoted) {
|
|
|
112
112
|
* (`diff --git "a/x y" "b/x y"`), and disambiguates the unquoted form for
|
|
113
113
|
* paths that themselves contain ` b/`: for the overwhelmingly common
|
|
114
114
|
* non-rename case the two paths are identical, so a symmetric split
|
|
115
|
-
* (`a/<p> b/<p>`) is tried first
|
|
116
|
-
* lines at the
|
|
115
|
+
* (`a/<p> b/<p>`) is tried first: a greedy `a\/.+ b\/(.+)$` splits such
|
|
116
|
+
* lines at the last ` b/` and returns a truncated path. Falls back to a
|
|
117
117
|
* non-greedy split for renames.
|
|
118
118
|
*
|
|
119
119
|
* @returns null when the line is not a diff --git header.
|
|
@@ -153,10 +153,10 @@ export function parseDiffGitHeader(line) {
|
|
|
153
153
|
* Splits raw diff content into lines, tolerating CRLF-saved patch files.
|
|
154
154
|
*
|
|
155
155
|
* The distinction matters: a patch file saved with CRLF endings (Windows
|
|
156
|
-
* editor, `core.autocrlf` checkout) has `\r` on
|
|
157
|
-
* structural ones
|
|
156
|
+
* editor, `core.autocrlf` checkout) has `\r` on every line including
|
|
157
|
+
* structural ones. Strip it, or headers, `@@` lines and the
|
|
158
158
|
* `` marker all fail to match. But an LF patch
|
|
159
|
-
* of a file whose
|
|
159
|
+
* of a file whose content is CRLF has `\r` only on payload lines, where it
|
|
160
160
|
* is significant and must be preserved. Detect the former by checking the
|
|
161
161
|
* structural lines themselves for a trailing `\r`.
|
|
162
162
|
*/
|
|
@@ -170,8 +170,8 @@ function splitDiffLines(diffContent) {
|
|
|
170
170
|
return lines.map((line) => (line.endsWith('\r') ? line.slice(0, -1) : line));
|
|
171
171
|
}
|
|
172
172
|
/**
|
|
173
|
-
* Parses a unified diff into structured per-file sections
|
|
174
|
-
* shared walker every diff consumer builds on.
|
|
173
|
+
* Parses a unified diff into structured per-file sections. This is the
|
|
174
|
+
* single shared walker every diff consumer builds on.
|
|
175
175
|
*/
|
|
176
176
|
export function parseDiffSections(diffContent) {
|
|
177
177
|
const sections = [];
|
|
@@ -223,7 +223,7 @@ export function parseDiffSections(diffContent) {
|
|
|
223
223
|
continue;
|
|
224
224
|
}
|
|
225
225
|
// `git diff --binary` always records full blob hashes here (git
|
|
226
|
-
// apply requires them)
|
|
226
|
+
// apply requires them). Text sections carry abbreviated ones. The
|
|
227
227
|
// hashes let binary sections be compared by identity when their
|
|
228
228
|
// payload cannot be applied as text.
|
|
229
229
|
const indexMatch = /^index ([0-9a-f]{7,64})\.\.([0-9a-f]{7,64})(?: \d{6})?$/.exec(line);
|
|
@@ -254,7 +254,7 @@ export function parseDiffSections(diffContent) {
|
|
|
254
254
|
if (line === '\') {
|
|
255
255
|
// The marker is an annotation on the immediately preceding body
|
|
256
256
|
// line. Peek the last collected line to decide which side(s) the
|
|
257
|
-
// annotation applies to
|
|
257
|
+
// annotation applies to. A single boolean cannot represent the
|
|
258
258
|
// asymmetric case where only one side lacks the trailing newline.
|
|
259
259
|
const previous = currentHunk.lines[currentHunk.lines.length - 1] ?? '';
|
|
260
260
|
if (previous.startsWith('-')) {
|
|
@@ -267,12 +267,12 @@ export function parseDiffSections(diffContent) {
|
|
|
267
267
|
// Context line: present in both sides, so the trailing-newline
|
|
268
268
|
// absence applies to both. This is rare (it only happens when
|
|
269
269
|
// the hunk ends on an unchanged line that itself is the last
|
|
270
|
-
// line of the file) but real
|
|
270
|
+
// line of the file) but real: git emits it.
|
|
271
271
|
currentHunk.noNewlineAtEndOld = true;
|
|
272
272
|
currentHunk.noNewlineAtEndNew = true;
|
|
273
273
|
}
|
|
274
274
|
// If the marker appears with no preceding body line (malformed
|
|
275
|
-
// diff), leave both flags false
|
|
275
|
+
// diff), leave both flags false. The downstream apply logic
|
|
276
276
|
// will still produce a defined result.
|
|
277
277
|
continue;
|
|
278
278
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* clean" for the broken queue. This module provides a pattern-scoped scan so
|
|
9
9
|
* `verify` can cross-check registrations against available file bodies.
|
|
10
10
|
*
|
|
11
|
-
* The scan is
|
|
11
|
+
* The scan is narrow on purpose: it only matches component-shaped
|
|
12
12
|
* references (widget tag names, locale fluent names). Unrelated jar.mn or
|
|
13
13
|
* customElements.js edits pass through without spurious warnings.
|
|
14
14
|
*/
|
|
@@ -28,11 +28,11 @@ export interface PatchRegistrationReference {
|
|
|
28
28
|
}
|
|
29
29
|
/**
|
|
30
30
|
* Walks a unified-diff patch body and returns the set of
|
|
31
|
-
* component-shaped engine paths that the patch
|
|
31
|
+
* component-shaped engine paths that the patch adds a registration for.
|
|
32
32
|
*
|
|
33
|
-
* Returns the empty array when no registration hunks are present
|
|
33
|
+
* Returns the empty array when no registration hunks are present, or
|
|
34
34
|
* when the registration hunks do not mention any component-shaped
|
|
35
|
-
* paths
|
|
35
|
+
* paths. That leaves the scan silent on the vast majority of patches
|
|
36
36
|
* (branding tweaks, behavioural fixes, module additions) so it only
|
|
37
37
|
* fires when a furnace-managed component is being newly registered.
|
|
38
38
|
*
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* clean" for the broken queue. This module provides a pattern-scoped scan so
|
|
10
10
|
* `verify` can cross-check registrations against available file bodies.
|
|
11
11
|
*
|
|
12
|
-
* The scan is
|
|
12
|
+
* The scan is narrow on purpose: it only matches component-shaped
|
|
13
13
|
* references (widget tag names, locale fluent names). Unrelated jar.mn or
|
|
14
14
|
* customElements.js edits pass through without spurious warnings.
|
|
15
15
|
*/
|
|
@@ -23,11 +23,11 @@ const REGISTRATION_FILE_PATHS = new Set([
|
|
|
23
23
|
]);
|
|
24
24
|
/**
|
|
25
25
|
* Walks a unified-diff patch body and returns the set of
|
|
26
|
-
* component-shaped engine paths that the patch
|
|
26
|
+
* component-shaped engine paths that the patch adds a registration for.
|
|
27
27
|
*
|
|
28
|
-
* Returns the empty array when no registration hunks are present
|
|
28
|
+
* Returns the empty array when no registration hunks are present, or
|
|
29
29
|
* when the registration hunks do not mention any component-shaped
|
|
30
|
-
* paths
|
|
30
|
+
* paths. That leaves the scan silent on the vast majority of patches
|
|
31
31
|
* (branding tweaks, behavioural fixes, module additions) so it only
|
|
32
32
|
* fires when a furnace-managed component is being newly registered.
|
|
33
33
|
*
|
|
@@ -38,7 +38,7 @@ export function collectPatchRegistrationReferences(patchBody) {
|
|
|
38
38
|
return [];
|
|
39
39
|
const refs = [];
|
|
40
40
|
// Key the file state off the `b/` path because that names the target
|
|
41
|
-
// side and is stable against renames. Only real hunk adds count
|
|
41
|
+
// side and is stable against renames. Only real hunk adds count.
|
|
42
42
|
// parseDiffSections has already filtered out header/metadata lines.
|
|
43
43
|
for (const section of parseDiffSections(patchBody)) {
|
|
44
44
|
if (!REGISTRATION_FILE_PATHS.has(section.targetPath))
|
|
@@ -59,7 +59,7 @@ export function collectPatchRegistrationReferences(patchBody) {
|
|
|
59
59
|
}
|
|
60
60
|
/**
|
|
61
61
|
* Per-source extractor. Each registration file has a distinct syntactic
|
|
62
|
-
* shape
|
|
62
|
+
* shape. We scope the match to that file so a jar.mn regex does not
|
|
63
63
|
* accidentally match a customElements.js line.
|
|
64
64
|
*/
|
|
65
65
|
function extractTargetPathsFromRegistrationLine(sourceFile, added) {
|
|
@@ -68,7 +68,7 @@ function extractTargetPathsFromRegistrationLine(sourceFile, added) {
|
|
|
68
68
|
// ` content/global/elements/moz-qa-panel.mjs (widgets/moz-qa-panel/moz-qa-panel.mjs)`
|
|
69
69
|
// The parenthesised second half is the repo-relative path Firefox's
|
|
70
70
|
// packaging system reads. Widget registrations always live under
|
|
71
|
-
// `widgets/<tag>/<file
|
|
71
|
+
// `widgets/<tag>/<file>`, and the enclosing tree is
|
|
72
72
|
// `toolkit/content/widgets/`. Reconstruct the engine-relative
|
|
73
73
|
// target path so callers can check it against patch bodies.
|
|
74
74
|
const widgetMatch = /\(\s*(widgets\/[^\s)]+)\s*\)/.exec(added);
|
|
@@ -5,29 +5,29 @@
|
|
|
5
5
|
/**
|
|
6
6
|
* Extracts the complete file content from a "new file" patch given a raw
|
|
7
7
|
* diff string already in memory. Callers with a patch file path should
|
|
8
|
-
* prefer {@link extractNewFileContent}
|
|
8
|
+
* prefer {@link extractNewFileContent}. This helper exists for code paths
|
|
9
9
|
* that already hold the diff (e.g. the in-flight export planner) and do
|
|
10
10
|
* not want to round-trip through the filesystem.
|
|
11
11
|
*
|
|
12
12
|
* @param diff - Raw unified-diff content
|
|
13
13
|
* @param targetFile - Optional target file to scope extraction to
|
|
14
14
|
* @returns The file content that the patch would create
|
|
15
|
-
* @throws PatchError for binary sections
|
|
15
|
+
* @throws PatchError for binary sections. A `GIT binary patch` payload is
|
|
16
16
|
* base85 (whose alphabet includes `+`), so "extract the + lines" would
|
|
17
17
|
* silently write garbage text over a binary target. Callers must treat
|
|
18
18
|
* binary new-file conflicts as unresolvable rather than auto-resolving.
|
|
19
19
|
*/
|
|
20
20
|
export declare function extractNewFileContentFromDiff(diff: string, targetFile?: string): string;
|
|
21
21
|
/**
|
|
22
|
-
* Projects every
|
|
22
|
+
* Projects every text new file a diff creates into a path → content map, for
|
|
23
23
|
* the cross-patch lint projections that build a synthetic patch-queue entry.
|
|
24
24
|
*
|
|
25
|
-
* Binary new files are
|
|
26
|
-
* forward-import rule, which scans content for import statements
|
|
27
|
-
* blob authors none, so omitting it contributes exactly what
|
|
28
|
-
* would. Refusing instead (which is what
|
|
25
|
+
* Binary new files are skipped rather than refused. The map feeds only the
|
|
26
|
+
* forward-import rule, which scans content for import statements, and a
|
|
27
|
+
* binary blob authors none, so omitting it contributes exactly what
|
|
28
|
+
* including it would. Refusing instead (which is what
|
|
29
29
|
* {@link extractNewFileContentFromDiff} correctly does for a caller that
|
|
30
|
-
* named
|
|
30
|
+
* named one file) made vendoring a new binary impossible: every projection
|
|
31
31
|
* site fed it every detected new file, so `export --order`, `re-export
|
|
32
32
|
* --scan --scan-file`, `patch move-files-into` and `patch split` all died on
|
|
33
33
|
* a file the export half had just written a valid `GIT binary patch` for.
|
|
@@ -9,14 +9,14 @@ import { isNewFileInPatch, parseDiffSections, parseHunksForFile } from './patch-
|
|
|
9
9
|
/**
|
|
10
10
|
* Extracts the complete file content from a "new file" patch given a raw
|
|
11
11
|
* diff string already in memory. Callers with a patch file path should
|
|
12
|
-
* prefer {@link extractNewFileContent}
|
|
12
|
+
* prefer {@link extractNewFileContent}. This helper exists for code paths
|
|
13
13
|
* that already hold the diff (e.g. the in-flight export planner) and do
|
|
14
14
|
* not want to round-trip through the filesystem.
|
|
15
15
|
*
|
|
16
16
|
* @param diff - Raw unified-diff content
|
|
17
17
|
* @param targetFile - Optional target file to scope extraction to
|
|
18
18
|
* @returns The file content that the patch would create
|
|
19
|
-
* @throws PatchError for binary sections
|
|
19
|
+
* @throws PatchError for binary sections. A `GIT binary patch` payload is
|
|
20
20
|
* base85 (whose alphabet includes `+`), so "extract the + lines" would
|
|
21
21
|
* silently write garbage text over a binary target. Callers must treat
|
|
22
22
|
* binary new-file conflicts as unresolvable rather than auto-resolving.
|
|
@@ -37,7 +37,7 @@ export function extractNewFileContentFromDiff(diff, targetFile) {
|
|
|
37
37
|
*/
|
|
38
38
|
function contentFromSections(sections) {
|
|
39
39
|
// An empty new file is a legitimate git diff: `new file mode` with no
|
|
40
|
-
// hunks at all. It must extract as ''
|
|
40
|
+
// hunks at all. It must extract as '': the historical line-walker
|
|
41
41
|
// returned '\n' for it, creating a one-byte file that failed checksum
|
|
42
42
|
// and drift comparisons against the truly empty file the patch creates.
|
|
43
43
|
const hunks = sections.flatMap((section) => section.hunks);
|
|
@@ -61,15 +61,15 @@ function contentFromSections(sections) {
|
|
|
61
61
|
return hasNoNewlineMarker ? result : result + '\n';
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
|
-
* Projects every
|
|
64
|
+
* Projects every text new file a diff creates into a path → content map, for
|
|
65
65
|
* the cross-patch lint projections that build a synthetic patch-queue entry.
|
|
66
66
|
*
|
|
67
|
-
* Binary new files are
|
|
68
|
-
* forward-import rule, which scans content for import statements
|
|
69
|
-
* blob authors none, so omitting it contributes exactly what
|
|
70
|
-
* would. Refusing instead (which is what
|
|
67
|
+
* Binary new files are skipped rather than refused. The map feeds only the
|
|
68
|
+
* forward-import rule, which scans content for import statements, and a
|
|
69
|
+
* binary blob authors none, so omitting it contributes exactly what
|
|
70
|
+
* including it would. Refusing instead (which is what
|
|
71
71
|
* {@link extractNewFileContentFromDiff} correctly does for a caller that
|
|
72
|
-
* named
|
|
72
|
+
* named one file) made vendoring a new binary impossible: every projection
|
|
73
73
|
* site fed it every detected new file, so `export --order`, `re-export
|
|
74
74
|
* --scan --scan-file`, `patch move-files-into` and `patch split` all died on
|
|
75
75
|
* a file the export half had just written a valid `GIT binary patch` for.
|
|
@@ -134,7 +134,7 @@ export function applyPatchTextToContent(content, patchContent, targetFile) {
|
|
|
134
134
|
// The "no newline at end" marker applies to the last hunk in file order
|
|
135
135
|
// (highest oldStart), which is the *first* hunk in our reverse-sorted array.
|
|
136
136
|
// We read the new-side flag because the output we produce corresponds to
|
|
137
|
-
// the new side
|
|
137
|
+
// the new side. Asymmetric diffs (old lacks newline, new has one, or
|
|
138
138
|
// vice versa) would otherwise disagree with `git apply`.
|
|
139
139
|
const lastHunkNoNewline = sortedHunks[0]?.noNewlineAtEndNew ?? false;
|
|
140
140
|
for (const hunk of sortedHunks) {
|
|
@@ -158,10 +158,10 @@ export function applyPatchTextToContent(content, patchContent, targetFile) {
|
|
|
158
158
|
throw new PatchError(`Patch hunk header mismatch for ${targetFile}: header says ${hunk.oldCount} old lines but body has ${actualOldCount}`, targetFile);
|
|
159
159
|
}
|
|
160
160
|
// Replace the old lines with new lines. Unified-diff convention: for a
|
|
161
|
-
// pure-insertion hunk (`@@ -N,0 +M,k @@`), N names the line
|
|
162
|
-
// insertion point, so content is spliced at index N (after line N)
|
|
161
|
+
// pure-insertion hunk (`@@ -N,0 +M,k @@`), N names the line before the
|
|
162
|
+
// insertion point, so content is spliced at index N (after line N).
|
|
163
163
|
// `N - 1` inserted one line too early, and `@@ -0,0` (insert at top of
|
|
164
|
-
// file) produced splice(-1, …), which inserts before the
|
|
164
|
+
// file) produced splice(-1, …), which inserts before the last element.
|
|
165
165
|
const startIndex = hunk.oldCount === 0 ? hunk.oldStart : hunk.oldStart - 1;
|
|
166
166
|
// Verify context lines match before applying
|
|
167
167
|
let verifyIndex = startIndex;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*
|
|
4
4
|
* Best-effort: a missing `ps`, an exited process, or an unparseable field
|
|
5
5
|
* yields `undefined`, which callers must render as "unknown" rather than as
|
|
6
|
-
* zero
|
|
6
|
+
* zero. Reporting a live build as having used no CPU would invert the very
|
|
7
7
|
* diagnosis this exists for.
|
|
8
8
|
*
|
|
9
9
|
* @param pid - Process to inspect
|
|
@@ -3,12 +3,12 @@
|
|
|
3
3
|
* Accumulated-CPU-time probe for a single PID.
|
|
4
4
|
*
|
|
5
5
|
* Exists to answer the one question `kill(pid, 0)` cannot: a lock holder
|
|
6
|
-
* that
|
|
7
|
-
* sessions on one checkout diagnosed exactly this by hand
|
|
8
|
-
* near-zero CPU is hung, not working"
|
|
6
|
+
* that exists may still be wedged. A downstream fork running five concurrent
|
|
7
|
+
* sessions on one checkout diagnosed exactly this by hand ("a holder at
|
|
8
|
+
* near-zero CPU is hung, not working") after a queue stalled behind a
|
|
9
9
|
* command that had consumed 0.3 s of CPU in eleven minutes.
|
|
10
10
|
*
|
|
11
|
-
* It is reported as
|
|
11
|
+
* It is reported as evidence, never as a verdict. A legitimately slow holder
|
|
12
12
|
* can also sit at low CPU while blocked on I/O or on a child process, so
|
|
13
13
|
* nothing keys a refusal, a kill, or a lock steal off this number.
|
|
14
14
|
*/
|
|
@@ -19,7 +19,7 @@ import { parsePsDuration } from '../utils/ps-duration.js';
|
|
|
19
19
|
*
|
|
20
20
|
* Best-effort: a missing `ps`, an exited process, or an unparseable field
|
|
21
21
|
* yields `undefined`, which callers must render as "unknown" rather than as
|
|
22
|
-
* zero
|
|
22
|
+
* zero. Reporting a live build as having used no CPU would invert the very
|
|
23
23
|
* diagnosis this exists for.
|
|
24
24
|
*
|
|
25
25
|
* @param pid - Process to inspect
|
|
@@ -12,11 +12,11 @@ export type RebasePatchStatus = 'pending' | 'applied-clean' | 'applied-fuzz' | '
|
|
|
12
12
|
* A discriminated union on `status`, so a payload can only be present on the
|
|
13
13
|
* status it belongs to. A flat-optionals shape makes
|
|
14
14
|
* `{ status: 'resolved', error, conflictingFiles }` representable, and
|
|
15
|
-
* `rebase --continue` will write it
|
|
15
|
+
* `rebase --continue` will write it, flipping the status without clearing
|
|
16
16
|
* the failure payload, then persisting that to the session file.
|
|
17
17
|
*
|
|
18
|
-
* The on-disk validator (`isValidPatchEntry`) is
|
|
19
|
-
*
|
|
18
|
+
* The on-disk validator (`isValidPatchEntry`) is not tightened to
|
|
19
|
+
* match, on purpose. The session file carries no schema version, so a stricter
|
|
20
20
|
* validator would reject an older file mid-rebase, where the only remedies
|
|
21
21
|
* discard the operator's in-progress conflict resolution. Instead
|
|
22
22
|
* {@link normalizeEntry} drops payload that does not belong to the status on
|
|
@@ -59,9 +59,9 @@ export declare function getRebaseSessionPath(projectRoot: string): string;
|
|
|
59
59
|
* discriminated-union form rather than collapsing three states into `null`.
|
|
60
60
|
*
|
|
61
61
|
* Distinguishing `present: false` from `present: true, valid: false` is
|
|
62
|
-
*
|
|
62
|
+
* important. Collapsing both to `null` while reporting liveness from
|
|
63
63
|
* `pathExists` alone wedges the operator in a closed cycle: `rebase` says
|
|
64
|
-
* "already in progress
|
|
64
|
+
* "already in progress, use --continue or --abort", and both of those say
|
|
65
65
|
* "no rebase session in progress", with no CLI path deleting the file and no
|
|
66
66
|
* message naming it.
|
|
67
67
|
*/
|
|
@@ -86,8 +86,8 @@ export type RebaseSessionRead = {
|
|
|
86
86
|
* that read mean `absent`. A pathExists pre-probe both races deletion (a
|
|
87
87
|
* file removed between probe and read misreports an absent session as
|
|
88
88
|
* corrupt) and swallows EACCES (an unreadable `.fireforge/` misreports a
|
|
89
|
-
* session as absent)
|
|
90
|
-
* markers.
|
|
89
|
+
* session as absent). It is the same failure `readTreeMarker` avoids for
|
|
90
|
+
* tree markers.
|
|
91
91
|
*/
|
|
92
92
|
export declare function readRebaseSession(projectRoot: string): Promise<RebaseSessionRead>;
|
|
93
93
|
/**
|
|
@@ -29,9 +29,9 @@ const REBASE_PATCH_STATUSES = [
|
|
|
29
29
|
/**
|
|
30
30
|
* Drops payload that does not belong to an entry's status.
|
|
31
31
|
*
|
|
32
|
-
* Applied on read so a session written by an older FireForge
|
|
32
|
+
* Applied on read so a session written by an older FireForge, where
|
|
33
33
|
* `rebase --continue` left `error`/`conflictingFiles` on a now-`resolved`
|
|
34
|
-
* entry
|
|
34
|
+
* entry, loads cleanly and is corrected, instead of being refused by a
|
|
35
35
|
* stricter validator mid-rebase.
|
|
36
36
|
*
|
|
37
37
|
* @param entry - A structurally valid entry, possibly carrying stale payload
|
|
@@ -74,28 +74,28 @@ function isValidOptionalProduct(value) {
|
|
|
74
74
|
}
|
|
75
75
|
/**
|
|
76
76
|
* Validates a session file against the shape the rebase commands actually
|
|
77
|
-
* consume
|
|
77
|
+
* consume, not merely against broad field types.
|
|
78
78
|
*
|
|
79
79
|
* A looser predicate that checks six `typeof`s and nothing else admits
|
|
80
80
|
* sessions the resume path then acts on. `patches: [null]` reaches
|
|
81
81
|
* `patch-loop.ts`, which reads `.filename` off each entry and hands it to
|
|
82
82
|
* `stampPatchVersions`. A `currentIndex` of `NaN` (legal for
|
|
83
83
|
* `typeof === 'number'`) makes the resume loop run zero iterations and
|
|
84
|
-
* report success
|
|
84
|
+
* report success. A negative one indexes out of range in `continue.ts`.
|
|
85
85
|
* `toVersion: ""` passes `isString` and is stamped verbatim onto every
|
|
86
86
|
* Furnace override's `baseVersion`. `fromProduct`/`toProduct` go unchecked
|
|
87
87
|
* despite being typed `FirefoxProduct`.
|
|
88
88
|
*
|
|
89
89
|
* The session file is written only by `rebase/index.ts` from validated CLI
|
|
90
90
|
* and config values, so every one of these is a corrupt-file or hand-edit
|
|
91
|
-
* case
|
|
91
|
+
* case, which is exactly what this predicate exists to catch.
|
|
92
92
|
*/
|
|
93
93
|
function isValidSession(data) {
|
|
94
94
|
if (!isObject(data))
|
|
95
95
|
return false;
|
|
96
96
|
if (!isString(data['startedAt']) || Number.isNaN(Date.parse(data['startedAt'])))
|
|
97
97
|
return false;
|
|
98
|
-
// 4 is git's own minimum abbreviation length
|
|
98
|
+
// 4 is git's own minimum abbreviation length. 40/64 are full SHA-1/SHA-256.
|
|
99
99
|
if (!isString(data['preRebaseCommit']) || !/^[0-9a-f]{4,64}$/i.test(data['preRebaseCommit'])) {
|
|
100
100
|
return false;
|
|
101
101
|
}
|
|
@@ -127,8 +127,8 @@ function isValidSession(data) {
|
|
|
127
127
|
* that read mean `absent`. A pathExists pre-probe both races deletion (a
|
|
128
128
|
* file removed between probe and read misreports an absent session as
|
|
129
129
|
* corrupt) and swallows EACCES (an unreadable `.fireforge/` misreports a
|
|
130
|
-
* session as absent)
|
|
131
|
-
* markers.
|
|
130
|
+
* session as absent). It is the same failure `readTreeMarker` avoids for
|
|
131
|
+
* tree markers.
|
|
132
132
|
*/
|
|
133
133
|
export async function readRebaseSession(projectRoot) {
|
|
134
134
|
const path = getRebaseSessionPath(projectRoot);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared result shape for manifest registration operations, split out of
|
|
3
3
|
* the `manifest-register.ts` barrel so the `register-*` leaf modules can
|
|
4
|
-
* import it without importing the barrel that re-exports them
|
|
4
|
+
* import it without importing the barrel that re-exports them. That
|
|
5
5
|
* type-only back-edge made the registration dependency graph cyclic.
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Shared result shape for manifest registration operations, split out of
|
|
4
4
|
* the `manifest-register.ts` barrel so the `register-*` leaf modules can
|
|
5
|
-
* import it without importing the barrel that re-exports them
|
|
5
|
+
* import it without importing the barrel that re-exports them. That
|
|
6
6
|
* type-only back-edge made the registration dependency graph cyclic.
|
|
7
7
|
*/
|
|
8
8
|
export {};
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* - creating a directory `moz.build` (license header + the requested list
|
|
9
9
|
* directive) and wiring the parent chain's `DIRS` entries up to the
|
|
10
|
-
* nearest existing moz.build
|
|
10
|
+
* nearest existing moz.build.
|
|
11
11
|
* - wiring an `XPCSHELL_TESTS_MANIFESTS` entry for a (possibly freshly
|
|
12
12
|
* created) `xpcshell.toml` into the nearest existing moz.build.
|
|
13
13
|
*
|
|
@@ -33,7 +33,7 @@ export declare function upsertMozBuildListEntry(content: string, directive: stri
|
|
|
33
33
|
* Ensures every parent directory between `childRelDir` and the nearest
|
|
34
34
|
* existing moz.build carries a `DIRS` entry pointing at the next segment
|
|
35
35
|
* down, creating intermediate moz.build files as needed. Walks upward
|
|
36
|
-
* from the child's parent
|
|
36
|
+
* from the child's parent. Throws when no moz.build exists anywhere up
|
|
37
37
|
* to the engine root (an engine checkout always has one at the root, so
|
|
38
38
|
* this indicates a bogus path).
|
|
39
39
|
*/
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
*
|
|
9
9
|
* - creating a directory `moz.build` (license header + the requested list
|
|
10
10
|
* directive) and wiring the parent chain's `DIRS` entries up to the
|
|
11
|
-
* nearest existing moz.build
|
|
11
|
+
* nearest existing moz.build.
|
|
12
12
|
* - wiring an `XPCSHELL_TESTS_MANIFESTS` entry for a (possibly freshly
|
|
13
13
|
* created) `xpcshell.toml` into the nearest existing moz.build.
|
|
14
14
|
*
|
|
@@ -25,7 +25,7 @@ import { findAlphabeticalMozBuildPosition } from './moz-manifest-helpers.js';
|
|
|
25
25
|
import { tokenizeMozBuildList } from './moz-manifest-tokenizers.js';
|
|
26
26
|
/**
|
|
27
27
|
* moz.build files use Firefox's canonical MPL-2.0 hash-comment header
|
|
28
|
-
* regardless of the fork's own project license
|
|
28
|
+
* regardless of the fork's own project license. They live in the engine
|
|
29
29
|
* tree among upstream MPL files.
|
|
30
30
|
*/
|
|
31
31
|
function mozBuildHeader() {
|
|
@@ -58,7 +58,7 @@ export function upsertMozBuildListEntry(content, directive, value) {
|
|
|
58
58
|
* Ensures every parent directory between `childRelDir` and the nearest
|
|
59
59
|
* existing moz.build carries a `DIRS` entry pointing at the next segment
|
|
60
60
|
* down, creating intermediate moz.build files as needed. Walks upward
|
|
61
|
-
* from the child's parent
|
|
61
|
+
* from the child's parent. Throws when no moz.build exists anywhere up
|
|
62
62
|
* to the engine root (an engine checkout always has one at the root, so
|
|
63
63
|
* this indicates a bogus path).
|
|
64
64
|
*/
|
|
@@ -12,7 +12,7 @@ import type { RegisterResult } from './register-result.js';
|
|
|
12
12
|
* freshly registered file at the wrong column and produces avoidable
|
|
13
13
|
* formatting churn, since adjacent Firefox entries are typically padded to a
|
|
14
14
|
* wider column. Returns `undefined` when no existing entries provide an
|
|
15
|
-
* alignment signal
|
|
15
|
+
* alignment signal. Callers fall back to the four-space default.
|
|
16
16
|
*/
|
|
17
17
|
export declare function measureSourceColumn(content: string): number | undefined;
|
|
18
18
|
/**
|
|
@@ -30,7 +30,7 @@ export declare function buildEntry(name: string, sourceColumn: number | undefine
|
|
|
30
30
|
* skin/classic/browser/{name}.css (../shared/{name}.css)
|
|
31
31
|
*
|
|
32
32
|
* The gap between target and source is sized to align with adjacent
|
|
33
|
-
* entries when the manifest already uses a wider column
|
|
34
|
-
* a four-space minimum otherwise.
|
|
33
|
+
* entries when the manifest already uses a wider column. It falls back
|
|
34
|
+
* to a four-space minimum otherwise.
|
|
35
35
|
*/
|
|
36
36
|
export declare function registerSharedCSS(engineDir: string, fileName: string, after?: string, dryRun?: boolean): Promise<RegisterResult>;
|
|
@@ -30,7 +30,7 @@ const MIN_SOURCE_GAP = 4;
|
|
|
30
30
|
* freshly registered file at the wrong column and produces avoidable
|
|
31
31
|
* formatting churn, since adjacent Firefox entries are typically padded to a
|
|
32
32
|
* wider column. Returns `undefined` when no existing entries provide an
|
|
33
|
-
* alignment signal
|
|
33
|
+
* alignment signal. Callers fall back to the four-space default.
|
|
34
34
|
*/
|
|
35
35
|
export function measureSourceColumn(content) {
|
|
36
36
|
const lines = content.split('\n');
|
|
@@ -75,8 +75,8 @@ export function buildEntry(name, sourceColumn) {
|
|
|
75
75
|
* skin/classic/browser/{name}.css (../shared/{name}.css)
|
|
76
76
|
*
|
|
77
77
|
* The gap between target and source is sized to align with adjacent
|
|
78
|
-
* entries when the manifest already uses a wider column
|
|
79
|
-
* a four-space minimum otherwise.
|
|
78
|
+
* entries when the manifest already uses a wider column. It falls back
|
|
79
|
+
* to a four-space minimum otherwise.
|
|
80
80
|
*/
|
|
81
81
|
export async function registerSharedCSS(engineDir, fileName, after, dryRun = false) {
|
|
82
82
|
const manifest = 'browser/themes/shared/jar.inc.mn';
|
|
@@ -90,7 +90,7 @@ export async function registerSharedCSS(engineDir, fileName, after, dryRun = fal
|
|
|
90
90
|
const entry = buildEntry(name, sourceColumn);
|
|
91
91
|
// Idempotency check. `furnace chrome-doc create` writes its CSS as a
|
|
92
92
|
// `content/browser/<name>.css` entry rather than the canonical
|
|
93
|
-
// `skin/classic/browser/<name>.css` form `register` produces
|
|
93
|
+
// `skin/classic/browser/<name>.css` form `register` produces. Recognise
|
|
94
94
|
// both shapes so a follow-up `register` invocation against an
|
|
95
95
|
// already-chrome-doc-registered file reports `skipped` instead of
|
|
96
96
|
// appending a duplicate `skin/classic/browser/...` row.
|