Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add bunx as execute in bun (#128)
- Loading branch information
Showing
6 changed files
with
71 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { expect, test } from 'vitest' | ||
import { parseNx } from '../../src/commands' | ||
|
||
const agent = 'bun' | ||
const _ = (arg: string, expected: string) => () => { | ||
expect( | ||
parseNx(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
|
||
test('single uninstall', _('esbuild', 'bunx esbuild')) | ||
test('multiple', _('esbuild --version', 'bunx esbuild --version')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { expect, test } from 'vitest' | ||
import { parseNx } from '../../src/commands' | ||
|
||
const agent = 'npm' | ||
const _ = (arg: string, expected: string) => () => { | ||
expect( | ||
parseNx(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
|
||
test('single uninstall', _('esbuild', 'npx esbuild')) | ||
test('multiple', _('esbuild --version', 'npx esbuild --version')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { expect, test } from 'vitest' | ||
import { parseNx } from '../../src/commands' | ||
|
||
const agent = 'pnpm' | ||
const _ = (arg: string, expected: string) => () => { | ||
expect( | ||
parseNx(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
|
||
test('single uninstall', _('esbuild', 'pnpm dlx esbuild')) | ||
test('multiple', _('esbuild --version', 'pnpm dlx esbuild --version')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { expect, test } from 'vitest' | ||
import { parseNx } from '../../src/commands' | ||
|
||
const agent = 'yarn' | ||
const _ = (arg: string, expected: string) => () => { | ||
expect( | ||
parseNx(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
|
||
test('single uninstall', _('esbuild', 'npx esbuild')) | ||
test('multiple', _('esbuild --version', 'npx esbuild --version')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { expect, test } from 'vitest' | ||
import { parseNx } from '../../src/commands' | ||
|
||
const agent = 'yarn@berry' | ||
const _ = (arg: string, expected: string) => () => { | ||
expect( | ||
parseNx(agent, arg.split(' ').filter(Boolean)), | ||
).toBe( | ||
expected, | ||
) | ||
} | ||
|
||
test('single uninstall', _('esbuild', 'yarn dlx esbuild')) | ||
test('multiple', _('esbuild --version', 'yarn dlx esbuild --version')) |