All notable changes to Shescape will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- No changes yet
- Add support for Node.js v22. (#1536)
- Add a
Shescape
stub with failing methods to the testing module. (#1530)
- Add
shescape/stateless
module with v1-like API. (#1130) - Re-export
Shescape
asStubscape
fromshescape/testing
. (#1308)
- Improve alignment between
Shescape
andStubscape
. (#1149) - Add a failing
Shescape
stub to the testing module. (#1149)
- BREAKING CHANGE: Change main API from an object to a class. (#963)
- BREAKING CHANGE: Drop support for Node.js
^10.13.0
,^12
,14.0.0
through14.18.0
, and16.0.0
through16.13.0
. (#963) - BREAKING CHANGE: Drop the
interpolation
option. (#963) - BREAKING CHANGE: Enable the
flagProtection
option by default. (#963) - BREAKING CHANGE: Reject non-array inputs to
escapeAll
"eAll
. (#963) - BREAKING CHANGE: Reject unresolved shells. (#963)
- BREAKING CHANGE: Reject unsupported shells. (#963)
- Bump dependency
which
from v2 to v3. (#963) - Don't resolve default shell when
shell
option is falsy. (#963)
- Fix potential silent executable lookup failure for Windows. (#1142)
- Support more valid
shell
values for Windows. (#1137)
- Change escaping of carriage return characters for CMD and Csh. (#1094)
- Fix TypeScript type declarations for
"shescape/testing"
. (#1083) - Fix TypeScript type exports for CommonJS use. (#1082)
- Fix incorrect escaping of
"
when escaping for CMD. (#1022) - Fix incorrect escaping of
"
when escaping for PowerShell. (#1023) - Fix incorrect escaping of
"
when quoting for PowerShell. (#1023) - Fix incorrect escaping of
%
when quoting for CMD. (#986, #998)
- Add
%
escaping for CMD. (#982) - Correct documented behavior of quoting functions. (#969)
- Expand injection strings to cover environment variables. (#982)
- Fix incorrect escaping of
$
and backticks for PowerShell. (#984) - Improve quoting functionality for PowerShell. (#983)
- Add flag protection option. (#908)
- Add
@since
information to API options. (#909) - Add
options
to the API documentation. (#936)
- Add support for Node.js v20. (#823)
- Provide testing utilities. (#710)
- Update type exports to be compatible with the TypeScript compiler option
"moduleResolution": "bundler"
. (#761)
- Add support for Node.js v19. (#682)
- Fix incorrect quoting of arguments with trailing
\!
for C shell. (#675)
- Add in-code example usage for each API function. (#610)
- Add whitespace preservation for Bash, Dash, and Zsh. (#584)
- Add whitespace preservation for PowerShell. (#614)
- Improve TypeScript type definitions. (#567)
- Improve JSDoc support for IDEs. (#568)
- Update API documentation. (#612)
- Fix potential polynomial backtracking in regular expression for Bash escaping
with
{interpolation:true}
. (552e8ea)
- Escape control characters
U+0008
,U+000D
,U+001B
, andU+009B
. (#456) - Improve escaping performance when interpolation is set to
true
. (#457) - Improve newline substitution on Windows. (#458, #460)
- Improve specificity of supported Node.js versions. (#432, #459)
- Remove all side effects on import. (#408)
- Fix potential polynomial backtracking in regular expression for Bash escaping
with
{interpolation:true}
. (#373) - Fix potential quadratic runtime regular expressions for Bash escaping with
{interpolation:true}
. (#373)
- Fix escaping characters after
U+0085
with{interpolation:true}
for PowerShell on Windows systems. (#354) - Improve performance of escaping for Dash. (#336)
- Include full documentation in published package. (#350)
- Fix escaping of line feed characters for Bash, Dash, and Zsh on Unix systems. (#332)
- Fix escaping of line feed and carriage return characters for PowerShell and CMD on Windows systems. (#332)
- Fix escaping of
~
and{
for Bash on Unix systems with input strings containing line terminating characters. (#332)
- Fix escaping of characters after whitespace with
{interpolation:true}
for Bash, Dash, and Zsh on Unix systems. (#324) - Fix escaping of characters after whitespace with
{interpolation:true}
for Powershell on Windows systems. (#322)
- Fix unnecessary escaping of quotes with the
child_process
functionsfork
,spawn
, andexecFile
. (#310) - Improve performance of escaping for Dash. (#272)
- Fix
The "path" argument must be of type string
error. (#277)
- Fix
Cannot find module 'path/win32'
error on Node.js <16.0.0. (#199) - Improve detection of the Windows operating system. (#192)
- Fix documented type of
interpolation
option. (#190)
- Add escaping of brace expansion for non-Zsh shells when interpolation is enabled. (#178)
- Explicitly import
process
. (#173)
- Fix default shell for Windows when
%COMSPEC%
is missing. - Fix escaping of
~
for certain input strings withescape
andescapeAll
wheninterpolation
is set totrue
in the options. - Improve error messaging for certain non-string arguments.
- Follow symbolic links when determining the shell to escape for.
- Add escaping for Unix interpolation characters to
escape
/escapeAll
. - Add escaping for Zsh wildcard characters to
escape
/escapeAll
. - Update TypeScript type definitions.
- Update type information in the documentation.
- Add official support for Dash (Debian Almquist shell).
- Include offline documentation in package installation.
- Fix escaping unicode double quotes (U+201C, U+201D, U+201) for PowerShell.
- Update documentation to include officially supported shells.
- Add default shell detection.
- Add support to configure the shell to escape for.
- Fix escaping backticks for PowerShell.
- Fix escaping
$
for PowerShell.
- Provide TypeScript type definitions.
- Update documentation to use ECMAScript module in examples.
- Provide native ECMAScript module source files.
- Strip null characters from arguments.
- Add in-source JSDoc documentation.
- Improve error message when a value is not stringable.
- Add
escapeAll
function to escape an array of arguments. - Recommend usage of
escapeAll
when usingfork
/spawn
/execFile
.
- BREAKING CHANGE: Remove ability to call
shescape()
directly. - BREAKING CHANGE: Automatically convert input to array in
quoteAll()
. - Fix numbering in documentation's "Install" section.
- Support non-string values as arguments.
- Add
quoteAll
function to quote and escape an array of arguments. - Create website with full documentation (no longer exists).
- Deprecate calling
shescape()
directly.
- Add
escape
function to escape an argument (same asshescape()
). - Add
quote
function to quote and escape an argument.
- Fix missing released files.
- Add support for escaping of double quotes on Windows.
- Escape individual shell arguments.