@lokascript/compilation-service 4.2.0 → 4.3.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 +62 -0
- package/package.json +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,68 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [4.3.0] - 2026-10-07
|
|
11
|
+
|
|
12
|
+
More of what upstream reads now translates, and what does not is refused instead of lost. On the
|
|
13
|
+
command-shape gate, round trips that came back silently different fell from 174 in 4.2.0 to 31,
|
|
14
|
+
none of them in English; 24,386 of 27,240 now read as their source does. English-to-English refuses
|
|
15
|
+
61 of the 1,135 scripts, down from 82, and each of the 61 now belongs to a named family with the
|
|
16
|
+
reason it is not carried yet.
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- **`@lokascript/semantic` reads `on every <event>` and `init immediately`.** Both lost their head
|
|
21
|
+
word, so the handler or the block was refused. `EventHandlerSemanticNode.eventModifiers.every` and
|
|
22
|
+
`FeatureSemanticNode.immediately` carry them. English writes them as upstream does; every other
|
|
23
|
+
language writes the English word first (`every al clic …`), as it already did for `on first`.
|
|
24
|
+
- **`@hyperfixi/testing-framework`: two new value-matrix axes.** A `branch` position is an `if` with
|
|
25
|
+
no `then` before a command that names no target (`if 2 is in arr add .a end`). The matrix's `if`
|
|
26
|
+
cells always wrote `then` and a `put` with its target, so an SOV reader always saw where the
|
|
27
|
+
condition ended, and none of them could fail the way Turkish did (see Fixed). The 610 pairs that
|
|
28
|
+
`branch` refuses are listed in the baseline. A twelfth operand kind is a CSS length (`100px`,
|
|
29
|
+
`50%`). The matrix now has 5,396 cells.
|
|
30
|
+
|
|
31
|
+
### Changed
|
|
32
|
+
|
|
33
|
+
- **`@lokascript/semantic` refuses core's swap strategies that upstream has no spelling for.**
|
|
34
|
+
`translate()` gains a loss kind, `'core-only'` (`TranslationLossKind`). Upstream and the engine
|
|
35
|
+
read `swap morph of #t with it` as an exchange with a property named `morph`, so core's morph
|
|
36
|
+
strategies, `none`, and a strategy with no content are now refused in every language. Before,
|
|
37
|
+
English wrote them as they were read. Core's `swap into #t with x` and `swap over #t with x` are its
|
|
38
|
+
innerHTML and outerHTML, and they are now written as `put x into #t` and `put x into #t's
|
|
39
|
+
outerHTML`. Before, English wrote `swap into of #t with x`, which runs as an exchange.
|
|
40
|
+
- **`@lokascript/semantic` writes a word in the target language only where that language's reader
|
|
41
|
+
brings it back.** A property name is localized only through the reader's property table or as a
|
|
42
|
+
keyword. So `add .foo to my children` keeps `children` in Spanish (`mi children`), where it wrote
|
|
43
|
+
`mi hijos` and read back a property named `hijos`. A call's arguments are written as written
|
|
44
|
+
(`call sprayInto(me)` wrote `sprayInto(yo)`). So is every bracket group inside an expression:
|
|
45
|
+
`2 is in [true, n]` wrote `[verdadero, n]` in Spanish, a variable no reader de-localizes. And so is a
|
|
46
|
+
type name after `am a`. These spots now show English words in foreign renders where they used to
|
|
47
|
+
show words that did not come back.
|
|
48
|
+
- **`@lokascript/semantic`: `innerHTML` and `outerHTML` are no longer English keywords.** A swap's
|
|
49
|
+
strategy slot still reads them, as words.
|
|
50
|
+
|
|
51
|
+
### Fixed
|
|
52
|
+
|
|
53
|
+
- **`@lokascript/semantic`: Turkish keeps an `if` condition whole before a command with no target.**
|
|
54
|
+
`if 2 is in arr add .a end` read back as `if 2 add .a to is in arr end`, with any operand, and so
|
|
55
|
+
did `is a Number` and `<` after a possessive. Turkish case markers may be dropped, and the marker
|
|
56
|
+
test counted a marker word anywhere in the value: `in` (also the operator), `a` (also the article),
|
|
57
|
+
`nin` (also the possessive). The marker must now be the last token of its group.
|
|
58
|
+
- **`@lokascript/semantic`: a number with a CSS unit is one value.** Upstream reads `100px`,
|
|
59
|
+
`1.5rem` and `50%` as one string. Every tokenizer split them, so `set my *width to 100px` and
|
|
60
|
+
`transition height to 100px` were refused in all 24 languages. A `%` that an operand touches
|
|
61
|
+
(`5%2`) or that is spaced still reads as the operator.
|
|
62
|
+
- **`@lokascript/semantic`: more English forms that were refused in every language now read.**
|
|
63
|
+
`set innerHTML of #d1 to …` and `increment innerHTML of #d1`; a single-quoted string that holds a
|
|
64
|
+
`"` (`set #t to '<div _="…">'`), which was written back in double quotes and so closed early;
|
|
65
|
+
`fetch … don't throw`; `put … at the start of` / `at the end of`, where the `end` closed the
|
|
66
|
+
handler; `remove 3 from :arr` and `remove {color} from me`; `otherwise` as `else`. In a translation
|
|
67
|
+
of an empty then-branch's `otherwise`, 13 languages wrote their own word for it inside the
|
|
68
|
+
condition and read it back there, silently.
|
|
69
|
+
- **`@lokascript/semantic`: a handler's `catch` and `finally` bodies are written in upstream's
|
|
70
|
+
spelling.** `catch e prepend …` kept core's `prepend`, which the engine rejects.
|
|
71
|
+
|
|
10
72
|
## [4.2.0] - 2026-10-07
|
|
11
73
|
|
|
12
74
|
A translation that would lose part of a script is now refused instead of returned short.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lokascript/compilation-service",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.3.0",
|
|
4
4
|
"description": "Semantic service for LokaScript - validates, translates, diffs and scores hyperscript from 24 languages, explicit syntax, or LLM JSON, and renders it as components and tests",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
"clean": "rm -rf dist"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@lokascript/framework": "^4.
|
|
38
|
+
"@lokascript/framework": "^4.3.0",
|
|
39
39
|
"hono": "^4.13.9"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
42
|
"@hono/node-server": "^2.1.1",
|
|
43
|
-
"@hyperfixi/engine": "^4.
|
|
44
|
-
"@lokascript/semantic": "^4.
|
|
43
|
+
"@hyperfixi/engine": "^4.3.0",
|
|
44
|
+
"@lokascript/semantic": "^4.3.0",
|
|
45
45
|
"@types/node": "^26.6.3",
|
|
46
46
|
"tsup": "^8.0.1",
|
|
47
47
|
"typescript": "^5.3.3",
|
|
48
48
|
"vitest": "^5.0.2"
|
|
49
49
|
},
|
|
50
50
|
"peerDependencies": {
|
|
51
|
-
"@lokascript/semantic": "^4.
|
|
52
|
-
"@hyperfixi/engine": "^4.
|
|
51
|
+
"@lokascript/semantic": "^4.3.0",
|
|
52
|
+
"@hyperfixi/engine": "^4.3.0"
|
|
53
53
|
},
|
|
54
54
|
"peerDependenciesMeta": {
|
|
55
55
|
"@lokascript/semantic": {
|