diff --git a/.eslintrc b/.eslintrc index aa7d52c..e55fc9c 100644 --- a/.eslintrc +++ b/.eslintrc @@ -1,7 +1,7 @@ { - "env" : { + "env": { "node": true, - "es2023" : true + "es2023": true }, "parserOptions": { "ecmaVersion": "latest", @@ -25,7 +25,7 @@ ] } ], - "rules" : { + "rules": { "@stylistic/js/comma-dangle": [ "error", "never" ], @@ -50,5 +50,12 @@ "no-console": [ "error", { "allow": [ "warn", "error" ]} ] + }, + "settings": { + "jsdoc": { + "preferredTypes": { + "Object": "object" + } + } } } diff --git a/.gitignore b/.gitignore index c4c8336..f5251f3 100644 --- a/.gitignore +++ b/.gitignore @@ -10,4 +10,6 @@ node_modules/ out/ pnpm-debug.log tmp/ +types/ *.log +*.tgz diff --git a/README.md b/README.md index 60c25b0..b1a70c1 100644 --- a/README.md +++ b/README.md @@ -55,7 +55,7 @@ Running the wrapper will generate the local `file://` URL to the generated `index.html` file, e.g.: ```text -file:///path/to/jsdoc/output/jsdoc-cli-wrapper/1.0.4/index.html +file:///path/to/jsdoc/output/jsdoc-cli-wrapper/1.0.5/index.html ``` You can click on or copy this link to open it in your browser. You can also open @@ -99,10 +99,10 @@ This wrapper resolves both of these minor annoyances. ```sh $ pnpm jsdoc -> jsdoc-cli-wrapper@1.0.4 jsdoc /path/to/jsdoc-cli-wrapper +> jsdoc-cli-wrapper@1.0.5 jsdoc /path/to/jsdoc-cli-wrapper > node index.js -c jsdoc.json . -file:///path/to/jsdoc-cli-wrapper/jsdoc/jsdoc-cli-wrapper/1.0.4/index.html +file:///path/to/jsdoc-cli-wrapper/jsdoc/jsdoc-cli-wrapper/1.0.5/index.html ``` Of course, your own project would use `jsdoc-cli-wrapper` instead of `node diff --git a/ci/vitest.config.js b/ci/vitest.config.js index a52aab1..d0776de 100644 --- a/ci/vitest.config.js +++ b/ci/vitest.config.js @@ -1,3 +1,4 @@ +// @ts-nocheck import { defineConfig, mergeConfig } from 'vitest/config' import baseConfig from '../vitest.config' diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 0000000..c7f8c28 --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "checkJs": true, + "lib": [ + "ES2022" + ], + "module": "node16", + "target": "es2020", + "strict": true + }, + "exclude": [ + "node_modules/**", + "coverage/**", + "jsdoc/**" + ] +} diff --git a/lib/index.js b/lib/index.js index edc520b..6c8ee66 100644 --- a/lib/index.js +++ b/lib/index.js @@ -8,30 +8,32 @@ import { spawn } from 'node:child_process' import { access, readdir, readFile, rm } from 'node:fs/promises' import path from 'node:path' +export const INSTALL_HINT = 'Run \'pnpm add [-g|-D] jsdoc\' ' + + 'to install JSDoc: https://jsdoc.app' + /** * Result of the `jsdoc` execution * @typedef {object} RunJsdocResults * @property {number} exitCode - 0 on success, nonzero on failure - * @property {string} indexHtml - path to the generated index.html file + * @property {string} [indexHtml] - path to the generated index.html file */ /** * Removes the existing JSDoc directory, runs `jsdoc`, and emits the result path * @param {string[]} argv - JSDoc command line interface arguments - * @param {object} env - environment variables, presumably process.env + * @param {EnvVars} env - environment variables, presumably process.env * @param {string} platform - the process.platform string * @returns {Promise} result of `jsdoc` execution * @throws if `jsdoc` isn't found or can't execute */ export async function runJsdoc(argv, env, platform) { + /** @type {string} */ let jsdocPath try { jsdocPath = await getPath('jsdoc', env, platform) - } catch { - return Promise.reject( - 'Run \'pnpm add -g jsdoc\' to install JSDoc: https://jsdoc.app' - ) + } catch (err) { + return Promise.reject(err instanceof Error ? err : INSTALL_HINT) } const {destination, willGenerate} = await analyzeArgv(argv) @@ -62,22 +64,26 @@ export async function runJsdoc(argv, env, platform) { */ export const pathKey = platform => platform !== 'win32' ? 'PATH' : 'Path' +/** @typedef {Object} EnvVars */ + /** * Returns the full path to the specified command * @param {string} cmdName - command to find in env[pathKey(platform)] - * @param {object} env - environment variables, presumably process.env + * @param {EnvVars} env - environment variables, presumably process.env * @param {string} platform - the process.platform string * @returns {Promise} path to the command * @throws if `jsdoc` isn't found */ export async function getPath(cmdName, env, platform) { const pk = pathKey(platform) + const pathVar = env[pk] + if (!pathVar) throw new Error(`"${pk}" environment variable not defined`) // pnpm will install both the original script and versions ending with .CMD // and .ps1. We'll just default to .CMD. if (platform === 'win32') cmdName += '.CMD' - for (const p of env[pk].split(path.delimiter)) { + for (const p of pathVar.split(path.delimiter)) { try { const candidate = path.join(p, cmdName) await access(candidate) @@ -103,7 +109,11 @@ export async function getPath(cmdName, env, platform) { * @returns {Promise} analysis results */ export async function analyzeArgv(argv) { - const validArg = nextArg => nextArg !== undefined && !nextArg.startsWith('-') + /** + * @param {(string|undefined)} nextArg - next argument after current one + * @returns {boolean} true if defined and not another flag, false otherwise + */ + function validArg(nextArg) { return !!nextArg && !nextArg.startsWith('-') } let destination, cmdLineDest, willGenerate = true for (let i = 0; i !== argv.length; ++i) { @@ -178,7 +188,8 @@ export async function analyzeArgv(argv) { * @returns {string} str with comments, trailing commas replaced by space */ export function stripJsonComments(str) { - let inString, escaped, comment, comma, result = [] + let inString = false, escaped = false, comment = null, comma = null + let result = [] for (let i = 0; i !== str.length; ++i) { let c = str[i] diff --git a/package.json b/package.json index c17fe9a..2477fdb 100644 --- a/package.json +++ b/package.json @@ -1,16 +1,22 @@ { "name": "jsdoc-cli-wrapper", - "version": "1.0.4", + "version": "1.0.5", "description": "JSDoc command line interface wrapper", "main": "index.js", "bin": "./index.js", + "types": "./types/index.d.ts", "scripts": { "lint": "eslint --color --max-warnings 0 .", "test": "vitest", - "test:ci": "eslint --color --max-warnings 0 . && vitest run -c ci/vitest.config.js", - "jsdoc": "node index.js -c jsdoc.json ." + "test:ci": "pnpm lint && pnpm typecheck && vitest run -c ci/vitest.config.js && pnpm jsdoc", + "typecheck": "npx -p typescript tsc -p jsconfig.json --noEmit --pretty", + "jsdoc": "node index.js -c jsdoc.json .", + "prepack": "npx -p typescript tsc ./index.js --allowJs --declaration --declarationMap --emitDeclarationOnly --outDir types" }, - "files": [ "lib/**" ], + "files": [ + "lib/**", + "types/**" + ], "keywords": [ "jsdoc", "JavaScript" @@ -25,13 +31,17 @@ "repository": "https://github.com/mbland/jsdoc-cli-wrapper", "bugs": "https://github.com/mbland/jsdoc-cli-wrapper/issues", "devDependencies": { - "@stylistic/eslint-plugin-js": "^1.5.1", - "@vitest/coverage-istanbul": "^1.1.0", - "@vitest/coverage-v8": "^1.1.0", - "@vitest/ui": "^1.1.0", + "@stylistic/eslint-plugin-js": "^1.5.3", + "@types/chai": "^4.3.11", + "@types/node": "^20.10.7", + "@vitest/coverage-istanbul": "^1.1.3", + "@vitest/coverage-v8": "^1.1.3", + "@vitest/ui": "^1.1.3", "eslint": "^8.56.0", - "eslint-plugin-jsdoc": "^46.9.1", + "eslint-plugin-jsdoc": "^46.10.1", "eslint-plugin-vitest": "^0.3.20", - "vitest": "^1.1.0" + "jsdoc": "^4.0.2", + "typescript": "^5.3.3", + "vitest": "^1.1.3" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index cd0c16e..8df2995 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,29 +6,41 @@ settings: devDependencies: '@stylistic/eslint-plugin-js': - specifier: ^1.5.1 - version: 1.5.1(eslint@8.56.0) + specifier: ^1.5.3 + version: 1.5.3(eslint@8.56.0) + '@types/chai': + specifier: ^4.3.11 + version: 4.3.11 + '@types/node': + specifier: ^20.10.7 + version: 20.10.7 '@vitest/coverage-istanbul': - specifier: ^1.1.0 - version: 1.1.0(vitest@1.1.0) + specifier: ^1.1.3 + version: 1.1.3(vitest@1.1.3) '@vitest/coverage-v8': - specifier: ^1.1.0 - version: 1.1.0(vitest@1.1.0) + specifier: ^1.1.3 + version: 1.1.3(vitest@1.1.3) '@vitest/ui': - specifier: ^1.1.0 - version: 1.1.0(vitest@1.1.0) + specifier: ^1.1.3 + version: 1.1.3(vitest@1.1.3) eslint: specifier: ^8.56.0 version: 8.56.0 eslint-plugin-jsdoc: - specifier: ^46.9.1 - version: 46.9.1(eslint@8.56.0) + specifier: ^46.10.1 + version: 46.10.1(eslint@8.56.0) eslint-plugin-vitest: specifier: ^0.3.20 - version: 0.3.20(eslint@8.56.0)(typescript@5.3.3)(vitest@1.1.0) + version: 0.3.20(eslint@8.56.0)(typescript@5.3.3)(vitest@1.1.3) + jsdoc: + specifier: ^4.0.2 + version: 4.0.2 + typescript: + specifier: ^5.3.3 + version: 5.3.3 vitest: - specifier: ^1.1.0 - version: 1.1.0(@vitest/ui@1.1.0) + specifier: ^1.1.3 + version: 1.1.3(@types/node@20.10.7)(@vitest/ui@1.1.3) packages: @@ -58,19 +70,19 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/core@7.23.6: - resolution: {integrity: sha512-FxpRyGjrMJXh7X3wGLGhNDCRiwpWEF74sKjTLDJSG5Kyvow3QZaG0Adbqzi9ZrVjTWpsX+2cxWXD71NMg93kdw==} + /@babel/core@7.23.7: + resolution: {integrity: sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==} engines: {node: '>=6.9.0'} dependencies: '@ampproject/remapping': 2.2.1 '@babel/code-frame': 7.23.5 '@babel/generator': 7.23.6 '@babel/helper-compilation-targets': 7.23.6 - '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.6) - '@babel/helpers': 7.23.6 + '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.7) + '@babel/helpers': 7.23.7 '@babel/parser': 7.23.6 '@babel/template': 7.22.15 - '@babel/traverse': 7.23.6 + '@babel/traverse': 7.23.7 '@babel/types': 7.23.6 convert-source-map: 2.0.0 debug: 4.3.4 @@ -129,13 +141,13 @@ packages: '@babel/types': 7.23.6 dev: true - /@babel/helper-module-transforms@7.23.3(@babel/core@7.23.6): + /@babel/helper-module-transforms@7.23.3(@babel/core@7.23.7): resolution: {integrity: sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==} engines: {node: '>=6.9.0'} peerDependencies: '@babel/core': ^7.0.0 dependencies: - '@babel/core': 7.23.6 + '@babel/core': 7.23.7 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-module-imports': 7.22.15 '@babel/helper-simple-access': 7.22.5 @@ -172,12 +184,12 @@ packages: engines: {node: '>=6.9.0'} dev: true - /@babel/helpers@7.23.6: - resolution: {integrity: sha512-wCfsbN4nBidDRhpDhvcKlzHWCTlgJYUUdSJfzXb2NuBssDSIjc3xcb+znA7l+zYsFljAcGM0aFkN40cR3lXiGA==} + /@babel/helpers@7.23.7: + resolution: {integrity: sha512-6AMnjCoC8wjqBzDHkuqpa7jAKwvMo4dC+lr/TFBz+ucfulO1XMpDnwWPGBNwClOKZ8h6xn5N81W/R5OrcKtCbQ==} engines: {node: '>=6.9.0'} dependencies: '@babel/template': 7.22.15 - '@babel/traverse': 7.23.6 + '@babel/traverse': 7.23.7 '@babel/types': 7.23.6 transitivePeerDependencies: - supports-color @@ -209,8 +221,8 @@ packages: '@babel/types': 7.23.6 dev: true - /@babel/traverse@7.23.6: - resolution: {integrity: sha512-czastdK1e8YByZqezMPFiZ8ahwVMh/ESl9vPgvgdB9AmFMGP5jfpFax74AQgl5zj4XHzqeYAg2l8PuUeRS1MgQ==} + /@babel/traverse@7.23.7: + resolution: {integrity: sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==} engines: {node: '>=6.9.0'} dependencies: '@babel/code-frame': 7.23.5 @@ -249,8 +261,8 @@ packages: jsdoc-type-pratt-parser: 4.0.0 dev: true - /@esbuild/aix-ppc64@0.19.10: - resolution: {integrity: sha512-Q+mk96KJ+FZ30h9fsJl+67IjNJm3x2eX+GBWGmocAKgzp27cowCOOqSdscX80s0SpdFXZnIv/+1xD1EctFx96Q==} + /@esbuild/aix-ppc64@0.19.11: + resolution: {integrity: sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==} engines: {node: '>=12'} cpu: [ppc64] os: [aix] @@ -258,8 +270,8 @@ packages: dev: true optional: true - /@esbuild/android-arm64@0.19.10: - resolution: {integrity: sha512-1X4CClKhDgC3by7k8aOWZeBXQX8dHT5QAMCAQDArCLaYfkppoARvh0fit3X2Qs+MXDngKcHv6XXyQCpY0hkK1Q==} + /@esbuild/android-arm64@0.19.11: + resolution: {integrity: sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -267,8 +279,8 @@ packages: dev: true optional: true - /@esbuild/android-arm@0.19.10: - resolution: {integrity: sha512-7W0bK7qfkw1fc2viBfrtAEkDKHatYfHzr/jKAHNr9BvkYDXPcC6bodtm8AyLJNNuqClLNaeTLuwURt4PRT9d7w==} + /@esbuild/android-arm@0.19.11: + resolution: {integrity: sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -276,8 +288,8 @@ packages: dev: true optional: true - /@esbuild/android-x64@0.19.10: - resolution: {integrity: sha512-O/nO/g+/7NlitUxETkUv/IvADKuZXyH4BHf/g/7laqKC4i/7whLpB0gvpPc2zpF0q9Q6FXS3TS75QHac9MvVWw==} + /@esbuild/android-x64@0.19.11: + resolution: {integrity: sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -285,8 +297,8 @@ packages: dev: true optional: true - /@esbuild/darwin-arm64@0.19.10: - resolution: {integrity: sha512-YSRRs2zOpwypck+6GL3wGXx2gNP7DXzetmo5pHXLrY/VIMsS59yKfjPizQ4lLt5vEI80M41gjm2BxrGZ5U+VMA==} + /@esbuild/darwin-arm64@0.19.11: + resolution: {integrity: sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -294,8 +306,8 @@ packages: dev: true optional: true - /@esbuild/darwin-x64@0.19.10: - resolution: {integrity: sha512-alfGtT+IEICKtNE54hbvPg13xGBe4GkVxyGWtzr+yHO7HIiRJppPDhOKq3zstTcVf8msXb/t4eavW3jCDpMSmA==} + /@esbuild/darwin-x64@0.19.11: + resolution: {integrity: sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -303,8 +315,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-arm64@0.19.10: - resolution: {integrity: sha512-dMtk1wc7FSH8CCkE854GyGuNKCewlh+7heYP/sclpOG6Cectzk14qdUIY5CrKDbkA/OczXq9WesqnPl09mj5dg==} + /@esbuild/freebsd-arm64@0.19.11: + resolution: {integrity: sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -312,8 +324,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-x64@0.19.10: - resolution: {integrity: sha512-G5UPPspryHu1T3uX8WiOEUa6q6OlQh6gNl4CO4Iw5PS+Kg5bVggVFehzXBJY6X6RSOMS8iXDv2330VzaObm4Ag==} + /@esbuild/freebsd-x64@0.19.11: + resolution: {integrity: sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -321,8 +333,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm64@0.19.10: - resolution: {integrity: sha512-QxaouHWZ+2KWEj7cGJmvTIHVALfhpGxo3WLmlYfJ+dA5fJB6lDEIg+oe/0//FuyVHuS3l79/wyBxbHr0NgtxJQ==} + /@esbuild/linux-arm64@0.19.11: + resolution: {integrity: sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -330,8 +342,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm@0.19.10: - resolution: {integrity: sha512-j6gUW5aAaPgD416Hk9FHxn27On28H4eVI9rJ4az7oCGTFW48+LcgNDBN+9f8rKZz7EEowo889CPKyeaD0iw9Kg==} + /@esbuild/linux-arm@0.19.11: + resolution: {integrity: sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -339,8 +351,8 @@ packages: dev: true optional: true - /@esbuild/linux-ia32@0.19.10: - resolution: {integrity: sha512-4ub1YwXxYjj9h1UIZs2hYbnTZBtenPw5NfXCRgEkGb0b6OJ2gpkMvDqRDYIDRjRdWSe/TBiZltm3Y3Q8SN1xNg==} + /@esbuild/linux-ia32@0.19.11: + resolution: {integrity: sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -348,8 +360,8 @@ packages: dev: true optional: true - /@esbuild/linux-loong64@0.19.10: - resolution: {integrity: sha512-lo3I9k+mbEKoxtoIbM0yC/MZ1i2wM0cIeOejlVdZ3D86LAcFXFRdeuZmh91QJvUTW51bOK5W2BznGNIl4+mDaA==} + /@esbuild/linux-loong64@0.19.11: + resolution: {integrity: sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -357,8 +369,8 @@ packages: dev: true optional: true - /@esbuild/linux-mips64el@0.19.10: - resolution: {integrity: sha512-J4gH3zhHNbdZN0Bcr1QUGVNkHTdpijgx5VMxeetSk6ntdt+vR1DqGmHxQYHRmNb77tP6GVvD+K0NyO4xjd7y4A==} + /@esbuild/linux-mips64el@0.19.11: + resolution: {integrity: sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -366,8 +378,8 @@ packages: dev: true optional: true - /@esbuild/linux-ppc64@0.19.10: - resolution: {integrity: sha512-tgT/7u+QhV6ge8wFMzaklOY7KqiyitgT1AUHMApau32ZlvTB/+efeCtMk4eXS+uEymYK249JsoiklZN64xt6oQ==} + /@esbuild/linux-ppc64@0.19.11: + resolution: {integrity: sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -375,8 +387,8 @@ packages: dev: true optional: true - /@esbuild/linux-riscv64@0.19.10: - resolution: {integrity: sha512-0f/spw0PfBMZBNqtKe5FLzBDGo0SKZKvMl5PHYQr3+eiSscfJ96XEknCe+JoOayybWUFQbcJTrk946i3j9uYZA==} + /@esbuild/linux-riscv64@0.19.11: + resolution: {integrity: sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -384,8 +396,8 @@ packages: dev: true optional: true - /@esbuild/linux-s390x@0.19.10: - resolution: {integrity: sha512-pZFe0OeskMHzHa9U38g+z8Yx5FNCLFtUnJtQMpwhS+r4S566aK2ci3t4NCP4tjt6d5j5uo4h7tExZMjeKoehAA==} + /@esbuild/linux-s390x@0.19.11: + resolution: {integrity: sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -393,8 +405,8 @@ packages: dev: true optional: true - /@esbuild/linux-x64@0.19.10: - resolution: {integrity: sha512-SpYNEqg/6pZYoc+1zLCjVOYvxfZVZj6w0KROZ3Fje/QrM3nfvT2llI+wmKSrWuX6wmZeTapbarvuNNK/qepSgA==} + /@esbuild/linux-x64@0.19.11: + resolution: {integrity: sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -402,8 +414,8 @@ packages: dev: true optional: true - /@esbuild/netbsd-x64@0.19.10: - resolution: {integrity: sha512-ACbZ0vXy9zksNArWlk2c38NdKg25+L9pr/mVaj9SUq6lHZu/35nx2xnQVRGLrC1KKQqJKRIB0q8GspiHI3J80Q==} + /@esbuild/netbsd-x64@0.19.11: + resolution: {integrity: sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -411,8 +423,8 @@ packages: dev: true optional: true - /@esbuild/openbsd-x64@0.19.10: - resolution: {integrity: sha512-PxcgvjdSjtgPMiPQrM3pwSaG4kGphP+bLSb+cihuP0LYdZv1epbAIecHVl5sD3npkfYBZ0ZnOjR878I7MdJDFg==} + /@esbuild/openbsd-x64@0.19.11: + resolution: {integrity: sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -420,8 +432,8 @@ packages: dev: true optional: true - /@esbuild/sunos-x64@0.19.10: - resolution: {integrity: sha512-ZkIOtrRL8SEJjr+VHjmW0znkPs+oJXhlJbNwfI37rvgeMtk3sxOQevXPXjmAPZPigVTncvFqLMd+uV0IBSEzqA==} + /@esbuild/sunos-x64@0.19.11: + resolution: {integrity: sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -429,8 +441,8 @@ packages: dev: true optional: true - /@esbuild/win32-arm64@0.19.10: - resolution: {integrity: sha512-+Sa4oTDbpBfGpl3Hn3XiUe4f8TU2JF7aX8cOfqFYMMjXp6ma6NJDztl5FDG8Ezx0OjwGikIHw+iA54YLDNNVfw==} + /@esbuild/win32-arm64@0.19.11: + resolution: {integrity: sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -438,8 +450,8 @@ packages: dev: true optional: true - /@esbuild/win32-ia32@0.19.10: - resolution: {integrity: sha512-EOGVLK1oWMBXgfttJdPHDTiivYSjX6jDNaATeNOaCOFEVcfMjtbx7WVQwPSE1eIfCp/CaSF2nSrDtzc4I9f8TQ==} + /@esbuild/win32-ia32@0.19.11: + resolution: {integrity: sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -447,8 +459,8 @@ packages: dev: true optional: true - /@esbuild/win32-x64@0.19.10: - resolution: {integrity: sha512-whqLG6Sc70AbU73fFYvuYzaE4MNMBIlR1Y/IrUeOXFrWHxBEjjbZaQ3IXIQS8wJdAzue2GwYZCjOrgrU1oUHoA==} + /@esbuild/win32-x64@0.19.11: + resolution: {integrity: sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -555,6 +567,13 @@ packages: '@jridgewell/sourcemap-codec': 1.4.15 dev: true + /@jsdoc/salty@0.2.7: + resolution: {integrity: sha512-mh8LbS9d4Jq84KLw8pzho7XC2q2/IJGiJss3xwRoLD1A+EE16SjN4PfaG4jRCzKegTFLlN0Zd8SdUPE6XdoPFg==} + engines: {node: '>=v12.0.0'} + dependencies: + lodash: 4.17.21 + dev: true + /@nodelib/fs.scandir@2.1.5: resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -580,104 +599,104 @@ packages: resolution: {integrity: sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==} dev: true - /@rollup/rollup-android-arm-eabi@4.9.1: - resolution: {integrity: sha512-6vMdBZqtq1dVQ4CWdhFwhKZL6E4L1dV6jUjuBvsavvNJSppzi6dLBbuV+3+IyUREaj9ZFvQefnQm28v4OCXlig==} + /@rollup/rollup-android-arm-eabi@4.9.3: + resolution: {integrity: sha512-nvh9bB41vXEoKKvlWCGptpGt8EhrEwPQFDCY0VAto+R+qpSbaErPS3OjMZuXR8i/2UVw952Dtlnl2JFxH31Qvg==} cpu: [arm] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-android-arm64@4.9.1: - resolution: {integrity: sha512-Jto9Fl3YQ9OLsTDWtLFPtaIMSL2kwGyGoVCmPC8Gxvym9TCZm4Sie+cVeblPO66YZsYH8MhBKDMGZ2NDxuk/XQ==} + /@rollup/rollup-android-arm64@4.9.3: + resolution: {integrity: sha512-kffYCJ2RhDL1DlshLzYPyJtVeusHlA8Q1j6k6s4AEVKLq/3HfGa2ADDycLsmPo3OW83r4XtOPqRMbcFzFsEIzQ==} cpu: [arm64] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-arm64@4.9.1: - resolution: {integrity: sha512-LtYcLNM+bhsaKAIGwVkh5IOWhaZhjTfNOkGzGqdHvhiCUVuJDalvDxEdSnhFzAn+g23wgsycmZk1vbnaibZwwA==} + /@rollup/rollup-darwin-arm64@4.9.3: + resolution: {integrity: sha512-Fo7DR6Q9/+ztTyMBZ79+WJtb8RWZonyCgkBCjV51rW5K/dizBzImTW6HLC0pzmHaAevwM0jW1GtB5LCFE81mSw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-x64@4.9.1: - resolution: {integrity: sha512-KyP/byeXu9V+etKO6Lw3E4tW4QdcnzDG/ake031mg42lob5tN+5qfr+lkcT/SGZaH2PdW4Z1NX9GHEkZ8xV7og==} + /@rollup/rollup-darwin-x64@4.9.3: + resolution: {integrity: sha512-5HcxDF9fqHucIlTiw/gmMb3Qv23L8bLCg904I74Q2lpl4j/20z9ogaD3tWkeguRuz+/17cuS321PT3PAuyjQdg==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.9.1: - resolution: {integrity: sha512-Yqz/Doumf3QTKplwGNrCHe/B2p9xqDghBZSlAY0/hU6ikuDVQuOUIpDP/YcmoT+447tsZTmirmjgG3znvSCR0Q==} + /@rollup/rollup-linux-arm-gnueabihf@4.9.3: + resolution: {integrity: sha512-cO6hKV+99D1V7uNJQn1chWaF9EGp7qV2N8sGH99q9Y62bsbN6Il55EwJppEWT+JiqDRg396vWCgwdHwje8itBQ==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.9.1: - resolution: {integrity: sha512-u3XkZVvxcvlAOlQJ3UsD1rFvLWqu4Ef/Ggl40WAVCuogf4S1nJPHh5RTgqYFpCOvuGJ7H5yGHabjFKEZGExk5Q==} + /@rollup/rollup-linux-arm64-gnu@4.9.3: + resolution: {integrity: sha512-xANyq6lVg6KMO8UUs0LjA4q7di3tPpDbzLPgVEU2/F1ngIZ54eli8Zdt3uUUTMXVbgTCafIO+JPeGMhu097i3w==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-musl@4.9.1: - resolution: {integrity: sha512-0XSYN/rfWShW+i+qjZ0phc6vZ7UWI8XWNz4E/l+6edFt+FxoEghrJHjX1EY/kcUGCnZzYYRCl31SNdfOi450Aw==} + /@rollup/rollup-linux-arm64-musl@4.9.3: + resolution: {integrity: sha512-TZJUfRTugVFATQToCMD8DNV6jv/KpSwhE1lLq5kXiQbBX3Pqw6dRKtzNkh5wcp0n09reBBq/7CGDERRw9KmE+g==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-riscv64-gnu@4.9.1: - resolution: {integrity: sha512-LmYIO65oZVfFt9t6cpYkbC4d5lKHLYv5B4CSHRpnANq0VZUQXGcCPXHzbCXCz4RQnx7jvlYB1ISVNCE/omz5cw==} + /@rollup/rollup-linux-riscv64-gnu@4.9.3: + resolution: {integrity: sha512-4/QVaRyaB5tkEAGfjVvWrmWdPF6F2NoaoO5uEP7N0AyeBw7l8SeCWWKAGrbx/00PUdHrJVURJiYikazslSKttQ==} cpu: [riscv64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-gnu@4.9.1: - resolution: {integrity: sha512-kr8rEPQ6ns/Lmr/hiw8sEVj9aa07gh1/tQF2Y5HrNCCEPiCBGnBUt9tVusrcBBiJfIt1yNaXN6r1CCmpbFEDpg==} + /@rollup/rollup-linux-x64-gnu@4.9.3: + resolution: {integrity: sha512-koLC6D3pj1YLZSkTy/jsk3HOadp7q2h6VQl/lPX854twOmmLNekHB6yuS+MkWcKdGGdW1JPuPBv/ZYhr5Yhtdg==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-musl@4.9.1: - resolution: {integrity: sha512-t4QSR7gN+OEZLG0MiCgPqMWZGwmeHhsM4AkegJ0Kiy6TnJ9vZ8dEIwHw1LcZKhbHxTY32hp9eVCMdR3/I8MGRw==} + /@rollup/rollup-linux-x64-musl@4.9.3: + resolution: {integrity: sha512-0OAkQ4HBp+JO2ip2Lgt/ShlrveOMzyhwt2D0KvqH28jFPqfZco28KSq76zymZwmU+F6GRojdxtQMJiNSXKNzeA==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.9.1: - resolution: {integrity: sha512-7XI4ZCBN34cb+BH557FJPmh0kmNz2c25SCQeT9OiFWEgf8+dL6ZwJ8f9RnUIit+j01u07Yvrsuu1rZGxJCc51g==} + /@rollup/rollup-win32-arm64-msvc@4.9.3: + resolution: {integrity: sha512-z5uvoMvdRWggigOnsb9OOCLERHV0ykRZoRB5O+URPZC9zM3pkoMg5fN4NKu2oHqgkzZtfx9u4njqqlYEzM1v9A==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.9.1: - resolution: {integrity: sha512-yE5c2j1lSWOH5jp+Q0qNL3Mdhr8WuqCNVjc6BxbVfS5cAS6zRmdiw7ktb8GNpDCEUJphILY6KACoFoRtKoqNQg==} + /@rollup/rollup-win32-ia32-msvc@4.9.3: + resolution: {integrity: sha512-wxomCHjBVKws+O4N1WLnniKCXu7vkLtdq9Fl9CN/EbwEldojvUrkoHE/fBLZzC7IT/x12Ut6d6cRs4dFvqJkMg==} cpu: [ia32] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-x64-msvc@4.9.1: - resolution: {integrity: sha512-PyJsSsafjmIhVgaI1Zdj7m8BB8mMckFah/xbpplObyHfiXzKcI5UOUXRyOdHW7nz4DpMCuzLnF7v5IWHenCwYA==} + /@rollup/rollup-win32-x64-msvc@4.9.3: + resolution: {integrity: sha512-1Qf/qk/iEtx0aOi+AQQt5PBoW0mFngsm7bPuxHClC/hWh2hHBktR6ktSfUg5b5rC9v8hTwNmHE7lBWXkgqluUQ==} cpu: [x64] os: [win32] requiresBuild: true @@ -688,19 +707,27 @@ packages: resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} dev: true - /@stylistic/eslint-plugin-js@1.5.1(eslint@8.56.0): - resolution: {integrity: sha512-iZF0rF+uOhAmOJYOJx1Yvmm3CZ1uz9n0SRd9dpBYHA3QAvfABUORh9LADWwZCigjHJkp2QbCZelGFJGwGz7Siw==} + /@stylistic/eslint-plugin-js@1.5.3(eslint@8.56.0): + resolution: {integrity: sha512-XlKnm82fD7Sw9kQ6FFigE0tobvptNBXZWsdfoKmUyK7bNxHsAHOFT8zJGY3j3MjZ0Fe7rLTu86hX/vOl0bRRdQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: '>=8.40.0' dependencies: - acorn: 8.11.2 + acorn: 8.11.3 escape-string-regexp: 4.0.0 eslint: 8.56.0 eslint-visitor-keys: 3.4.3 espree: 9.6.1 dev: true + /@types/chai@4.3.11: + resolution: {integrity: sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==} + dev: true + + /@types/estree@1.0.5: + resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + dev: true + /@types/istanbul-lib-coverage@2.0.6: resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==} dev: true @@ -709,25 +736,46 @@ packages: resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} dev: true + /@types/linkify-it@3.0.5: + resolution: {integrity: sha512-yg6E+u0/+Zjva+buc3EIb+29XEg4wltq7cSmd4Uc2EE/1nUVmxyzpX6gUXD0V8jIrG0r7YeOGVIbYRkxeooCtw==} + dev: true + + /@types/markdown-it@12.2.3: + resolution: {integrity: sha512-GKMHFfv3458yYy+v/N8gjufHO6MSZKCOXpZc5GXIWWy8uldwfmPn98vp81gZ5f9SVw8YYBctgfJ22a2d7AOMeQ==} + dependencies: + '@types/linkify-it': 3.0.5 + '@types/mdurl': 1.0.5 + dev: true + + /@types/mdurl@1.0.5: + resolution: {integrity: sha512-6L6VymKTzYSrEf4Nev4Xa1LCHKrlTlYCBMTlQKFuddo1CvQcE52I0mwfOJayueUC7MJuXOeHTcIU683lzd0cUA==} + dev: true + + /@types/node@20.10.7: + resolution: {integrity: sha512-fRbIKb8C/Y2lXxB5eVMj4IU7xpdox0Lh8bUPEdtLysaylsml1hOOx1+STloRs/B9nf7C6kPRmmg/V7aQW7usNg==} + dependencies: + undici-types: 5.26.5 + dev: true + /@types/semver@7.5.6: resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} dev: true - /@typescript-eslint/scope-manager@6.16.0: - resolution: {integrity: sha512-0N7Y9DSPdaBQ3sqSCwlrm9zJwkpOuc6HYm7LpzLAPqBL7dmzAUimr4M29dMkOP/tEwvOCC/Cxo//yOfJD3HUiw==} + /@typescript-eslint/scope-manager@6.17.0: + resolution: {integrity: sha512-RX7a8lwgOi7am0k17NUO0+ZmMOX4PpjLtLRgLmT1d3lBYdWH4ssBUbwdmc5pdRX8rXon8v9x8vaoOSpkHfcXGA==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.16.0 - '@typescript-eslint/visitor-keys': 6.16.0 + '@typescript-eslint/types': 6.17.0 + '@typescript-eslint/visitor-keys': 6.17.0 dev: true - /@typescript-eslint/types@6.16.0: - resolution: {integrity: sha512-hvDFpLEvTJoHutVl87+MG/c5C8I6LOgEx05zExTSJDEVU7hhR3jhV8M5zuggbdFCw98+HhZWPHZeKS97kS3JoQ==} + /@typescript-eslint/types@6.17.0: + resolution: {integrity: sha512-qRKs9tvc3a4RBcL/9PXtKSehI/q8wuU9xYJxe97WFxnzH8NWWtcW3ffNS+EWg8uPvIerhjsEZ+rHtDqOCiH57A==} engines: {node: ^16.0.0 || >=18.0.0} dev: true - /@typescript-eslint/typescript-estree@6.16.0(typescript@5.3.3): - resolution: {integrity: sha512-VTWZuixh/vr7nih6CfrdpmFNLEnoVBF1skfjdyGnNwXOH1SLeHItGdZDHhhAIzd3ACazyY2Fg76zuzOVTaknGA==} + /@typescript-eslint/typescript-estree@6.17.0(typescript@5.3.3): + resolution: {integrity: sha512-gVQe+SLdNPfjlJn5VNGhlOhrXz4cajwFd5kAgWtZ9dCZf4XJf8xmgCTLIqec7aha3JwgLI2CK6GY1043FRxZwg==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: typescript: '*' @@ -735,8 +783,8 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/types': 6.16.0 - '@typescript-eslint/visitor-keys': 6.16.0 + '@typescript-eslint/types': 6.17.0 + '@typescript-eslint/visitor-keys': 6.17.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 @@ -748,8 +796,8 @@ packages: - supports-color dev: true - /@typescript-eslint/utils@6.16.0(eslint@8.56.0)(typescript@5.3.3): - resolution: {integrity: sha512-T83QPKrBm6n//q9mv7oiSvy/Xq/7Hyw9SzSEhMHJwznEmQayfBM87+oAlkNAMEO7/MjIwKyOHgBJbxB0s7gx2A==} + /@typescript-eslint/utils@6.17.0(eslint@8.56.0)(typescript@5.3.3): + resolution: {integrity: sha512-LofsSPjN/ITNkzV47hxas2JCsNCEnGhVvocfyOcLzT9c/tSZE7SfhS/iWtzP1lKNOEfLhRTZz6xqI8N2RzweSQ==} engines: {node: ^16.0.0 || >=18.0.0} peerDependencies: eslint: ^7.0.0 || ^8.0.0 @@ -757,9 +805,9 @@ packages: '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.6 - '@typescript-eslint/scope-manager': 6.16.0 - '@typescript-eslint/types': 6.16.0 - '@typescript-eslint/typescript-estree': 6.16.0(typescript@5.3.3) + '@typescript-eslint/scope-manager': 6.17.0 + '@typescript-eslint/types': 6.17.0 + '@typescript-eslint/typescript-estree': 6.17.0(typescript@5.3.3) eslint: 8.56.0 semver: 7.5.4 transitivePeerDependencies: @@ -767,11 +815,11 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys@6.16.0: - resolution: {integrity: sha512-QSFQLruk7fhs91a/Ep/LqRdbJCZ1Rq03rqBdKT5Ky17Sz8zRLUksqIe9DW0pKtg/Z35/ztbLQ6qpOCN6rOC11A==} + /@typescript-eslint/visitor-keys@6.17.0: + resolution: {integrity: sha512-H6VwB/k3IuIeQOyYczyyKN8wH6ed8EwliaYHLxOIhyF0dYEIsN8+Bk3GE19qafeMKyZJJHP8+O1HiFhFLUNKSg==} engines: {node: ^16.0.0 || >=18.0.0} dependencies: - '@typescript-eslint/types': 6.16.0 + '@typescript-eslint/types': 6.17.0 eslint-visitor-keys: 3.4.3 dev: true @@ -779,8 +827,8 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /@vitest/coverage-istanbul@1.1.0(vitest@1.1.0): - resolution: {integrity: sha512-sjHGQQu7lkJUYSBMOR3f9AyOlK1LBVr0v7LMar/4i167ltabRWlQ2STBDM4P6Wl659NAcHlZ/RXxrAgJPavDMA==} + /@vitest/coverage-istanbul@1.1.3(vitest@1.1.3): + resolution: {integrity: sha512-pqx/RaLjJ7oxsbi0Vc/CjyXBXd86yQ0lKq1PPnk9BMNLqMTEWwfcTelcNrl41yK+IVRhHlFtwcjDva3VslbMMQ==} peerDependencies: vitest: ^1.0.0 dependencies: @@ -793,13 +841,13 @@ packages: magicast: 0.3.2 picocolors: 1.0.0 test-exclude: 6.0.0 - vitest: 1.1.0(@vitest/ui@1.1.0) + vitest: 1.1.3(@types/node@20.10.7)(@vitest/ui@1.1.3) transitivePeerDependencies: - supports-color dev: true - /@vitest/coverage-v8@1.1.0(vitest@1.1.0): - resolution: {integrity: sha512-kHQRk70vTdXAyQY2C0vKOHPyQD/R6IUzcGdO4vCuyr4alE5Yg1+Sk2jSdjlIrTTXdcNEs+ReWVM09mmSFJpzyQ==} + /@vitest/coverage-v8@1.1.3(vitest@1.1.3): + resolution: {integrity: sha512-Uput7t3eIcbSTOTQBzGtS+0kah96bX+szW9qQrLeGe3UmgL2Akn8POnyC2lH7XsnREZOds9aCUTxgXf+4HX5RA==} peerDependencies: vitest: ^1.0.0 dependencies: @@ -816,70 +864,71 @@ packages: std-env: 3.7.0 test-exclude: 6.0.0 v8-to-istanbul: 9.2.0 - vitest: 1.1.0(@vitest/ui@1.1.0) + vitest: 1.1.3(@types/node@20.10.7)(@vitest/ui@1.1.3) transitivePeerDependencies: - supports-color dev: true - /@vitest/expect@1.1.0: - resolution: {integrity: sha512-9IE2WWkcJo2BR9eqtY5MIo3TPmS50Pnwpm66A6neb2hvk/QSLfPXBz2qdiwUOQkwyFuuXEUj5380CbwfzW4+/w==} + /@vitest/expect@1.1.3: + resolution: {integrity: sha512-MnJqsKc1Ko04lksF9XoRJza0bGGwTtqfbyrsYv5on4rcEkdo+QgUdITenBQBUltKzdxW7K3rWh+nXRULwsdaVg==} dependencies: - '@vitest/spy': 1.1.0 - '@vitest/utils': 1.1.0 - chai: 4.3.10 + '@vitest/spy': 1.1.3 + '@vitest/utils': 1.1.3 + chai: 4.4.0 dev: true - /@vitest/runner@1.1.0: - resolution: {integrity: sha512-zdNLJ00pm5z/uhbWF6aeIJCGMSyTyWImy3Fcp9piRGvueERFlQFbUwCpzVce79OLm2UHk9iwaMSOaU9jVHgNVw==} + /@vitest/runner@1.1.3: + resolution: {integrity: sha512-Va2XbWMnhSdDEh/OFxyUltgQuuDRxnarK1hW5QNN4URpQrqq6jtt8cfww/pQQ4i0LjoYxh/3bYWvDFlR9tU73g==} dependencies: - '@vitest/utils': 1.1.0 + '@vitest/utils': 1.1.3 p-limit: 5.0.0 pathe: 1.1.1 dev: true - /@vitest/snapshot@1.1.0: - resolution: {integrity: sha512-5O/wyZg09V5qmNmAlUgCBqflvn2ylgsWJRRuPrnHEfDNT6tQpQ8O1isNGgo+VxofISHqz961SG3iVvt3SPK/QQ==} + /@vitest/snapshot@1.1.3: + resolution: {integrity: sha512-U0r8pRXsLAdxSVAyGNcqOU2H3Z4Y2dAAGGelL50O0QRMdi1WWeYHdrH/QWpN1e8juWfVKsb8B+pyJwTC+4Gy9w==} dependencies: magic-string: 0.30.5 pathe: 1.1.1 pretty-format: 29.7.0 dev: true - /@vitest/spy@1.1.0: - resolution: {integrity: sha512-sNOVSU/GE+7+P76qYo+VXdXhXffzWZcYIPQfmkiRxaNCSPiLANvQx5Mx6ZURJ/ndtEkUJEpvKLXqAYTKEY+lTg==} + /@vitest/spy@1.1.3: + resolution: {integrity: sha512-Ec0qWyGS5LhATFQtldvChPTAHv08yHIOZfiNcjwRQbFPHpkih0md9KAbs7TfeIfL7OFKoe7B/6ukBTqByubXkQ==} dependencies: tinyspy: 2.2.0 dev: true - /@vitest/ui@1.1.0(vitest@1.1.0): - resolution: {integrity: sha512-7yU1QRFBplz0xJqcgt+agcbrNFdBmLo8UUppdKkFmYx+Ih0+yMYQOyr7kOB+YoggJY/p5ZzXxdbiOz7NBX2y+w==} + /@vitest/ui@1.1.3(vitest@1.1.3): + resolution: {integrity: sha512-JKGgftXZgTtK7kfQNicE9Q2FuiUlYvCGyUENkA2/S1VBThtfQyGUwaJmiDFVAKBOrW305cNgjP67vsxMm9/SDQ==} peerDependencies: vitest: ^1.0.0 dependencies: - '@vitest/utils': 1.1.0 + '@vitest/utils': 1.1.3 fast-glob: 3.3.2 fflate: 0.8.1 flatted: 3.2.9 pathe: 1.1.1 picocolors: 1.0.0 sirv: 2.0.4 - vitest: 1.1.0(@vitest/ui@1.1.0) + vitest: 1.1.3(@types/node@20.10.7)(@vitest/ui@1.1.3) dev: true - /@vitest/utils@1.1.0: - resolution: {integrity: sha512-z+s510fKmYz4Y41XhNs3vcuFTFhcij2YF7F8VQfMEYAAUfqQh0Zfg7+w9xdgFGhPf3tX3TicAe+8BDITk6ampQ==} + /@vitest/utils@1.1.3: + resolution: {integrity: sha512-Dyt3UMcdElTll2H75vhxfpZu03uFpXRCHxWnzcrFjZxT1kTbq8ALUYIeBgGolo1gldVdI0YSlQRacsqxTwNqwg==} dependencies: diff-sequences: 29.6.3 + estree-walker: 3.0.3 loupe: 2.3.7 pretty-format: 29.7.0 dev: true - /acorn-jsx@5.3.2(acorn@8.11.2): + /acorn-jsx@5.3.2(acorn@8.11.3): resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 dependencies: - acorn: 8.11.2 + acorn: 8.11.3 dev: true /acorn-walk@8.3.1: @@ -887,8 +936,8 @@ packages: engines: {node: '>=0.4.0'} dev: true - /acorn@8.11.2: - resolution: {integrity: sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w==} + /acorn@8.11.3: + resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} engines: {node: '>=0.4.0'} hasBin: true dev: true @@ -948,6 +997,10 @@ packages: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} dev: true + /bluebird@3.7.2: + resolution: {integrity: sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg==} + dev: true + /brace-expansion@1.1.11: resolution: {integrity: sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==} dependencies: @@ -973,8 +1026,8 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true dependencies: - caniuse-lite: 1.0.30001571 - electron-to-chromium: 1.4.616 + caniuse-lite: 1.0.30001574 + electron-to-chromium: 1.4.623 node-releases: 2.0.14 update-browserslist-db: 1.0.13(browserslist@4.22.2) dev: true @@ -994,12 +1047,19 @@ packages: engines: {node: '>=6'} dev: true - /caniuse-lite@1.0.30001571: - resolution: {integrity: sha512-tYq/6MoXhdezDLFZuCO/TKboTzuQ/xR5cFdgXPfDtM7/kchBO3b4VWghE/OAi/DV7tTdhmLjZiZBZi1fA/GheQ==} + /caniuse-lite@1.0.30001574: + resolution: {integrity: sha512-BtYEK4r/iHt/txm81KBudCUcTy7t+s9emrIaHqjYurQ10x71zJ5VQ9x1dYPcz/b+pKSp4y/v1xSI67A+LzpNyg==} dev: true - /chai@4.3.10: - resolution: {integrity: sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==} + /catharsis@0.9.0: + resolution: {integrity: sha512-prMTQVpcns/tzFgFVkVp6ak6RykZyWb3gu8ckUpd6YkTlacOd3DXGJjIpD4Q6zJirizvaiAjSSHlOsA+6sNh2A==} + engines: {node: '>= 10'} + dependencies: + lodash: 4.17.21 + dev: true + + /chai@4.4.0: + resolution: {integrity: sha512-x9cHNq1uvkCdU+5xTkNh5WtgD4e4yDFCsp9jVc7N7qVeKeftv3gO/ZrviX5d+3ZfxdYnZXZYujjRInu1RogU6A==} engines: {node: '>=4'} dependencies: assertion-error: 1.1.0 @@ -1119,39 +1179,43 @@ packages: esutils: 2.0.3 dev: true - /electron-to-chromium@1.4.616: - resolution: {integrity: sha512-1n7zWYh8eS0L9Uy+GskE0lkBUNK83cXTVJI0pU3mGprFsbfSdAc15VTFbo+A+Bq4pwstmL30AVcEU3Fo463lNg==} + /electron-to-chromium@1.4.623: + resolution: {integrity: sha512-lKoz10iCYlP1WtRYdh5MvocQPWVRoI7ysp6qf18bmeBgR8abE6+I2CsfyNKztRDZvhdWc+krKT6wS7Neg8sw3A==} dev: true - /esbuild@0.19.10: - resolution: {integrity: sha512-S1Y27QGt/snkNYrRcswgRFqZjaTG5a5xM3EQo97uNBnH505pdzSNe/HLBq1v0RO7iK/ngdbhJB6mDAp0OK+iUA==} + /entities@2.1.0: + resolution: {integrity: sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==} + dev: true + + /esbuild@0.19.11: + resolution: {integrity: sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/aix-ppc64': 0.19.10 - '@esbuild/android-arm': 0.19.10 - '@esbuild/android-arm64': 0.19.10 - '@esbuild/android-x64': 0.19.10 - '@esbuild/darwin-arm64': 0.19.10 - '@esbuild/darwin-x64': 0.19.10 - '@esbuild/freebsd-arm64': 0.19.10 - '@esbuild/freebsd-x64': 0.19.10 - '@esbuild/linux-arm': 0.19.10 - '@esbuild/linux-arm64': 0.19.10 - '@esbuild/linux-ia32': 0.19.10 - '@esbuild/linux-loong64': 0.19.10 - '@esbuild/linux-mips64el': 0.19.10 - '@esbuild/linux-ppc64': 0.19.10 - '@esbuild/linux-riscv64': 0.19.10 - '@esbuild/linux-s390x': 0.19.10 - '@esbuild/linux-x64': 0.19.10 - '@esbuild/netbsd-x64': 0.19.10 - '@esbuild/openbsd-x64': 0.19.10 - '@esbuild/sunos-x64': 0.19.10 - '@esbuild/win32-arm64': 0.19.10 - '@esbuild/win32-ia32': 0.19.10 - '@esbuild/win32-x64': 0.19.10 + '@esbuild/aix-ppc64': 0.19.11 + '@esbuild/android-arm': 0.19.11 + '@esbuild/android-arm64': 0.19.11 + '@esbuild/android-x64': 0.19.11 + '@esbuild/darwin-arm64': 0.19.11 + '@esbuild/darwin-x64': 0.19.11 + '@esbuild/freebsd-arm64': 0.19.11 + '@esbuild/freebsd-x64': 0.19.11 + '@esbuild/linux-arm': 0.19.11 + '@esbuild/linux-arm64': 0.19.11 + '@esbuild/linux-ia32': 0.19.11 + '@esbuild/linux-loong64': 0.19.11 + '@esbuild/linux-mips64el': 0.19.11 + '@esbuild/linux-ppc64': 0.19.11 + '@esbuild/linux-riscv64': 0.19.11 + '@esbuild/linux-s390x': 0.19.11 + '@esbuild/linux-x64': 0.19.11 + '@esbuild/netbsd-x64': 0.19.11 + '@esbuild/openbsd-x64': 0.19.11 + '@esbuild/sunos-x64': 0.19.11 + '@esbuild/win32-arm64': 0.19.11 + '@esbuild/win32-ia32': 0.19.11 + '@esbuild/win32-x64': 0.19.11 dev: true /escalade@3.1.1: @@ -1164,16 +1228,21 @@ packages: engines: {node: '>=0.8.0'} dev: true + /escape-string-regexp@2.0.0: + resolution: {integrity: sha512-UpzcLCXolUWcNu5HtVMHYdXJjArjsF9C0aNnquZYY4uW/Vu0miy5YoWvbV345HauVvcAUnpRuhMMcqTcGOY2+w==} + engines: {node: '>=8'} + dev: true + /escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} dev: true - /eslint-plugin-jsdoc@46.9.1(eslint@8.56.0): - resolution: {integrity: sha512-11Ox5LCl2wY7gGkp9UOyew70o9qvii1daAH+h/MFobRVRNcy7sVlH+jm0HQdgcvcru6285GvpjpUyoa051j03Q==} + /eslint-plugin-jsdoc@46.10.1(eslint@8.56.0): + resolution: {integrity: sha512-x8wxIpv00Y50NyweDUpa+58ffgSAI5sqe+zcZh33xphD0AVh+1kqr1ombaTRb7Fhpove1zfUuujlX9DWWBP5ag==} engines: {node: '>=16'} peerDependencies: - eslint: ^7.0.0 || ^8.0.0 + eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 dependencies: '@es-joy/jsdoccomment': 0.41.0 are-docs-informative: 0.0.2 @@ -1189,7 +1258,7 @@ packages: - supports-color dev: true - /eslint-plugin-vitest@0.3.20(eslint@8.56.0)(typescript@5.3.3)(vitest@1.1.0): + /eslint-plugin-vitest@0.3.20(eslint@8.56.0)(typescript@5.3.3)(vitest@1.1.3): resolution: {integrity: sha512-O05k4j9TGMOkkghj9dRgpeLDyOSiVIxQWgNDPfhYPm5ioJsehcYV/zkRLekQs+c8+RBCVXucSED3fYOyy2EoWA==} engines: {node: ^18.0.0 || >= 20.0.0} peerDependencies: @@ -1202,9 +1271,9 @@ packages: vitest: optional: true dependencies: - '@typescript-eslint/utils': 6.16.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/utils': 6.17.0(eslint@8.56.0)(typescript@5.3.3) eslint: 8.56.0 - vitest: 1.1.0(@vitest/ui@1.1.0) + vitest: 1.1.3(@types/node@20.10.7)(@vitest/ui@1.1.3) transitivePeerDependencies: - supports-color - typescript @@ -1274,8 +1343,8 @@ packages: resolution: {integrity: sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} dependencies: - acorn: 8.11.2 - acorn-jsx: 5.3.2(acorn@8.11.2) + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) eslint-visitor-keys: 3.4.3 dev: true @@ -1298,6 +1367,12 @@ packages: engines: {node: '>=4.0'} dev: true + /estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + dependencies: + '@types/estree': 1.0.5 + dev: true + /esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -1461,6 +1536,10 @@ packages: slash: 3.0.0 dev: true + /graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + dev: true + /graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} dev: true @@ -1560,7 +1639,7 @@ packages: resolution: {integrity: sha512-EAMEJBsYuyyztxMxW3g7ugGPkrZsV57v0Hmv3mm1uQsmB+QnZuepg731CRaIgeUVSdmsTngOkSnauNF8p7FIhA==} engines: {node: '>=10'} dependencies: - '@babel/core': 7.23.6 + '@babel/core': 7.23.7 '@babel/parser': 7.23.6 '@istanbuljs/schema': 0.1.3 istanbul-lib-coverage: 3.2.2 @@ -1608,11 +1687,39 @@ packages: argparse: 2.0.1 dev: true + /js2xmlparser@4.0.2: + resolution: {integrity: sha512-6n4D8gLlLf1n5mNLQPRfViYzu9RATblzPEtm1SthMX1Pjao0r9YI9nw7ZIfRxQMERS87mcswrg+r/OYrPRX6jA==} + dependencies: + xmlcreate: 2.0.4 + dev: true + /jsdoc-type-pratt-parser@4.0.0: resolution: {integrity: sha512-YtOli5Cmzy3q4dP26GraSOeAhqecewG04hoO8DY56CH4KJ9Fvv5qKWUCCo3HZob7esJQHCv6/+bnTy72xZZaVQ==} engines: {node: '>=12.0.0'} dev: true + /jsdoc@4.0.2: + resolution: {integrity: sha512-e8cIg2z62InH7azBBi3EsSEqrKx+nUtAS5bBcYTSpZFA+vhNPyhv8PTFZ0WsjOPDj04/dOLlm08EDcQJDqaGQg==} + engines: {node: '>=12.0.0'} + hasBin: true + dependencies: + '@babel/parser': 7.23.6 + '@jsdoc/salty': 0.2.7 + '@types/markdown-it': 12.2.3 + bluebird: 3.7.2 + catharsis: 0.9.0 + escape-string-regexp: 2.0.0 + js2xmlparser: 4.0.2 + klaw: 3.0.0 + markdown-it: 12.3.2 + markdown-it-anchor: 8.6.7(@types/markdown-it@12.2.3)(markdown-it@12.3.2) + marked: 4.3.0 + mkdirp: 1.0.4 + requizzle: 0.2.4 + strip-json-comments: 3.1.1 + underscore: 1.13.6 + dev: true + /jsesc@2.5.2: resolution: {integrity: sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==} engines: {node: '>=4'} @@ -1647,6 +1754,12 @@ packages: json-buffer: 3.0.1 dev: true + /klaw@3.0.0: + resolution: {integrity: sha512-0Fo5oir+O9jnXu5EefYbVK+mHMBeEVEy2cmctR1O1NECcCkPRreJKrS6Qt/j3KC2C148Dfo9i3pCmCMsdqGr0g==} + dependencies: + graceful-fs: 4.2.11 + dev: true + /levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -1655,6 +1768,12 @@ packages: type-check: 0.4.0 dev: true + /linkify-it@3.0.3: + resolution: {integrity: sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==} + dependencies: + uc.micro: 1.0.6 + dev: true + /local-pkg@0.5.0: resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} engines: {node: '>=14'} @@ -1674,6 +1793,10 @@ packages: resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} dev: true + /lodash@4.17.21: + resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + dev: true + /loupe@2.3.7: resolution: {integrity: sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==} dependencies: @@ -1715,6 +1838,37 @@ packages: semver: 7.5.4 dev: true + /markdown-it-anchor@8.6.7(@types/markdown-it@12.2.3)(markdown-it@12.3.2): + resolution: {integrity: sha512-FlCHFwNnutLgVTflOYHPW2pPcl2AACqVzExlkGQNsi4CJgqOHN7YTgDd4LuhgN1BFO3TS0vLAruV1Td6dwWPJA==} + peerDependencies: + '@types/markdown-it': '*' + markdown-it: '*' + dependencies: + '@types/markdown-it': 12.2.3 + markdown-it: 12.3.2 + dev: true + + /markdown-it@12.3.2: + resolution: {integrity: sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==} + hasBin: true + dependencies: + argparse: 2.0.1 + entities: 2.1.0 + linkify-it: 3.0.3 + mdurl: 1.0.1 + uc.micro: 1.0.6 + dev: true + + /marked@4.3.0: + resolution: {integrity: sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==} + engines: {node: '>= 12'} + hasBin: true + dev: true + + /mdurl@1.0.1: + resolution: {integrity: sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==} + dev: true + /merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} dev: true @@ -1750,10 +1904,16 @@ packages: brace-expansion: 2.0.1 dev: true + /mkdirp@1.0.4: + resolution: {integrity: sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==} + engines: {node: '>=10'} + hasBin: true + dev: true + /mlly@1.4.2: resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==} dependencies: - acorn: 8.11.2 + acorn: 8.11.3 pathe: 1.1.1 pkg-types: 1.0.3 ufo: 1.3.2 @@ -1892,8 +2052,8 @@ packages: pathe: 1.1.1 dev: true - /postcss@8.4.32: - resolution: {integrity: sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==} + /postcss@8.4.33: + resolution: {integrity: sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.7 @@ -1928,6 +2088,12 @@ packages: resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} dev: true + /requizzle@0.2.4: + resolution: {integrity: sha512-JRrFk1D4OQ4SqovXOgdav+K8EAhSB/LJZqCz8tbX0KObcdeM15Ss59ozWMBWmmINMagCwmqn4ZNryUGpBsl6Jw==} + dependencies: + lodash: 4.17.21 + dev: true + /resolve-from@4.0.0: resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} engines: {node: '>=4'} @@ -1945,24 +2111,26 @@ packages: glob: 7.2.3 dev: true - /rollup@4.9.1: - resolution: {integrity: sha512-pgPO9DWzLoW/vIhlSoDByCzcpX92bKEorbgXuZrqxByte3JFk2xSW2JEeAcyLc9Ru9pqcNNW+Ob7ntsk2oT/Xw==} + /rollup@4.9.3: + resolution: {integrity: sha512-JnchF0ZGFiqGpAPjg3e89j656Ne4tTtCY1VZc1AxtoQcRIxjTu9jyYHBAtkDXE+X681n4un/nX9SU52AroSRzg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true + dependencies: + '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.9.1 - '@rollup/rollup-android-arm64': 4.9.1 - '@rollup/rollup-darwin-arm64': 4.9.1 - '@rollup/rollup-darwin-x64': 4.9.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.9.1 - '@rollup/rollup-linux-arm64-gnu': 4.9.1 - '@rollup/rollup-linux-arm64-musl': 4.9.1 - '@rollup/rollup-linux-riscv64-gnu': 4.9.1 - '@rollup/rollup-linux-x64-gnu': 4.9.1 - '@rollup/rollup-linux-x64-musl': 4.9.1 - '@rollup/rollup-win32-arm64-msvc': 4.9.1 - '@rollup/rollup-win32-ia32-msvc': 4.9.1 - '@rollup/rollup-win32-x64-msvc': 4.9.1 + '@rollup/rollup-android-arm-eabi': 4.9.3 + '@rollup/rollup-android-arm64': 4.9.3 + '@rollup/rollup-darwin-arm64': 4.9.3 + '@rollup/rollup-darwin-x64': 4.9.3 + '@rollup/rollup-linux-arm-gnueabihf': 4.9.3 + '@rollup/rollup-linux-arm64-gnu': 4.9.3 + '@rollup/rollup-linux-arm64-musl': 4.9.3 + '@rollup/rollup-linux-riscv64-gnu': 4.9.3 + '@rollup/rollup-linux-x64-gnu': 4.9.3 + '@rollup/rollup-linux-x64-musl': 4.9.3 + '@rollup/rollup-win32-arm64-msvc': 4.9.3 + '@rollup/rollup-win32-ia32-msvc': 4.9.3 + '@rollup/rollup-win32-x64-msvc': 4.9.3 fsevents: 2.3.3 dev: true @@ -2073,7 +2241,7 @@ packages: /strip-literal@1.3.0: resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==} dependencies: - acorn: 8.11.2 + acorn: 8.11.3 dev: true /supports-color@5.5.0: @@ -2166,10 +2334,22 @@ packages: hasBin: true dev: true + /uc.micro@1.0.6: + resolution: {integrity: sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==} + dev: true + /ufo@1.3.2: resolution: {integrity: sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==} dev: true + /underscore@1.13.6: + resolution: {integrity: sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==} + dev: true + + /undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + dev: true + /update-browserslist-db@1.0.13(browserslist@4.22.2): resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} hasBin: true @@ -2196,8 +2376,8 @@ packages: convert-source-map: 2.0.0 dev: true - /vite-node@1.1.0: - resolution: {integrity: sha512-jV48DDUxGLEBdHCQvxL1mEh7+naVy+nhUUUaPAZLd3FJgXuxQiewHcfeZebbJ6onDqNGkP4r3MhQ342PRlG81Q==} + /vite-node@1.1.3(@types/node@20.10.7): + resolution: {integrity: sha512-BLSO72YAkIUuNrOx+8uznYICJfTEbvBAmWClY3hpath5+h1mbPS5OMn42lrTxXuyCazVyZoDkSRnju78GiVCqA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true dependencies: @@ -2205,7 +2385,7 @@ packages: debug: 4.3.4 pathe: 1.1.1 picocolors: 1.0.0 - vite: 5.0.10 + vite: 5.0.11(@types/node@20.10.7) transitivePeerDependencies: - '@types/node' - less @@ -2217,8 +2397,8 @@ packages: - terser dev: true - /vite@5.0.10: - resolution: {integrity: sha512-2P8J7WWgmc355HUMlFrwofacvr98DAjoE52BfdbwQtyLH06XKwaL/FMnmKM2crF0iX4MpmMKoDlNCB1ok7zHCw==} + /vite@5.0.11(@types/node@20.10.7): + resolution: {integrity: sha512-XBMnDjZcNAw/G1gEiskiM1v6yzM4GE5aMGvhWTlHAYYhxb7S3/V1s3m2LDHa8Vh6yIWYYB0iJwsEaS523c4oYA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -2245,15 +2425,16 @@ packages: terser: optional: true dependencies: - esbuild: 0.19.10 - postcss: 8.4.32 - rollup: 4.9.1 + '@types/node': 20.10.7 + esbuild: 0.19.11 + postcss: 8.4.33 + rollup: 4.9.3 optionalDependencies: fsevents: 2.3.3 dev: true - /vitest@1.1.0(@vitest/ui@1.1.0): - resolution: {integrity: sha512-oDFiCrw7dd3Jf06HoMtSRARivvyjHJaTxikFxuqJjO76U436PqlVw1uLn7a8OSPrhSfMGVaRakKpA2lePdw79A==} + /vitest@1.1.3(@types/node@20.10.7)(@vitest/ui@1.1.3): + resolution: {integrity: sha512-2l8om1NOkiA90/Y207PsEvJLYygddsOyr81wLQ20Ra8IlLKbyQncWsGZjnbkyG2KwwuTXLQjEPOJuxGMG8qJBQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -2277,15 +2458,16 @@ packages: jsdom: optional: true dependencies: - '@vitest/expect': 1.1.0 - '@vitest/runner': 1.1.0 - '@vitest/snapshot': 1.1.0 - '@vitest/spy': 1.1.0 - '@vitest/ui': 1.1.0(vitest@1.1.0) - '@vitest/utils': 1.1.0 + '@types/node': 20.10.7 + '@vitest/expect': 1.1.3 + '@vitest/runner': 1.1.3 + '@vitest/snapshot': 1.1.3 + '@vitest/spy': 1.1.3 + '@vitest/ui': 1.1.3(vitest@1.1.3) + '@vitest/utils': 1.1.3 acorn-walk: 8.3.1 cac: 6.7.14 - chai: 4.3.10 + chai: 4.4.0 debug: 4.3.4 execa: 8.0.1 local-pkg: 0.5.0 @@ -2296,8 +2478,8 @@ packages: strip-literal: 1.3.0 tinybench: 2.5.1 tinypool: 0.8.1 - vite: 5.0.10 - vite-node: 1.1.0 + vite: 5.0.11(@types/node@20.10.7) + vite-node: 1.1.3(@types/node@20.10.7) why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -2330,6 +2512,10 @@ packages: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} dev: true + /xmlcreate@2.0.4: + resolution: {integrity: sha512-nquOebG4sngPmGPICTS5EnxqhKbCmz5Ox5hsszI2T6U5qdrJizBc+0ilYSEjTSzU0yZcmvppztXe/5Al5fUwdg==} + dev: true + /yallist@3.1.1: resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} dev: true diff --git a/test/DestDirHelper.js b/test/DestDirHelper.js index 952b77f..d55df8b 100644 --- a/test/DestDirHelper.js +++ b/test/DestDirHelper.js @@ -4,14 +4,29 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -import { findFile } from '../lib' +import { findFile } from '../lib/index.js' import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises' import { tmpdir } from 'node:os' import path from 'node:path' export default class DestDirHelper { + /** @type {(string | null)} */ #destDir = null + /** + * @typedef {object} TempIndexInfo + * @property {string} destDir - path to the temporary destination directory + * @property {string} indexPath - path to the generated index.html file + */ + + /** + * Creates a new temporary directory and index.html file for testing + * @param {string} destDirPrefix - prefix for temporary destination directory + * @param {string} origSubdir - subdirectory within temporary directory + * @param {string} origContent - content of generated index.html file + * @returns {Promise} - object + * @throws {Error} if creating the directory or the index.html file fails + */ async createIndexHtml(destDirPrefix, origSubdir, origContent) { this.#destDir = await mkdtemp(path.join(tmpdir(), destDirPrefix)) const indexPath = path.join(this.#destDir, origSubdir, 'index.html') @@ -22,6 +37,10 @@ export default class DestDirHelper { } async readIndexHtml() { + if (this.#destDir === null) { + throw new Error('this.createIndexHtml() not called') + } + const actualPath = await findFile(this.#destDir, 'index.html') return {actualPath, content: await readFile(actualPath, {encoding: 'utf8'})} } diff --git a/test/analyzeArgv.test.js b/test/analyzeArgv.test.js index 1a61a74..2df59f5 100644 --- a/test/analyzeArgv.test.js +++ b/test/analyzeArgv.test.js @@ -5,8 +5,8 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -import { analyzeArgv } from '../lib' -import { fixturePath } from './fixtures' +import { analyzeArgv } from '../lib/index.js' +import { fixturePath } from './fixtures/index.js' import { describe, expect, test } from 'vitest' import path from 'node:path' diff --git a/test/findFile.test.js b/test/findFile.test.js index 7791e4b..697bcf9 100644 --- a/test/findFile.test.js +++ b/test/findFile.test.js @@ -5,8 +5,8 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -import { findFile } from '../lib' -import { fixturePath } from './fixtures' +import { findFile } from '../lib/index.js' +import { fixturePath } from './fixtures/index.js' import { describe, expect, test } from 'vitest' import path from 'node:path' diff --git a/test/fixtures/jsdocStub/jsdoc.js b/test/fixtures/jsdocStub/jsdoc.js index e114d3f..38de055 100755 --- a/test/fixtures/jsdocStub/jsdoc.js +++ b/test/fixtures/jsdocStub/jsdoc.js @@ -42,7 +42,7 @@ try { * @returns {ArgsResult} - parameters determining fake jsdoc behavior */ function parseArgs(argv) { - let destination = null + let destination = 'out' let willGenerate = true let exitCode = 0 @@ -61,7 +61,7 @@ function parseArgs(argv) { break case '--exit-code': - exitCode = nextArg + exitCode = parseInt(nextArg) break } } diff --git a/test/getPath.test.js b/test/getPath.test.js index 810746e..f5cb73e 100644 --- a/test/getPath.test.js +++ b/test/getPath.test.js @@ -5,8 +5,8 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -import { getPath, pathKey } from '../lib' -import { fixturePath } from './fixtures' +import { getPath, pathKey } from '../lib/index.js' +import { fixturePath } from './fixtures/index.js' import { describe, expect, test } from 'vitest' import path from 'node:path' @@ -15,7 +15,11 @@ describe('getPath', () => { const envPath = ['usr/local/bin', 'usr/bin', 'bin'] .map(p => path.join(root, p)) .join(path.delimiter) - const makeEnv = platform => ({[pathKey(platform)]: envPath}) + /** + * @param {string} platform - valid process.platform OS identifier + * @returns {Object} - process.env-like object + */ + function makeEnv(platform) { return ({ [pathKey(platform)]: envPath }) } test('finds command on POSIX system', async() => { await expect(getPath('testcmd', makeEnv('linux'), 'linux')).resolves @@ -31,4 +35,9 @@ describe('getPath', () => { await expect(getPath('nonexistent', makeEnv('linux'), 'linux')).rejects .toBe(`nonexistent not found in ${pathKey('linux')}`) }) + + test('throws if no appropriate environment variable found', async () => { + await expect(getPath('borken', makeEnv('win32'), 'linux')).rejects + .toThrowError(`"${pathKey('linux')}" environment variable not defined`) + }) }) diff --git a/test/main.test.js b/test/main.test.js index f7e8447..a0dd233 100644 --- a/test/main.test.js +++ b/test/main.test.js @@ -5,9 +5,9 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -import { getPath, pathKey } from '../lib' -import { fixturePath } from './fixtures' -import DestDirHelper from './DestDirHelper' +import { INSTALL_HINT, pathKey } from '../lib/index.js' +import { fixturePath } from './fixtures/index.js' +import DestDirHelper from './DestDirHelper.js' import { afterEach, describe, expect, test } from 'vitest' import { spawn } from 'node:child_process' import path from 'node:path' @@ -16,13 +16,25 @@ import { fileURLToPath, pathToFileURL } from 'node:url' const PATH_KEY = pathKey(process.platform) describe('jsdoc-cli-wrapper', () => { - const root = fixturePath('jsdocStub') const destDirHelper = new DestDirHelper() const mainPath = fileURLToPath(new URL('../index.js', import.meta.url)) - const envPath = [root, process.env[PATH_KEY]].join(path.delimiter) + const envPath = [fixturePath('jsdocStub'), process.env[PATH_KEY]] + .join(path.delimiter) afterEach(async () => await destDirHelper.cleanup()) + /** + * @typedef {object} JsdocResult + * @property {(number | null)} exitCode - the exit code from 'jsdoc' + * @property {string} [stdout] - standard output from 'jsdoc' + * @property {string} [stderr] - standard error from 'jsdoc' + */ + + /** + * @param {string} testEnvPath - command line search path environment variable + * @param {...string} argv - command line arguments to pass to 'jsdoc' + * @returns {Promise} - exit code and output from 'jsdoc' + */ const spawnMain = (testEnvPath, ...argv) => new Promise((resolve, reject) => { const env = {...process.env, [PATH_KEY]: testEnvPath} const wrapper = spawn(process.execPath, [mainPath, ...argv], {env}) @@ -32,6 +44,7 @@ describe('jsdoc-cli-wrapper', () => { wrapper.stdout.on('data', data => stdout += data.toString()) wrapper.stderr.on('data', data => stderr += data.toString()) wrapper.on('close', exitCode => { + /** @type {JsdocResult} */ const result = { exitCode } if (stdout) result.stdout = stdout if (stderr) result.stderr = stderr @@ -40,20 +53,18 @@ describe('jsdoc-cli-wrapper', () => { wrapper.on('error', err => reject(err)) }) + /** + * @callback JsdocRunner + * @param {...string} argv - command line arguments to pass to 'jsdoc' + * @returns {Promise} - exit code and output from 'jsdoc' + */ + + /** @type {JsdocRunner} */ const runMain = (...argv) => spawnMain(envPath, ...argv) + /** @type {JsdocRunner} */ const runMainWithoutJsdoc = async (...argv) => { - let envPath = process.env[PATH_KEY] - - try { - const jsdocPath = await getPath('jsdoc', process.env, process.platform) - const jsdocDir = path.dirname(jsdocPath) - envPath = envPath.split(path.delimiter) - .filter(p => p !== jsdocDir) - .join(path.delimiter) - } catch { /* It's OK if it's not actually installed. */ } - - return spawnMain(envPath, ...argv) + return spawnMain('/bogus/bin', ...argv) } test('success without index.html path', async () => { @@ -61,7 +72,7 @@ describe('jsdoc-cli-wrapper', () => { }) test('error without index.html path', async () => { - await expect(runMain('--exit-code', 1)).resolves + await expect(runMain('--exit-code', '1')).resolves .toStrictEqual({ exitCode: 1 }) }) @@ -71,15 +82,12 @@ describe('jsdoc-cli-wrapper', () => { ) const result = pathToFileURL(indexPath.replace('old-subdir', 'new-subdir')) - await expect(runMain('-d', destDir)).resolves.toStrictEqual({ - exitCode: 0, stdout: `${result}\n` - }) + await expect(runMain('-d', destDir)).resolves + .toStrictEqual({ exitCode: 0, stdout: `${result}\n` }) }) test('emit internal error', async () => { - await expect(runMainWithoutJsdoc()).resolves.toStrictEqual({ - exitCode: 1, - stderr: 'Run \'pnpm add -g jsdoc\' to install JSDoc: https://jsdoc.app\n' - }) + await expect(runMainWithoutJsdoc()).resolves + .toStrictEqual({ exitCode: 1, stderr: `${INSTALL_HINT}\n` }) }) }) diff --git a/test/runJsdoc.test.js b/test/runJsdoc.test.js index 63c9fc2..b22a318 100644 --- a/test/runJsdoc.test.js +++ b/test/runJsdoc.test.js @@ -5,9 +5,9 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -import { runJsdoc, pathKey } from '../lib' -import { fixturePath } from './fixtures' -import DestDirHelper from './DestDirHelper' +import { runJsdoc, pathKey, INSTALL_HINT } from '../lib/index.js' +import { fixturePath } from './fixtures/index.js' +import DestDirHelper from './DestDirHelper.js' import { afterEach, beforeEach, describe, expect, test } from 'vitest' import path from 'node:path' @@ -19,7 +19,9 @@ describe('runJsdoc', () => { const platform = process.platform const destDirHelper = new DestDirHelper() - let origIndexPath = null + /** @type {string} */ + let origIndexPath + /** @type {string[]} */ let argv = [] beforeEach(async () => { @@ -34,11 +36,16 @@ describe('runJsdoc', () => { const readIndexHtml = async () => destDirHelper.readIndexHtml() + test('throws error if PATH/Path env var not found', async () => { + await expect(runJsdoc(argv, {}, platform)) + .rejects.toThrowError(`"${PATH_KEY}" environment variable not defined`) + }) + test('emits error if jsdoc not found', async () => { const bogusPath = path.join(root, 'nonexistent') await expect(runJsdoc(argv, {[PATH_KEY]: bogusPath}, platform)) - .rejects.toContain('npm add -g jsdoc') + .rejects.toContain(INSTALL_HINT) await expect(readIndexHtml()).resolves.toStrictEqual({ actualPath: origIndexPath, content: 'Old and Busted' }) @@ -53,7 +60,7 @@ describe('runJsdoc', () => { }) test('deletes existing output and returns error', async () => { - await expect(runJsdoc(argv.concat('--exit-code', 1), env, platform)) + await expect(runJsdoc(argv.concat('--exit-code', '1'), env, platform)) .resolves.toStrictEqual({exitCode: 1}) await expect(readIndexHtml()) .rejects.toThrowError(/no such file or directory/) diff --git a/test/stripJsonComments.test.js b/test/stripJsonComments.test.js index 9df959a..8de9b76 100644 --- a/test/stripJsonComments.test.js +++ b/test/stripJsonComments.test.js @@ -5,7 +5,7 @@ * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ -import { stripJsonComments } from '../lib' +import { stripJsonComments } from '../lib/index.js' import { describe, expect, test } from 'vitest' describe('stripJsonComments', () => { @@ -216,9 +216,22 @@ describe('stripJsonComments', () => { // JSON.parse() from Node.js ^18.0.0 only ever fails with "Unexpected // token", whereas versions >= 19.0.0 provide more descriptive errors. const v18 = process.version.startsWith('v18.') + /** + * @param {string} token - token expected to cause a JSON.parse() error + * @param {string} msg - expected Node.js v >= 19.0.0 JSON.parse() error + * @returns {string} - the appropriate JSON.parse() error prefix + */ const errPrefix = (token, msg) => v18 ? `Unexpected token ${token} in` : msg + /** + * @param {string[]} lines - lines of text to join + * @returns {string} - lines joined by newlines + */ const jsonSrc = (...lines) => lines.join('\n') + /** + * @param {string} src - original JSON source to strip + * @returns {object} - object parsed from src + */ const stripAndParse = (src) => () => JSON.parse(stripJsonComments(src)) test('* not preceded or followed by /', () => { diff --git a/vitest.config.js b/vitest.config.js index c2ad09b..7a7d8de 100644 --- a/vitest.config.js +++ b/vitest.config.js @@ -1,3 +1,4 @@ +// @ts-nocheck import { defineConfig, configDefaults } from 'vitest/config' export default defineConfig({