@datamoc/mw_games 0.8.2 → 0.9.0-alpha

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
@@ -7,6 +7,21 @@ the public API may still change between minor versions.
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.9.0-alpha] - 2026-09-13
11
+
12
+ ### Changed
13
+
14
+ - MWL authoring syntax is now JSON5 instead of the WML-inspired tag/`key=value`
15
+ form: every `.mwl` file is a top-level array of `{ tag, ...attributes, children }`
16
+ nodes, values are real JSON5 numbers, booleans and strings (stringified back to
17
+ the `Record<string, string>` the schema, compiler and runtime already see), and
18
+ translatable strings are marked `_("...")` via a preprocessor rewrite. The
19
+ `#define`/`#include`/`#ifdef` textual pass is unchanged. The `"""..."""` block
20
+ form (item 317) is superseded by JSON5 `\n` escapes and backslash line
21
+ continuations. Clean cutover: all fixtures, examples, tests and doc examples
22
+ are migrated, the old tag parser is deleted, and `json5` (pure JS, no native
23
+ build) is a runtime dependency.
24
+
10
25
  ## [0.8.2] - 2026-09-13
11
26
 
12
27
  ### Added
package/README.md CHANGED
@@ -402,9 +402,12 @@ The optional 3D group is now implemented without changing the existing 2D entry
402
402
 
403
403
  ## MWL
404
404
 
405
- MWL is the framework's declarative, WML-inspired authoring layer. It describes
406
- game data and commands while `mwg` remains responsible for execution, rendering,
407
- input, audio, and saves. MWL is a new language, not a WML compatibility layer.
405
+ MWL is the framework's declarative, WML-inspired authoring layer. Content files
406
+ are JSON5: a top-level array of `{ tag, ...attributes, children }` nodes, with
407
+ real numbers and booleans for scalar values and `_("...")` marking translatable
408
+ strings. It describes game data and commands while `mwg` remains responsible for
409
+ execution, rendering, input, audio, and saves. MWL is a new language, not a WML
410
+ compatibility layer.
408
411
  The Wesnoth port can nevertheless use its native `.cfg` files as build inputs:
409
412
  the port-owned WML front end parses them, the adapter converts the supported
410
413
  nodes to MWL, and the normal MWL compiler emits the runtime module.
@@ -461,7 +464,7 @@ reported as warnings. The output directory is safe to regenerate: its extracted
461
464
  CSS `url(data:...)` values and HTML `srcset` candidates are handled too, including
462
465
  their density descriptors.
463
466
 
464
- Translation messages are the values marked `_ "..."` in the source; the
467
+ Translation messages are the values marked `_("...")` in the source; the
465
468
  extracted catalog matches `@datamoc/mw_games/i18n`. Hooks are referenced as
466
469
  `type:name`, declared in a manifest, and bundled with esbuild, which a game
467
470
  project installs itself (`npm install --save-dev esbuild`). The framework does