diff --git a/lib/node-arguments.js b/lib/node-arguments.js index ea444cc19..7848a0304 100644 --- a/lib/node-arguments.js +++ b/lib/node-arguments.js @@ -1,12 +1,12 @@ import process from 'node:process'; -import arrgv from 'arrgv'; +import {tokenizeArgs} from 'args-tokenizer'; export default function normalizeNodeArguments(fromConf = [], fromArgv = '') { let parsedArgv = []; if (fromArgv !== '') { try { - parsedArgv = arrgv(fromArgv); + parsedArgv = tokenizeArgs(fromArgv); } catch { throw new Error('Could not parse `--node-arguments` value. Make sure all strings are closed and backslashes are used correctly.'); } diff --git a/package-lock.json b/package-lock.json index 7fb86d068..840ff800d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "acorn": "^8.13.0", "acorn-walk": "^8.3.4", "ansi-styles": "^6.2.1", - "arrgv": "^1.0.2", + "args-tokenizer": "^0.3.0", "arrify": "^3.0.0", "callsites": "^4.2.0", "cbor": "^9.0.2", @@ -3019,6 +3019,12 @@ "sprintf-js": "~1.0.2" } }, + "node_modules/args-tokenizer": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/args-tokenizer/-/args-tokenizer-0.3.0.tgz", + "integrity": "sha512-xXAd7G2Mll5W8uo37GETpQ2VrE84M181Z7ugHFGQnJZ50M2mbOv0osSZ9VsSgPfJQ+LVG0prSi0th+ELMsno7Q==", + "license": "MIT" + }, "node_modules/array-buffer-byte-length": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.1.tgz", @@ -3162,6 +3168,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/arrgv/-/arrgv-1.0.2.tgz", "integrity": "sha512-a4eg4yhp7mmruZDQFqVMlxNRFGi/i1r87pt8SDHy0/I8PqSXoUTlWZRdAZo0VXgvEARcujbtTk8kiZRi1uDGRw==", + "dev": true, "license": "MIT", "engines": { "node": ">=8.0.0" diff --git a/package.json b/package.json index 426edad69..32df09e6b 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "acorn": "^8.13.0", "acorn-walk": "^8.3.4", "ansi-styles": "^6.2.1", - "arrgv": "^1.0.2", + "args-tokenizer": "^0.3.0", "arrify": "^3.0.0", "callsites": "^4.2.0", "cbor": "^9.0.2",