diff --git a/.prettierignore b/.lintignore similarity index 78% rename from .prettierignore rename to .lintignore index ad0392d..66e44fd 100755 --- a/.prettierignore +++ b/.lintignore @@ -1,5 +1,6 @@ node_modules coverage dist +dist-internal package-lock.json docs diff --git a/lint-markdown.js b/lint-markdown.js deleted file mode 100644 index 9ab79e3..0000000 --- a/lint-markdown.js +++ /dev/null @@ -1,68 +0,0 @@ -/* eslint-disable import/no-extraneous-dependencies */ -/* eslint-disable @typescript-eslint/no-var-requires */ -const markdownLinkCheck = require("markdown-link-check"); -const chalk = require("chalk"); -const path = require("path"); -const fs = require("fs"); - -const statusLabels = { - alive: chalk.green("✓"), - dead: chalk.red("✖"), - ignored: chalk.gray("/"), - error: chalk.yellow("⚠"), -}; - -const options = { - // ignorePatterns: [{ pattern: "^http(s)://" }], - retryOn429: true, - retryCount: 2, - fallbackRetryDelay: "30s", - aliveStatusCodes: [200, 206], -}; - -function getFiles(dir, extension, result = []) { - const dirents = fs.readdirSync(dir, { withFileTypes: true }); - for (const dirent of dirents) { - const res = path.resolve(dir, dirent.name); - if (dirent.isDirectory()) getFiles(res, extension, result); - else if (res.endsWith(extension)) result.push(res); - } - return result; -} - -function checkFile(file) { - return new Promise((resolve, reject) => { - const opts = { - ...options, - baseUrl: `file://${path.dirname(file)}`, - replacementPatterns: [{ pattern: /^\.\.\/api\/(.*)\.md/, replacement: "../dist-internal/api/$1.html" }], - }; - markdownLinkCheck(fs.readFileSync(file, "utf-8"), opts, (err, results) => { - const relativeFile = path.relative(process.cwd(), file); - if (err) { - console.log(relativeFile, err); - reject(err); - } else if (results.length) { - const failed = results.filter((result) => result.status !== "alive" && result.status !== "ignored"); - console.log(relativeFile); - if (failed.length) { - for (const result of failed) { - console.log("- [%s] %s", statusLabels[result.status], result.link); - } - reject(); - } else { - resolve(); - } - } - }); - }); -} - -async function checkAllFiles() { - const results = await Promise.allSettled(getFiles("docs", ".md").map(checkFile)); - if (results.some(({ status }) => status !== "fulfilled")) { - process.exit(-1); - } -} - -checkAllFiles(); diff --git a/package-lock.json b/package-lock.json index 75b3e00..043a3f3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,13 +9,13 @@ "version": "0.8.1", "license": "Zlib", "devDependencies": { - "@lusito/eslint-config": "^3.0.1", - "@lusito/mono-docs": "^0.14.0", - "@lusito/prettier-config": "^3.0.0", + "@lusito/eslint-config": "^3.1.0", + "@lusito/mono": "^0.15.1", + "@lusito/mono-docs": "^0.16.0", + "@lusito/prettier-config": "^3.1.0", "eslint-plugin-jest": "^28.5.0", - "eslint-plugin-jsdoc": "^48.2.6", - "markdown-link-check": "^3.12.2", - "nodemon": "^3.1.1", + "eslint-plugin-jsdoc": "^48.2.7", + "nodemon": "^3.1.2", "parcel": "^2.12.0", "parcel-plugin-static-files-copy": "^2.6.0", "rimraf": "^5.0.7", @@ -134,9 +134,9 @@ } }, "node_modules/@es-joy/jsdoccomment": { - "version": "0.43.0", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.43.0.tgz", - "integrity": "sha512-Q1CnsQrytI3TlCB1IVWXWeqUIPGVEKGaE7IbVdt13Nq/3i0JESAkQQERrfiQkmlpijl+++qyqPgaS31Bvc1jRQ==", + "version": "0.43.1", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.43.1.tgz", + "integrity": "sha512-I238eDtOolvCuvtxrnqtlBaw0BwdQuYqK7eA6XIonicMdOOOb75mqdIzkGDUbS04+1Di007rgm9snFRNeVrOog==", "dev": true, "dependencies": { "@types/eslint": "^8.56.5", @@ -491,9 +491,9 @@ } }, "node_modules/@lusito/eslint-config": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@lusito/eslint-config/-/eslint-config-3.0.1.tgz", - "integrity": "sha512-CufXroXHUWT4z3LNLYOUAThlNiOwN4cyHdvTkTzIptxw9+8jW8ypqUc6ypimmyYI42JdPqjrXO3UkZsKMKfGyQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@lusito/eslint-config/-/eslint-config-3.1.0.tgz", + "integrity": "sha512-AxB6FD5wC5kr38X4WYRHgcsUGrzt2nmjjr0g4CODA3F8xiOrQjG0m3dm2YPwGHTvhDjRlGy6Cf1uRZuy08DxvQ==", "dev": true, "dependencies": { "@typescript-eslint/eslint-plugin": "^7.10.0", @@ -504,16 +504,33 @@ "eslint-plugin-import": "^2.29.1" } }, + "node_modules/@lusito/mono": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/@lusito/mono/-/mono-0.15.1.tgz", + "integrity": "sha512-xZb/JnNbdn0oo0Sds6sHXGRdxlDqR5APlVgqx3ji1gX1x758WTd8vmx6QLGyo7J7IG095VSEACROz27rsktfng==", + "dev": true, + "dependencies": { + "chalk": "^4.1.2", + "ignore": "^5.3.1", + "markdown-link-check": "^3.12.2", + "prompts": "^2.4.2", + "yargs": "^17.7.2" + }, + "bin": { + "mono-lint": "dist/mono-lint.js", + "mono-release": "dist/mono-release.js" + } + }, "node_modules/@lusito/mono-docs": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@lusito/mono-docs/-/mono-docs-0.14.0.tgz", - "integrity": "sha512-0FEhe+7WsXqIiLHb+wnny5OefaSRStY3eC2fQrgv81l3+wFAo4Pmtw0wpFsCEod6Q7YpQRkoT4o7c1iX7QktDg==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@lusito/mono-docs/-/mono-docs-0.16.0.tgz", + "integrity": "sha512-h/G4H66Xtq/4jGQxGFylj3CSb88wkH48V35PKRlYZf7SSML2ArRUBUycoQgmd8zkUtk8EwbxqOgwiTLUmgnDKA==", "dev": true, "dependencies": { "@fastify/static": "^7.0.4", "@fontsource/source-code-pro": "^4.5.14", "@fontsource/source-sans-pro": "^4.5.11", - "@lusito/require-libs": "^0.13.0", + "@lusito/require-libs": "^0.14.0", "classnames": "^2.5.1", "cross-env": "^7.0.3", "dom-helmet": "^0.8.0", @@ -524,7 +541,6 @@ "js-yaml": "^4.1.0", "markdown-it": "^14.1.0", "pirates": "^4.0.6", - "rimraf": "^5.0.7", "slug": "^9.1.0", "tsx-dom-ssr": "^0.8.0", "tsx-dom-types": "^1.0.0" @@ -534,18 +550,18 @@ } }, "node_modules/@lusito/prettier-config": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@lusito/prettier-config/-/prettier-config-3.0.0.tgz", - "integrity": "sha512-L2YUs7F1mCAQhloQJMDl5a4rvgbTC2HVb9HmEhoS5RAWPIKuUTsZ9aXyIPotyxpzEWVrluSghtiaJ/BB6dNeXQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@lusito/prettier-config/-/prettier-config-3.1.0.tgz", + "integrity": "sha512-lQvN+zzrnPD/Vu7B4PNEffheOHkEOC5HIW7moz6GM/A4Sqpj33rhrG4k2F+ggK8Y8h43177ImSX/HDg/BuYPDA==", "dev": true, "dependencies": { "prettier": "3.2.5" } }, "node_modules/@lusito/require-libs": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@lusito/require-libs/-/require-libs-0.13.0.tgz", - "integrity": "sha512-skOscO3bWaeveN45P4dlkb7HcNFuyngVkY5RPrw38TdL1fWnMAeFTvZS1q8Fc7GuiAhVO5oA/V4YirHvbFOXpQ==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@lusito/require-libs/-/require-libs-0.14.0.tgz", + "integrity": "sha512-YqJmbRqmme/pjF+Jy0eej0ASTDfhbxNlkGkwfx+a/NpXxma5NmLW3Q9+MWT02vULmzvOlg6NELu6I5R3m5qWgg==", "dev": true, "dependencies": { "front-matter": "^4.0.2", @@ -3443,6 +3459,57 @@ "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==", "dev": true }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/cliui/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/cliui/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/cliui/node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, "node_modules/clone": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", @@ -4397,18 +4464,18 @@ } }, "node_modules/eslint-plugin-jsdoc": { - "version": "48.2.6", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.2.6.tgz", - "integrity": "sha512-GNk9jtpYmoEVeD/U6yYYmd6T8vSOoPs7CL8ZeX85iD8P3qifDdLQGze6+cw9boobDthmYnnxvIoHrhuSffj09g==", + "version": "48.2.7", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.2.7.tgz", + "integrity": "sha512-fYj3roTnkFL9OFFTB129rico8lerC5G8Vp2ZW9SjO9RNWG0exVvI+i/Y8Bpm1ufjR0uvT38xtoab/U0Hp8Ybog==", "dev": true, "dependencies": { - "@es-joy/jsdoccomment": "~0.43.0", + "@es-joy/jsdoccomment": "~0.43.1", "are-docs-informative": "^0.0.2", "comment-parser": "1.4.1", "debug": "^4.3.4", "escape-string-regexp": "^4.0.0", "esquery": "^1.5.0", - "semver": "^7.6.1", + "semver": "^7.6.2", "spdx-expression-parse": "^4.0.0" }, "engines": { @@ -4972,6 +5039,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, "node_modules/get-intrinsic": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", @@ -6017,6 +6093,15 @@ "graceful-fs": "^4.1.6" } }, + "node_modules/kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -6643,9 +6728,9 @@ "dev": true }, "node_modules/nodemon": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.1.tgz", - "integrity": "sha512-k43xGaDtaDIcufn0Fc6fTtsdKSkV/hQzoQFigNH//GaKta28yoKVYXCnV+KXRqfT/YzsFaQU9VdeEG+HEyxr6A==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.2.tgz", + "integrity": "sha512-/Ib/kloefDy+N0iRTxIUzyGcdW9lzlnca2Jsa5w73bs3npXjg+WInmiX6VY13mIb6SykkthYX/U5t0ukryGqBw==", "dev": true, "dependencies": { "chokidar": "^3.5.2", @@ -7464,6 +7549,19 @@ "node": ">=0.4.0" } }, + "node_modules/prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "dependencies": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -7646,6 +7744,15 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", @@ -7827,9 +7934,9 @@ "dev": true }, "node_modules/sass": { - "version": "1.77.2", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.2.tgz", - "integrity": "sha512-eb4GZt1C3avsX3heBNlrc7I09nyT00IUuo4eFhAbeXWU2fvA7oXI53SxODVAA+zgZCk9aunAZgO+losjR3fAwA==", + "version": "1.77.4", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.4.tgz", + "integrity": "sha512-vcF3Ckow6g939GMA4PeU7b2K/9FALXk2KF9J87txdHzXbUF9XRQRwSxcAs/fGaTnJeBFd7UoV22j3lzMLdM0Pw==", "dev": true, "dependencies": { "chokidar": ">=3.0.0 <4.0.0", @@ -7986,6 +8093,12 @@ "node": ">=10" } }, + "node_modules/sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, "node_modules/slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -9059,6 +9172,62 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "engines": { + "node": ">=10" + } + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs/node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "node_modules/yargs/node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -9160,9 +9329,9 @@ } }, "@es-joy/jsdoccomment": { - "version": "0.43.0", - "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.43.0.tgz", - "integrity": "sha512-Q1CnsQrytI3TlCB1IVWXWeqUIPGVEKGaE7IbVdt13Nq/3i0JESAkQQERrfiQkmlpijl+++qyqPgaS31Bvc1jRQ==", + "version": "0.43.1", + "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.43.1.tgz", + "integrity": "sha512-I238eDtOolvCuvtxrnqtlBaw0BwdQuYqK7eA6XIonicMdOOOb75mqdIzkGDUbS04+1Di007rgm9snFRNeVrOog==", "dev": true, "requires": { "@types/eslint": "^8.56.5", @@ -9429,9 +9598,9 @@ "dev": true }, "@lusito/eslint-config": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/@lusito/eslint-config/-/eslint-config-3.0.1.tgz", - "integrity": "sha512-CufXroXHUWT4z3LNLYOUAThlNiOwN4cyHdvTkTzIptxw9+8jW8ypqUc6ypimmyYI42JdPqjrXO3UkZsKMKfGyQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@lusito/eslint-config/-/eslint-config-3.1.0.tgz", + "integrity": "sha512-AxB6FD5wC5kr38X4WYRHgcsUGrzt2nmjjr0g4CODA3F8xiOrQjG0m3dm2YPwGHTvhDjRlGy6Cf1uRZuy08DxvQ==", "dev": true, "requires": { "@typescript-eslint/eslint-plugin": "^7.10.0", @@ -9442,16 +9611,29 @@ "eslint-plugin-import": "^2.29.1" } }, + "@lusito/mono": { + "version": "0.15.1", + "resolved": "https://registry.npmjs.org/@lusito/mono/-/mono-0.15.1.tgz", + "integrity": "sha512-xZb/JnNbdn0oo0Sds6sHXGRdxlDqR5APlVgqx3ji1gX1x758WTd8vmx6QLGyo7J7IG095VSEACROz27rsktfng==", + "dev": true, + "requires": { + "chalk": "^4.1.2", + "ignore": "^5.3.1", + "markdown-link-check": "^3.12.2", + "prompts": "^2.4.2", + "yargs": "^17.7.2" + } + }, "@lusito/mono-docs": { - "version": "0.14.0", - "resolved": "https://registry.npmjs.org/@lusito/mono-docs/-/mono-docs-0.14.0.tgz", - "integrity": "sha512-0FEhe+7WsXqIiLHb+wnny5OefaSRStY3eC2fQrgv81l3+wFAo4Pmtw0wpFsCEod6Q7YpQRkoT4o7c1iX7QktDg==", + "version": "0.16.0", + "resolved": "https://registry.npmjs.org/@lusito/mono-docs/-/mono-docs-0.16.0.tgz", + "integrity": "sha512-h/G4H66Xtq/4jGQxGFylj3CSb88wkH48V35PKRlYZf7SSML2ArRUBUycoQgmd8zkUtk8EwbxqOgwiTLUmgnDKA==", "dev": true, "requires": { "@fastify/static": "^7.0.4", "@fontsource/source-code-pro": "^4.5.14", "@fontsource/source-sans-pro": "^4.5.11", - "@lusito/require-libs": "^0.13.0", + "@lusito/require-libs": "^0.14.0", "classnames": "^2.5.1", "cross-env": "^7.0.3", "dom-helmet": "^0.8.0", @@ -9462,25 +9644,24 @@ "js-yaml": "^4.1.0", "markdown-it": "^14.1.0", "pirates": "^4.0.6", - "rimraf": "^5.0.7", "slug": "^9.1.0", "tsx-dom-ssr": "^0.8.0", "tsx-dom-types": "^1.0.0" } }, "@lusito/prettier-config": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/@lusito/prettier-config/-/prettier-config-3.0.0.tgz", - "integrity": "sha512-L2YUs7F1mCAQhloQJMDl5a4rvgbTC2HVb9HmEhoS5RAWPIKuUTsZ9aXyIPotyxpzEWVrluSghtiaJ/BB6dNeXQ==", + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@lusito/prettier-config/-/prettier-config-3.1.0.tgz", + "integrity": "sha512-lQvN+zzrnPD/Vu7B4PNEffheOHkEOC5HIW7moz6GM/A4Sqpj33rhrG4k2F+ggK8Y8h43177ImSX/HDg/BuYPDA==", "dev": true, "requires": { "prettier": "3.2.5" } }, "@lusito/require-libs": { - "version": "0.13.0", - "resolved": "https://registry.npmjs.org/@lusito/require-libs/-/require-libs-0.13.0.tgz", - "integrity": "sha512-skOscO3bWaeveN45P4dlkb7HcNFuyngVkY5RPrw38TdL1fWnMAeFTvZS1q8Fc7GuiAhVO5oA/V4YirHvbFOXpQ==", + "version": "0.14.0", + "resolved": "https://registry.npmjs.org/@lusito/require-libs/-/require-libs-0.14.0.tgz", + "integrity": "sha512-YqJmbRqmme/pjF+Jy0eej0ASTDfhbxNlkGkwfx+a/NpXxma5NmLW3Q9+MWT02vULmzvOlg6NELu6I5R3m5qWgg==", "dev": true, "requires": { "front-matter": "^4.0.2", @@ -11285,6 +11466,47 @@ "integrity": "sha512-saHYOzhIQs6wy2sVxTM6bUDsQO4F50V9RQ22qBpEdCW+I+/Wmke2HOl6lS6dTpdxVhb88/I6+Hs+438c3lfUow==", "dev": true }, + "cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "requires": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "dependencies": { + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + }, + "wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "requires": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + } + } + } + }, "clone": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", @@ -11985,18 +12207,18 @@ } }, "eslint-plugin-jsdoc": { - "version": "48.2.6", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.2.6.tgz", - "integrity": "sha512-GNk9jtpYmoEVeD/U6yYYmd6T8vSOoPs7CL8ZeX85iD8P3qifDdLQGze6+cw9boobDthmYnnxvIoHrhuSffj09g==", + "version": "48.2.7", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-48.2.7.tgz", + "integrity": "sha512-fYj3roTnkFL9OFFTB129rico8lerC5G8Vp2ZW9SjO9RNWG0exVvI+i/Y8Bpm1ufjR0uvT38xtoab/U0Hp8Ybog==", "dev": true, "requires": { - "@es-joy/jsdoccomment": "~0.43.0", + "@es-joy/jsdoccomment": "~0.43.1", "are-docs-informative": "^0.0.2", "comment-parser": "1.4.1", "debug": "^4.3.4", "escape-string-regexp": "^4.0.0", "esquery": "^1.5.0", - "semver": "^7.6.1", + "semver": "^7.6.2", "spdx-expression-parse": "^4.0.0" } }, @@ -12422,6 +12644,12 @@ "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==", "dev": true }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, "get-intrinsic": { "version": "1.2.4", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", @@ -13128,6 +13356,12 @@ "universalify": "^2.0.0" } }, + "kleur": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-3.0.3.tgz", + "integrity": "sha512-eTIzlVOSUR+JxdDFepEYcBMtZ9Qqdef+rnzWdRZuMbOywu5tO2w2N7rqjoANZ5k9vywhL6Br1VRjUIgTQx4E8w==", + "dev": true + }, "levn": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", @@ -13539,9 +13773,9 @@ "dev": true }, "nodemon": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.1.tgz", - "integrity": "sha512-k43xGaDtaDIcufn0Fc6fTtsdKSkV/hQzoQFigNH//GaKta28yoKVYXCnV+KXRqfT/YzsFaQU9VdeEG+HEyxr6A==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/nodemon/-/nodemon-3.1.2.tgz", + "integrity": "sha512-/Ib/kloefDy+N0iRTxIUzyGcdW9lzlnca2Jsa5w73bs3npXjg+WInmiX6VY13mIb6SykkthYX/U5t0ukryGqBw==", "dev": true, "requires": { "chokidar": "^3.5.2", @@ -14142,6 +14376,16 @@ "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", "dev": true }, + "prompts": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/prompts/-/prompts-2.4.2.tgz", + "integrity": "sha512-NxNv/kLguCA7p3jE8oL2aEBsrJWgAakBpgmgK6lpPWV+WuOmY6r2/zbAVnP+T8bQlA0nzHXSJSJW0Hq7ylaD2Q==", + "dev": true, + "requires": { + "kleur": "^3.0.3", + "sisteransi": "^1.0.5" + } + }, "proxy-addr": { "version": "2.0.7", "resolved": "https://registry.npmjs.org/proxy-addr/-/proxy-addr-2.0.7.tgz", @@ -14279,6 +14523,12 @@ "set-function-name": "^2.0.1" } }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true + }, "require-from-string": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", @@ -14389,9 +14639,9 @@ "dev": true }, "sass": { - "version": "1.77.2", - "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.2.tgz", - "integrity": "sha512-eb4GZt1C3avsX3heBNlrc7I09nyT00IUuo4eFhAbeXWU2fvA7oXI53SxODVAA+zgZCk9aunAZgO+losjR3fAwA==", + "version": "1.77.4", + "resolved": "https://registry.npmjs.org/sass/-/sass-1.77.4.tgz", + "integrity": "sha512-vcF3Ckow6g939GMA4PeU7b2K/9FALXk2KF9J87txdHzXbUF9XRQRwSxcAs/fGaTnJeBFd7UoV22j3lzMLdM0Pw==", "dev": true, "requires": { "chokidar": ">=3.0.0 <4.0.0", @@ -14509,6 +14759,12 @@ "semver": "^7.5.3" } }, + "sisteransi": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", + "integrity": "sha512-bLGGlR1QxBcynn2d5YmDX4MGjlZvy2MRBDRNHLJ8VI6l6+9FUiyTFNJ0IveOSP0bcXgVDPRcfGqA0pjaqUpfVg==", + "dev": true + }, "slash": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", @@ -15298,6 +15554,52 @@ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", "dev": true }, + "y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true + }, + "yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "requires": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "dependencies": { + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + } + } + } + }, + "yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true + }, "yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", diff --git a/package.json b/package.json index 62da378..75097a2 100644 --- a/package.json +++ b/package.json @@ -34,16 +34,9 @@ "build:example:base": "rimraf dist-internal/example && tsc && parcel build example/index.html --dist-dir dist-internal/example --no-source-maps", "build:example:dev": "npm run build:example:base -- --public-url /example/", "build:example:prod": "npm run build:example:base -- --public-url /sounts/example/", - "lint": "npm run lint:style && npm run lint:es && npm run lint:package && npm run lint:md", - "lint:es": "eslint \"{src,sample}/**/*.{ts,tsx}\" --ext \".ts,.tsx\" --ignore-path .prettierignore", - "lint:es:fix": "npm run lint:es -- --fix", - "lint:fix": "npm run lint:style:fix && npm run lint:es:fix && npm run lint:package:fix && npm run lint:md", - "lint:md": "node lint-markdown.js", - "lint:package": "sort-package-json --check", - "lint:package:fix": "sort-package-json", - "lint:style": "npm run lint:style:base -- --check", - "lint:style:base": "prettier \"{src,sample}/**/*.{ts,tsx,js,json}\" \"./*.{ts,tsx,js,json}\"", - "lint:style:fix": "npm run lint:style:base -- --write", + "lint": "mono-lint", + "lint:fix": "mono-lint --fix", + "release": "mono-release", "serve:docs": "rimraf dist-internal && npm run build:api && npm run build:example:dev && mono-docs . serve", "start": "parcel --dist-dir dist-internal/example example/index.html", "start:docs": "nodemon --ignore node_modules --ignore dist --ignore \"dist-internal\" -e ts,tsx,md,scss,png,webp --exec \"npm run serve:docs\"" @@ -52,13 +45,13 @@ "since 2017-06" ], "devDependencies": { - "@lusito/eslint-config": "^3.0.1", - "@lusito/mono-docs": "^0.14.0", - "@lusito/prettier-config": "^3.0.0", + "@lusito/eslint-config": "^3.1.0", + "@lusito/mono": "^0.15.1", + "@lusito/mono-docs": "^0.16.0", + "@lusito/prettier-config": "^3.1.0", "eslint-plugin-jest": "^28.5.0", - "eslint-plugin-jsdoc": "^48.2.6", - "markdown-link-check": "^3.12.2", - "nodemon": "^3.1.1", + "eslint-plugin-jsdoc": "^48.2.7", + "nodemon": "^3.1.2", "parcel": "^2.12.0", "parcel-plugin-static-files-copy": "^2.6.0", "rimraf": "^5.0.7", @@ -70,6 +63,13 @@ "volta": { "node": "20.13.1" }, + "monoLint": { + "lintMarkdownLinks": { + "warnOnlyPatterns": [ + "^https:\\/\\/lusito\\.github\\.io\\/sounts\\/" + ] + } + }, "staticFiles": { "staticPath": [ "example/assets/music.wav",