Skip to content

Commit

Permalink
chore: replace shell-quote with args-tokenizer (#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
TrySound authored Dec 21, 2024
1 parent ba0a0d5 commit 457271d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@
"@types/node": "^22.10.1",
"@types/prompts": "^2.4.9",
"@types/semver": "^7.5.8",
"args-tokenizer": "^0.2.0",
"eslint": "^9.16.0",
"esno": "^4.8.0",
"log-symbols": "^7.0.0",
"npm-check": "^6.0.1",
"picocolors": "^1.1.1",
"rimraf": "^6.0.1",
"shell-quote": "^1.8.2",
"tsup": "^8.3.5",
"typescript": "^5.7.2",
"vitest": "^2.1.8"
Expand Down
17 changes: 8 additions & 9 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions src/version-bump.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ import process from 'node:process'
import symbols from 'log-symbols'
import c from 'picocolors'
import prompts from 'prompts'
// @ts-expect-error missing types
import parseCommand from 'shell-quote/parse'
import { tokenizeArgs } from 'args-tokenizer';
import { x } from 'tinyexec'
import { getCurrentVersion } from './get-current-version'
import { getNewVersion } from './get-new-version'
Expand Down Expand Up @@ -78,7 +77,7 @@ export async function versionBump(arg: (VersionBumpOptions) | string = {}): Prom
await operation.options.execute(operation)
}
else {
const [command, ...args] = parseCommand(operation.options.execute)
const [command, ...args] = tokenizeArgs(operation.options.execute)
console.log(symbols.info, 'Executing script', command, ...args)
await x(command, args, {
nodeOptions: {
Expand Down

0 comments on commit 457271d

Please sign in to comment.