Skip to content

Commit a6f2434

Browse files
committed
Add oxnode to binaries with first positional arg entry
1 parent 4a8dd49 commit a6f2434

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

packages/knip/src/binaries/fallback.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ import type { BinaryResolver } from '../types/config.js';
33
import { compact } from '../util/array.js';
44
import { toBinary, toDeferResolve, toEntry } from '../util/input.js';
55

6-
// Binaries that spawn a child process for the binary at first positional arg (and don't have custom resolver already)
6+
// Generic fallbacks for basic handling of binaries that don't have a plugin nor a custom resolver
7+
8+
// Binaries that spawn a child process for the binary at first positional arg
79
const spawningBinaries = ['cross-env', 'retry-cli'];
810

9-
// Binaries that have a new script behind the double-dash/end-of-command (and don't have custom resolver already)
11+
// Binaries that have a new script behind the double-dash/end-of-command
1012
const endOfCommandBinaries = ['dotenvx'];
1113

12-
const positionals = new Set(['babel-node', 'esbuild', 'execa', 'jiti', 'vite-node', 'zx']);
14+
// Binaries with entry at first positional arg
15+
const positionals = new Set(['babel-node', 'esbuild', 'execa', 'jiti', 'oxnode', 'vite-node', 'zx']);
1316

1417
export const resolve: BinaryResolver = (binary, args, { fromArgs }) => {
1518
const parsed = parseArgs(args, { boolean: ['quiet', 'verbose'], '--': endOfCommandBinaries.includes(binary) });

0 commit comments

Comments
 (0)