@swiftuijs/twill-export 0.1.1 → 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 +9 -1
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # <img src="https://twill.evecalm.com/logo.png" alt="Twill hummingbird" align="right" width="40" height="40" /> Twill source export
2
2
 
3
- `@swiftuijs/twill-export` exports a checked source project to native TS/TSX. It supplies the optional `twill export` subcommand and a programmatic API; applications do not ship it. Node 20.19+ or 22.12+ is required.
3
+ `@swiftuijs/twill-export` exports checked Twill projects to native TS/TSX. Twill is a TypeScript-based language with Swift-inspired syntax extensions. The package supplies the optional `twill export` subcommand and a programmatic API; applications do not ship it. Node 20.19+ or 22.12+ is required.
4
4
 
5
5
  Install the compiler and optional export package into your application, then run:
6
6
 
@@ -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.1",
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.1",
43
- "@swiftuijs/twill-formatter": "0.1.1"
42
+ "@swiftuijs/twill": "0.2.0",
43
+ "@swiftuijs/twill-formatter": "0.2.0"
44
44
  },
45
45
  "devDependencies": {
46
46
  "vite": "^8.3.2",