@vttforge/cli 0.10.1 → 0.12.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # @vttforge/cli
2
2
 
3
+ ## 0.12.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 3e57887: `vttforge lint`: Biome over the project, then the v14 audit. Biome ships as a dependency of the CLI with `lint/vttforge-biome.json`, so a scaffolded project lints and formats without installing or configuring anything; a `biome.json` at the project root replaces the shipped config. `--fix` writes the safe fixes and formats, `--no-audit` skips the audit, `--strict` makes any audit finding fail. The templates gain `lint` and `format` scripts that call it.
8
+
9
+ ## 0.11.0
10
+
11
+ ### Minor Changes
12
+
13
+ - 5aae89d: `vttforge migrate --data-models` writes a data model per `template.json` type: one class per type, one function per shared template that the types spread, the `documentTypes` block for the manifest and the registration for `init`. `--style plain` needs nothing installed; `--style sdk` builds on `@vttforge/core`. What it guessed (empty arrays, nulls, a template a type lists that is not defined) it reports.
14
+ - 4361bcd: What the first run over seven v13 projects taught the audit and the migrate command.
15
+
16
+ - `audit` gains `VTTF-AUDIT-017` (the jQuery `renderChatMessage` hook, removed in v15) and `VTTF-AUDIT-018` (a class on an Application v1 base, removed in v16).
17
+ - `VTTF-AUDIT-007` resolves the token attributes against `template.json` too, so a system that still declares its types there is not flagged for a bar that works.
18
+ - Both commands skip minified bundles (`*.min.js`): a vendored library is not the author's to fix.
19
+ - `migrate` rewrites `rollMode: <expression>` to `messageMode: Roll._mapLegacyRollMode(<expression>)` instead of asking, handles a template-literal deletion key such as `` [`flags.${id}.-=old`] ``, and notes every `renderChatMessage` handler.
20
+ - 89f9013: The bare v13 global aliases (`renderTemplate`, `ActorSheet`, `Actors`, `TextEditor`, `ChatLog` and about ninety more) warn on v14 and throw on v15. `vttforge audit` reports them as `VTTF-AUDIT-019`, and `vttforge migrate` renames each to its `foundry.*` path, which is the same object. A name the file declares or imports, an object key, a property, and a word inside a string are left alone.
21
+
22
+ ### Patch Changes
23
+
24
+ - 66aaf98: `vttforge migrate` no longer renames the keys of a Dialog button, or of a class body that happens to hold a context-menu entry. An entry is an object whose own keys include `callback` and `name` or `condition`; a button has `icon`, `label` and `callback`, and keeps `callback` on v14.
25
+
3
26
  ## 0.10.1
4
27
 
5
28
  ### Patch Changes
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @vttforge/cli
2
2
 
3
- Scaffold, dev loop, release build and audit for Foundry VTT v14+ systems and modules.
3
+ Scaffold, dev loop, release build, lint and audit for Foundry VTT v14+ systems and modules.
4
4
 
5
5
  ```bash
6
6
  pnpm create vttforge my-system # same as: npx @vttforge/cli init my-system
@@ -13,6 +13,7 @@ vttforge init <name> [--type system|module] [--lang ts|js] [--id] [--title] [--d
13
13
  [--author] [--license] [--yes] [--no-install] [--no-git]
14
14
  vttforge dev [--foundry-data <path>] [--port <n>]
15
15
  vttforge build
16
+ vttforge lint [dir] [--fix] [--no-audit] [--strict]
16
17
  vttforge audit [dir] [--json] [--strict]
17
18
  vttforge migrate [dir] [--write] [--json]
18
19
  ```
@@ -23,6 +24,8 @@ vttforge migrate [dir] [--write] [--json]
23
24
 
24
25
  **`build`** runs the production build and writes `<id>-<version>.zip` at the project root with the manifest at the top level, which is what foundryvtt.com expects. `LICENSE`, `README.md` and `CHANGELOG.md` go in when present.
25
26
 
27
+ **`lint`** runs Biome, which ships with the CLI, over the project with a shipped config (a `biome.json` at the project root replaces it), then the audit. `--fix` writes the safe fixes and formats.
28
+
26
29
  **`audit`** checks the manifest, the source and the templates against the v14 breakages that fail quietly: the `flags.hotReload` shape, the removed grid fields, the v12 `styles` shape, `HTMLField`/`FilePathField` paths missing from `documentTypes`, `TypeDataModel` without `prepareBaseData`, a bad `_addDataFieldMigrations` override, token attributes that do not point at a `{ value, max }` field, a sheet template that opens a `<form>` the sheet already is, a declared subtype with no name in any language file, a `template.json` that erases the metadata `system.json` declares for the same type, and the v13 code v14 broke or deprecated: bare `mergeObject`-style globals, `-=` update keys, `rollMode`, whole-array `CONFIG.statusEffects` assignment, `legacyTransferral`, numeric Active Effect modes. `--json` for machines; `--strict` exits non-zero on any finding rather than only on HIGH.
27
30
 
28
31
  **`migrate`** rewrites a v13 project for v14: the removed globals, `-=` keys, `rollMode`, context-menu keys, numeric effect modes, whole-array `CONFIG.statusEffects`, `legacyTransferral`, the core-sheet unregister lines, and the manifest's `type` and `compatibility`. It reports by default and writes with `--write`; what it will not decide it lists as needing one.