@skillstech/thunderlang 1.5.0 → 1.6.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,3 +1,31 @@
1
+ # 1.6.0
2
+
3
+ - **Thunder write in Thunder's words.** `thunder write <file> --edit` (step edits: inputs, questions, Stops, steps,
4
+ answers, renames, in TypeScript, JavaScript, Python, and Go) now takes conditions, values, and steps the way Thunder
5
+ reads them: `"amount is at least 75 and not member"`, `"the length of value is below 2"`, `"name is nothing"`,
6
+ `Give …`, `Set … to …`, `Stop with "…"`. Each language gets its own form (`name is None`, `name == null`,
7
+ `name == nil`), and names are the code's own names said as words, matched in the function first, never from a
8
+ comment or docstring. Code is still accepted. A word with no fixed meaning in the language is refused, not guessed.
9
+ - **New in step edits:** `setValue` takes `toValue` (a name or expression, e.g. route a new input into a step);
10
+ steps inside `except` / `catch` and `finally` can be edited; `--edits <list.json|->` reads a list of edits; and the
11
+ MCP server offers `intent_write` (files and edits in, patch, new files, and proof out; nothing written to disk).
12
+ - **Fixes found by measuring on real code** (Flask, Click, Requests, httpx, rich, humanize, toolz): an `elif` whose
13
+ comparison changed got a second colon; removing a function's only step left an empty Python body (now `pass`); a
14
+ hex number (`0xFFFFFFFF`) was written as `4294967296xFFFFFFFF` (hex, octal, binary, and `1_000` now keep their
15
+ form, in step edits and rule edits); a word was matched to a name in a docstring; in a list of edits, a later
16
+ edit's line could land on a step an earlier edit inserted (lines now always mean the original file's lines); and
17
+ several edits to one function were checked against stale steps; a comment between a question and its first step
18
+ was taken as part of the question (it was dropped and the colon lost); and a step added before a decorated function
19
+ went between the decorator and the function. Each has a test. On 9,326 generated edits across Flask, Requests,
20
+ Click, httpx, and rich, every one of the 8,942 written files now parses (11 did not before).
21
+ - **Measured:** `scripts/write-bench.mjs` runs change requests with hidden tests (the test must fail on the original
22
+ code and pass on the written code); `scripts/write-sweep.mjs --verify` checks every written file with the
23
+ language's own parser. Results in docs/thunder-write.md.
24
+
25
+ **Upgrade note.** No command, flag, exit code, or JSON shape was removed. A Python condition such as `x is 5` (or
26
+ `member is true`) given to `--edit` is now read as Thunder's "is" (equals), not Python's identity test; `x is None`
27
+ is unchanged. `thunder write --edit` accepts `--edits <file>`.
28
+
1
29
  # 1.5.0
2
30
 
3
31
  - **Thunder Trace reads tables, settings, and packages.** `thunder trace` now links SQL to the repository that