Skip to content

Commit a12e77e

Browse files
committed
release: VelarScript 0.27.1
1 parent eab8c55 commit a12e77e

62 files changed

Lines changed: 1575 additions & 1506 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎AGENTS.md‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ This file governs the repository unless a closer `AGENTS.md` narrows the target.
2525
## Python / JavaScript reflex and canonical-form table
2626

2727
Vel's parents are JavaScript and Python. These reflexes land in Vel source as
28-
something else. `A1`–`A6` are **advisories** for those traps; `A7`–`A9` are
29-
canonical-form advisories, raised only when the compiler can prove the longer
30-
collection or record spelling has one language-owned replacement. The compiler
31-
reports all nine and still emits. The rest are already errors whose message
28+
something else. `A1`–`A6` are **advisories** for those traps; `A7`–`A10` and
29+
`A13`–`A15` are canonical-form advisories, raised only when the compiler can prove
30+
the longer collection or record spelling has one language-owned replacement.
31+
The compiler reports them and still emits. The rest are already errors whose message
3232
names the successor.
3333

3434
| Reflex | Write instead | Channel |
@@ -40,8 +40,11 @@ names the successor.
4040
| `"${value}"`, `` `${value}` `` | `f"{value}"` or `` f`{value}` `` — only the `f` prefix interpolates, and `${...}` is legal literal text everywhere else (generating JavaScript source is a real use, and answers with `velar-allow A5`) | `A5` |
4141
| `f"${value}"` | `f"{value}"` — even under the `f` prefix, `$` keeps the brace after it literal, so `${value}` stays text | `A6` |
4242
| Empty collection + identity-only copy loop | Initialize from the compiler-owned conversion: `set.values()`, `Set(list)`, `map.keys()` / `map.values()`, `Map(record)`, or the matching `.copy()`; transforms, filters, effects, non-empty destinations, computed sources, and non-adjacent loops do not trigger | `A7` |
43-
| `for item in items: if test: return true` followed by `return false` | `return items.some(item => test)` — only the exact single-slot, pure-boolean, early-return query over a List triggers; calls, getters, effects, optional conditions, wider bodies, computed sources, and non-adjacent returns do not | `A8` |
43+
| Single-slot List loop that only returns on a pure condition, followed by the matching exhausted return | Use `some`, `every`, or `find`; only exact early-return query shapes trigger, while calls, getters, effects, optional conditions, wider bodies, computed sources, and non-adjacent returns do not | `A8` |
44+
| Empty List + loop that only appends or extends a pure per-item projection, optionally under one pure guard | Initialize with `map`, `filter`, `filter(...).map(...)`, or `flatMap`; only stable List sources, data reads/operators, and compiler-owned `Type.from(value)` projections trigger, while calls, getters, effects, destination reads, wider bodies, and computed sources do not | `A13` |
4445
| A closed target literal mirrors two or more same-name fields from one typed record | `Target.from(source, {overrides})` — target fields are the authority; computed/effectful overrides, partial targets, spreads, and mixed sources do not trigger. `.from` uses target declaration order, so preserve an intentional authored wire order with a reasoned suppression | `A9` |
46+
| `flag ? "true" : "false"` in a native text attribute | `str(flag)` — the fix is offered only for that exact equivalent conversion, outside HTML bool-presence attributes and component props; it is withheld only when the discarded source contains an authored comment | `A14` |
47+
| `{field: field}` repeats one ordinary identifier | `{field}` — quoted keys, different values, member/call expressions, and entries whose rewrite would erase a comment do not receive the mechanical fix | `A15` |
4548
| `enumerate(xs)` | `for value, index in xs:` | error |
4649
| `with X as y:` | `using y = X` | error |
4750
| `raise E(...)` | `throw E(...)` | error |
@@ -97,6 +100,8 @@ the advisory channel in
97100
and its exact collection canonicalization extensions in
98101
[docs/decisions/D93-CANONICAL-COLLECTION-CONVERSION-ADVISORY.md](docs/decisions/D93-CANONICAL-COLLECTION-CONVERSION-ADVISORY.md)
99102
and [docs/decisions/D94-CANONICAL-LIST-SOME-ADVISORY.md](docs/decisions/D94-CANONICAL-LIST-SOME-ADVISORY.md),
103+
the proven List query and pipeline forms in
104+
[docs/decisions/D112-CANONICAL-LIST-PIPELINE-ADVISORY.md](docs/decisions/D112-CANONICAL-LIST-PIPELINE-ADVISORY.md),
100105
and the exact record projection in
101106
[docs/decisions/D95-EXACT-RECORD-PROJECTION.md](docs/decisions/D95-EXACT-RECORD-PROJECTION.md).
102107

