@hominis/fireforge 0.11.2 → 0.13.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +79 -26
  3. package/dist/src/commands/bootstrap-checks.d.ts +16 -0
  4. package/dist/src/commands/bootstrap-checks.js +66 -0
  5. package/dist/src/commands/bootstrap.js +27 -9
  6. package/dist/src/commands/doctor.d.ts +8 -0
  7. package/dist/src/commands/doctor.js +7 -1
  8. package/dist/src/commands/export-flow.js +3 -11
  9. package/dist/src/commands/export-shared.d.ts +2 -1
  10. package/dist/src/commands/export-shared.js +7 -2
  11. package/dist/src/commands/furnace/create.js +1 -1
  12. package/dist/src/commands/furnace/deploy.js +1 -1
  13. package/dist/src/commands/furnace/override.js +1 -1
  14. package/dist/src/commands/furnace/refresh.js +1 -1
  15. package/dist/src/commands/furnace/remove.js +1 -1
  16. package/dist/src/commands/furnace/rename.js +1 -1
  17. package/dist/src/commands/furnace/scan.js +1 -1
  18. package/dist/src/commands/lint.js +12 -3
  19. package/dist/src/commands/patch/delete.js +1 -15
  20. package/dist/src/commands/patch/reorder.js +1 -9
  21. package/dist/src/commands/re-export.js +1 -17
  22. package/dist/src/commands/verify.js +2 -2
  23. package/dist/src/core/ast-utils.d.ts +10 -0
  24. package/dist/src/core/ast-utils.js +18 -0
  25. package/dist/src/core/config-paths.d.ts +2 -2
  26. package/dist/src/core/config-paths.js +3 -0
  27. package/dist/src/core/config-validate.js +21 -3
  28. package/dist/src/core/file-lock.js +39 -2
  29. package/dist/src/core/furnace-apply.js +2 -1
  30. package/dist/src/core/furnace-config.js +6 -2
  31. package/dist/src/core/patch-apply.js +26 -4
  32. package/dist/src/core/patch-lint-checkjs.d.ts +21 -0
  33. package/dist/src/core/patch-lint-checkjs.js +225 -0
  34. package/dist/src/core/patch-lint-cross.d.ts +1 -0
  35. package/dist/src/core/patch-lint-cross.js +7 -0
  36. package/dist/src/core/patch-lint-jsdoc.d.ts +21 -0
  37. package/dist/src/core/patch-lint-jsdoc.js +259 -0
  38. package/dist/src/core/patch-lint-ownership.d.ts +25 -0
  39. package/dist/src/core/patch-lint-ownership.js +43 -0
  40. package/dist/src/core/patch-lint.d.ts +14 -3
  41. package/dist/src/core/patch-lint.js +116 -47
  42. package/dist/src/core/patch-manifest-resolve.d.ts +5 -0
  43. package/dist/src/core/patch-manifest-resolve.js +12 -0
  44. package/dist/src/core/patch-manifest.d.ts +1 -0
  45. package/dist/src/core/patch-manifest.js +1 -0
  46. package/dist/src/types/commands/patches.d.ts +2 -2
  47. package/dist/src/types/config.d.ts +11 -0
  48. package/dist/src/utils/paths.js +3 -1
  49. package/package.json +1 -1
@@ -8,5 +8,6 @@
8
8
  export { rebuildPatchesManifest, validatePatchesManifestConsistency, } from './patch-manifest-consistency.js';
9
9
  export { addPatchToManifest, loadPatchesManifest, PatchDeleteRollbackError, PATCHES_MANIFEST, removePatchFileAndManifest, removePatchFromManifest, renumberPatchesInManifest, savePatchesManifest, } from './patch-manifest-io.js';
10
10
  export { checkVersionCompatibility, findPatchesAffectingFile, getClaimedFiles, stampPatchVersions, validatePatchIntegrity, } from './patch-manifest-query.js';
11
+ export { resolvePatchIdentifier } from './patch-manifest-resolve.js';
11
12
  export { validatePatchesManifest } from './patch-manifest-validate.js';
12
13
  //# sourceMappingURL=patch-manifest.js.map
@@ -94,6 +94,6 @@ export interface PatchLintIssue {
94
94
  fingerprint?: string;
95
95
  /** Human-readable description of the issue */
96
96
  message: string;
97
- /** Severity: errors block export, warnings are advisory */
98
- severity: 'error' | 'warning';
97
+ /** Severity: errors block export, warnings are advisory, notices are informational (not counted) */
98
+ severity: 'error' | 'warning' | 'notice';
99
99
  }
@@ -42,6 +42,8 @@ export interface FireForgeConfig {
42
42
  license?: ProjectLicense;
43
43
  /** Wire command configuration */
44
44
  wire?: WireConfig;
45
+ /** Patch lint configuration */
46
+ patchLint?: PatchLintConfig;
45
47
  }
46
48
  /**
47
49
  * Wire command configuration.
@@ -50,6 +52,15 @@ export interface WireConfig {
50
52
  /** Subscript directory relative to engine/. Default: "browser/base/content" */
51
53
  subscriptDir?: string;
52
54
  }
55
+ /**
56
+ * Configuration for patch lint rules.
57
+ */
58
+ export interface PatchLintConfig {
59
+ /** Enable TypeScript checkJs pass on patch-owned .sys.mjs files */
60
+ checkJs?: boolean;
61
+ /** File paths exempt from the raw-color-value check (exact or basename match) */
62
+ rawColorAllowlist?: string[];
63
+ }
53
64
  /**
54
65
  * Build mode for mach.
55
66
  */
@@ -12,6 +12,8 @@ export function isExplicitAbsolutePath(path) {
12
12
  }
13
13
  /** Resolves a candidate path and returns whether it stays within the given root. */
14
14
  export function isPathInsideRoot(root, candidate) {
15
+ if (candidate.includes('\0'))
16
+ return false;
15
17
  const resolvedRoot = resolve(root);
16
18
  const resolvedCandidate = isExplicitAbsolutePath(candidate)
17
19
  ? resolve(candidate)
@@ -24,7 +26,7 @@ export function isPathInsideRoot(root, candidate) {
24
26
  }
25
27
  /** Checks whether a relative path stays contained within an arbitrary root. */
26
28
  export function isContainedRelativePath(path) {
27
- if (isExplicitAbsolutePath(path)) {
29
+ if (isExplicitAbsolutePath(path) || path.includes('\0')) {
28
30
  return false;
29
31
  }
30
32
  return isPathInsideRoot(RELATIVE_PATH_ROOT, path);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hominis/fireforge",
3
- "version": "0.11.2",
3
+ "version": "0.13.0",
4
4
  "description": "FireForge — a build tool for customizing Firefox",
5
5
  "type": "module",
6
6
  "main": "./dist/src/index.js",