@hominis/fireforge 0.31.0 → 0.33.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 (64) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/dist/src/commands/export-all.js +4 -1
  3. package/dist/src/commands/export-shared.js +10 -1
  4. package/dist/src/commands/export.js +5 -1
  5. package/dist/src/commands/lint-per-patch.d.ts +2 -0
  6. package/dist/src/commands/lint-per-patch.js +206 -44
  7. package/dist/src/commands/lint.js +100 -7
  8. package/dist/src/commands/patch/split-plan.d.ts +18 -2
  9. package/dist/src/commands/patch/split-plan.js +90 -16
  10. package/dist/src/commands/patch/split.js +12 -3
  11. package/dist/src/commands/re-export-files.js +4 -1
  12. package/dist/src/commands/re-export.js +8 -1
  13. package/dist/src/commands/test-run.d.ts +10 -0
  14. package/dist/src/commands/test-run.js +13 -4
  15. package/dist/src/commands/test.js +46 -7
  16. package/dist/src/commands/token.js +12 -1
  17. package/dist/src/commands/typecheck.js +35 -0
  18. package/dist/src/core/build-prepare.js +23 -3
  19. package/dist/src/core/config-validate.js +52 -0
  20. package/dist/src/core/furnace-apply-dry-run.d.ts +17 -0
  21. package/dist/src/core/furnace-apply-dry-run.js +105 -0
  22. package/dist/src/core/furnace-apply-ftl.d.ts +12 -0
  23. package/dist/src/core/furnace-apply-ftl.js +97 -1
  24. package/dist/src/core/furnace-apply-helpers.js +10 -80
  25. package/dist/src/core/furnace-jsconfig.js +22 -2
  26. package/dist/src/core/git-base.d.ts +15 -0
  27. package/dist/src/core/git-base.js +32 -0
  28. package/dist/src/core/git-diff.d.ts +8 -0
  29. package/dist/src/core/git-diff.js +224 -59
  30. package/dist/src/core/git-file-ops.d.ts +39 -0
  31. package/dist/src/core/git-file-ops.js +82 -1
  32. package/dist/src/core/mach-resource-shim.d.ts +21 -0
  33. package/dist/src/core/mach-resource-shim.js +92 -0
  34. package/dist/src/core/mach.d.ts +17 -0
  35. package/dist/src/core/mach.js +30 -2
  36. package/dist/src/core/manifest-helpers.js +29 -4
  37. package/dist/src/core/patch-lint-checkjs.d.ts +75 -21
  38. package/dist/src/core/patch-lint-checkjs.js +213 -67
  39. package/dist/src/core/patch-lint-cross.d.ts +31 -0
  40. package/dist/src/core/patch-lint-cross.js +83 -63
  41. package/dist/src/core/patch-lint-css.d.ts +23 -0
  42. package/dist/src/core/patch-lint-css.js +172 -0
  43. package/dist/src/core/patch-lint-reexports.d.ts +1 -1
  44. package/dist/src/core/patch-lint-reexports.js +1 -1
  45. package/dist/src/core/patch-lint.d.ts +34 -11
  46. package/dist/src/core/patch-lint.js +19 -163
  47. package/dist/src/core/test-harness-crash.d.ts +6 -3
  48. package/dist/src/core/test-harness-crash.js +32 -4
  49. package/dist/src/core/test-xpcshell-retry.d.ts +9 -2
  50. package/dist/src/core/test-xpcshell-retry.js +9 -4
  51. package/dist/src/core/token-dark-mode.d.ts +9 -0
  52. package/dist/src/core/token-dark-mode.js +1 -1
  53. package/dist/src/core/token-docs.d.ts +32 -0
  54. package/dist/src/core/token-docs.js +101 -0
  55. package/dist/src/core/token-manager.d.ts +8 -0
  56. package/dist/src/core/token-manager.js +77 -95
  57. package/dist/src/core/token-variant.d.ts +39 -0
  58. package/dist/src/core/token-variant.js +141 -0
  59. package/dist/src/core/typecheck-shim.d.ts +3 -1
  60. package/dist/src/core/typecheck-shim.js +43 -3
  61. package/dist/src/core/typecheck.js +56 -28
  62. package/dist/src/types/commands/options.d.ts +22 -0
  63. package/dist/src/types/config.d.ts +24 -2
  64. package/package.json +3 -3
