rip-lang 3.10.10 → 3.10.12
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 +6 -0
- package/README.md +19 -16
- package/docs/dist/rip-ui.min.js +4 -7
- package/docs/dist/rip-ui.min.js.br +0 -0
- package/docs/dist/rip.browser.min.js +4 -7
- package/docs/dist/rip.browser.min.js.br +0 -0
- package/docs/index.html +15 -11
- package/docs/results/index.html +30 -17
- package/package.json +1 -1
- package/src/compiler.js +3 -4
- package/src/components.js +8 -2
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,12 @@ 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.10.12] - 2026-02-20
|
|
11
|
+
|
|
12
|
+
### Compiler — Fix Variable Scoping in Effect Blocks
|
|
13
|
+
|
|
14
|
+
- **Effect block bodies now scope variables correctly** — Variables assigned inside `~>` block bodies (e.g., `prev = document.querySelector(...)`) were being hoisted to the enclosing function scope instead of staying local to the effect's arrow function. This caused `ReferenceError` in strict mode. Fixed in both the standalone compiler (`compiler.js`) and the component compiler (`components.js`) by treating effect blocks as proper function boundaries in variable collection, and using `generateFunctionBody` (matching how computed blocks were already handled) instead of raw expression generation.
|
|
15
|
+
|
|
10
16
|
## [3.10.6] - 2026-02-20
|
|
11
17
|
|
|
12
18
|
### CLI — Fix Multiline Argument Corruption
|
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
-
<a href="CHANGELOG.md"><img src="https://img.shields.io/badge/version-3.10.
|
|
12
|
+
<a href="CHANGELOG.md"><img src="https://img.shields.io/badge/version-3.10.12-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
14
|
<a href="#"><img src="https://img.shields.io/badge/tests-1%2C243%2F1%2C243-brightgreen.svg" alt="Tests"></a>
|
|
15
15
|
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License"></a>
|
|
@@ -262,20 +262,23 @@ Rip's reactivity is framework-agnostic — use it with React, Vue, Svelte, or va
|
|
|
262
262
|
|
|
263
263
|
## Rip UI
|
|
264
264
|
|
|
265
|
-
Load `rip-ui.min.js` (~
|
|
265
|
+
Load `rip-ui.min.js` (~53KB Brotli) — the Rip compiler and pre-compiled UI framework in one file. Components are `.rip` source files, compiled on demand, rendered with fine-grained reactivity. No build step. No bundler.
|
|
266
266
|
|
|
267
|
-
```
|
|
268
|
-
|
|
269
|
-
@count := 0
|
|
267
|
+
```html
|
|
268
|
+
<script type="module" src="rip-ui.min.js"></script>
|
|
270
269
|
|
|
270
|
+
<script type="text/rip" data-name="index">
|
|
271
|
+
export Home = component
|
|
272
|
+
@count := 0
|
|
271
273
|
render
|
|
272
274
|
div.counter
|
|
273
275
|
h1 "Count: #{@count}"
|
|
274
276
|
button @click: (-> @count++), "+"
|
|
275
277
|
button @click: (-> @count--), "-"
|
|
278
|
+
</script>
|
|
276
279
|
```
|
|
277
280
|
|
|
278
|
-
Two keywords
|
|
281
|
+
That's it. The runtime auto-detects inline `data-name` components, compiles them, and launches the app with hash routing — no bootstrap script needed. Two keywords (`component` and `render`) are all the language adds. Everything else (`:=` state, `~=` computed, methods, lifecycle) is standard Rip.
|
|
279
282
|
|
|
280
283
|
See [@rip-lang/ui](packages/ui/) for the full framework: file-based router, reactive stash, component store, and renderer. **[Try the demo](https://shreeve.github.io/rip-lang/demo.html)** — a complete app in one HTML file.
|
|
281
284
|
|
|
@@ -291,7 +294,7 @@ See [@rip-lang/ui](packages/ui/) for the full framework: file-based router, reac
|
|
|
291
294
|
| **Self-hosting** | No | Yes |
|
|
292
295
|
| **Lexer** | 3,558 LOC | 2,024 LOC |
|
|
293
296
|
| **Compiler** | 10,346 LOC | 3,293 LOC |
|
|
294
|
-
| **Total** | 17,760 LOC | ~11,
|
|
297
|
+
| **Total** | 17,760 LOC | ~11,300 LOC |
|
|
295
298
|
|
|
296
299
|
Smaller codebase, modern output, built-in reactivity.
|
|
297
300
|
|
|
@@ -302,7 +305,7 @@ Smaller codebase, modern output, built-in reactivity.
|
|
|
302
305
|
Run Rip directly in the browser — inline scripts and the console REPL both support `await` via the `!` operator:
|
|
303
306
|
|
|
304
307
|
```html
|
|
305
|
-
<script type="module" src="
|
|
308
|
+
<script type="module" src="rip-ui.min.js"></script>
|
|
306
309
|
<script type="text/rip">
|
|
307
310
|
res = fetch! 'https://api.example.com/data'
|
|
308
311
|
data = res.json!
|
|
@@ -334,17 +337,17 @@ Simple arrays (with `.loc`) instead of AST node classes. The compiler is self-ho
|
|
|
334
337
|
| Component | File | Lines |
|
|
335
338
|
|-----------|------|-------|
|
|
336
339
|
| Lexer + Rewriter | `src/lexer.js` | 1,761 |
|
|
337
|
-
| Compiler + Codegen | `src/compiler.js` | 3,
|
|
340
|
+
| Compiler + Codegen | `src/compiler.js` | 3,303 |
|
|
338
341
|
| Type System | `src/types.js` | 1,099 |
|
|
339
|
-
| Component System | `src/components.js` | 1,
|
|
342
|
+
| Component System | `src/components.js` | 1,877 |
|
|
340
343
|
| Source Maps | `src/sourcemaps.js` | 189 |
|
|
341
|
-
| Parser (generated) | `src/parser.js` |
|
|
344
|
+
| Parser (generated) | `src/parser.js` | 357 |
|
|
342
345
|
| Grammar | `src/grammar/grammar.rip` | 944 |
|
|
343
346
|
| Parser Generator | `src/grammar/solar.rip` | 929 |
|
|
344
347
|
| REPL | `src/repl.js` | 601 |
|
|
345
|
-
| Browser Entry | `src/browser.js` |
|
|
348
|
+
| Browser Entry | `src/browser.js` | 167 |
|
|
346
349
|
| Tags | `src/tags.js` | 62 |
|
|
347
|
-
| **Total** | | **~11,
|
|
350
|
+
| **Total** | | **~11,289** |
|
|
348
351
|
|
|
349
352
|
---
|
|
350
353
|
|
|
@@ -354,11 +357,11 @@ Rip includes optional packages for full-stack development:
|
|
|
354
357
|
|
|
355
358
|
| Package | Version | Purpose |
|
|
356
359
|
|---------|---------|---------|
|
|
357
|
-
| [rip-lang](https://www.npmjs.com/package/rip-lang) | 3.10.
|
|
360
|
+
| [rip-lang](https://www.npmjs.com/package/rip-lang) | 3.10.10 | Core language compiler |
|
|
358
361
|
| [@rip-lang/api](packages/api/) | 1.1.10 | HTTP framework (Sinatra-style routing, 37 validators) |
|
|
359
362
|
| [@rip-lang/server](packages/server/) | 1.1.19 | Multi-worker app server (hot reload, HTTPS, mDNS) |
|
|
360
363
|
| [@rip-lang/db](packages/db/) | 1.2.0 | DuckDB server with official UI + ActiveRecord-style client |
|
|
361
|
-
| [@rip-lang/ui](packages/ui/) | 0.3.
|
|
364
|
+
| [@rip-lang/ui](packages/ui/) | 0.3.19 | Zero-build reactive web framework (auto-launch, stash, router) |
|
|
362
365
|
| [@rip-lang/swarm](packages/swarm/) | 1.1.4 | Parallel job runner with worker pool |
|
|
363
366
|
| [@rip-lang/csv](packages/csv/) | 1.1.4 | CSV parser + writer |
|
|
364
367
|
| [@rip-lang/schema](packages/schema/) | 0.2.1 | Unified schema → TypeScript types, SQL DDL, validation, ORM |
|
|
@@ -400,7 +403,7 @@ rip file.rip # Run
|
|
|
400
403
|
rip -c file.rip # Compile
|
|
401
404
|
rip -t file.rip # Tokens
|
|
402
405
|
rip -s file.rip # S-expressions
|
|
403
|
-
bun run test #
|
|
406
|
+
bun run test # 1243 tests
|
|
404
407
|
bun run parser # Rebuild parser
|
|
405
408
|
bun run browser # Build browser bundle
|
|
406
409
|
```
|