Comparing version 2.1.0 to 2.1.1
@@ -14,2 +14,7 @@ <!-- SPDX-License-Identifier: CC0-1.0 --> | ||
## [2.1.1] - 2024-05-01 | ||
- Add support for Node.js v22. ([#1536]) | ||
- Add a `Shescape` stub with failing methods to the testing module. ([#1530]) | ||
## [2.1.0] - 2023-12-23 | ||
@@ -337,4 +342,6 @@ | ||
[#1308]: https://github.com/ericcornelissen/shescape/pull/1308 | ||
[#1530]: https://github.com/ericcornelissen/shescape/pull/1530 | ||
[#1536]: https://github.com/ericcornelissen/shescape/pull/1536 | ||
[552e8ea]: https://github.com/ericcornelissen/shescape/commit/552e8eab56861720b1d4e5474fb65741643358f9 | ||
[keep a changelog]: https://keepachangelog.com/en/1.0.0/ | ||
[semantic versioning]: https://semver.org/spec/v2.0.0.html |
@@ -159,5 +159,5 @@ <!-- SPDX-License-Identifier: CC-BY-SA-4.0 --> | ||
> **Warning**: If possible, it is advised to rewrite your code so that you can | ||
> use `Shescape#quote` as shown above. Or use a different function from the | ||
> `child_process` API, as shown further down below. | ||
**WARNING:** If possible, it is advised to rewrite your code so that you can | ||
use `Shescape#quote` as shown above. Or use a different function from the | ||
`child_process` API, as shown further down below. | ||
@@ -304,5 +304,5 @@ ```javascript | ||
> **Warning**: Due to a bug in Node.js (<18.7.0), using `execFileSync` with a | ||
> shell may result in `args` not being passed properly to the `command`, | ||
> depending on the shell being used. See [nodejs/node#43333]. | ||
**WARNING:** Due to a bug in Node.js (<18.7.0), using `execFileSync` with a | ||
shell may result in `args` not being passed properly to the `command`, depending | ||
on the shell being used. See [nodejs/node#43333]. | ||
@@ -309,0 +309,0 @@ ```javascript |
@@ -17,4 +17,4 @@ <!-- SPDX-License-Identifier: CC-BY-SA-4.0 --> | ||
> **Warning**: If the code under test invokes a command you should **not** use | ||
> these stubs. | ||
**WARNING:** If the code under test invokes a command you should not use these | ||
stubs. | ||
@@ -55,2 +55,15 @@ ```javascript | ||
### What Stubs | ||
This project provides three test stubs to support testing three separate | ||
scenarios, namely: | ||
- `Stubscape`: Provides nearly identical behavior to Shescape. The API behaves | ||
the same as Shescape but independent of which shell is used and it never fails | ||
to instantiate. | ||
- `Failscape`: Is a test stub that always fails to escape or quote, but never | ||
fails to instantiate. Helpful to test this scenario explicitly. | ||
- `Throwscape`: Is a test stub that always fails to instantiate. Helpful to test | ||
this scenario explicitly. | ||
## Fixtures | ||
@@ -57,0 +70,0 @@ |
@@ -98,3 +98,3 @@ <!-- SPDX-License-Identifier: CC-BY-SA-4.0 --> | ||
> **Note**: Always verify that the program you're invoking supports `--`. | ||
**NOTE:** Always verify that the program you're invoking supports `--`. | ||
@@ -101,0 +101,0 @@ ```javascript |
{ | ||
"name": "shescape", | ||
"version": "2.1.0", | ||
"version": "2.1.1", | ||
"description": "simple shell escape library", | ||
@@ -12,7 +12,7 @@ "homepage": "https://github.com/ericcornelissen/shescape#readme", | ||
"types": "./index.d.ts", | ||
"default": "./index.js" | ||
"default": "./src/modules/index.js" | ||
}, | ||
"require": { | ||
"types": "./index.d.cts", | ||
"default": "./index.cjs" | ||
"default": "./src/modules/index.cjs" | ||
} | ||
@@ -23,7 +23,7 @@ }, | ||
"types": "./stateless.d.ts", | ||
"default": "./stateless.js" | ||
"default": "./src/modules/stateless.js" | ||
}, | ||
"require": { | ||
"types": "./stateless.d.cts", | ||
"default": "./stateless.cjs" | ||
"default": "./src/modules/stateless.cjs" | ||
} | ||
@@ -34,7 +34,7 @@ }, | ||
"types": "./testing.d.ts", | ||
"default": "./testing.js" | ||
"default": "./src/modules/testing.js" | ||
}, | ||
"require": { | ||
"types": "./testing.d.cts", | ||
"default": "./testing.cjs" | ||
"default": "./src/modules/testing.cjs" | ||
} | ||
@@ -45,3 +45,3 @@ } | ||
"engines": { | ||
"node": "^14.18.0 || ^16.13.0 || ^18 || ^19 || ^20" | ||
"node": "^14.18.0 || ^16.13.0 || ^18 || ^19 || ^20 || ^22" | ||
}, | ||
@@ -69,39 +69,34 @@ "repository": { | ||
"devDependencies": { | ||
"@arethetypeswrong/cli": "0.13.4", | ||
"@ericcornelissen/eslint-plugin-top": "2.1.0", | ||
"@arethetypeswrong/cli": "0.15.2", | ||
"@ericcornelissen/eslint-plugin-top": "3.2.0", | ||
"@fast-check/ava": "1.2.1", | ||
"@gitlab-org/jsfuzz": "1.2.2", | ||
"@stryker-mutator/core": "8.0.0", | ||
"@stryker-mutator/tap-runner": "8.0.0", | ||
"ava": "6.0.1", | ||
"@stryker-mutator/core": "8.2.6", | ||
"@stryker-mutator/tap-runner": "8.2.6", | ||
"ava": "6.1.1", | ||
"better-npm-audit": "3.7.3", | ||
"c8": "8.0.1", | ||
"c8": "9.0.0", | ||
"dotenv": "16.3.1", | ||
"eslint": "8.56.0", | ||
"eslint": "9.1.1", | ||
"eslint-plugin-ava": "14.0.0", | ||
"eslint-plugin-jsdoc": "46.9.0", | ||
"eslint-plugin-jsonc": "2.11.2", | ||
"eslint-plugin-regexp": "2.1.2", | ||
"eslint-plugin-yml": "1.11.0", | ||
"fast-check": "3.15.0", | ||
"husky": "8.0.3", | ||
"eslint-plugin-jsdoc": "48.2.3", | ||
"eslint-plugin-jsonc": "2.15.1", | ||
"eslint-plugin-regexp": "2.5.0", | ||
"eslint-plugin-yml": "1.14.0", | ||
"fast-check": "3.17.2", | ||
"husky": "9.0.10", | ||
"is-ci": "3.0.1", | ||
"knip": "3.8.4", | ||
"knip": "5.11.0", | ||
"licensee": "10.0.0", | ||
"lockfile-lint": "4.12.1", | ||
"markdownlint-cli": "0.38.0", | ||
"lockfile-lint": "4.13.1", | ||
"markdownlint-cli": "0.39.0", | ||
"nve": "17.0.0", | ||
"prettier": "3.1.1", | ||
"publint": "0.2.4", | ||
"rollup": "4.9.1", | ||
"shescape-previous": "npm:shescape@2.0.1", | ||
"prettier": "3.2.4", | ||
"publint": "0.2.7", | ||
"rollup": "4.16.3", | ||
"shescape-previous": "npm:shescape@2.1.0", | ||
"sinon": "17.0.1" | ||
}, | ||
"scripts": { | ||
"prepare": "is-ci || husky install script/hooks", | ||
"prepublishOnly": "npm run transpile", | ||
"premutation:integration": "npm run transpile", | ||
"pretest:integration": "npm run transpile", | ||
"prevet:package.json": "npm run transpile", | ||
"_eslint": "eslint . --config config/eslint.yml --report-unused-disable-directives", | ||
"_eslint": "eslint --config config/eslint.js --report-unused-disable-directives", | ||
"_prettier": "prettier . --ignore-path .gitignore", | ||
@@ -127,16 +122,17 @@ "audit": "better-npm-audit audit", | ||
"lint:ci": "node script/maybe-run.js actionlint", | ||
"lint:js": "npm run _eslint -- --ext .js,.cjs", | ||
"lint:json": "npm run _eslint -- --ext .json,.jsonc", | ||
"lint:js": "npm run _eslint -- '**/*.{cjs,js}'", | ||
"lint:json": "npm run _eslint -- '**/*.{json,jsonc}'", | ||
"lint:md": "markdownlint --config config/markdownlint.yml --dot --ignore-path .gitignore .", | ||
"lint:sh": "node script/maybe-run.js shellcheck script/hooks/*.sh script/hooks/pre-*", | ||
"lint:yml": "npm run _eslint -- --ext .yml", | ||
"lint:yml": "npm run _eslint -- '**/*.yml'", | ||
"mutation": "npm run mutation:unit && npm run mutation:integration", | ||
"mutation:integration": "stryker run config/stryker/integration.js", | ||
"mutation:integration": "npm run transpile && stryker run config/stryker/integration.js", | ||
"mutation:unit": "stryker run config/stryker/unit.js", | ||
"setup": "husky script/hooks", | ||
"test": "npm run test:unit && npm run test:integration && npm run test:e2e && npm run test:compat && npm run test:breakage", | ||
"test:breakage": "ava test/breakage/**/*.test.js", | ||
"test:compat": "node test/compat/runner.js", | ||
"test:compat-all": "nve 14.18.0,16.13.0,18.0.0,19.0.0,20.0.0 npm run test:compat", | ||
"test:compat-all": "nve 14.18.0,16.13.0,18.0.0,19.0.0,20.0.0,22.0.0 npm run test:compat", | ||
"test:e2e": "ava test/e2e/**/*.test.js --timeout 1m", | ||
"test:integration": "ava test/integration/**/*.test.js --timeout 2m", | ||
"test:integration": "npm run transpile && ava test/integration/**/*.test.js --timeout 2m", | ||
"test:unit": "ava test/unit/**/*.test.js", | ||
@@ -147,5 +143,5 @@ "transpile": "rollup --config config/rollup.js && node script/create-d-cts.js", | ||
"vet:deps": "knip --config config/knip.jsonc", | ||
"vet:package.json": "publint --strict && attw --pack .", | ||
"vet:package-lock.json": "lockfile-lint --path package-lock.json --allowed-hosts npm gitlab.com --validate-https" | ||
"vet:package.json": "npm run transpile && publint --strict && attw --pack .", | ||
"vet:package-lock.json": "lockfile-lint" | ||
} | ||
} |
@@ -88,4 +88,4 @@ <!-- SPDX-License-Identifier: CC-BY-SA-4.0 --> | ||
Supporting code, such a scripts and tests, is generally licensed under the `MIT` | ||
license. However, individual files may be licensed differently depending on the | ||
intend or origin. | ||
or `MIT-0` license. Individual files may be licensed differently depending on | ||
the intend or origin. | ||
@@ -92,0 +92,0 @@ The license under which a given file is available can always be found in the |
@@ -10,2 +10,6 @@ <!-- SPDX-License-Identifier: CC0-1.0 --> | ||
This document should be considered expired after 2024-10-01. If you are | ||
reading this after that date you should try to find an up-to-date version | ||
in the official source repository. | ||
## Supported Versions | ||
@@ -87,4 +91,6 @@ | ||
> **Note**: Advisories will be created only for vulnerabilities present in | ||
> released versions of the project. | ||
An advisory will be created only if a vulnerability affects at least one | ||
released versions of the project. The affected versions range of an advisory | ||
will by default include all unsupported versions of the project at the time of | ||
disclosure. | ||
@@ -91,0 +97,0 @@ | ID | Date | Affected versions | Patched versions | |
@@ -7,3 +7,3 @@ /** | ||
import type { ShescapeOptions } from "shescape"; | ||
import type { ShescapeOptions } from "./index.d.ts"; | ||
@@ -10,0 +10,0 @@ /** |
@@ -6,3 +6,3 @@ /** | ||
import type { Shescape as ShescapeType } from "shescape"; | ||
import type { Shescape as ShescapeType } from "./index.d.ts"; | ||
@@ -22,2 +22,8 @@ /** | ||
/** | ||
* A test stub of Shescape that can be instantiated but all methods always fail. | ||
* This can be used to simulate a failure when using Shescape in your code. | ||
*/ | ||
export const Failscape: ShescapeType; | ||
/** | ||
* An optimistic test stub of Shescape that has the same input-output profile as | ||
@@ -24,0 +30,0 @@ * the real Shescape implementation. |
Sorry, the diff of this file is not supported yet
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
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
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
231305
39
4958
1