Comparing version 1.2.0 to 1.2.1
@@ -12,2 +12,7 @@ # Changelog | ||
## [1.2.1] - 2021-04-24 | ||
- Provide TypeScript type definitions. | ||
- Update documentation to use ECMAScript module in examples. | ||
## [1.2.0] - 2021-04-14 | ||
@@ -14,0 +19,0 @@ |
@@ -6,8 +6,8 @@ /** | ||
* @example | ||
* const cp = require("child_process"); | ||
* const shescape = require("shescape"); | ||
* import cp from "child_process"; | ||
* import * as shescape from "shescape"; | ||
* cp.spawn("command", shescape.escapeAll(userInput), options); | ||
* | ||
* @module shescape | ||
* @version 1.2.0 | ||
* @version 1.2.1 | ||
* @license MPL-2.0 | ||
@@ -14,0 +14,0 @@ * @author Eric Cornelissen <ericornelissen@gmail.com> |
{ | ||
"name": "shescape", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "simple shell escape library", | ||
@@ -13,4 +13,5 @@ "homepage": "https://ericcornelissen.github.io/shescape/", | ||
}, | ||
"typings": "index.d.ts", | ||
"scripts": { | ||
"clean": "rm -rf .corpus coverage crash-* index.cjs", | ||
"clean": "rm -rf .corpus/ .nyc_output/ .stryker-tmp/ reports/ crash-* index.cjs", | ||
"format": "prettier --write ./**/*.{cjs,js,md,yml}", | ||
@@ -24,3 +25,4 @@ "prefuzz": "npm run transpile", | ||
"test": "mocha test/**/*.test.js", | ||
"test:coverage": "c8 --reporter=lcov --reporter=text npm run test", | ||
"test:coverage": "c8 --reports-dir=reports/coverage --reporter=lcov --reporter=text npm run test", | ||
"test:mutation": "stryker run", | ||
"transpile": "ncc build index.js && mv dist/index.js index.cjs && rm -rf dist" | ||
@@ -46,2 +48,3 @@ }, | ||
"devDependencies": { | ||
"@stryker-mutator/core": "^4.6.0", | ||
"@vercel/ncc": "^0.28.3", | ||
@@ -48,0 +51,0 @@ "c8": "^7.7.1", |
@@ -22,4 +22,4 @@ # Shescape | ||
```js | ||
const cp = require("child_process"); | ||
const shescape = require("shescape"); | ||
import cp from "child_process"; | ||
import * as shescape from "shescape"; | ||
@@ -26,0 +26,0 @@ cp.spawn("command", shescape.escapeAll(userInput), options); |
@@ -37,11 +37,7 @@ /** | ||
export function escapeShellArgByPlatform(arg, platform) { | ||
let argAsString = arg; | ||
if (typeof arg !== "string") { | ||
if (!isStringable(arg)) { | ||
throw new TypeError(typeError); | ||
} | ||
argAsString = arg.toString(); | ||
if (!isStringable(arg)) { | ||
throw new TypeError(typeError); | ||
} | ||
const argAsString = arg.toString(); | ||
switch (platform) { | ||
@@ -48,0 +44,0 @@ case win32: |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
37627
12
448
0
10