diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index 2c434e929..b57a22c34 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -31,7 +31,7 @@ jobs: - name: Checkout repository uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Install Node.js - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 with: cache: npm node-version-file: .nvmrc @@ -75,12 +75,12 @@ jobs: - name: Checkout repository uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Initialize CodeQL - uses: github/codeql-action/init@5b6282e01c62d02e720b81eb8a51204f527c3624 # v2.21.3 + uses: github/codeql-action/init@a09933a12a80f87b87005513f0abb1494c27a716 # v2.21.4 with: config-file: ./.github/codeql.yml languages: javascript - name: Perform CodeQL analysis - uses: github/codeql-action/analyze@5b6282e01c62d02e720b81eb8a51204f527c3624 # v2.21.3 + uses: github/codeql-action/analyze@a09933a12a80f87b87005513f0abb1494c27a716 # v2.21.4 format: name: Formatting runs-on: ubuntu-22.04 @@ -102,7 +102,7 @@ jobs: - name: Checkout repository uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Install Node.js - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 with: cache: npm node-version-file: .nvmrc @@ -131,7 +131,7 @@ jobs: - name: Checkout repository uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Install Node.js - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 with: cache: npm node-version-file: .nvmrc @@ -162,7 +162,7 @@ jobs: - name: Install tooling uses: asdf-vm/actions/install@6a442392015fbbdd8b48696d41e0051b2698b2e4 # v2.2.0 - name: Install Node.js - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 with: cache: npm node-version-file: .nvmrc @@ -213,7 +213,7 @@ jobs: with: args: . --sarif --output njsscan-results.sarif || true - name: Upload njsscan report to GitHub - uses: github/codeql-action/upload-sarif@5b6282e01c62d02e720b81eb8a51204f527c3624 # v2.21.3 + uses: github/codeql-action/upload-sarif@a09933a12a80f87b87005513f0abb1494c27a716 # v2.21.4 if: ${{ failure() || success() }} with: sarif_file: njsscan-results.sarif @@ -250,7 +250,7 @@ jobs: - name: Checkout repository uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Install Node.js - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 with: cache: npm node-version: ${{ matrix.node-version }} @@ -301,7 +301,7 @@ jobs: - name: Checkout repository uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Install Node.js - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 with: cache: npm node-version-file: .nvmrc @@ -352,7 +352,7 @@ jobs: - name: Checkout repository uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Install Node.js - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 with: cache: npm node-version-file: .nvmrc @@ -395,7 +395,7 @@ jobs: COMMIT_SHA="$(git rev-parse HEAD)" echo "commit-sha=$COMMIT_SHA" >> "$GITHUB_OUTPUT" - name: Install Node.js - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 with: cache: npm node-version-file: .nvmrc @@ -447,7 +447,7 @@ jobs: COMMIT_SHA="$(git rev-parse HEAD)" echo "commit-sha=$COMMIT_SHA" >> "$GITHUB_OUTPUT" - name: Install Node.js - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 with: cache: npm node-version-file: .nvmrc @@ -494,7 +494,7 @@ jobs: - name: Checkout repository uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Install Node.js - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 with: cache: npm node-version-file: .nvmrc @@ -529,7 +529,7 @@ jobs: - name: Checkout repository uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Install Node.js - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 with: cache: npm node-version-file: .nvmrc @@ -575,7 +575,7 @@ jobs: scan-ref: . template: "@/contrib/sarif.tpl" - name: Upload Trivy report to GitHub - uses: github/codeql-action/upload-sarif@5b6282e01c62d02e720b81eb8a51204f527c3624 # v2.21.3 + uses: github/codeql-action/upload-sarif@a09933a12a80f87b87005513f0abb1494c27a716 # v2.21.4 if: ${{ failure() || success() }} with: sarif_file: trivy-results.sarif @@ -600,7 +600,7 @@ jobs: - name: Checkout repository uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Install Node.js - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 with: cache: npm node-version-file: .nvmrc diff --git a/.github/workflows/config-npm.yml b/.github/workflows/config-npm.yml index dc3abd379..9dc8253a3 100644 --- a/.github/workflows/config-npm.yml +++ b/.github/workflows/config-npm.yml @@ -35,7 +35,7 @@ jobs: - name: Checkout repository uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Install Node.js - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 with: cache: npm node-version-file: .nvmrc diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 3a5444499..4051ca9ae 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -33,7 +33,7 @@ jobs: with: fetch-depth: 0 # To fetch all tags - name: Install Node.js - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 with: cache: npm node-version-file: .nvmrc @@ -79,19 +79,25 @@ jobs: - name: Get release version uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 id: major_version + env: + VERSION: ${{ needs.check.outputs.version }} with: result-encoding: string script: | - const version = "${{ needs.check.outputs.version }}" + const version = `${process.env.VERSION}` const major = version.replace(/\.\d\.\d$/, "") return major - name: Create release tag + env: + VERSION: ${{ needs.check.outputs.version }} run: | - git tag '${{ needs.check.outputs.version }}' - git push origin '${{ needs.check.outputs.version }}' + git tag "${VERSION}" + git push origin "${VERSION}" - name: Update major version branch + env: + MAJOR_VERSION: ${{ steps.major_version.outputs.result }} run: | - git push origin 'HEAD:${{ steps.major_version.outputs.result }}' + git push origin "HEAD:${MAJOR_VERSION}" github: name: GitHub runs-on: ubuntu-22.04 @@ -150,7 +156,7 @@ jobs: - name: Checkout repository uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Install Node.js - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 with: cache: npm node-version-file: .nvmrc diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a32e0fc55..3533fdd8e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -38,7 +38,7 @@ jobs: - name: Checkout repository uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 - name: Install Node.js - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 with: cache: npm node-version-file: .nvmrc diff --git a/.github/workflows/reusable-audit.yml b/.github/workflows/reusable-audit.yml index 6e4265b1e..f6eadf9e5 100644 --- a/.github/workflows/reusable-audit.yml +++ b/.github/workflows/reusable-audit.yml @@ -38,7 +38,7 @@ jobs: with: ref: ${{ matrix.ref }} - name: Install Node.js - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 with: cache: npm node-version-file: .nvmrc diff --git a/.github/workflows/reusable-fuzz.yml b/.github/workflows/reusable-fuzz.yml index 6fb1df297..a7b9f552f 100644 --- a/.github/workflows/reusable-fuzz.yml +++ b/.github/workflows/reusable-fuzz.yml @@ -53,16 +53,20 @@ jobs: - name: Create identifier uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1 id: run-id + env: + OS: ${{ inputs.os }} + SHELL: ${{ inputs.shell }} + TARGET: ${{ matrix.target }} with: result-encoding: string script: | - const path = "${{ inputs.shell }}" + const path = `${process.env.SHELL}` const fileName = path.split(/\//g).pop() const shellName = fileName.endsWith(".exe") ? fileName.slice(0, -4) : fileName - return `${{ inputs.os }}-${shellName}-${{ matrix.target }}` + return `${process.env.OS}-${shellName}-${process.env.TARGET}` - name: Install Node.js - uses: actions/setup-node@e33196f7422957bea03ed53f6fbb155025ffc7b8 # v3.7.0 + uses: actions/setup-node@5e21ff4d9bc1a8cf6de233a3057d20ec6b3fb69d # v3.8.1 with: cache: npm node-version-file: .nvmrc @@ -85,9 +89,11 @@ jobs: id: fuzz shell: bash {0} env: + DURATION: ${{ inputs.duration }} FUZZ_SHELL: ${{ inputs.shell }} + TARGET: ${{ matrix.target }} run: | - timeout '${{ inputs.duration }}s' npm run fuzz '${{ matrix.target }}' + timeout "${DURATION}s" npm run fuzz "${TARGET}" export EXIT_CODE=$? if [[ ($EXIT_CODE == 124) ]]; then echo 'fuzz-error=false' >> $GITHUB_OUTPUT @@ -102,8 +108,10 @@ jobs: fi - name: Check for unexpected error if: ${{ steps.fuzz.outputs.script-error == 'true' }} + env: + EXIT_CODE: ${{ steps.fuzz.outputs.exit-code }} run: | - echo 'Unexpected error: ${{ steps.fuzz.outputs.exit-code }}' + echo "Unexpected error: ${EXIT_CODE}" exit 1 - name: Upload crash (if any) if: ${{ steps.fuzz.outputs.fuzz-error == 'true' }} diff --git a/.github/workflows/semgrep.yml b/.github/workflows/semgrep.yml index 08115fe7c..ea3fbb7f0 100644 --- a/.github/workflows/semgrep.yml +++ b/.github/workflows/semgrep.yml @@ -22,7 +22,7 @@ jobs: env: SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }} - name: Upload Semgrep report to GitHub - uses: github/codeql-action/upload-sarif@5b6282e01c62d02e720b81eb8a51204f527c3624 # v2.21.3 + uses: github/codeql-action/upload-sarif@a09933a12a80f87b87005513f0abb1494c27a716 # v2.21.4 if: ${{ failure() || success() }} with: sarif_file: semgrep.sarif diff --git a/README.md b/README.md index 3063ed1f1..032045628 100644 --- a/README.md +++ b/README.md @@ -72,9 +72,11 @@ View the [testing] documentation for how to test code that uses Shescape. Read the [tips] for additional ways to protect against shell injection. ---- +## License -_Content licensed under [CC BY-SA 4.0]; Code snippets under the [MIT license]._ +The source code is licensed under the `MPL-2.0` license, see [LICENSE] for +the full license text. The documentation text is licensed under [CC BY-SA 4.0]; +code snippets under the [MIT license]. [ci-url]: https://github.com/ericcornelissen/shescape/actions/workflows/checks.yml [ci-image]: https://github.com/ericcornelissen/shescape/actions/workflows/checks.yml/badge.svg @@ -90,7 +92,7 @@ _Content licensed under [CC BY-SA 4.0]; Code snippets under the [MIT license]._ [cmd.exe]: https://en.wikipedia.org/wiki/Cmd.exe [csh]: https://en.wikipedia.org/wiki/C_shell [dash]: https://en.wikipedia.org/wiki/Almquist_shell#Dash "Debian Almquist Shell" -[license]: https://github.com/ericcornelissen/shescape/blob/main/LICENSE +[license]: ./LICENSE [mit license]: https://opensource.org/license/mit/ [powershell]: https://en.wikipedia.org/wiki/PowerShell [recipes]: docs/recipes.md diff --git a/package-lock.json b/package-lock.json index 470802a35..a7022c211 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,23 +23,23 @@ "better-npm-audit": "3.7.3", "c8": "8.0.1", "dotenv": "16.3.1", - "eslint": "8.46.0", + "eslint": "8.47.0", "eslint-plugin-ava": "14.0.0", - "eslint-plugin-jsdoc": "46.4.3", + "eslint-plugin-jsdoc": "46.4.6", "eslint-plugin-jsonc": "2.9.0", "eslint-plugin-regexp": "1.15.0", "eslint-plugin-yml": "1.8.0", "fast-check": "3.12.0", "husky": "8.0.3", "is-ci": "3.0.1", - "knip": "2.17.0", + "knip": "2.19.5", "licensee": "10.0.0", "markdownlint-cli": "0.35.0", "nve": "16.1.0", "nyc": "15.1.0", - "prettier": "3.0.1", + "prettier": "3.0.2", "publint": "0.2.0", - "rollup": "3.27.0", + "rollup": "3.28.0", "sinon": "15.2.0" }, "engines": { @@ -849,12 +849,12 @@ } }, "node_modules/@es-joy/jsdoccomment": { - "version": "0.39.4", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.39.4.tgz", - "integrity": "sha512-Jvw915fjqQct445+yron7Dufix9A+m9j1fCJYlCo1FWlRvTxa3pjJelxdSTdaLWcTwRU6vbL+NYjO4YuNIS5Qg==", + "version": "0.40.1", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.40.1.tgz", + "integrity": "sha512-YORCdZSusAlBrFpZ77pJjc5r1bQs5caPWtAu+WWmiSo+8XaUzseapVrfAtiRFbQWnrBxxLLEwF6f6ZG/UgCQCg==", "dev": true, "dependencies": { - "comment-parser": "1.3.1", + "comment-parser": "1.4.0", "esquery": "^1.5.0", "jsdoc-type-pratt-parser": "~4.0.0" }, @@ -887,9 +887,9 @@ } }, "node_modules/@eslint/eslintrc": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.1.tgz", - "integrity": "sha512-9t7ZA7NGGK8ckelF0PQCfcxIUzs1Md5rrO6U/c+FIQNanea5UZC0wqKXH4vHBccmu4ZJgZ2idtPeW7+Q2npOEA==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.2.tgz", + "integrity": "sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -936,9 +936,9 @@ } }, "node_modules/@eslint/eslintrc/node_modules/globals": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-13.20.0.tgz", - "integrity": "sha512-Qg5QtVkCy/kv3FUSlu4ukeZDVf9ee0iXLAUYX13gbR17bnejFTzr4iS9bY7kwCf1NztRNm1t91fjOiyx4CSwPQ==", + "version": "13.21.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-13.21.0.tgz", + "integrity": "sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg==", "dev": true, "dependencies": { "type-fest": "^0.20.2" @@ -981,9 +981,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.46.0.tgz", - "integrity": "sha512-a8TLtmPi8xzPkCbp/OGFUo5yhRkHM2Ko9kOWP4znJr0WAhWyThaw3PnwX4vOTWOAMsV2uRt32PPDcEz63esSaA==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.47.0.tgz", + "integrity": "sha512-P6omY1zv5MItm93kLM8s2vr1HICJH8v0dvddDhysbIuZ+vcjOHg5Zbkf1mTkcmi2JA9oBG2anOkRnW8WJTS8Og==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -3717,9 +3717,9 @@ } }, "node_modules/comment-parser": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.3.1.tgz", - "integrity": "sha512-B52sN2VNghyq5ofvUsqZjmk6YkihBX5vMSChmSK9v4ShjKf3Vk5Xcmgpw4o+iIgtrnM/u5FiMpz9VKb8lpBveA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.4.0.tgz", + "integrity": "sha512-QLyTNiZ2KDOibvFPlZ6ZngVsZ/0gYnE6uTXi5aoDg8ed3AkJAz4sEje3Y8a29hQ1s6A99MZXe47fLAXQ1rTqaw==", "dev": true, "engines": { "node": ">= 12.0.0" @@ -4408,15 +4408,15 @@ } }, "node_modules/eslint": { - "version": "8.46.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.46.0.tgz", - "integrity": "sha512-cIO74PvbW0qU8e0mIvk5IV3ToWdCq5FYG6gWPHHkx6gNdjlbAYvtfHmlCMXxjcoVaIdwy/IAt3+mDkZkfvb2Dg==", + "version": "8.47.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.47.0.tgz", + "integrity": "sha512-spUQWrdPt+pRVP1TTJLmfRNJJHHZryFmptzcafwSvHsceV81djHOdnEeDmkdotZyLNjDhrOasNK8nikkoG1O8Q==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", - "@eslint/eslintrc": "^2.1.1", - "@eslint/js": "^8.46.0", + "@eslint/eslintrc": "^2.1.2", + "@eslint/js": "^8.47.0", "@humanwhocodes/config-array": "^0.11.10", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -4427,7 +4427,7 @@ "doctrine": "^3.0.0", "escape-string-regexp": "^4.0.0", "eslint-scope": "^7.2.2", - "eslint-visitor-keys": "^3.4.2", + "eslint-visitor-keys": "^3.4.3", "espree": "^9.6.1", "esquery": "^1.4.2", "esutils": "^2.0.2", @@ -4484,19 +4484,19 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "46.4.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.4.3.tgz", - "integrity": "sha512-Prc7ol+vCIghPeECpwZq5+P+VZfoi87suywvbYCiCnkI1kTmVSdcOC2M8mioglWxBbd28wbb1OVjg/8OzGzatA==", + "version": "46.4.6", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-46.4.6.tgz", + "integrity": "sha512-z4SWYnJfOqftZI+b3RM9AtWL1vF/sLWE/LlO9yOKDof9yN2+n3zOdOJTGX/pRE/xnPsooOLG2Rq6e4d+XW3lNw==", "dev": true, "dependencies": { - "@es-joy/jsdoccomment": "~0.39.4", + "@es-joy/jsdoccomment": "~0.40.1", "are-docs-informative": "^0.0.2", - "comment-parser": "1.3.1", + "comment-parser": "1.4.0", "debug": "^4.3.4", "escape-string-regexp": "^4.0.0", "esquery": "^1.5.0", "is-builtin-module": "^3.2.1", - "semver": "^7.5.1", + "semver": "^7.5.4", "spdx-expression-parse": "^3.0.1" }, "engines": { @@ -4622,9 +4622,9 @@ } }, "node_modules/eslint-visitor-keys": { - "version": "3.4.2", - "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.2.tgz", - "integrity": "sha512-8drBzUEyZ2llkpCA67iYrgEssKDUu68V8ChqqOfFupIaG/LCVPUT+CoGJpT77zJprs4T/W7p07LP7zAIMuweVw==", + "version": "3.4.3", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz", + "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -7005,9 +7005,9 @@ } }, "node_modules/knip": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/knip/-/knip-2.17.0.tgz", - "integrity": "sha512-3KaG356MbiF8qyddXL9k94UUWRFrlQeC5XcguhOUhNOfM+upLRDIGmCp1HwrjQOxzCuTs1TOuCDlqXzLanNApw==", + "version": "2.19.5", + "resolved": "https://registry.npmjs.org/knip/-/knip-2.19.5.tgz", + "integrity": "sha512-kSGe/dzC1gnKcOj48tUWyb5OtHSnbbOG55tH2XVn2Obv477B1kKyiyrC/9Akim3X+6UcVGd/sOo4gbF6a1bMgw==", "dev": true, "dependencies": { "@ericcornelissen/bash-parser": "^0.5.2", @@ -9900,9 +9900,9 @@ } }, "node_modules/prettier": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.1.tgz", - "integrity": "sha512-fcOWSnnpCrovBsmFZIGIy9UqK2FaI7Hqax+DIO0A9UxeVoY4iweyaFjS5TavZN97Hfehph0nhsZnjlVKzEQSrQ==", + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.2.tgz", + "integrity": "sha512-o2YR9qtniXvwEZlOKbveKfDQVyqxbEIWn48Z8m3ZJjBjcCmUy3xZGIv+7AkaeuaTr6yPXJjwv07ZWlsWbEy1rQ==", "dev": true, "bin": { "prettier": "bin/prettier.cjs" @@ -10770,9 +10770,9 @@ } }, "node_modules/rollup": { - "version": "3.27.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.27.0.tgz", - "integrity": "sha512-aOltLCrYZ0FhJDm7fCqwTjIUEVjWjcydKBV/Zeid6Mn8BWgDCUBBWT5beM5ieForYNo/1ZHuGJdka26kvQ3Gzg==", + "version": "3.28.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.28.0.tgz", + "integrity": "sha512-d7zhvo1OUY2SXSM6pfNjgD5+d0Nz87CUp4mt8l/GgVP3oBsPwzNvSzyu1me6BSG9JIgWNTVcafIXBIyM8yQ3yw==", "dev": true, "bin": { "rollup": "dist/bin/rollup" diff --git a/package.json b/package.json index 5b3081235..4170743df 100644 --- a/package.json +++ b/package.json @@ -63,23 +63,23 @@ "better-npm-audit": "3.7.3", "c8": "8.0.1", "dotenv": "16.3.1", - "eslint": "8.46.0", + "eslint": "8.47.0", "eslint-plugin-ava": "14.0.0", - "eslint-plugin-jsdoc": "46.4.3", + "eslint-plugin-jsdoc": "46.4.6", "eslint-plugin-jsonc": "2.9.0", "eslint-plugin-regexp": "1.15.0", "eslint-plugin-yml": "1.8.0", "fast-check": "3.12.0", "husky": "8.0.3", "is-ci": "3.0.1", - "knip": "2.17.0", + "knip": "2.19.5", "licensee": "10.0.0", "markdownlint-cli": "0.35.0", "nve": "16.1.0", "nyc": "15.1.0", - "prettier": "3.0.1", + "prettier": "3.0.2", "publint": "0.2.0", - "rollup": "3.27.0", + "rollup": "3.28.0", "sinon": "15.2.0" }, "scripts": { diff --git a/src/executables.js b/src/executables.js index 4771e31c1..f802bf866 100644 --- a/src/executables.js +++ b/src/executables.js @@ -18,7 +18,6 @@ * @param {Function} deps.readlink A function to resolve (sym)links. * @param {Function} deps.which A function to perform a `which(1)`-like lookup. * @returns {string} The full path to the binary of the executable. - * @throws {Error} If the `deps` aren't provided. */ export function resolveExecutable({ executable }, { exists, readlink, which }) { try { diff --git a/src/reflection.js b/src/reflection.js index 42994cb7e..e4eca0a3c 100644 --- a/src/reflection.js +++ b/src/reflection.js @@ -32,7 +32,7 @@ const typeofString = "string"; * Checks if a value can be converted into a string and converts it if possible. * * @param {any} value The value of interest. - * @returns {string|null} The `.toString()` if it's a string, otherwise `null`. + * @returns {string | null} If possible the string of `value`, otherwise `null`. */ function maybeToString(value) { if (value === undefined || value === null) { diff --git a/test/e2e/_macros.js b/test/e2e/_macros.js index 0f7057630..5fdc0baff 100644 --- a/test/e2e/_macros.js +++ b/test/e2e/_macros.js @@ -16,7 +16,7 @@ import * as runners from "../_runners.cjs"; * * @param {object} args The arguments for this macro. * @param {string} args.arg The command argument to test with. - * @param {boolean|string} args.shell The shell to test against. + * @param {boolean | string} args.shell The shell to test against. */ export const exec = test.macro({ async exec(t, args) { @@ -41,7 +41,7 @@ export const exec = test.macro({ * * @param {object} args The arguments for this macro. * @param {string} args.arg The command argument to test with. - * @param {boolean|string} args.shell The shell to test against. + * @param {boolean | string} args.shell The shell to test against. */ export const execSync = test.macro({ exec(t, args) { @@ -66,7 +66,7 @@ export const execSync = test.macro({ * * @param {object} args The arguments for this macro. * @param {string} args.arg The command argument to test with. - * @param {boolean|string} args.shell The shell to test against. + * @param {boolean | string} args.shell The shell to test against. */ export const execFile = test.macro({ async exec(t, args) { @@ -90,7 +90,7 @@ export const execFile = test.macro({ * * @param {object} args The arguments for this macro. * @param {string} args.arg The command argument to test with. - * @param {boolean|string} args.shell The shell to test against. + * @param {boolean | string} args.shell The shell to test against. */ export const execFileSync = test.macro({ exec(t, args) { @@ -135,7 +135,7 @@ export const fork = test.macro({ * * @param {object} args The arguments for this macro. * @param {string} args.arg The command argument to test with. - * @param {boolean|string} args.shell The shell to test against. + * @param {boolean | string} args.shell The shell to test against. */ export const spawn = test.macro({ async exec(t, args) { @@ -159,7 +159,7 @@ export const spawn = test.macro({ * * @param {object} args The arguments for this macro. * @param {string} args.arg The command argument to test with. - * @param {boolean|string} args.shell The shell to test against. + * @param {boolean | string} args.shell The shell to test against. */ export const spawnSync = test.macro({ exec(t, args) {