rip-lang 3.8.8 → 3.8.10
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 +21 -0
- package/README.md +7 -7
- package/docs/dist/rip-ui.min.js +77 -79
- package/docs/dist/rip-ui.min.js.br +0 -0
- package/docs/dist/rip.browser.js +44 -76
- package/docs/dist/rip.browser.min.js +78 -80
- package/docs/dist/rip.browser.min.js.br +0 -0
- package/docs/dist/ui.js +9 -3
- package/docs/dist/ui.min.js +2 -2
- package/docs/dist/ui.min.js.br +0 -0
- package/package.json +1 -1
- package/src/compiler.js +43 -72
- package/src/grammar/grammar.rip +5 -5
- package/src/parser-rd.js +4 -4
- package/src/parser.js +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,27 @@ All notable changes to Rip will be documented in this file.
|
|
|
7
7
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
8
8
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
9
9
|
|
|
10
|
+
## [3.8.10] - 2026-02-17
|
|
11
|
+
|
|
12
|
+
### Compiler — Bug Fix
|
|
13
|
+
|
|
14
|
+
- **Fixed `or throw` variable hoisting bug** — The `x = expr or throw` pattern inside function bodies was erroneously adding the target variable to the program-level `programVars` set. This "poisoned" the variable filter for subsequent sibling functions, causing them to omit local `let` declarations and produce `ReferenceError` at runtime. Most notably, this broke `@rip-lang/api`'s `store` variable when multiple exported functions used the pattern. Fixed by removing the incorrect `programVars.add()` call from `generateAssignment`.
|
|
15
|
+
|
|
16
|
+
### Schema — New Features
|
|
17
|
+
|
|
18
|
+
- **`Model.fromSchema()` bridge** — ORM models can now auto-configure their schema, table name, and primary key directly from a parsed `.schema` AST via `Model.fromSchema(schema, 'ModelName')`, eliminating manual field re-declaration.
|
|
19
|
+
- **Dependency-ordered SQL DDL** — `emit-sql.js` now topologically sorts tables so foreign key references are always defined before use.
|
|
20
|
+
- **`app-demo.rip` example** — Rewrote the schema demo in Rip (was JavaScript), showcasing TypeScript generation, SQL DDL, and runtime validation from a single `.schema` file.
|
|
21
|
+
|
|
22
|
+
## [3.8.9] - 2026-02-16
|
|
23
|
+
|
|
24
|
+
### Compiler — Grammar Desugaring & Cleanup
|
|
25
|
+
|
|
26
|
+
- **`until` desugared to `while`** — Grammar now emits `["while", ["!", cond], ...]` directly, eliminating `generateUntil` from the compiler. Also fixes the `until...when` guard bug where the guard expression was silently dropped.
|
|
27
|
+
- **`unless` desugared to `if`** — Grammar now emits `["if", ["!", cond], ...]` for all `unless` forms, removing ~20 `unless`-specific code paths from the compiler (dispatch table, postfix conditionals, assignment handlers, return/throw handlers, control flow analysis).
|
|
28
|
+
- **`toSearchable` renamed to `toMatchable`** — The regex helper name now matches the `.match()` API it wraps.
|
|
29
|
+
- **Added missing `%%=` handler** — The mathematical modulo assignment operator now works correctly instead of crashing during code generation.
|
|
30
|
+
|
|
10
31
|
## [3.8.8] - 2026-02-16
|
|
11
32
|
|
|
12
33
|
### Compiler — Refactoring & Cleanup
|
package/README.md
CHANGED
|
@@ -9,15 +9,15 @@
|
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
-
<a href="CHANGELOG.md"><img src="https://img.shields.io/badge/version-3.8.
|
|
12
|
+
<a href="CHANGELOG.md"><img src="https://img.shields.io/badge/version-3.8.10-blue.svg" alt="Version"></a>
|
|
13
13
|
<a href="#zero-dependencies"><img src="https://img.shields.io/badge/dependencies-ZERO-brightgreen.svg" alt="Dependencies"></a>
|
|
14
|
-
<a href="#"><img src="https://img.shields.io/badge/tests-1%
|
|
14
|
+
<a href="#"><img src="https://img.shields.io/badge/tests-1%2C242%2F1%2C242-brightgreen.svg" alt="Tests"></a>
|
|
15
15
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License"></a>
|
|
16
16
|
</p>
|
|
17
17
|
|
|
18
18
|
---
|
|
19
19
|
|
|
20
|
-
Rip is a modern language inspired by CoffeeScript. It compiles to **ES2022** (classes, `?.`, `??`, modules), adds about a **dozen new operators**, includes **built-in reactivity**, and sports a self-hosting compiler with **zero dependencies** — all in
|
|
20
|
+
Rip is a modern language inspired by CoffeeScript. It compiles to **ES2022** (classes, `?.`, `??`, modules), adds about a **dozen new operators**, includes **built-in reactivity**, and sports a self-hosting compiler with **zero dependencies** — all in under 10,000 lines of code.
|
|
21
21
|
|
|
22
22
|
> **No imports. No hooks. No dependency arrays. Just write code.**
|
|
23
23
|
|
|
@@ -290,8 +290,8 @@ See [@rip-lang/ui](packages/ui/) for the full framework: file-based router, reac
|
|
|
290
290
|
| **Dependencies** | Multiple | Zero |
|
|
291
291
|
| **Self-hosting** | No | Yes |
|
|
292
292
|
| **Lexer** | 3,558 LOC | 2,024 LOC |
|
|
293
|
-
| **Compiler** | 10,346 LOC | 3,
|
|
294
|
-
| **Total** | 17,760 LOC | ~
|
|
293
|
+
| **Compiler** | 10,346 LOC | 3,289 LOC |
|
|
294
|
+
| **Total** | 17,760 LOC | ~9,500 LOC |
|
|
295
295
|
|
|
296
296
|
Smaller codebase, modern output, built-in reactivity.
|
|
297
297
|
|
|
@@ -354,14 +354,14 @@ Rip includes optional packages for full-stack development:
|
|
|
354
354
|
|
|
355
355
|
| Package | Version | Purpose |
|
|
356
356
|
|---------|---------|---------|
|
|
357
|
-
| [rip-lang](https://www.npmjs.com/package/rip-lang) | 3.8.
|
|
357
|
+
| [rip-lang](https://www.npmjs.com/package/rip-lang) | 3.8.10 | Core language compiler |
|
|
358
358
|
| [@rip-lang/api](packages/api/) | 1.1.6 | HTTP framework (Sinatra-style routing, 37 validators) |
|
|
359
359
|
| [@rip-lang/server](packages/server/) | 1.1.5 | Multi-worker app server (hot reload, HTTPS, mDNS) |
|
|
360
360
|
| [@rip-lang/db](packages/db/) | 1.1.4 | DuckDB server with official UI (pure Bun FFI) |
|
|
361
361
|
| [@rip-lang/ui](packages/ui/) | 0.3.2 | Zero-build reactive web framework (stash, router, hash routing) |
|
|
362
362
|
| [@rip-lang/swarm](packages/swarm/) | 1.1.3 | Parallel job runner with worker pool |
|
|
363
363
|
| [@rip-lang/csv](packages/csv/) | 1.1.3 | CSV parser + writer |
|
|
364
|
-
| [@rip-lang/schema](packages/schema/) | 0.
|
|
364
|
+
| [@rip-lang/schema](packages/schema/) | 0.2.0 | Unified schema → TypeScript types, SQL DDL, validation, ORM |
|
|
365
365
|
| [VS Code Extension](packages/vscode/) | 0.3.1 | Syntax highlighting, type intelligence, source maps |
|
|
366
366
|
|
|
367
367
|
```bash
|