rip-lang 3.10.4 → 3.10.5

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.
Files changed (2) hide show
  1. package/bin/rip +5 -10
  2. package/package.json +1 -1
package/bin/rip CHANGED
@@ -180,14 +180,12 @@ async function main() {
180
180
  }
181
181
  }
182
182
 
183
- // If no compile flags execute the script instead of compiling it
184
- const hasCompileFlag = showCompiled || showTokens || showSExpr || generateDts || generateMap || outputFile;
185
- if (inputFile && !hasCompileFlag) {
186
- if (!existsSync(inputFile)) {
187
- console.error(`Error: File not found: ${inputFile}`);
188
- process.exit(1);
189
- }
183
+ // Helper to check if path is a regular file (not a directory)
184
+ const isFile = (path) => existsSync(path) && statSync(path).isFile();
190
185
 
186
+ // If no compile flags and file exists → execute the script instead of compiling it
187
+ const hasCompileFlag = showCompiled || showTokens || showSExpr || generateDts || generateMap || outputFile;
188
+ if (inputFile && !hasCompileFlag && isFile(inputFile)) {
191
189
  const loaderPath = join(__dirname, '../rip-loader.js');
192
190
 
193
191
  if (inputFile.endsWith('.rip')) {
@@ -217,9 +215,6 @@ async function main() {
217
215
  }
218
216
  }
219
217
 
220
- // Helper to check if path is a regular file (not a directory)
221
- const isFile = (path) => existsSync(path) && statSync(path).isFile();
222
-
223
218
  // Fallback: Check for bin/ script in git repo root
224
219
  // Allows `rip migrate --status` to find and run {repo}/bin/migrate
225
220
  // Also triggers if inputFile is a directory (not a compilable file)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rip-lang",
3
- "version": "3.10.4",
3
+ "version": "3.10.5",
4
4
  "description": "A modern language that compiles to JavaScript",
5
5
  "type": "module",
6
6
  "main": "src/compiler.js",