‎CHANGELOG.md‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,32 @@ many times that surface has changed *since counting began*, never a maturity
1212
grade: `core@0.1` beside `web@0.11` means Core started counting today, not that
1313
Core is younger. History is deliberately not recomputed (D110 rule 3).
1414

15+
## 0.27.1 — 2026-09-04
16+
17+
Surfaces: `core@0.3` · `web@0.11` · `node@0.16` · `server@0.15` · `desktop@0.10`
18+
19+
### Language and editor tooling
20+
21+
- Exact, side-effect-free `List` loops can now be shortened through editor
22+
fixes to `some`, `every`, `find`, `map`, `filter`, or `flatMap`. Fixes are
23+
withheld when comments, effects, unstable sources, or branch-only type
24+
narrowing would change meaning.
25+
- Same-name object fields such as `{id: id}` now offer the equivalent
26+
shorthand `{id}` while preserving surrounding layout and comments.
27+
- Language-service coverage now includes the expanded built-in collection
28+
vocabulary, Look property/value completions and hover types, and the current
29+
function and declaration forms.
30+
31+
### Web attributes
32+
33+
- Native element attributes now use one value contract: `null` and `false`
34+
remove the attribute, `true` writes an empty present attribute, strings stay
35+
exact, and finite numbers use their text form.
36+
- A native text attribute written as `flag ? "true" : "false"` now offers the
37+
equivalent `str(flag)` fix. Component props, HTML boolean-presence
38+
attributes, optional booleans, custom elements, and comment-sensitive forms
39+
remain explicit.
40+
1541
## 0.27.0 — 2026-09-04
1642

1743
Surfaces: `core@0.3` · `web@0.11` · `node@0.16` · `server@0.15` · `desktop@0.10`

‎docs/ai-skill-server.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ browser application activates `@velarscript/web`:
1313
```json
1414
{
1515
"dependencies": {
16-
"@velarscript/server": "0.27.0"
16+
"@velarscript/server": "0.27.1"
1717
}
1818
}
1919
```

‎docs/ai-skill-web.md‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,15 @@ rows are the ones a keyed position renders; `// velar-allow A4: <reason>`
124124
suppresses it where building the rows is the only spelling, which a `readonly`
125125
list or one API response makes it.
126126

127+
Native attributes separate presence from text. `false` and `null` remove an
128+
attribute, `true` writes an empty value, and a string writes its exact text.
129+
Write `aria-expanded={str(open)}` when the token `"true"` or `"false"` is
130+
required. Advisory **A14** recognizes the exact equivalent conversion from
131+
`open ? "true" : "false"` to `str(open)` on a native text attribute. It offers
132+
the quick fix when discarded source has no comment; comments inside `open`
133+
survive because that source is copied verbatim. HTML bool-presence attributes
134+
and component props stay outside the rewrite.
135+
127136
A native element rejects every attribute name beginning with `on` other than
128137
the `on:` directive itself. `onclick`, `onClick`, and `ONCLICK` are one
129138
attribute to the browser, and the browser compiles that attribute's value as

0 commit comments

Comments
 (0)