rip-lang 3.10.3 → 3.10.4

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 +2 -2
  2. package/package.json +1 -1
package/bin/rip CHANGED
@@ -3,7 +3,7 @@
3
3
  import { readFileSync, writeFileSync, existsSync, statSync, unlinkSync } from 'fs';
4
4
  import { execSync, spawn } from 'child_process';
5
5
  import { fileURLToPath } from 'url';
6
- import { dirname, join } from 'path';
6
+ import { dirname, basename, join } from 'path';
7
7
  import { Compiler } from '../src/compiler.js';
8
8
  import { startREPL } from '../src/repl.js';
9
9
  import packageJson from '../package.json' with { type: 'json' };
@@ -204,7 +204,7 @@ async function main() {
204
204
  const source = readFileSync(inputFile, 'utf-8');
205
205
  const compiler = new Compiler();
206
206
  const result = compiler.compile(source);
207
- const tmp = join(dirname(inputFile), `.${inputFile}.__rip__.mjs`);
207
+ const tmp = join(dirname(inputFile), `.${basename(inputFile)}.__rip__.mjs`);
208
208
  let exitCode = 0;
209
209
  try {
210
210
  writeFileSync(tmp, result.code);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rip-lang",
3
- "version": "3.10.3",
3
+ "version": "3.10.4",
4
4
  "description": "A modern language that compiles to JavaScript",
5
5
  "type": "module",
6
6
  "main": "src/compiler.js",