rip-lang 3.15.1 → 3.15.2

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/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  </p>
10
10
 
11
11
  <p align="center">
12
- <a href="https://github.com/shreeve/rip-lang/commits/main"><img src="https://img.shields.io/badge/version-3.15.1-blue.svg" alt="Version"></a>
12
+ <a href="https://github.com/shreeve/rip-lang/commits/main"><img src="https://img.shields.io/badge/version-3.15.2-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%2C436%2F1%2C436-brightgreen.svg" alt="Tests"></a>
15
15
  <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License"></a>
package/docs/dist/rip.js CHANGED
@@ -12453,8 +12453,8 @@ globalThis.zip ??= (...a) => a[0].map((_, i) => a.map(b => b[i]));
12453
12453
  return new CodeEmitter({}).getComponentRuntime();
12454
12454
  }
12455
12455
  // src/browser.js
12456
- var VERSION = "3.15.1";
12457
- var BUILD_DATE = "2026-04-27@06:14:13GMT";
12456
+ var VERSION = "3.15.2";
12457
+ var BUILD_DATE = "2026-04-27@06:15:56GMT";
12458
12458
  if (typeof globalThis !== "undefined") {
12459
12459
  if (!globalThis.__rip)
12460
12460
  new Function(getReactiveRuntime())();
@@ -1639,7 +1639,7 @@ globalThis.sleep ??= (ms) => new Promise(r => setTimeout(r, ms));
1639
1639
  globalThis.todo ??= (msg) => { throw new Error(msg || "Not implemented"); };
1640
1640
  globalThis.warn ??= console.warn;
1641
1641
  globalThis.zip ??= (...a) => a[0].map((_, i) => a.map(b => b[i]));
1642
- `}function g1(){return new h1({}).getReactiveRuntime()}function v1(){return new h1({}).getComponentRuntime()}var D3="3.15.1",A3="2026-04-27@06:14:13GMT";if(typeof globalThis<"u"){if(!globalThis.__rip)Function(g1())();if(!globalThis.__ripComponent)Function(v1())()}var C5=(f)=>{let l=f.match(/^[ \t]*(?=\S)/gm),c=Math.min(...(l||[]).map((h)=>h.length));return f.replace(RegExp(`^[ ]{${c}}`,"gm"),"").trim()},Y2=(f)=>String(f).replace(/[\r\n]/g,"").replace(/\s+$/g,"");function $3(f,l){let h=`//# sourceURL=${Y2(l)}`,u=/\n?\/\/# sourceMappingURL=[^\n]*\s*$/,_=f.match(u);if(_)return f.slice(0,_.index)+`
1642
+ `}function g1(){return new h1({}).getReactiveRuntime()}function v1(){return new h1({}).getComponentRuntime()}var D3="3.15.2",A3="2026-04-27@06:15:56GMT";if(typeof globalThis<"u"){if(!globalThis.__rip)Function(g1())();if(!globalThis.__ripComponent)Function(v1())()}var C5=(f)=>{let l=f.match(/^[ \t]*(?=\S)/gm),c=Math.min(...(l||[]).map((h)=>h.length));return f.replace(RegExp(`^[ ]{${c}}`,"gm"),"").trim()},Y2=(f)=>String(f).replace(/[\r\n]/g,"").replace(/\s+$/g,"");function $3(f,l){let h=`//# sourceURL=${Y2(l)}`,u=/\n?\/\/# sourceMappingURL=[^\n]*\s*$/,_=f.match(u);if(_)return f.slice(0,_.index)+`
1643
1643
  `+h+f.slice(_.index);return f+`
1644
1644
  `+h}function M3(f,l){if(!l)return f;return f.replace(/\/\/# sourceMappingURL=data:application\/json;base64,([A-Za-z0-9+/=]+)/,(c,h)=>{let u;try{let n=atob(h),D=new Uint8Array(n.length);for(let A=0;A<n.length;A++)D[A]=n.charCodeAt(A);u=new TextDecoder().decode(D)}catch{return c}let _;try{_=JSON.parse(u)}catch{return c}_.mappings=";".repeat(l)+_.mappings;let i=new TextEncoder().encode(JSON.stringify(_)),w="";for(let n=0;n<i.length;n++)w+=String.fromCharCode(i[n]);return`//# sourceMappingURL=data:application/json;base64,${btoa(w)}`})}function n3(f,l){let c=`${Y2(l)}.js`,h=M3(f,1);return`(async()=>{
1645
1645
  ${$3(h,c)}
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rip-lang",
3
- "version": "3.15.1",
3
+ "version": "3.15.2",
4
4
  "description": "A modern language that compiles to JavaScript",
5
5
  "type": "module",
6
6
  "main": "src/compiler.js",
@@ -24,6 +24,7 @@
24
24
  "bin/",
25
25
  "src/",
26
26
  "docs/",
27
+ "scripts/postinstall.js",
27
28
  "scripts/serve.js",
28
29
  "rip-loader.js",
29
30
  "README.md",
@@ -36,7 +37,7 @@
36
37
  "gallery": "bun scripts/gallery.js",
37
38
  "bundle:demo": "bun scripts/bundle-app.js docs/demo -o docs/example/index.json -t 'Rip App Demo'",
38
39
  "parser": "bun src/grammar/solar.rip -o src/parser.js src/grammar/grammar.rip",
39
- "postinstall": "bun scripts/link-local.js --quiet && bun scripts/link-check.js --quiet",
40
+ "postinstall": "node scripts/postinstall.js --quiet",
40
41
  "link-local": "bun scripts/link-local.js",
41
42
  "link-global": "bun scripts/link-global.js",
42
43
  "link-check": "bun scripts/link-check.js",
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env node
2
+ // scripts/postinstall.js — workspace-only postinstall hook.
3
+ //
4
+ // `link-local.js` and `link-check.js` rewrite `node_modules/.bun/` and
5
+ // `node_modules/rip-lang/` to point at the workspace's source tree.
6
+ // That's exactly what we want during dev, but it's meaningless — and
7
+ // would error — for consumers running `npm install rip-lang` from
8
+ // outside this repo (no `packages/` sibling, possibly no `bun` binary).
9
+ //
10
+ // This dispatcher checks for the workspace markers first and exits 0
11
+ // otherwise. Uses Node only (every npm install has Node; not every
12
+ // consumer has Bun). Tolerates missing files / non-zero subprocess
13
+ // exits — postinstall is best-effort, never fatal for consumers.
14
+
15
+ import { existsSync } from 'node:fs';
16
+ import { spawnSync } from 'node:child_process';
17
+
18
+ if (!existsSync('packages') || !existsSync('scripts/link-local.js')) process.exit(0);
19
+
20
+ const args = process.argv.slice(2);
21
+ const run = (script) => {
22
+ const r = spawnSync('bun', ['scripts/' + script, ...args], { stdio: 'inherit' });
23
+ return r.status ?? 0;
24
+ };
25
+
26
+ run('link-local.js');
27
+ run('link-check.js');