Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Commit

Permalink
feat(node): upgrade minimum version
Browse files Browse the repository at this point in the history
BREAKING CHANGE: upgrade minimum version to 20
  • Loading branch information
pevisscher committed Dec 21, 2023
1 parent d96dba8 commit 7c4660d
Show file tree
Hide file tree
Showing 3 changed files with 3,510 additions and 3,887 deletions.
6 changes: 3 additions & 3 deletions bin/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url))
const project = path.join(__dirname, '../tsconfig.json')
const dev = fs.existsSync(project) && process.env.DEBUG != 'false'

if (dev && !process.env.NODE_OPTIONS?.includes('--loader ts-node/esm')) {
if (dev && !process.env.NODE_OPTIONS?.includes('--import tsx/esm')) {
await new Promise((resolve, reject) => {
const subprocess = spawn(process.argv[0], [...process.argv.slice(1)], {
cwd: process.cwd(),
env: { ...process.env, NODE_OPTIONS: `--loader ts-node/esm/transpile-only --enable-source-maps ${process.env.NODE_OPTIONS ?? ''}` },
env: { ...process.env, NODE_OPTIONS: `--import tsx/esm --enable-source-maps ${process.env.NODE_OPTIONS ?? ''}` },
stdio: 'inherit',
})

Expand All @@ -32,5 +32,5 @@ if (dev && !process.env.NODE_OPTIONS?.includes('--loader ts-node/esm')) {
process.exit(0)
}

const { run } = dev ? await import('../src/index.js') : await import('../.dist/index.js')
const { run } = dev ? await import('../src/index.ts') : await import('../.dist/index.js')
await run().catch(console.error)
Loading

0 comments on commit 7c4660d

Please sign in to comment.