@swiftuijs/twill-export 0.1.2 → 0.2.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 (2) hide show
  1. package/README.md +8 -0
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -43,3 +43,11 @@ console.log(result.diagnostics, result.files, result.written);
43
43
  Source errors return diagnostics and `written: false`. Invalid destinations and unsupported export constructs throw. `--json` provides the same structured result; failures return a nonzero CLI status.
44
44
 
45
45
  [Guide](https://twill.evecalm.com/adoption) · [CLI reference](https://twill.evecalm.com/cli) · [Issues](https://github.com/swiftuijs/twill/issues) · MIT licensed · Built by [forth.ink](https://forth.ink).
46
+
47
+ ## Added in 0.2.0
48
+
49
+ Twill 0.2.0 adds `if const value = lookup() { use(value); }` with branch-local nullish bindings and native destructuring. Group trailing calls in initializers, following Swift’s condition boundary. It emits native branches without a helper, closure or optional wrapper. See [syntax](https://twill.evecalm.com/syntax#branch-nullish-bindings) and [RFC 0018](https://github.com/swiftuijs/twill/blob/main/docs/rfcs/0018-optional-branch-bindings.md).
50
+
51
+ Twill 0.2.0 includes associated-value enums and `match` expressions: `match (state) { case State.loaded({ value }): value; default: 0; }`. Named payload bindings and erased factory descriptors compile to native switches without calling factories. Native switch statements retain JS fallthrough; match and switch expressions return one result without fallthrough. Use the coordinated 0.2.0 packages and extension. Compiler, formatter, linter, highlighter, export and editor changes are validated together. See [syntax and compatibility](https://twill.evecalm.com/syntax#match-expressions) and [RFC 0016](https://github.com/swiftuijs/twill/blob/main/docs/rfcs/0016-pattern-matching.md).
52
+
53
+ The optional `runtime: "external"` compiler mode in 0.2.0 is preserved during export. Its native sources retain the versioned `@swiftuijs/twill-runtime` helper import; install that production dependency in the destination. Default inline export stays self-contained. Export does not copy dependencies or rewrite package manifests. See [runtime modes](https://twill.evecalm.com/runtime).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@swiftuijs/twill-export",
3
- "version": "0.1.2",
3
+ "version": "0.2.0",
4
4
  "description": "Export a checked Twill source project to formatted native TypeScript.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -39,8 +39,8 @@
39
39
  "prettier": "^3.9.9",
40
40
  "typescript": "5.9.3",
41
41
  "magic-string": "^1.4.2",
42
- "@swiftuijs/twill": "0.1.2",
43
- "@swiftuijs/twill-formatter": "0.1.2"
42
+ "@swiftuijs/twill": "0.2.0",
43
+ "@swiftuijs/twill-formatter": "0.2.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "vite": "^8.3.2",