rip-lang 3.12.1 → 3.12.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 +1 -1
- package/bin/rip +15 -0
- package/docs/dist/rip.min.js +1 -1
- package/docs/dist/rip.min.js.br +0 -0
- package/package.json +1 -1
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.12.
|
|
12
|
+
<a href="CHANGELOG.md"><img src="https://img.shields.io/badge/version-3.12.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%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>
|
package/bin/rip
CHANGED
|
@@ -97,6 +97,21 @@ async function main() {
|
|
|
97
97
|
|
|
98
98
|
if (ripOptions.includes('-v') || ripOptions.includes('--version')) {
|
|
99
99
|
console.log(`Rip ${VERSION} - ${SUMMARY}`);
|
|
100
|
+
try {
|
|
101
|
+
const { readdirSync } = await import('fs');
|
|
102
|
+
const home = process.env.HOME || process.env.USERPROFILE;
|
|
103
|
+
const scopeDir = join(home, '.bun', 'install', 'global', 'node_modules', '@rip-lang');
|
|
104
|
+
if (existsSync(scopeDir) && statSync(scopeDir).isDirectory()) {
|
|
105
|
+
const pkgs = readdirSync(scopeDir).sort();
|
|
106
|
+
console.log();
|
|
107
|
+
for (const name of pkgs) {
|
|
108
|
+
try {
|
|
109
|
+
const pkg = JSON.parse(readFileSync(join(scopeDir, name, 'package.json'), 'utf-8'));
|
|
110
|
+
console.log(` ${pkg.name.padEnd(24)} ${pkg.version}`);
|
|
111
|
+
} catch {}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
} catch {}
|
|
100
115
|
process.exit(0);
|
|
101
116
|
}
|
|
102
117
|
|
package/docs/dist/rip.min.js
CHANGED
|
@@ -515,7 +515,7 @@ if (typeof globalThis !== 'undefined') {
|
|
|
515
515
|
`:"",$=U.slice(0,u).join(`
|
|
516
516
|
`)}let Y=new p().tokenize($);if(this.options.showTokens)Y.forEach((Q)=>console.log(`${Q[0].padEnd(12)} ${JSON.stringify(Q[1])}`)),console.log();let F=null,_=null;if(this.options.types==="emit"||this.options.types==="check"||this.options.types===!0)_=[...Y];Y=Y.filter((Q)=>Q[0]!=="TYPE_DECL");while(Y.length>0&&Y[0][0]==="TERMINATOR")Y.shift();if(Y.every((Q)=>Q[0]==="TERMINATOR")){if(_)F=T1(_,["program"]);return{tokens:Y,sexpr:["program"],code:"",dts:F,data:A,reactiveVars:{}}}a.lexer={tokens:Y,pos:0,setInput:function(){},lex:function(){if(this.pos>=this.tokens.length)return 1;let Q=this.tokens[this.pos++],D=Q[1];if(Q.data)D=new String(D),Object.assign(D,Q.data);return this.text=D,this.loc=Q.loc,Q[0]}};let X;try{X=a.parse($)}catch(Q){if(/\?\s*\([^)]*\?[^)]*:[^)]*\)\s*:/.test($)||/\?\s+\w+\s+\?\s+/.test($))throw Error("Nested ternary operators are not supported. Use if/else statements instead.");throw Q}if(this.options.showSExpr)console.log(x(X,0,!0)),console.log();let R=null;if(this.options.sourceMap){let Q=(this.options.filename||"output")+".js",D=this.options.filename||"input.rip";R=new j1(Q,D,$)}let H=new y({dataSection:A,skipPreamble:this.options.skipPreamble,reactiveVars:this.options.reactiveVars,sourceMap:R}),w=H.compile(X),Z=R?R.toJSON():null,K=R?R.toReverseMap():null;if(Z&&this.options.sourceMap==="inline"){let Q=typeof Buffer<"u"?Buffer.from(Z).toString("base64"):btoa(Z);w+=`
|
|
517
517
|
//# sourceMappingURL=data:application/json;base64,${Q}`}else if(Z&&this.options.filename)w+=`
|
|
518
|
-
//# sourceMappingURL=${this.options.filename}.js.map`;if(_)F=T1(_,X);return{tokens:Y,sexpr:X,code:w,dts:F,map:Z,reverseMap:K,data:A,reactiveVars:H.reactiveVars}}compileToJS($){return this.compile($).code}compileToSExpr($){return this.compile($).sexpr}}X2(y,p);y.prototype.generateEnum=a1;function h1($,W={}){return new M1(W).compile($)}function d($,W={}){return new M1(W).compileToJS($)}function w1(){return new y({}).getReactiveRuntime()}function C1(){return new y({}).getComponentRuntime()}var T3="3.12.
|
|
518
|
+
//# sourceMappingURL=${this.options.filename}.js.map`;if(_)F=T1(_,X);return{tokens:Y,sexpr:X,code:w,dts:F,map:Z,reverseMap:K,data:A,reactiveVars:H.reactiveVars}}compileToJS($){return this.compile($).code}compileToSExpr($){return this.compile($).sexpr}}X2(y,p);y.prototype.generateEnum=a1;function h1($,W={}){return new M1(W).compile($)}function d($,W={}){return new M1(W).compileToJS($)}function w1(){return new y({}).getReactiveRuntime()}function C1(){return new y({}).getComponentRuntime()}var T3="3.12.2",S3="2026-02-22@00:16:42GMT";if(typeof globalThis<"u"&&!globalThis.__rip)Function(w1())();var L3=($)=>{let W=$.match(/^[ \t]*(?=\S)/gm),A=Math.min(...(W||[]).map((U)=>U.length));return $.replace(RegExp(`^[ ]{${A}}`,"gm"),"").trim()};async function V3(){let $=document.querySelectorAll('script[type="text/rip"]');for(let W of $){if(W.hasAttribute("data-rip-processed"))continue;if(W.hasAttribute("data-name"))continue;try{let A;if(W.src){let u=await fetch(W.src);if(!u.ok){console.error(`Rip: failed to fetch ${W.src} (${u.status})`);continue}A=await u.text()}else A=L3(W.textContent);let U;try{U=d(A)}catch(u){console.error("Rip compile error:",u.message),console.error("Source:",A);continue}await(0,eval)(`(async()=>{
|
|
519
519
|
${U}
|
|
520
520
|
})()`),W.setAttribute("data-rip-processed","true")}catch(A){console.error("Rip runtime error:",A)}}}async function t($){for(let[Y,F]of Object.entries(t.modules))if($.includes(Y))return F;let W=await fetch($).then((Y)=>{if(!Y.ok)throw Error(`importRip: ${$} (${Y.status})`);return Y.text()}),A=d(W),U=`// ${$}
|
|
521
521
|
`,u=new Blob([U+A],{type:"application/javascript"});return await import(URL.createObjectURL(u))}t.modules={};function j3($){try{let W=$.replace(/^/gm," "),U=d(`do ->
|
package/docs/dist/rip.min.js.br
CHANGED
|
Binary file
|