Skip to content

Commit

Permalink
refactor: make run.js esm
Browse files Browse the repository at this point in the history
  • Loading branch information
lishaduck committed Dec 4, 2024
1 parent 73b1bea commit a4a1d1c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@
"prettier-check": "prettier . --check --cache",
"prettier-fix": "prettier . --write --cache",
"test": "turbo run testing check-engines --continue",
"test-run": "(cd test/ && node ./run.js)",
"test-run-record": "(cd test/ && node ./run.js record)",
"test-run": "(cd test/ && node ./run.mjs)",
"test-run-record": "(cd test/ && node ./run.mjs record)",
"tsc": "tsc",
"tsc-watch": "tsc --watch"
},
Expand Down
10 changes: 7 additions & 3 deletions test/run.js → test/run.mjs
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
#!/bin/node
/* eslint n/no-process-exit: "off" -- WIP */
const {execSync} = require('node:child_process');
const fs = require('node:fs');
const path = require('node:path');
import {execSync} from 'node:child_process';
import * as fs from 'node:fs';
import * as path from 'node:path';
import {fileURLToPath} from 'node:url';

const __filename = fileURLToPath(import.meta.url);
const __dirname = path.dirname(__filename);

const CMD = 'elm-review --no-color';
const TMP = path.join(__dirname, 'temporary');
Expand Down

0 comments on commit a4a1d1c

Please sign in to comment.