@@ -129,6 +129,19 @@ export interface TypecheckConfig {
129
129
  * built-in shim first, extraShim second — augment, don't redeclare.
130
130
  */
131
131
  extraShim?: string;
132
+ /**
133
+ * Per-project override of {@link extraShim}, keyed by the project's path
134
+ * exactly as it appears in {@link projects}. A string value points the
135
+ * project at a different `.d.ts`; `null` opts the project out of the shared
136
+ * extra shim entirely (it absorbs only the built-in Firefox globals shim).
137
+ *
138
+ * Needed because the shared shim is injected into every project: a shim hub
139
+ * that references Gecko declaration libs (`lib.gecko.dom.d.ts`, …) is wanted
140
+ * by projects that include it but collides with a project that narrows
141
+ * `lib: ["ES2024", "DOM"]` (Element/Node identity splits, nsIPrincipal
142
+ * mismatch). A narrowed project sets `null` here to stay clean.
143
+ */
144
+ projectOverrides?: Record<string, string | null>;
132
145
  }
133
146
  /**
134
147
  * Wire command configuration.
@@ -145,8 +158,15 @@ export type PatchLintSeverityGate = 'off' | 'warning' | 'error';
145
158
  /**
146
159
  * Allowlisted TypeScript `compilerOptions` overrides for the patch
147
160
  * `checkJs` pass when {@link PatchLintConfig.checkJsStrict} is true.
148
- * Merged after the strict preset; only boolean flags — no `paths`,
149
- * `rootDir`, or other options that would fight the synthetic program.
161
+ * Merged after the strict preset.
162
+ *
163
+ * Boolean flags tighten the strict preset. The optional `paths` mapping
164
+ * (each pattern may carry a single `*`) lets patch-owned modules be typed
165
+ * from their real sources — e.g. `"resource:///modules/foo/*": ["./*"]` —
166
+ * resolved host-side against the engine directory, so no `baseUrl` is set
167
+ * (TS5090-safe) and no hand-generated ambient stub shim is needed. Other
168
+ * options (`rootDir`, etc.) stay disallowed: they would fight the
169
+ * synthetic program.
150
170
  */
151
171
  export interface PatchLintCheckJsCompilerOptions {
152
172
  strictNullChecks?: boolean;
@@ -157,6 +177,8 @@ export interface PatchLintCheckJsCompilerOptions {
157
177
  strictPropertyInitialization?: boolean;
158
178
  noUnusedLocals?: boolean;
159
179
  noUnusedParameters?: boolean;
180
+ /** Module-resolution `paths` mapping (pattern → targets, engine-relative). */
181
+ paths?: Record<string, string[]>;
160
182
  }
161
183
  /**
162
184
  * Configuration for patch lint rules.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hominis/fireforge",
3
- "version": "0.31.0",
3
+ "version": "0.33.0",
4
4
  "description": "FireForge — a build tool for customizing Firefox",
5
5
  "type": "module",
6
6
  "main": "./dist/src/index.js",
@@ -63,7 +63,7 @@
63
63
  "devDependencies": {
64
64
  "@eslint/js": "^10.0.0",
65
65
  "@types/estree": "^1.0.8",
66
- "@types/node": "^25.5.2",
66
+ "@types/node": "^26.0.0",
67
67
  "@vitest/coverage-v8": "^4.1.2",
68
68
  "dpdm": "4.2.0",
69
69
  "eslint": "^10.0.0",
@@ -72,7 +72,7 @@
72
72
  "eslint-plugin-simple-import-sort": "^13.0.0",
73
73
  "fast-check": "^4.6.0",
74
74
  "husky": "^9.1.7",
75
- "knip": "6.16.1",
75
+ "knip": "6.17.1",
76
76
  "lint-staged": "^17.0.4",
77
77
  "prettier": "^3.7.4",
78
78
  "tsx": "^4.7.0",