Skip to content

Releases

v0.4.0

Choose a tag to compare

@Cellule Cellule released this 29 Sep 01:37
d9b225a

Parsing Behavior Changes (thanks to @TooTallNate via PR #24)

  • Rewrote the parser as a character-by-character state machine instead of the previous regex, so adjacent quoted and unquoted segments are treated as a single argument, matching bash word-splitting
  • Quote characters are now always stripped, including word-internal and key=value positions:
    • --foo="bar"'baz' -> --foo=barbaz
    • a" b" -> a b
    • "a"b -> ab
    • run:silent["echo 1"]["echo 2"] -> run:silent[echo 1][echo 2]
    • --name='Phil Taylor' -> --name=Phil Taylor
  • Fixes #20 (word-internal quotes were not stripped)
  • Fixes #23 (unquoted tail after a quoted section was split into a separate argument)
  • Known differences from bash, unchanged by this release: backslash escapes are not processed, $variables/globs are left literal, and an unclosed quote consumes the rest of the input instead of raising an error
  • Security dependency bumps: minimatch 3.1.5 via #25, brace-expansion 1.1.16 via #27

Build / Breaking Changes

  • Update TypeScript to 7.0.2 (requires Node.js >=16.20)
  • Drop CommonJS support: the package is now ESM-only (import only). The commonjs/ build, the require export condition, and the module/main CJS entry points have been removed β€” main and exports now point to the single ESM build (./index.js)
  • Consolidate to a single build: removed tsconfig.base.json and tsconfig.commonjs.json; tsconfig.json is now self-contained (target ES2022, module ESNext, strict, declaration) and npm run build runs a single tsc -p .. Note: TypeScript 7 no longer accepts the old target ES3 (hence the ES2022 baseline)
  • Minimum Node.js version is now >=16.20.0 (engines updated accordingly)
  • Tests: removed the CJS require() spec (test/Index.spec.cjs); test/config.json now runs *[sS]pec.js only

Requires Node.js >=16.20.0. ESM-only β€” use import, not require().

string-argv v0.3.0

Choose a tag to compare

@Cellule Cellule released this 16 Apr 13:58

Changelog

v0.3.0 (2019-04-16)

Dev Experience Changes

  • Project now compiled with TypeScript and provides typings 7415c2

string-argv v0.2.1

Choose a tag to compare

@Cellule Cellule released this 16 Apr 13:57

Changelog

v0.2.1 (2019-04-14)

Parsing Behavior Changes

  • Now parses multiple nested quotes and content when there are no spaces 7d9b897

string-argv v0.1.2

Choose a tag to compare

@Cellule Cellule released this 11 Mar 17:25

Changelog

  • Add support for empty quotes #13