From d7c02910e1cf63ab40f7f8909dbb94dc253667aa Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sun, 26 Oct 2025 14:05:37 +0100 Subject: [PATCH 1/3] tidy some untidy files --- lib/MetaCPAN/Web/Controller/Feed.pm | 5 ++--- t/controller/feed.t | 9 +-------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/lib/MetaCPAN/Web/Controller/Feed.pm b/lib/MetaCPAN/Web/Controller/Feed.pm index 33d3ed50a6..50bafbb5f9 100644 --- a/lib/MetaCPAN/Web/Controller/Feed.pm +++ b/lib/MetaCPAN/Web/Controller/Feed.pm @@ -5,9 +5,8 @@ use namespace::autoclean; BEGIN { extends 'MetaCPAN::Web::Controller' } -use DateTime (); -use HTML::Escape qw( escape_html ); -use MetaCPAN::Web::RenderUtil qw( render_markdown ); +use DateTime (); +use HTML::Escape qw( escape_html ); use MetaCPAN::Web::Types qw( ArrayRef DateTime Enum HashRef Str Undef Uri ); use Params::ValidationCompiler qw( validation_for ); use XML::FeedPP (); ## no perlimports diff --git a/t/controller/feed.t b/t/controller/feed.t index 580ded89b5..b2681ed477 100644 --- a/t/controller/feed.t +++ b/t/controller/feed.t @@ -4,14 +4,7 @@ use lib 't/lib'; use MetaCPAN::Web (); use MetaCPAN::Web::Controller::Feed (); -use MetaCPAN::Web::Test qw( - app - GET - override_api_response - test_cache_headers - test_psgi - tx -); +use MetaCPAN::Web::Test qw( app GET test_cache_headers test_psgi tx ); use Test::More; use Test::Warnings (); use Try::Tiny qw( catch try ); From ad1b5e4112ffa978580708701ff269cae3e145e1 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 12 Oct 2024 05:57:27 +0200 Subject: [PATCH 2/3] use eslint with stylistic for tidying javascript eslint and stylistic is more configurable than prettier and can have better alignment. We are also already using eslint. --- build-assets.mjs | 54 +- eslint.config.mjs | 44 +- package-lock.json | 788 +++++++++++++++++++++---- package.json | 1 + precious.toml | 31 +- root/static/js/autocomplete.mjs | 30 +- root/static/js/bootstrap-slidepanel.js | 12 +- root/static/js/brush-cpan-changes.js | 12 +- root/static/js/brush-perl.js | 189 +++--- root/static/js/cpan.js | 42 +- root/static/js/document-ui.mjs | 10 +- root/static/js/github.js | 166 +++--- root/static/js/google-analytics.mjs | 2 +- root/static/js/pod2html.mjs | 24 +- root/static/js/profile.js | 30 +- root/static/js/relatize_date.js | 32 +- root/static/js/search.js | 2 +- root/static/js/storage.js | 7 +- root/static/js/syntaxhighlighter.mjs | 58 +- root/static/js/tablesorter.mjs | 16 +- 20 files changed, 1036 insertions(+), 514 deletions(-) diff --git a/build-assets.mjs b/build-assets.mjs index 98170e558e..da45a57fbc 100755 --- a/build-assets.mjs +++ b/build-assets.mjs @@ -1,16 +1,14 @@ #!/usr/bin/env node -import * as esbuild from 'esbuild' -import { - lessLoader -} -from 'esbuild-plugin-less'; +import * as esbuild from 'esbuild'; +import { lessLoader } from 'esbuild-plugin-less'; import { writeFile, opendir, - unlink -} -from 'node:fs/promises'; + unlink, +} from 'node:fs/promises'; +import console from 'node:console'; +import process from 'node:process'; import path from 'node:path'; import parseArgs from 'minimist'; @@ -21,16 +19,16 @@ const config = { ], assetNames: '[name]-[hash]', entryNames: '[name]-[hash]', - format: 'esm', - outdir: 'root/assets', - bundle: true, - sourcemap: true, - inject: ['root/static/js/inject.mjs'], - loader: { - '.eot': 'file', - '.svg': 'file', - '.ttf': 'file', - '.woff': 'file', + format: 'esm', + outdir: 'root/assets', + bundle: true, + sourcemap: true, + inject: ['root/static/js/inject.mjs'], + loader: { + '.eot': 'file', + '.svg': 'file', + '.ttf': 'file', + '.woff': 'file', '.woff2': 'file', }, plugins: [ @@ -40,18 +38,18 @@ const config = { setup(build) { build.onResolve({ - filter: /^\// - }, - () => ({ - external: true - }), + filter: /^\//, + }, + () => ({ + external: true, + }), ); build.initialOptions.metafile = true; build.onStart(() => { - console.log('building assets...') + console.log('building assets...'); }); - build.onEnd(async result => { + build.onEnd(async (result) => { const outputs = result?.metafile?.outputs; if (outputs) { const files = Object.keys(outputs).sort() @@ -70,7 +68,7 @@ const config = { } }); } - }, + }(), ], }; @@ -86,7 +84,7 @@ if (args.minify) { } if (args.clean) { for await (const file of await opendir(config.outdir, { - withFileTypes: true + withFileTypes: true, })) { const filePath = path.join(file.parentPath, file.name); if (file.name.match(/^\./)) { @@ -105,7 +103,7 @@ if (args.clean) { const ctx = await esbuild.context(config); if (args.watch) { await ctx.watch(); - const sig = await new Promise(resolve => { + const sig = await new Promise((resolve) => { [ 'SIGTERM', 'SIGQUIT', diff --git a/eslint.config.mjs b/eslint.config.mjs index 71e9dbc669..27a0d9acca 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -1,31 +1,43 @@ -import globals from "globals"; -import pluginJs from "@eslint/js"; +import globals from 'globals'; +import stylistic from '@stylistic/eslint-plugin'; +import js from '@eslint/js'; -export default [{ - ignores: ["root/assets/"], - }, +export default [ { - languageOptions: { - globals: globals.browser, - } + ignores: ['root/assets/'], }, { - files: ['build-assets.mjs'], + files: ['**/*.mjs'], languageOptions: { - globals: globals.nodeBuiltin, + sourceType: 'module', }, }, { - files: ['**/*.js'], + files: ['**/*.js'], languageOptions: { sourceType: 'commonjs', - } + }, }, { - files: ['**/*.mjs'], + files: ['root/**/*.mjs', 'root/**/*.js'], languageOptions: { - sourceType: 'module', - } + globals: globals.browser, + }, + }, + js.configs.recommended, + stylistic.configs.customize({ + semi: true, + }), + { + rules: { + '@stylistic/indent': ['error', 4], + '@stylistic/multiline-ternary': 'off', + '@stylistic/key-spacing': [ + 'error', + { + align: 'value', + }, + ], + }, }, - pluginJs.configs.recommended, ]; diff --git a/package-lock.json b/package-lock.json index fb8f5df115..12d42904ad 100644 --- a/package-lock.json +++ b/package-lock.json @@ -29,6 +29,7 @@ "devDependencies": { "@eslint/js": "^9.38.0", "@playwright/test": "^1.56.1", + "@stylistic/eslint-plugin": "^2.9.0", "eslint": "^9.38.0", "globals": "^16.4.0", "js-beautify": "^1.15.4", @@ -484,10 +485,11 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.12.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.1.tgz", - "integrity": "sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==", + "version": "4.12.2", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.12.2.tgz", + "integrity": "sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==", "dev": true, + "license": "MIT", "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } @@ -507,6 +509,30 @@ "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } }, + "node_modules/@eslint/config-array/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/@eslint/config-array/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/@eslint/config-helpers": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/@eslint/config-helpers/-/config-helpers-0.4.1.tgz", @@ -557,6 +583,17 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/@eslint/eslintrc/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, "node_modules/@eslint/eslintrc/node_modules/globals": { "version": "14.0.0", "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", @@ -570,6 +607,19 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@eslint/eslintrc/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/@eslint/js": { "version": "9.38.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.38.0.tgz", @@ -611,6 +661,7 @@ "version": "6.7.2", "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-6.7.2.tgz", "integrity": "sha512-JUOtgFW6k9u4Y+xeIaEiLr3+cjoUPiAuLXoyKOJSia6Duzb7pq+A76P9ZdPDoAoxHdHzq6gE9/jKBGXlZT8FbA==", + "license": "(CC-BY-4.0 AND OFL-1.1 AND MIT)", "engines": { "node": ">=6" } @@ -620,41 +671,31 @@ "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=18.18.0" } }, "node_modules/@humanfs/node": { - "version": "0.16.6", - "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", - "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", + "version": "0.16.7", + "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.7.tgz", + "integrity": "sha512-/zUx+yOsIrG4Y43Eh2peDeKCxlRt/gET6aHfaKpuq267qXdYDFViVHfMaLyygZOnl0kGWxFIgsBy8QFuTLUXEQ==", "dev": true, + "license": "Apache-2.0", "dependencies": { "@humanfs/core": "^0.19.1", - "@humanwhocodes/retry": "^0.3.0" + "@humanwhocodes/retry": "^0.4.0" }, "engines": { "node": ">=18.18.0" } }, - "node_modules/@humanfs/node/node_modules/@humanwhocodes/retry": { - "version": "0.3.1", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.3.1.tgz", - "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", - "dev": true, - "engines": { - "node": ">=18.18" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/nzakas" - } - }, "node_modules/@humanwhocodes/module-importer": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, + "license": "Apache-2.0", "engines": { "node": ">=12.22" }, @@ -664,9 +705,9 @@ } }, "node_modules/@humanwhocodes/retry": { - "version": "0.4.2", - "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.2.tgz", - "integrity": "sha512-xeO57FpIu4p1Ri3Jq/EXq4ClRm86dVF2z/+kvFnyqVYRavTZmaFaUBbWCOuuTh0o/g7DSsk6kc2vrS4Vl5oPOQ==", + "version": "0.4.3", + "resolved": "https://registry.npmjs.org/@humanwhocodes/retry/-/retry-0.4.3.tgz", + "integrity": "sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==", "dev": true, "license": "Apache-2.0", "engines": { @@ -695,11 +736,50 @@ "node": ">=12" } }, + "node_modules/@nodelib/fs.scandir": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz", + "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "2.0.5", + "run-parallel": "^1.1.9" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.stat": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", + "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, "node_modules/@one-ini/wasm": { "version": "0.1.1", "resolved": "https://registry.npmjs.org/@one-ini/wasm/-/wasm-0.1.1.tgz", "integrity": "sha512-XuySG1E38YScSJoMlqovLru4KTUNSjgVTIjyh7qMX6aNN5HY5Ct5LhRJdxO79JtTzKfzV/bnWpz+zquYrISsvw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/@pkgjs/parseargs": { "version": "0.11.0", @@ -728,11 +808,32 @@ "node": ">=18" } }, + "node_modules/@stylistic/eslint-plugin": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/@stylistic/eslint-plugin/-/eslint-plugin-2.13.0.tgz", + "integrity": "sha512-RnO1SaiCFHn666wNz2QfZEFxvmiNRqhzaMXHXxXXKt+MEP7aajlPxUSMIQpKAaJfverpovEYqjBOXDq6dDcaOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/utils": "^8.13.0", + "eslint-visitor-keys": "^4.2.0", + "espree": "^10.3.0", + "estraverse": "^5.3.0", + "picomatch": "^4.0.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "peerDependencies": { + "eslint": ">=8.40.0" + } + }, "node_modules/@types/estree": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", - "integrity": "sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==", - "dev": true + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", + "integrity": "sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==", + "dev": true, + "license": "MIT" }, "node_modules/@types/json-schema": { "version": "7.0.15", @@ -747,6 +848,148 @@ "integrity": "sha512-Gjm4+H9noDJgu5EdT3rUw5MhPBag46fiOy27BefvWkNL8mlZnKnCaVVVTLKj6RYXed9b62CPKnPav9govyQDzA==", "license": "MIT" }, + "node_modules/@typescript-eslint/project-service": { + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/project-service/-/project-service-8.46.2.tgz", + "integrity": "sha512-PULOLZ9iqwI7hXcmL4fVfIsBi6AN9YxRc0frbvmg8f+4hQAjQ5GYNKK0DIArNo+rOKmR/iBYwkpBmnIwin4wBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/tsconfig-utils": "^8.46.2", + "@typescript-eslint/types": "^8.46.2", + "debug": "^4.3.4" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/scope-manager": { + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.46.2.tgz", + "integrity": "sha512-LF4b/NmGvdWEHD2H4MsHD8ny6JpiVNDzrSZr3CsckEgCbAGZbYM4Cqxvi9L+WqDMT+51Ozy7lt2M+d0JLEuBqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.46.2", + "@typescript-eslint/visitor-keys": "8.46.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/tsconfig-utils": { + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/tsconfig-utils/-/tsconfig-utils-8.46.2.tgz", + "integrity": "sha512-a7QH6fw4S57+F5y2FIxxSDyi5M4UfGF+Jl1bCGd7+L4KsaUY80GsiF/t0UoRFDHAguKlBaACWJRmdrc6Xfkkag==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/types": { + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.46.2.tgz", + "integrity": "sha512-lNCWCbq7rpg7qDsQrd3D6NyWYu+gkTENkG5IKYhUIcxSb59SQC/hEQ+MrG4sTgBVghTonNWq42bA/d4yYumldQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, + "node_modules/@typescript-eslint/typescript-estree": { + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.46.2.tgz", + "integrity": "sha512-f7rW7LJ2b7Uh2EiQ+7sza6RDZnajbNbemn54Ob6fRwQbgcIn+GWfyuHDHRYgRoZu1P4AayVScrRW+YfbTvPQoQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/project-service": "8.46.2", + "@typescript-eslint/tsconfig-utils": "8.46.2", + "@typescript-eslint/types": "8.46.2", + "@typescript-eslint/visitor-keys": "8.46.2", + "debug": "^4.3.4", + "fast-glob": "^3.3.2", + "is-glob": "^4.0.3", + "minimatch": "^9.0.4", + "semver": "^7.6.0", + "ts-api-utils": "^2.1.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/utils": { + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.46.2.tgz", + "integrity": "sha512-sExxzucx0Tud5tE0XqR0lT0psBQvEpnpiul9XbGUB1QwpWJJAps1O/Z7hJxLGiZLBKMCutjTzDgmd1muEhBnVg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@eslint-community/eslint-utils": "^4.7.0", + "@typescript-eslint/scope-manager": "8.46.2", + "@typescript-eslint/types": "8.46.2", + "@typescript-eslint/typescript-estree": "8.46.2" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0", + "typescript": ">=4.8.4 <6.0.0" + } + }, + "node_modules/@typescript-eslint/visitor-keys": { + "version": "8.46.2", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.46.2.tgz", + "integrity": "sha512-tUFMXI4gxzzMXt4xpGJEsBsTox0XbNQ1y94EwlD/CuZwFcQP79xfQqMhau9HsRc/J0cAPA/HZt1dZPtGn9V/7w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@typescript-eslint/types": "8.46.2", + "eslint-visitor-keys": "^4.2.1" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + } + }, "node_modules/abbrev": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-2.0.0.tgz", @@ -763,6 +1006,7 @@ "integrity": "sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==", "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -798,9 +1042,9 @@ } }, "node_modules/ansi-regex": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.1.0.tgz", - "integrity": "sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==", + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.2.2.tgz", + "integrity": "sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==", "dev": true, "license": "MIT", "engines": { @@ -815,6 +1059,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^2.0.1" }, @@ -836,31 +1081,46 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/bootstrap": { "version": "3.4.1", "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-3.4.1.tgz", "integrity": "sha512-yN5oZVmRCwe5aKwzRj6736nSmKDX7pLYwsXiCj/EYmo16hODaBiT4En5btW/jhBF/seV+XMx3aYwukYC3A49DA==", + "license": "MIT", "engines": { "node": ">=6" } }, "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz", + "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==", "dev": true, "license": "MIT", "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" + "balanced-match": "^1.0.0" + } + }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "license": "MIT", + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" } }, "node_modules/brush-base": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/brush-base/-/brush-base-4.0.0.tgz", "integrity": "sha512-+ai9SMunotx5SjJtpAG/+NkjruOBP7Kpb3fRYXSMa+13j9vt4rUshWmXB3yutO65IeMTgGBCdEz9T2IlxCibpA==", + "license": "MIT", "dependencies": { "syntaxhighlighter-html-renderer": "^4.0.0", "syntaxhighlighter-match": "^4.0.0", @@ -875,6 +1135,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/brush-cpp/-/brush-cpp-4.0.1.tgz", "integrity": "sha512-zyC4igGN/oADXfvWPgxXqZGJKwfjMPujLL2+9kKpD4Qsf7f15CY8vM0IrL98z6mcpx9AssYfN4CQjxO1VszbcQ==", + "license": "MIT", "dependencies": { "brush-base": "^4.0.0", "syntaxhighlighter-regex": "^4.0.0" @@ -888,6 +1149,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/brush-diff/-/brush-diff-4.0.0.tgz", "integrity": "sha512-CJNO7Av1QDuaKtgaGNJ+fPRRlQAnpyD7UwRWlbfpT6ns/sGaKPOj633AtSfT7avvF+MOr8BDTiAruXUh+QxZJA==", + "license": "MIT", "dependencies": { "brush-base": "^4.0.0", "syntaxhighlighter-regex": "^4.0.0" @@ -901,6 +1163,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/brush-javascript/-/brush-javascript-4.0.0.tgz", "integrity": "sha512-vH6GPiKgP43msH3dbPbCwo1F3Irbdx0FEPmhKt2fbkAqh+yakC74+P95yVu3MU05QKlgTjCbEeRP13f8w+8bFA==", + "license": "MIT", "dependencies": { "brush-base": "^4.0.0", "syntaxhighlighter-regex": "^4.0.0" @@ -914,6 +1177,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/brush-plain/-/brush-plain-4.0.1.tgz", "integrity": "sha512-9cQZ9GDJyO2gk68rOZWmKChlPxB+l8TENsG6DqmWPkbj4vkK0IexCqk6OmX4XsXemwe4B0oWztRU3sjASeSlYQ==", + "license": "MIT", "dependencies": { "brush-base": "^4.0.0", "syntaxhighlighter-regex": "^4.0.0" @@ -927,6 +1191,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/brush-yaml/-/brush-yaml-4.0.0.tgz", "integrity": "sha512-FjHI8jljsB8HFRiieHU7d0rdIqzbtImlHh9NtFqREyewfSwNq9snfYFE1BYx3Tq6D37FWGoBcdMmep24jkSO+g==", + "license": "MIT", "dependencies": { "brush-base": "^4.0.0", "syntaxhighlighter-regex": "^4.0.0" @@ -951,6 +1216,7 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^4.1.0", "supports-color": "^7.1.0" @@ -967,6 +1233,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "~1.1.4" }, @@ -978,13 +1245,15 @@ "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/commander": { "version": "10.0.1", "resolved": "https://registry.npmjs.org/commander/-/commander-10.0.1.tgz", "integrity": "sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==", "dev": true, + "license": "MIT", "engines": { "node": ">=14" } @@ -1001,6 +1270,7 @@ "resolved": "https://registry.npmjs.org/config-chain/-/config-chain-1.1.13.tgz", "integrity": "sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==", "dev": true, + "license": "MIT", "dependencies": { "ini": "^1.3.4", "proto-list": "~1.2.1" @@ -1010,6 +1280,7 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-2.0.6.tgz", "integrity": "sha512-1j20GZTsvKNkc4BY3NpMOM8tt///wY3FpIzozTOFO2ffuZcV61nojHXVKIy3WM+7ADCy5FVhdZYHYDdgTU0yJw==", + "license": "MIT", "dependencies": { "is-what": "^3.14.1" }, @@ -1022,6 +1293,7 @@ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz", "integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==", "dev": true, + "license": "MIT", "dependencies": { "path-key": "^3.1.0", "shebang-command": "^2.0.0", @@ -1032,9 +1304,9 @@ } }, "node_modules/debug": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.0.tgz", - "integrity": "sha512-6WTZ/IxCY/T6BALoZHaE4ctp9xm+Z5kY/pzYaCHRFeyVhojxlrm+46y68HA6hr0TcwEssoxNiDEUJQjfPZ/RYA==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", "dev": true, "license": "MIT", "dependencies": { @@ -1053,7 +1325,8 @@ "version": "0.1.4", "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/devbridge-autocomplete": { "version": "1.5.0", @@ -1081,6 +1354,7 @@ "resolved": "https://registry.npmjs.org/editorconfig/-/editorconfig-1.0.4.tgz", "integrity": "sha512-L9Qe08KWTlqYMVvMcTIvMAdl1cDUubzRNYL+WfA4bLDMHe4nemKkpmYzkznE1FwLKu0EEmy6obgQKzMJrg4x9Q==", "dev": true, + "license": "MIT", "dependencies": { "@one-ini/wasm": "0.1.1", "commander": "^10.0.0", @@ -1094,20 +1368,12 @@ "node": ">=14" } }, - "node_modules/editorconfig/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0" - } - }, "node_modules/editorconfig/node_modules/minimatch": { "version": "9.0.1", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.1.tgz", "integrity": "sha512-0jWhJpD/MdhPXwPuiRkCbfYfSKp2qnn2eOc279qI7f+osl/l+prKSrvhg157zSYvx/1nmgn2NqdT6k2Z7zSH9w==", "dev": true, + "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -1129,6 +1395,7 @@ "version": "0.1.8", "resolved": "https://registry.npmjs.org/errno/-/errno-0.1.8.tgz", "integrity": "sha512-dJ6oBr5SQ1VSd9qkk7ByRgb/1SH4JZjCHSW/mr63/QcXO9zLVxvJ6Oy13nio03rxpSnVDDjFor75SjVeZWPW/A==", + "license": "MIT", "optional": true, "dependencies": { "prr": "~1.0.1" @@ -1143,6 +1410,7 @@ "integrity": "sha512-KohQwyzrKTQmhXDW1PjCv3Tyspn9n5GcY2RTDqeORIdIJY8yKIF7sTSopFmn/wpMPW4rdPXI0UE5LJLuq3bx0Q==", "hasInstallScript": true, "license": "MIT", + "peer": true, "bin": { "esbuild": "bin/esbuild" }, @@ -1196,6 +1464,7 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, @@ -1209,6 +1478,7 @@ "integrity": "sha512-t5aPOpmtJcZcz5UJyY2GbvpDlsK5E8JqRqoKtfiKE3cNh437KIqfJr3A3AKf5k64NPx6d0G3dno6XDY05PqPtw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.8.0", "@eslint-community/regexpp": "^4.12.1", @@ -1293,6 +1563,30 @@ "url": "https://opencollective.com/eslint" } }, + "node_modules/eslint/node_modules/brace-expansion": { + "version": "1.1.12", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz", + "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, "node_modules/espree": { "version": "10.4.0", "resolved": "https://registry.npmjs.org/espree/-/espree-10.4.0.tgz", @@ -1312,10 +1606,11 @@ } }, "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "estraverse": "^5.1.0" }, @@ -1341,6 +1636,7 @@ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=4.0" } @@ -1350,6 +1646,7 @@ "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, + "license": "BSD-2-Clause", "engines": { "node": ">=0.10.0" } @@ -1357,7 +1654,8 @@ "node_modules/ev-emitter": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ev-emitter/-/ev-emitter-2.1.2.tgz", - "integrity": "sha512-jQ5Ql18hdCQ4qS+RCrbLfz1n+Pags27q5TwMKvZyhp5hh2UULUYZUy1keqj6k6SYsdqIYjnmz7xyyEY0V67B8Q==" + "integrity": "sha512-jQ5Ql18hdCQ4qS+RCrbLfz1n+Pags27q5TwMKvZyhp5hh2UULUYZUy1keqj6k6SYsdqIYjnmz7xyyEY0V67B8Q==", + "license": "MIT" }, "node_modules/fast-deep-equal": { "version": "3.1.3", @@ -1366,6 +1664,36 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-glob": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.3.tgz", + "integrity": "sha512-7MptL8U0cqcFdzIzwOTHoilX9x5BrNqye7Z/LuC7kCMRio1EMSyqRK3BEAUD7sXRq4iT4AzTVuZdhgQ2TCvYLg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.2", + "merge2": "^1.3.0", + "micromatch": "^4.0.8" + }, + "engines": { + "node": ">=8.6.0" + } + }, + "node_modules/fast-glob/node_modules/glob-parent": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", + "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", + "dev": true, + "license": "ISC", + "dependencies": { + "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", @@ -1377,13 +1705,25 @@ "version": "2.0.6", "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true + "dev": true, + "license": "MIT" + }, + "node_modules/fastq": { + "version": "1.19.1", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.19.1.tgz", + "integrity": "sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "reusify": "^1.0.4" + } }, "node_modules/file-entry-cache": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, + "license": "MIT", "dependencies": { "flat-cache": "^4.0.0" }, @@ -1391,11 +1731,25 @@ "node": ">=16.0.0" } }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "license": "MIT", + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -1412,6 +1766,7 @@ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, + "license": "MIT", "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.4" @@ -1421,19 +1776,20 @@ } }, "node_modules/flatted": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", - "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "dev": true + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.3.tgz", + "integrity": "sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==", + "dev": true, + "license": "ISC" }, "node_modules/foreground-child": { - "version": "3.3.0", - "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.0.tgz", - "integrity": "sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==", + "version": "3.3.1", + "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-3.3.1.tgz", + "integrity": "sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==", "dev": true, "license": "ISC", "dependencies": { - "cross-spawn": "^7.0.0", + "cross-spawn": "^7.0.6", "signal-exit": "^4.0.1" }, "engines": { @@ -1484,6 +1840,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, + "license": "ISC", "dependencies": { "is-glob": "^4.0.3" }, @@ -1491,32 +1848,6 @@ "node": ">=10.13.0" } }, - "node_modules/glob/node_modules/brace-expansion": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", - "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", - "dev": true, - "license": "MIT", - "dependencies": { - "balanced-match": "^1.0.0" - } - }, - "node_modules/glob/node_modules/minimatch": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", - "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", - "dev": true, - "license": "ISC", - "dependencies": { - "brace-expansion": "^2.0.1" - }, - "engines": { - "node": ">=16 || 14 >=14.17" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, "node_modules/globals": { "version": "16.4.0", "resolved": "https://registry.npmjs.org/globals/-/globals-16.4.0.tgz", @@ -1534,6 +1865,7 @@ "version": "4.2.11", "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "license": "ISC", "optional": true }, "node_modules/has-flag": { @@ -1541,6 +1873,7 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -1549,6 +1882,7 @@ "version": "0.6.3", "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.3.tgz", "integrity": "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw==", + "license": "MIT", "optional": true, "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" @@ -1571,6 +1905,7 @@ "version": "0.5.5", "resolved": "https://registry.npmjs.org/image-size/-/image-size-0.5.5.tgz", "integrity": "sha512-6TDAlDPZxUFCv+fuOkIoXT/V/f3Qbq8e37p+YOiYrUv3v9cc3/6x78VdfPgFVaB9dZYeLUfKgHRebpkm/oP2VQ==", + "license": "MIT", "optional": true, "bin": { "image-size": "bin/image-size.js" @@ -1583,6 +1918,7 @@ "version": "5.0.0", "resolved": "https://registry.npmjs.org/imagesloaded/-/imagesloaded-5.0.0.tgz", "integrity": "sha512-/0JGSubc1MTCoDKVmonLHgbifBWHdyLkun+R/151E1c5n79hiSxcd7cB7mPXFgojYu8xnRZv7GYxzKoxW8BetQ==", + "license": "MIT", "dependencies": { "ev-emitter": "^2.1.2" } @@ -1609,6 +1945,7 @@ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.19" } @@ -1617,13 +1954,15 @@ "version": "1.3.8", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -1643,6 +1982,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", "dev": true, + "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" }, @@ -1650,16 +1990,28 @@ "node": ">=0.10.0" } }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.12.0" + } + }, "node_modules/is-what": { "version": "3.14.1", "resolved": "https://registry.npmjs.org/is-what/-/is-what-3.14.1.tgz", - "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==" + "integrity": "sha512-sNxgpk9793nzSs7bA6JQJGeIuRBQhAaNGG77kzYQgMkrID+lS6SlK07K5LaptscDlSaIgH+GPFzf+d75FVxozA==", + "license": "MIT" }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/jackspeak": { "version": "3.4.3", @@ -1680,7 +2032,9 @@ "node_modules/jquery": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/jquery/-/jquery-3.7.1.tgz", - "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==" + "integrity": "sha512-m4avr8yL8kmFN8psrbFFFmB/If14iN5o9nw/NgnnM+kybDJpRsAynV2BsfpTYrTRysYUdADVD7CkUUizgkpLfg==", + "license": "MIT", + "peer": true }, "node_modules/js-beautify": { "version": "1.15.4", @@ -1709,6 +2063,7 @@ "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.5.tgz", "integrity": "sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==", "dev": true, + "license": "MIT", "engines": { "node": ">=14" } @@ -1730,7 +2085,8 @@ "version": "3.0.1", "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/json-schema-traverse": { "version": "0.4.1", @@ -1743,13 +2099,15 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/keyv": { "version": "4.5.4", "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, + "license": "MIT", "dependencies": { "json-buffer": "3.0.1" } @@ -1785,6 +2143,7 @@ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -1798,6 +2157,7 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^5.0.0" }, @@ -1812,7 +2172,8 @@ "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lru-cache": { "version": "10.4.3", @@ -1825,6 +2186,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", + "license": "MIT", "optional": true, "dependencies": { "pify": "^4.0.1", @@ -1838,15 +2200,54 @@ "version": "5.7.2", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "license": "ISC", "optional": true, "bin": { "semver": "bin/semver" } }, + "node_modules/merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 8" + } + }, + "node_modules/micromatch": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", + "dev": true, + "license": "MIT", + "dependencies": { + "braces": "^3.0.3", + "picomatch": "^2.3.1" + }, + "engines": { + "node": ">=8.6" + } + }, + "node_modules/micromatch/node_modules/picomatch": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", + "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/mime": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", + "license": "MIT", "optional": true, "bin": { "mime": "cli.js" @@ -1856,22 +2257,26 @@ } }, "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "version": "9.0.5", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.5.tgz", + "integrity": "sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==", "dev": true, "license": "ISC", "dependencies": { - "brace-expansion": "^1.1.7" + "brace-expansion": "^2.0.1" }, "engines": { - "node": "*" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, "node_modules/minimist": { "version": "1.2.8", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "license": "MIT", "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -1889,7 +2294,8 @@ "node_modules/mousetrap": { "version": "1.6.5", "resolved": "https://registry.npmjs.org/mousetrap/-/mousetrap-1.6.5.tgz", - "integrity": "sha512-QNo4kEepaIBwiT8CDhP98umTetp+JNfQYBWvC1pc6/OAibuXtRcxZ58Qz8skvEHYvURne/7R8T5VoOI7rDsEUA==" + "integrity": "sha512-QNo4kEepaIBwiT8CDhP98umTetp+JNfQYBWvC1pc6/OAibuXtRcxZ58Qz8skvEHYvURne/7R8T5VoOI7rDsEUA==", + "license": "Apache-2.0 WITH LLVM-exception" }, "node_modules/ms": { "version": "2.1.3", @@ -1902,12 +2308,14 @@ "version": "1.4.0", "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/needle": { "version": "3.3.1", "resolved": "https://registry.npmjs.org/needle/-/needle-3.3.1.tgz", "integrity": "sha512-6k0YULvhpw+RoLNiQCRKOl09Rv1dPLr8hHnVjHqdolKwDrdNyk+Hmrthi4lIGPPz3r39dLx0hsF5s40sZ3Us4Q==", + "license": "MIT", "optional": true, "dependencies": { "iconv-lite": "^0.6.3", @@ -1941,6 +2349,7 @@ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, + "license": "MIT", "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -1957,6 +2366,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/opts-parser/-/opts-parser-4.0.0.tgz", "integrity": "sha512-RevSaG33tWLJE2p8r1TuUG/BUrv+H0RtZna8XgIYlI99WmZraBSywmXkHRcqlVgmNlLrDZEo4m5gJSCIDK4huA==", + "license": "MIT", "dependencies": { "syntaxhighlighter-regex": "^4.0.0" }, @@ -1970,6 +2380,7 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", "dev": true, + "license": "MIT", "dependencies": { "yocto-queue": "^0.1.0" }, @@ -1985,6 +2396,7 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^3.0.2" }, @@ -2019,6 +2431,7 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "license": "MIT", "engines": { "node": ">= 0.10" } @@ -2028,6 +2441,7 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -2037,6 +2451,7 @@ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz", "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -2058,10 +2473,24 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/picomatch": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.3.tgz", + "integrity": "sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, "node_modules/pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", + "license": "MIT", "optional": true, "engines": { "node": ">=6" @@ -2104,6 +2533,7 @@ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, + "license": "MIT", "engines": { "node": ">= 0.8.0" } @@ -2113,6 +2543,7 @@ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.6.2.tgz", "integrity": "sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==", "dev": true, + "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, @@ -2127,12 +2558,14 @@ "version": "1.2.4", "resolved": "https://registry.npmjs.org/proto-list/-/proto-list-1.2.4.tgz", "integrity": "sha512-vtK/94akxsTMhe0/cbfpR+syPuszcuwhqVjJq26CuNDgFGj682oRBXOP5MJpv2r7JtE8MsiepGIqvvOTBwn2vA==", - "dev": true + "dev": true, + "license": "ISC" }, "node_modules/prr": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/prr/-/prr-1.0.1.tgz", "integrity": "sha512-yPw4Sng1gWghHQWj0B3ZggWUm4qVbPwPFcRG8KyxiU7J2OHFSoEHKS+EZ3fv5l1t9CyCiop6l/ZYeWbrgoQejw==", + "license": "MIT", "optional": true }, "node_modules/punycode": { @@ -2154,6 +2587,27 @@ "jquery": ">=1.6.0" } }, + "node_modules/queue-microtask": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz", + "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -2168,28 +2622,67 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/retabber/-/retabber-4.0.0.tgz", "integrity": "sha512-mMamiOJ7p6OWFzENvHwout68kLJZ/FMgIXMqUr9Y/DTyHkE0oOFibvZFWxcmDQkXweAaYFaLdpZGP3I5eqAmgQ==", + "license": "MIT", "engines": { "node": ">=4", "npm": ">=2" } }, + "node_modules/reusify": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.1.0.tgz", + "integrity": "sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==", + "dev": true, + "license": "MIT", + "engines": { + "iojs": ">=1.0.0", + "node": ">=0.10.0" + } + }, + "node_modules/run-parallel": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", + "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "queue-microtask": "^1.2.2" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "license": "MIT", "optional": true }, "node_modules/sax": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.3.0.tgz", - "integrity": "sha512-0s+oAmw9zLl1V1cS9BtZN7JAd0cW5e0QH4W3LWEK6a4LaLEA2OTpGYWDY+6XasBLtz6wkm3u1xRw95mRuJ59WA==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.4.1.tgz", + "integrity": "sha512-+aWOz7yVScEGoKNd4PA10LZ8sk0A/z5+nXQG5giUO5rprX9jgYsTdov9qCchZiPIZezbZH+jRut8nPodFAX4Jg==", + "license": "ISC", "optional": true }, "node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.7.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.3.tgz", + "integrity": "sha512-SdsKMrI9TdgjdweUSR9MweHA4EJ8YxHn8DFaDisvhVlUOe4BF1tLD7GAj0lIqWVl+dPb/rExr0Btby5loQm20Q==", "dev": true, + "license": "ISC", "bin": { "semver": "bin/semver.js" }, @@ -2202,6 +2695,7 @@ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==", "dev": true, + "license": "MIT", "dependencies": { "shebang-regex": "^3.0.0" }, @@ -2214,6 +2708,7 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz", "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true, + "license": "MIT", "engines": { "node": ">=8" } @@ -2235,6 +2730,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "license": "BSD-3-Clause", "optional": true, "engines": { "node": ">=0.10.0" @@ -2305,9 +2801,9 @@ } }, "node_modules/strip-ansi": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.0.tgz", - "integrity": "sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==", + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.1.2.tgz", + "integrity": "sha512-gmBGslpoQJtgnMAvOVqGZpEz9dyoKTCzy2nfz/n8aIFhN/jCE/rCmcxabB6jOOHV+0WNnylOxaxBQPSvcWklhA==", "dev": true, "license": "MIT", "dependencies": { @@ -2362,6 +2858,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^4.0.0" }, @@ -2373,6 +2870,7 @@ "version": "4.0.1", "resolved": "https://registry.npmjs.org/syntaxhighlighter/-/syntaxhighlighter-4.0.1.tgz", "integrity": "sha512-bFNBIn7KGbqXIA7C9A7AJUToPE7skGnNfKd5JI+x0gT7d3Rll8yjQUDZD1XGV/y1dOhjJxcl7IZt4rSeQeUjpQ==", + "license": "MIT", "dependencies": { "brush-base": "^4.0.0", "domready": "^1.0.5", @@ -2388,6 +2886,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/syntaxhighlighter-html-renderer/-/syntaxhighlighter-html-renderer-4.0.0.tgz", "integrity": "sha512-31BJiszzhSWxqz0h+gX8zlWal0EgzZGTzSt+1vkGNEyC4NeafY3Q0OE0/b1qmJHhc/YsFazp8XiAymk0BJXdmw==", + "license": "MIT", "engines": { "node": ">=4", "npm": ">=2" @@ -2397,6 +2896,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/syntaxhighlighter-match/-/syntaxhighlighter-match-4.0.0.tgz", "integrity": "sha512-OmuVjDa4ZXZz8hXkzRhSbYvjOjpllIcCvxn7indSQkDD/k+RhDCQmuuJHqojMzhaOo8oWPC63aGEOUr2ytiY3g==", + "license": "MIT", "dependencies": { "syntaxhighlighter-regex": "^4.0.0" }, @@ -2409,6 +2909,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/syntaxhighlighter-regex/-/syntaxhighlighter-regex-4.0.0.tgz", "integrity": "sha512-BL23yI7F1YrLtpckIcTH3XvOPWp/AZxHZIijslEVWtIwqCxGcJiSDilj7k9XxbWltALv7v0THLDF7pydj04O0Q==", + "license": "MIT", "engines": { "node": ">=4", "npm": ">=2" @@ -2418,20 +2919,49 @@ "version": "2.32.0", "resolved": "https://registry.npmjs.org/tablesorter/-/tablesorter-2.32.0.tgz", "integrity": "sha512-tKjx6H+ZVoxND5ukDIVvF4AKEIw0ZJde/e6YlAZlUOKI0o0xD2RZLTb2tKB1hiDHkHGLHGQ7ndvd0Pnkj5Xzjw==", + "license": "(MIT OR GPL-2.0)", "dependencies": { "jquery": ">=1.2.6" } }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, + "node_modules/ts-api-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-2.1.0.tgz", + "integrity": "sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.12" + }, + "peerDependencies": { + "typescript": ">=4.8.4" + } + }, "node_modules/tslib": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz", - "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "license": "0BSD" }, "node_modules/type-check": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, + "license": "MIT", "dependencies": { "prelude-ls": "^1.2.1" }, @@ -2439,6 +2969,21 @@ "node": ">= 0.8.0" } }, + "node_modules/typescript": { + "version": "5.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.9.3.tgz", + "integrity": "sha512-jl1vZzPDinLr9eUt3J/t7V6FgNEw9QjvBPdysz9KfQDD41fQrC2Y4vKQdiaUpFT4bXlb1RHhLpp8wtm6M5TgSw==", + "dev": true, + "license": "Apache-2.0", + "peer": true, + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, "node_modules/unindenter": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/unindenter/-/unindenter-4.0.0.tgz", @@ -2463,6 +3008,7 @@ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", "dev": true, + "license": "ISC", "dependencies": { "isexe": "^2.0.0" }, @@ -2478,6 +3024,7 @@ "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.10.0" } @@ -2565,9 +3112,9 @@ } }, "node_modules/wrap-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.3.tgz", + "integrity": "sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==", "dev": true, "license": "MIT", "engines": { @@ -2582,6 +3129,7 @@ "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", "dev": true, + "license": "MIT", "engines": { "node": ">=10" }, diff --git a/package.json b/package.json index 2a451ed6d9..55bd726bcf 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ "devDependencies": { "@eslint/js": "^9.38.0", "@playwright/test": "^1.56.1", + "@stylistic/eslint-plugin": "^2.9.0", "eslint": "^9.38.0", "globals": "^16.4.0", "js-beautify": "^1.15.4", diff --git a/precious.toml b/precious.toml index 0bcb5e9d42..136ef7a597 100644 --- a/precious.toml +++ b/precious.toml @@ -56,39 +56,12 @@ ok-exit-codes = 0 lint-failure-exit-codes = 1 ignore-stderr = [ "Code style issues" ] -[commands.js-beautify-tidy] -type = "tidy" -include = [ "**/*.js", "**/*.mjs" ] -cmd = [ - "npx", "-s", "js-beautify", - "--editorconfig", - "--brace-style", "end-expand", - "--replace" -] -ok-exit-codes = 0 -lint-failure-exit-codes = 1 - -[commands.js-beautify-lint] -type = "lint" -include = [ "**/*.js", "**/*.mjs" ] -cmd = [ - "bash", "-c", """ - diff -u "$0" <( \ - npx -s js-beautify \ - --editorconfig \ - --brace-style end-expand \ - "$0" \ - ) >&2 - """ -] -ok-exit-codes = 0 -lint-failure-exit-codes = 1 - [commands.eslint] -type = "lint" +type = "both" include = [ "**/*.js", "**/*.mjs" ] cmd = [ "npx", "-s", "eslint" ] +tidy-flags = "--fix" ok-exit-codes = 0 lint-failure-exit-codes = 1 diff --git a/root/static/js/autocomplete.mjs b/root/static/js/autocomplete.mjs index abc5f9d556..e9e60fdb8c 100644 --- a/root/static/js/autocomplete.mjs +++ b/root/static/js/autocomplete.mjs @@ -8,41 +8,41 @@ import 'devbridge-autocomplete'; // #441 Allow more specific queries to send ("Ty", "Type::"). // #744/#993 Don't select things if the mouse pointer happens to be over the dropdown when it appears. // Please don't steal ctrl-pg up/down. -const search_input = document.querySelector("#metacpan_search-input"); +const search_input = document.querySelector('#metacpan_search-input'); const ac_width = search_input.offsetWidth; jQuery(search_input).autocomplete({ - serviceUrl: '/search/autocomplete', + serviceUrl: '/search/autocomplete', // Wait for more typing rather than firing at every keystroke. - deferRequestBy: 150, + deferRequestBy: 150, // If the autocomplete fires with a single colon ("type:") it will get no results // and anything else typed after that will never trigger another query. // Set 'preventBadQueries:false' to keep trying. - preventBadQueries: false, - dataType: 'json', - lookupLitmit: 20, - paramName: 'q', - autoSelectFirst: false, + preventBadQueries: false, + dataType: 'json', + lookupLitmit: 20, + paramName: 'q', + autoSelectFirst: false, // This simply caches the results of a previous search by url (so no reason not to). - noCache: false, + noCache: false, triggerSelectOnValidInput: false, - maxHeight: 180, - width: ac_width, - onSelect: function(suggestion) { + maxHeight: 180, + width: ac_width, + onSelect: function (suggestion) { if (suggestion.data.type == 'module') { document.location.href = '/pod/' + suggestion.data.module; } else if (suggestion.data.type == 'author') { document.location.href = '/author/' + suggestion.data.id; } - } + }, }); const ac = jQuery(search_input).autocomplete(); const formatResult = ac.options.formatResult; -ac.options.formatResult = function(suggestion, currentValue) { +ac.options.formatResult = function (suggestion, currentValue) { const out = formatResult(suggestion, currentValue); if (suggestion.data.type == 'author') { - return "Author: " + out; + return 'Author: ' + out; } return out; }; diff --git a/root/static/js/bootstrap-slidepanel.js b/root/static/js/bootstrap-slidepanel.js index dffb61e2fd..ae129bca43 100644 --- a/root/static/js/bootstrap-slidepanel.js +++ b/root/static/js/bootstrap-slidepanel.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; for (const toggle of document.querySelectorAll('[data-toggle="slidepanel"]')) { const panel = document.querySelector(toggle.dataset.target); @@ -8,22 +8,22 @@ for (const toggle of document.querySelectorAll('[data-toggle="slidepanel"]')) { const showAnim = new Animation(new KeyframeEffect( panel, { - transform: ['translateX(-100%)', 'translateX(0)'] + transform: ['translateX(-100%)', 'translateX(0)'], }, - 200 + 200, )); const hideAnim = new Animation(new KeyframeEffect( panel, { - transform: ['translateX(0)', 'translateX(-100%)'] + transform: ['translateX(0)', 'translateX(-100%)'], }, - 200 + 200, )); hideAnim.addEventListener('finish', () => { panel.style.removeProperty('visibility'); }); - toggle.addEventListener('click', function(e) { + toggle.addEventListener('click', function (e) { e.preventDefault(); toggle.classList.toggle('slidepanel-visible'); diff --git a/root/static/js/brush-cpan-changes.js b/root/static/js/brush-cpan-changes.js index 7c6cdc8c16..57dea73b7f 100644 --- a/root/static/js/brush-cpan-changes.js +++ b/root/static/js/brush-cpan-changes.js @@ -5,24 +5,24 @@ function Brush() { // these classes/colors are totally arbitrary { regex: /^\{\{\$NEXT\}\}$/gm, - css: 'color3' + css: 'color3', }, // placeholder (oops) { regex: /^v?([0-9._]+)(-TRIAL)?([ \t]+.+)?/gm, - css: 'constants' + css: 'constants', }, // version/date { regex: /^\s+\[.+?\]/gm, - css: 'value' + css: 'value', }, // group { regex: /^\s+[-*]/gm, - css: 'functions' + css: 'functions', }, // item marker { regex: /^[^v0-9].+\n(?=\nv?[0-9_.])/g, - css: 'preprocessor' - } // preamble + css: 'preprocessor', + }, // preamble ]; }; diff --git a/root/static/js/brush-perl.js b/root/static/js/brush-perl.js index 367947f929..5fc84d7462 100644 --- a/root/static/js/brush-perl.js +++ b/root/static/js/brush-perl.js @@ -2,115 +2,114 @@ const BrushBase = require('brush-base'); const regexLib = require('syntaxhighlighter-regex').commonRegExp; function Brush() { - var funcs = - 'abs accept alarm atan2 bind binmode chdir chmod chomp chop chown chr ' + - 'chroot close closedir connect cos crypt defined delete each endgrent ' + - 'endhostent endnetent endprotoent endpwent endservent eof exec exists ' + - 'exp fcntl fileno flock fork format formline getc getgrent getgrgid ' + - 'getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr ' + - 'getnetbyname getnetent getpeername getpgrp getppid getpriority ' + - 'getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid ' + - 'getservbyname getservbyport getservent getsockname getsockopt glob ' + - 'gmtime grep hex index int ioctl join keys kill lc lcfirst length link ' + - 'listen localtime lock log lstat map mkdir msgctl msgget msgrcv msgsnd ' + - 'oct open opendir ord pack pipe pop pos print printf prototype push ' + - 'quotemeta rand read readdir readline readlink readpipe recv rename ' + - 'reset reverse rewinddir rindex rmdir scalar seek seekdir select semctl ' + - 'semget semop send setgrent sethostent setnetent setpgrp setpriority ' + - 'setprotoent setpwent setservent setsockopt shift shmctl shmget shmread ' + - 'shmwrite shutdown sin sleep socket socketpair sort splice split sprintf ' + - 'sqrt srand stat study substr symlink syscall sysopen sysread sysseek ' + - 'system syswrite tell telldir time times tr truncate uc ucfirst umask ' + - 'undef unlink unpack unshift utime values vec wait waitpid warn write ' + + var funcs + = 'abs accept alarm atan2 bind binmode chdir chmod chomp chop chown chr ' + + 'chroot close closedir connect cos crypt defined delete each endgrent ' + + 'endhostent endnetent endprotoent endpwent endservent eof exec exists ' + + 'exp fcntl fileno flock fork format formline getc getgrent getgrgid ' + + 'getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr ' + + 'getnetbyname getnetent getpeername getpgrp getppid getpriority ' + + 'getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid ' + + 'getservbyname getservbyport getservent getsockname getsockopt glob ' + + 'gmtime grep hex index int ioctl join keys kill lc lcfirst length link ' + + 'listen localtime lock log lstat map mkdir msgctl msgget msgrcv msgsnd ' + + 'oct open opendir ord pack pipe pop pos print printf prototype push ' + + 'quotemeta rand read readdir readline readlink readpipe recv rename ' + + 'reset reverse rewinddir rindex rmdir scalar seek seekdir select semctl ' + + 'semget semop send setgrent sethostent setnetent setpgrp setpriority ' + + 'setprotoent setpwent setservent setsockopt shift shmctl shmget shmread ' + + 'shmwrite shutdown sin sleep socket socketpair sort splice split sprintf ' + + 'sqrt srand stat study substr symlink syscall sysopen sysread sysseek ' + + 'system syswrite tell telldir time times tr truncate uc ucfirst umask ' + + 'undef unlink unpack unshift utime values vec wait waitpid warn write ' // feature - 'say'; + + 'say'; - var keywords = - 'bless caller continue dbmclose dbmopen die do dump else elsif eval exit ' + - 'for foreach goto if import last local my next no our package redo ref ' + - 'require return sub tie tied unless untie until use wantarray while ' + + var keywords + = 'bless caller continue dbmclose dbmopen die do dump else elsif eval exit ' + + 'for foreach goto if import last local my next no our package redo ref ' + + 'require return sub tie tied unless untie until use wantarray while ' // feature - 'given when default ' + + + 'given when default ' // Try::Tiny - 'try catch finally ' + + + 'try catch finally ' // Moose - 'has extends with before after around override augment'; + + 'has extends with before after around override augment'; this.regexList = [{ - regex: /(<<|<<)((\w+)|(['"])(.+?)\4)[\s\S]+?\n\3\5\n/g, - css: 'string' - }, // here doc (maybe html encoded) - { - regex: /#.*$/gm, - css: 'comments' - }, - { - regex: /^#!.*\n/g, - css: 'preprocessor' - }, // shebang - { - regex: /-?\w+(?=\s*=(>|>))/g, - css: 'string' - }, // fat comma + regex: /(<<|<<)((\w+)|(['"])(.+?)\4)[\s\S]+?\n\3\5\n/g, + css: 'string', + }, // here doc (maybe html encoded) + { + regex: /#.*$/gm, + css: 'comments', + }, + { + regex: /^#!.*\n/g, + css: 'preprocessor', + }, // shebang + { + regex: /-?\w+(?=\s*=(>|>))/g, + css: 'string', + }, // fat comma - // is this too much? - { - regex: /\bq[qwxr]?\([\s\S]*?\)/g, - css: 'string' - }, // quote-like operators () - { - regex: /\bq[qwxr]?\{[\s\S]*?\}/g, - css: 'string' - }, // quote-like operators {} - { - regex: /\bq[qwxr]?\[[\s\S]*?\]/g, - css: 'string' - }, // quote-like operators [] - { - regex: /\bq[qwxr]?(<|<)[\s\S]*?(>|>)/g, - css: 'string' - }, // quote-like operators <> - { - regex: /\bq[qwxr]?([^\w({<[])[\s\S]*?\1/g, - css: 'string' - }, // quote-like operators non-paired + // is this too much? + { + regex: /\bq[qwxr]?\([\s\S]*?\)/g, + css: 'string', + }, // quote-like operators () + { + regex: /\bq[qwxr]?\{[\s\S]*?\}/g, + css: 'string', + }, // quote-like operators {} + { + regex: /\bq[qwxr]?\[[\s\S]*?\]/g, + css: 'string', + }, // quote-like operators [] + { + regex: /\bq[qwxr]?(<|<)[\s\S]*?(>|>)/g, + css: 'string', + }, // quote-like operators <> + { + regex: /\bq[qwxr]?([^\w({<[])[\s\S]*?\1/g, + css: 'string', + }, // quote-like operators non-paired - { - regex: regexLib.doubleQuotedString, - css: 'string' - }, - { - regex: regexLib.singleQuotedString, - css: 'string' - }, - // currently ignoring single quote package separator and utf8 names - { - regex: /(?:&|[$@%*]|\$#)\$?[a-zA-Z_](\w+|::)*/g, - css: 'variable' - }, - { - regex: /(^|\n)\s*__(?:END|DATA)__\b[\s\S]*$/g, - css: 'comments' - }, + { + regex: regexLib.doubleQuotedString, + css: 'string', + }, + { + regex: regexLib.singleQuotedString, + css: 'string', + }, + // currently ignoring single quote package separator and utf8 names + { + regex: /(?:&|[$@%*]|\$#)\$?[a-zA-Z_](\w+|::)*/g, + css: 'variable', + }, + { + regex: /(^|\n)\s*__(?:END|DATA)__\b[\s\S]*$/g, + css: 'comments', + }, - // don't capture the newline after =cut so that =cut\n\n=head1 will start a new pod section - { - regex: /(^|\n)=\w[\s\S]*?(\n=cut(?![a-zA-Z]).*)/g, - css: 'comments' - }, // pod + // don't capture the newline after =cut so that =cut\n\n=head1 will start a new pod section + { + regex: /(^|\n)=\w[\s\S]*?(\n=cut(?![a-zA-Z]).*)/g, + css: 'comments', + }, // pod - { - regex: new RegExp(this.getKeywords(funcs), 'gm'), - css: 'functions' - }, - { - regex: new RegExp(this.getKeywords(keywords), 'gm'), - css: 'keyword' - } + { + regex: new RegExp(this.getKeywords(funcs), 'gm'), + css: 'functions', + }, + { + regex: new RegExp(this.getKeywords(keywords), 'gm'), + css: 'keyword', + }, ]; this.forHtmlScript(regexLib.phpScriptTags); - } Brush.prototype = new BrushBase(); diff --git a/root/static/js/cpan.js b/root/static/js/cpan.js index 25a5144030..8897cb9f51 100644 --- a/root/static/js/cpan.js +++ b/root/static/js/cpan.js @@ -5,7 +5,7 @@ const storage = require('./storage.js'); const Mousetrap = require('mousetrap'); const { formatTOC, - createAnchors + createAnchors, } = require('./document-ui.mjs'); const jQuery = require('jquery'); @@ -38,10 +38,10 @@ async function processUserData() { if (user_data.avatar) { const base_av = format_string(user_data.avatar, { - size: 35 + size: 35, }); const double_av = format_string(user_data.avatar, { - size: 70 + size: 70, }); const avatar = document.createElement('img'); @@ -95,8 +95,8 @@ function format_string(input_string, replacements) { const output_string = input_string.replace( /\{(\/?)(\w+)\}/g, (x, slash, placeholder) => - Object.hasOwn(replacements, placeholder) ? - slash + replacements[placeholder] : '' + Object.hasOwn(replacements, placeholder) + ? slash + replacements[placeholder] : '', ); return output_string; } @@ -104,20 +104,20 @@ function format_string(input_string, replacements) { // User customisations processUserData(); -jQuery(".ttip").tooltip(); // bootstrap +jQuery('.ttip').tooltip(); // bootstrap for (const el of document.querySelectorAll('.keyboard-shortcuts')) { - el.addEventListener('click', e => { + el.addEventListener('click', (e) => { e.preventDefault(); jQuery('#metacpan_keyboard-shortcuts').modal(); // bootstrap }); } // Global keyboard shortcuts -Mousetrap.bind('?', function() { +Mousetrap.bind('?', function () { jQuery('#metacpan_keyboard-shortcuts').modal(); // bootstrap }); -Mousetrap.bind('s', function(e) { +Mousetrap.bind('s', function (e) { e.preventDefault(); document.querySelector('#metacpan_search-input').focus(); }); @@ -132,7 +132,7 @@ for (const el of document.querySelectorAll('a[data-keyboard-shortcut]')) { } for (const logout of document.querySelectorAll('.logout-button')) { - logout.addEventListener('click', e => { + logout.addEventListener('click', (e) => { e.preventDefault(); const form = document.createElement('form'); form.method = 'POST'; @@ -178,7 +178,7 @@ for (const favButton of document.querySelectorAll('.breadcrumbs .favorite')) { jQuery('.dropdown-toggle').dropdown(); // bootstrap -const toc = document.querySelector(".content .toc") +const toc = document.querySelector('.content .toc'); if (toc) { formatTOC(toc); } @@ -205,38 +205,38 @@ set_page_size('a[href*="/requires"]', 'requires_page_size'); const changes = document.querySelector('#metacpan_last-changes'); if (changes) { const changes_content = changes.querySelector('.changes-content'); - const changes_toggle = changes.querySelector(".changes-toggle"); + const changes_toggle = changes.querySelector('.changes-toggle'); changes.classList.add('collapsable', 'collapsed'); const content_height = Math.round(changes_content.scrollHeight); const potential_size = Math.round( - changes_content.offsetHeight + - changes_toggle.offsetHeight + changes_content.offsetHeight + + changes_toggle.offsetHeight, ); if (content_height <= potential_size) { changes.classList.remove('collapsable', 'collapsed'); } - changes_toggle.addEventListener('click', e => { + changes_toggle.addEventListener('click', (e) => { e.preventDefault(); changes.classList.toggle('collapsed'); }); } for (const favForm of document.querySelectorAll('form[action="/account/favorite/add"]')) { - favForm.addEventListener('submit', async e => { + favForm.addEventListener('submit', async (e) => { e.preventDefault(); const formData = new FormData(favForm); const response = await fetch(favForm.action, { - method: favForm.method, + method: favForm.method, headers: { - 'Accept': 'application/json', + Accept: 'application/json', }, body: formData, }); if (!response.ok) { - alert("Error adding favorite!"); + alert('Error adding favorite!'); } const button = favForm.querySelector('button'); @@ -266,7 +266,7 @@ for (const favForm of document.querySelectorAll('form[action="/account/favorite/ } for (const favButton of document.querySelectorAll('.fav-not-logged-in')) { - favButton.addEventListener('click', e => { + favButton.addEventListener('click', (e) => { e.preventDefault(); alert('Please sign in to add favorites'); }); @@ -282,7 +282,7 @@ for (const sel of document.querySelectorAll('.select-navigator')) { const contribs = document.querySelector('#metacpan_contributors'); if (contribs) { const contrib_button = document.querySelector('.contributors-show-button'); - contrib_button.addEventListener('click', e => { + contrib_button.addEventListener('click', (e) => { e.preventDefault(); contrib_button.style.display = 'none'; contribs.classList.remove('slide-out-hidden'); diff --git a/root/static/js/document-ui.mjs b/root/static/js/document-ui.mjs index da0a406371..46b59b6737 100644 --- a/root/static/js/document-ui.mjs +++ b/root/static/js/document-ui.mjs @@ -1,7 +1,7 @@ import storage from './storage.js'; export const createAnchors = (topList) => { - const it = typeof(topList)[Symbol.iterator] === 'function' ? topList : [topList]; + const it = typeof (topList)[Symbol.iterator] === 'function' ? topList : [topList]; for (const top of it) { for (const heading of top.querySelectorAll(':scope h1,h2,h3,h4,h5,h6,dt')) { const id = heading.id; @@ -20,20 +20,20 @@ export const createAnchors = (topList) => { heading.prepend(link); } } -} +}; export const formatTOC = (toc) => { if (storage.getItem('hideTOC') == 1) { - toc.classList.add("hide-toc"); + toc.classList.add('hide-toc'); } const toc_header = toc.querySelector('.toc-header'); const toc_body = toc.querySelector('ul'); toc_header.insertAdjacentHTML('beforeend', - ' [ ]' + ' [ ]', ); - toc_header.querySelector('.toggle-toc').addEventListener('click', e => { + toc_header.querySelector('.toggle-toc').addEventListener('click', (e) => { e.preventDefault(); const currentVisible = !toc.classList.contains('hide-toc'); storage.setItem('hideTOC', currentVisible ? 1 : 0); diff --git a/root/static/js/github.js b/root/static/js/github.js index 91015b020e..a4fc46ab0a 100644 --- a/root/static/js/github.js +++ b/root/static/js/github.js @@ -29,19 +29,19 @@ class GitHubUrl { config = { issues: { - pattern: /^(?:https?:\/\/)?(?:www\.)?github\.com\/([^/]+)\/([^/]+)\/issues\/?$/, - prepareData: function(data, cb) { + pattern: /^(?:https?:\/\/)?(?:www\.)?github\.com\/([^/]+)\/([^/]+)\/issues\/?$/, + prepareData: function (data, cb) { // we need additionally the repo info var url = this.url.replace('/issues', ''); fetch(url).then(response => response.json()) - .then(repo => { + .then((repo) => { cb({ issues: data, - repo: repo + repo: repo, }); }); }, - render: function(data) { + render: function (data) { if (data.issues.length === 0) { return 'There are currently no open issues.'; } @@ -51,9 +51,9 @@ class GitHubUrl { issues_text = 'Issues'; } - var result = '' + - ' ' + - ' ' + : '') + + + (data.homepage + ? ' ' + : '') + + // with v3 api the number under 'watchers' is actually the number of stargazers + // in the v4 api this will be corrected. see https://github.com/metacpan/metacpan-web/issues/975 + + ' ' + + ' ' + + + (data.has_issues + ? ' ' + : '') + + + ' ' + + ' ' + + ' ' + + ' ' + + ' ' + + '
Open Issues:' + data.repo.open_issues + '
' + issues_text + ':'; + var result = '
' + + ' ' + + '
Open Issues:' + data.repo.open_issues + '
' + issues_text + ':'; for (const issue of data.issues) { result += ''; @@ -61,17 +61,17 @@ class GitHubUrl { return result + '
' + issue.created_at + '' + issue.title + '
'; }, - url: function(result) { + url: function (result) { return this.githubApiUrl + '/repos/' + result[1] + '/' + result[2] + '/issues?per_page=15'; - } + }, // Release info }, // Release info repo: { // NOTE: Not allowing dots in the repo name might be too restrictive. - pattern: /^(?:(?:git|https?):\/\/)?(?:www\.)?github\.com[/:]([^/]+)\/([^/.]+)(?:\/(tree(?:\/master)?)?|\.git)*$/, - normalizeUrl: function(match) { + pattern: /^(?:(?:git|https?):\/\/)?(?:www\.)?github\.com[/:]([^/]+)\/([^/.]+)(?:\/(tree(?:\/master)?)?|\.git)*$/, + normalizeUrl: function (match) { // Old releases might have old github urls ("/$user/$repo/tree"). // Since github doesn't honor those anymore, fix the link. // A url like ".../tree/master" still seems to work, though. @@ -79,83 +79,73 @@ class GitHubUrl { this.item.href = this.href.replace(/\/tree$/, ''); } }, - render: function(data) { + render: function (data) { return '' - + - (data.description ? - ' ' : - '') - - + - (data.homepage ? - ' ' : - '') - - // with v3 api the number under 'watchers' is actually the number of stargazers - // in the v4 api this will be corrected. see https://github.com/metacpan/metacpan-web/issues/975 - + - ' ' + - ' ' - - + - (data.has_issues ? - ' ' : - '') - - + - ' ' + - ' ' + - ' ' + - ' ' + - ' ' + - '
Description:' + data.description + '
Homepage:' + data.homepage + '
Stars:' + data.watchers + '
Forks:' + data.forks + '
Open Issues: ' + data.open_issues + '
Pull Requests:' + data.html_url + '/pulls' + '
Clone URL:' + data.clone_url + '
GitHub URL:' + data.html_url + '
SSH URL:' + data.ssh_url + '
Last Commit:' + data.pushed_at + '
'; + + (data.description + ? '
Description:' + data.description + '
Homepage:' + data.homepage + '
Stars:' + data.watchers + '
Forks:' + data.forks + '
Open Issues: ' + data.open_issues + '
Pull Requests:' + data.html_url + '/pulls' + '
Clone URL:' + data.clone_url + '
GitHub URL:' + data.html_url + '
SSH URL:' + data.ssh_url + '
Last Commit:' + data.pushed_at + '
'; }, - url: function(result) { + url: function (result) { return this.githubApiUrl + '/repos/' + result[1] + '/' + result[2]; - } + }, }, // Author profiles user: { pattern: /^(?:https?:\/\/)?(?:www\.)?github\.com\/([^/]+)\/?$/, - render: function(data) { - return '' + - (data.name ? - ' ' : - '') - - + - (data.email ? - ' ' : - '') - - + - (data.blog ? - ' ' : - '') - - + - (data.company ? - ' ' : - '') - - + - (data.location ? - ' ' : - '') - - + - ' ' + - ' ' + - ' ' + - ' ' + - '
Name:' + data.name + '
Email:' + data.email + '
Website/Blog:' + data.blog + '
Company:' + data.company + '
Location:' + data.location + '
Member Since:' + data.created_at + '
Followers:' + data.followers + '
Following:' + data.following + '
Public Repos:' + data.public_repos + '
'; + render: function (data) { + return '' + + (data.name + ? ' ' + : '') + + + (data.email + ? ' ' + : '') + + + (data.blog + ? ' ' + : '') + + + (data.company + ? ' ' + : '') + + + (data.location + ? ' ' + : '') + + + ' ' + + ' ' + + ' ' + + ' ' + + '
Name:' + data.name + '
Email:' + data.email + '
Website/Blog:' + data.blog + '
Company:' + data.company + '
Location:' + data.location + '
Member Since:' + data.created_at + '
Followers:' + data.followers + '
Following:' + data.following + '
Public Repos:' + data.public_repos + '
'; }, - url: function(result) { + url: function (result) { return this.githubApiUrl + '/users/' + result[1]; - } - } + }, + }, }; createPopup() { @@ -169,14 +159,14 @@ class GitHubUrl { content: { ajax: { dataType: 'json', - type: 'GET', - url: this.url, - error: function(data) { + type: 'GET', + url: this.url, + error: function (data) { var error = (data && data.message) || 'An error occurred'; qtip.set('content.text', '' + error + ''); }, - success: function(data) { - self.prepareData(data, function(data) { + success: function (data) { + self.prepareData(data, function (data) { var html = self.render(data); qtip.set('content.text', html); for (const date of document.querySelectorAll('.qtip-github .relatize')) { @@ -188,20 +178,20 @@ class GitHubUrl { }); }, }, - text: '', - title: 'GitHub Info' + text: '', + title: 'GitHub Info', }, hide: { event: 'mouseleave', - fixed: true + fixed: true, }, position: { at: 'right center', - my: 'left center' + my: 'left center', }, style: { classes: 'qtip-shadow qtip-rounded qtip-light qtip-github', - } + }, }); qtip = tooltip.qtip('api'); } diff --git a/root/static/js/google-analytics.mjs b/root/static/js/google-analytics.mjs index fd8a1f0ddf..6ba2f2f88c 100644 --- a/root/static/js/google-analytics.mjs +++ b/root/static/js/google-analytics.mjs @@ -6,7 +6,7 @@ const gtag = (...args) => { gtag('js', new Date()); gtag('config', 'G-6B2JCQSHJE', { - cookie_flags: 'SameSite=Lax;Secure' + cookie_flags: 'SameSite=Lax;Secure', }); export { diff --git a/root/static/js/pod2html.mjs b/root/static/js/pod2html.mjs index aef3b23ee1..948c4b063f 100644 --- a/root/static/js/pod2html.mjs +++ b/root/static/js/pod2html.mjs @@ -1,8 +1,8 @@ import { formatTOC, - createAnchors + createAnchors, } -from './document-ui.mjs'; + from './document-ui.mjs'; const pod2htmlForm = document.querySelector('#metacpan-pod-renderer-form'); if (pod2htmlForm) { @@ -24,7 +24,7 @@ if (pod2htmlForm) { pod = textInput.value; } submit.disabled = true; - document.title = "Pod Renderer - metacpan.org"; + document.title = 'Pod Renderer - metacpan.org'; rendered.style.display = 'none'; rendered.replaceChildren(); @@ -36,9 +36,9 @@ if (pod2htmlForm) { form.set('pod', pod); const response = await fetch('/pod2html', { - method: 'POST', + method: 'POST', headers: { - "Accept": "application/json", + Accept: 'application/json', }, body: form, }); @@ -49,7 +49,7 @@ if (pod2htmlForm) { const data = await response.json(); - document.title = "Pod Renderer - " + data.pod_title + " - metacpan.org"; + document.title = 'Pod Renderer - ' + data.pod_title + ' - metacpan.org'; const body = template.content.cloneNode(true); body.querySelector('.toc-body').replaceWith(parseHTML(data.pod_index)); @@ -103,30 +103,30 @@ if (pod2htmlForm) { }); let dragTimer; - renderer.addEventListener("dragover", (ev) => { + renderer.addEventListener('dragover', (ev) => { ev.preventDefault(); if (dragTimer) { window.clearTimeout(dragTimer); } dragTimer = window.setTimeout(() => { - renderer.classList.remove("dragging"); + renderer.classList.remove('dragging'); window.clearTimeout(dragTimer); dragTimer = null; }, 500); }); - document.addEventListener("dragenter", function() { - renderer.classList.add("dragging"); + document.addEventListener('dragenter', function () { + renderer.classList.add('dragging'); }); - renderer.addEventListener("drop", (ev) => { + renderer.addEventListener('drop', (ev) => { const data = ev.dataTransfer; if (data && data.files && data.files.length) { const file = data.files[0]; ev.preventDefault(); ev.stopPropagation(); - renderer.classList.remove("dragging"); + renderer.classList.remove('dragging'); if (dragTimer) { window.clearTimeout(dragTimer); dragTimer = null; diff --git a/root/static/js/profile.js b/root/static/js/profile.js index b3759f99e7..300b2e1483 100644 --- a/root/static/js/profile.js +++ b/root/static/js/profile.js @@ -1,4 +1,4 @@ -"use strict"; +'use strict'; function rewriteURL(link) { const url = link.dataset.urlTemplate; @@ -8,12 +8,12 @@ function rewriteURL(link) { } function removeDiv(div) { - new Promise(resolve => { - div.addEventListener("animationend", resolve); + new Promise((resolve) => { + div.addEventListener('animationend', resolve); setTimeout(resolve, 400); }).then(() => div.parentNode.removeChild(div)); - div.classList.remove("slide-down"); - div.classList.add("slide-up"); + div.classList.remove('slide-down'); + div.classList.add('slide-up'); } function removeField(e) { @@ -68,7 +68,7 @@ function fillLocation() { navigator.geolocation.getCurrentPosition((pos) => { document.querySelector('input[name="latitude"]').value = pos.coords.latitude; document.querySelector('input[name="longitude"]').value = pos.coords.longitude; - }, function() {}); + }, function () {}); return false; } @@ -76,7 +76,7 @@ const profileForm = document.querySelector('.profile-form'); if (profileForm) { for (const btn of profileForm.querySelectorAll(':scope .add-field')) { - btn.addEventListener('click', function(e) { + btn.addEventListener('click', function (e) { e.preventDefault(); addField(this.closest('.field-container').parentNode, this.dataset.fieldType); }); @@ -86,7 +86,7 @@ if (profileForm) { remove_field.addEventListener('click', removeField); } - profileForm.querySelector('.add-profile').addEventListener('change', function(e) { + profileForm.querySelector('.add-profile').addEventListener('change', function (e) { e.preventDefault(); const option = this.selectedOptions[0]; addProfile( @@ -108,13 +108,13 @@ if (profileForm) { }); } - const extra = profileForm.querySelector('textarea[name="extra"]') + const extra = profileForm.querySelector('textarea[name="extra"]'); extra.addEventListener('keyup', () => { validateJSON(extra); }); validateJSON(extra); - profileForm.querySelector('.fill-location').addEventListener('click', function(e) { + profileForm.querySelector('.fill-location').addEventListener('click', function (e) { e.preventDefault(); fillLocation(); }); @@ -122,15 +122,15 @@ if (profileForm) { const donation_box = document.querySelector('#metacpan_donations'); const donations = profileForm.querySelector('input[name="donations"]'); donations.addEventListener('change', () => { - donation_box.classList.remove("slide-out-hidden"); + donation_box.classList.remove('slide-out-hidden'); if (donations.value) { - donation_box.classList.add("slide-down"); - donation_box.classList.remove("slide-up"); + donation_box.classList.add('slide-down'); + donation_box.classList.remove('slide-up'); } else { - donation_box.classList.remove("slide-down"); - donation_box.classList.add("slide-up"); + donation_box.classList.remove('slide-down'); + donation_box.classList.add('slide-up'); } }); } diff --git a/root/static/js/relatize_date.js b/root/static/js/relatize_date.js index 7b122ed9a5..fcd8fc78c9 100644 --- a/root/static/js/relatize_date.js +++ b/root/static/js/relatize_date.js @@ -1,39 +1,39 @@ const relDate = { - relDate: function(element) { + relDate: function (element) { var str = element.getAttribute('title'), d = new Date(str), m; if (!d || isNaN(d)) { // match w3cdtf/iso 8601/rfc 3339 (not all browsers will via new Date()) if ((m = str.match(/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(GMT|UTC|Z)?$/))) { - d = m[7] ? // UTC - new Date(Date.UTC(m[1], m[2] - 1, m[3], m[4], m[5], m[6])) : - new Date(m[1], m[2] - 1, m[3], m[4], m[5], m[6]); + d = m[7] // UTC + ? new Date(Date.UTC(m[1], m[2] - 1, m[3], m[4], m[5], m[6])) + : new Date(m[1], m[2] - 1, m[3], m[4], m[5], m[6]); } } // if Date is not parseable just return the original string return ((!d || isNaN(d)) ? str : this.timeAgoInWords(d)); }, - shortDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], - days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], + shortDays: ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'], + days: ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'], shortMonths: ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'], - months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], + months: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'], /** * Given a formatted string, replace the necessary items and return. * Example: Time.now().strftime("%B %d, %Y") => February 11, 2008 * @param {String} format The formatted string used to format the results */ - strftime: function(date, format) { + strftime: function (date, format) { var day = date.getDay(), month = date.getMonth(); var hours = date.getHours(), minutes = date.getMinutes(); - var pad = function(num) { + var pad = function (num) { var string = num.toString(10); - return new Array((2 - string.length) + 1).join('0') + string + return new Array((2 - string.length) + 1).join('0') + string; }; return format.replace(/%([aAbBcdHImMpSwyY])/g, (match, letter) => { @@ -72,7 +72,7 @@ const relDate = { }); }, - timeAgoInWords: function(targetDate, includeTime) { + timeAgoInWords: function (targetDate, includeTime) { return this.distanceOfTimeInWords(targetDate, new Date(), includeTime); }, @@ -83,7 +83,7 @@ const relDate = { * @param {Date} toTime The end date to use in the calculation * @param {Boolean} Include the time in the output */ - distanceOfTimeInWords: function(fromTime, toTime, includeTime) { + distanceOfTimeInWords: function (fromTime, toTime, includeTime) { var delta = parseInt((toTime.getTime() - fromTime.getTime()) / 1000); if (delta < 120) { return 'a minute ago'; @@ -103,15 +103,15 @@ const relDate = { else { var days = (parseInt(delta / 86400)).toString(); if (days > 5) { - var fmt = '%b %d, %Y' - if (includeTime) fmt += ' %I:%M %p' + var fmt = '%b %d, %Y'; + if (includeTime) fmt += ' %I:%M %p'; return this.strftime(fromTime, fmt); } else { - return days + " days ago" + return days + ' days ago'; } } - } + }, }; const relatizeDate = (elements) => { diff --git a/root/static/js/search.js b/root/static/js/search.js index 3a473fa4d8..60e7deb96f 100644 --- a/root/static/js/search.js +++ b/root/static/js/search.js @@ -28,7 +28,7 @@ const showSearchBar = () => { searchBarForm.classList.add('visible-lg'); } } -} +}; document.body.addEventListener('click', showSearchBar); diff --git a/root/static/js/storage.js b/root/static/js/storage.js index 2b41d08748..68135e0586 100644 --- a/root/static/js/storage.js +++ b/root/static/js/storage.js @@ -10,12 +10,13 @@ catch { if (!storage) { storage = new class { getItem(k) { - return this["_" + k]; + return this['_' + k]; } + setItem(k, v) { - return this["_" + k] = v; + return this['_' + k] = v; } - }; + }(); } module.exports = storage; diff --git a/root/static/js/syntaxhighlighter.mjs b/root/static/js/syntaxhighlighter.mjs index e12807f99f..c550cbf677 100644 --- a/root/static/js/syntaxhighlighter.mjs +++ b/root/static/js/syntaxhighlighter.mjs @@ -1,7 +1,7 @@ import SyntaxHighlighter, { - registerBrush + registerBrush, } -from 'syntaxhighlighter'; + from 'syntaxhighlighter'; import Renderer from 'syntaxhighlighter-html-renderer'; await Promise.all([ @@ -11,7 +11,7 @@ await Promise.all([ import('brush-javascript').then(brush => registerBrush(brush)), import('./brush-perl.js').then(brush => registerBrush(brush)), import('brush-plain').then(brush => registerBrush(brush)), - import('brush-yaml').then(brush => registerBrush(brush)) + import('brush-yaml').then(brush => registerBrush(brush)), ]); const parseLines = (lines) => { @@ -68,12 +68,12 @@ const togglePod = (e) => { const diff = topLine.getBoundingClientRect().top - topOffset; window.scrollTo({ - top: scrollTop + diff, - left: 0, - behavior: "instant" + top: scrollTop + diff, + left: 0, + behavior: 'instant', }); } -} +}; const hashLines = /^#L(\d+(?:-\d+)?(?:,\d+(?:-\d+)?)*)$/; @@ -101,7 +101,7 @@ SyntaxHighlighter.config.useScriptTags = false; * @param {String} code Input code. * @return {String} Returns code with tags. */ -const processPackages = function(code) { +const processPackages = function (code) { const target_pattern = this.opts.package_target_type == 'source' ? '/module/%s/source' : '/pod/%s'; // This regexp is not great, but its good enough so far: // Match (possible) quotes or q operators followed by: an html entity or punctuation (not a letter). @@ -118,7 +118,7 @@ const processPackages = function(code) { // (again, possibly across a newline (which is actually a new div)) // without knowing where to end (the closing delimiter) would be really difficult. // See also the above comment about scanning the plain string and linkifying later. - code = code.replace(/((?:with|extends|use<\/code> (?:parent|base|aliased|Mojo::Base))\s*<\/code>\s*(?:qw(?:[^&a-z]|&#?[a-zA-Z0-9]+;)<\/code>.+?)?)(.+?)(<\/code>)/g, function(m, prefix, pkg, suffix) { + code = code.replace(/((?:with|extends|use<\/code> (?:parent|base|aliased|Mojo::Base))\s*<\/code>\s*(?:qw(?:[^&a-z]|&#?[a-zA-Z0-9]+;)<\/code>.+?)?)(.+?)(<\/code>)/g, function (m, prefix, pkg, suffix) { const match = strip_delimiters.exec(pkg); if (match) { prefix = prefix + match[1]; @@ -138,14 +138,14 @@ const processPackages = function(code) { }; const processUrls = Renderer.prototype.processUrls; -Renderer.prototype.processUrls = function(html, ...args) { +Renderer.prototype.processUrls = function (html, ...args) { html = processPackages.apply(this, [html]); html = processUrls.apply(this, [html, ...args]); return html; }; const getHtml = Renderer.prototype.getHtml; -Renderer.prototype.getHtml = function(...args) { +Renderer.prototype.getHtml = function (...args) { let html = getHtml.call(this, ...args); html = html.replace(/\s+(<(tbody|table|div)\b)/g, '$1'); html = html.replace(/(<\/(tbody|table|div)>)\s+/g, '$1'); @@ -153,7 +153,7 @@ Renderer.prototype.getHtml = function(...args) { }; const wrapLine = Renderer.prototype.wrapLine; -Renderer.prototype.wrapLine = function(lineIndex, lineNumber, lineHtml) { +Renderer.prototype.wrapLine = function (lineIndex, lineNumber, lineHtml) { if (lineHtml == ' ') { lineHtml = ''; } @@ -161,7 +161,7 @@ Renderer.prototype.wrapLine = function(lineIndex, lineNumber, lineHtml) { }; // on pod pages, set the language to perl if no other language is set -CODE: for (const code of document.querySelectorAll(".pod pre > code")) { +CODE: for (const code of document.querySelectorAll('.pod pre > code')) { for (const className of code.classList) { if (className.match(/(?:\s|^)language-\S+/)) { continue CODE; @@ -170,7 +170,7 @@ CODE: for (const code of document.querySelectorAll(".pod pre > code")) { code.classList.add('language-perl'); } -const source = document.querySelector("#metacpan_source"); +const source = document.querySelector('#metacpan_source'); if (source) { const packageMatch = document.location.hash.match(/^#P(\S+)$/); const lineMatch = document.location.hash.match(hashLines); @@ -187,8 +187,8 @@ if (source) { // the code. else if (packageMatch) { const decodedPackageMatch = decodeURIComponent(packageMatch[1]); - const leadingSource = source.innerText.split("package " + decodedPackageMatch + ";"); - const lineCount = leadingSource[0].split("\n").length; + const leadingSource = source.innerText.split('package ' + decodedPackageMatch + ';'); + const lineCount = leadingSource[0].split('\n').length; if (leadingSource.length > 1 && lineCount > 1) { source.dataset.line = lineCount; } @@ -204,14 +204,14 @@ if (source) { } } -for (const code of document.querySelectorAll(".content pre > code")) { +for (const code of document.querySelectorAll('.content pre > code')) { const pre = code.parentNode; const config = { - 'gutter': false, - 'toolbar': false, + 'gutter': false, + 'toolbar': false, 'quick-code': false, - 'tab-size': 8 + 'tab-size': 8, }; for (const className of code.classList) { const res = className.match(/(?:\s|^)language-(\S+)/); @@ -251,13 +251,13 @@ for (const code of document.querySelectorAll(".content pre > code")) { const fakeCode = { className: code.className, - id: code.id, - title: code.title, + id: code.id, + title: code.title, innerHTML: { - toString: function() { - return html + toString: function () { + return html; }, - replace: function(search, replace) { + replace: function (search, replace) { if (search.toString() == /^[ ]*[\n]+|[\n]*[ ]*$/g.toString()) { return html.replace(/\n$/g, ''); } @@ -267,9 +267,9 @@ for (const code of document.querySelectorAll(".content pre > code")) { }; const parentNode = code.parentNode; fakeCode.parentNode = { - replaceChild: function(newEl, oldEl) { + replaceChild: function (newEl, oldEl) { if (oldEl === fakeCode) { - oldEl = code + oldEl = code; } parentNode.replaceChild(newEl, oldEl); }, @@ -348,8 +348,8 @@ if (source) { let line = linenr; if (e.shiftKey && source.dataset.line) { const startLine = parseLines(source.dataset.line)[0]; - line = startLine < line ? startLine + '-' + line : - line + '-' + startLine; + line = startLine < line ? startLine + '-' + line + : line + '-' + startLine; } link.removeAttribute('id'); document.location.hash = '#L' + line; diff --git a/root/static/js/tablesorter.mjs b/root/static/js/tablesorter.mjs index d07411d4a4..ef359a95cb 100644 --- a/root/static/js/tablesorter.mjs +++ b/root/static/js/tablesorter.mjs @@ -5,17 +5,17 @@ import 'tablesorter'; for (const table of document.querySelectorAll('table.tablesorter')) { const cfg = { - textExtraction: function(node) { - const sort = node.getAttribute("sort"); + textExtraction: function (node) { + const sort = node.getAttribute('sort'); if (!sort) return node.textContent; - if (node.classList.contains("date")) { + if (node.classList.contains('date')) { return (new Date(sort)).getTime(); } else { return sort; } }, - headers: {} + headers: {}, }; const sortable = []; @@ -33,7 +33,7 @@ for (const table of document.querySelectorAll('table.tablesorter')) { let sortid; if (table.id) { const storageid = table.id.replace(/^metacpan_/, ''); - sortid = storage.getItem("tablesorter:" + storageid); + sortid = storage.getItem('tablesorter:' + storageid); } if (!sortid && table.dataset.defaultSort) { sortid = table.dataset.defaultSort; @@ -76,7 +76,7 @@ for (const header of document.querySelectorAll('.tablesorter.remote th.header')) const loc = new URL(document.location); loc.searchParams.set('sort', JSON.stringify([ - [header.column, header.count++ % 2] + [header.column, header.count++ % 2], ])); window.location.assign(loc); }); @@ -86,11 +86,11 @@ for (const header of document.querySelectorAll('.tablesorter th.header')) { const tableid = header.closest('table').id; const storageid = tableid.replace(/^metacpan_/, ''); header.addEventListener('click', () => { - setTimeout(function() { + setTimeout(function () { var sortParam = (new URL(document.location)).searchParams.get('sort'); if (sortParam != null) { sortParam = sortParam.slice(2, sortParam.length - 2); - storage.setItem("tablesorter:" + storageid, sortParam); + storage.setItem('tablesorter:' + storageid, sortParam); } }, 1000); }); From 1bcb6d8fd2fbf0a4b78101a01ecd18038cec9633 Mon Sep 17 00:00:00 2001 From: Graham Knop Date: Sat, 12 Oct 2024 06:06:20 +0200 Subject: [PATCH 3/3] tidy json files --- .prettierignore | 5 +++ package.json | 90 ++++++++++++++++++++++++------------------------- precious.toml | 2 +- 3 files changed, 51 insertions(+), 46 deletions(-) create mode 100644 .prettierignore diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000000..a06def32b6 --- /dev/null +++ b/.prettierignore @@ -0,0 +1,5 @@ +*.js +*.mjs +/package-lock.json +/node_modules/ +/local/ diff --git a/package.json b/package.json index 55bd726bcf..ae449bdd3e 100644 --- a/package.json +++ b/package.json @@ -1,47 +1,47 @@ { - "name": "metacpan-web", - "version": "1.0.0", - "scripts": { - "build": "./build-assets.mjs", - "build:min": "./build-assets.mjs --minify", - "build:watch": "./build-assets.mjs --watch", - "test": "echo \"Error: no test specified\" && exit 1" - }, - "repository": { - "type": "git", - "url": "git+https://github.com/metacpan/metacpan-web.git" - }, - "author": "", - "bugs": { - "url": "https://github.com/metacpan/metacpan-web/issues" - }, - "homepage": "https://github.com/metacpan/metacpanweb#readme", - "devDependencies": { - "@eslint/js": "^9.38.0", - "@playwright/test": "^1.56.1", - "@stylistic/eslint-plugin": "^2.9.0", - "eslint": "^9.38.0", - "globals": "^16.4.0", - "js-beautify": "^1.15.4", - "prettier": "3.6.2" - }, - "dependencies": { - "@fortawesome/fontawesome-free": "^6.7.2", - "bootstrap": "^3.4.1", - "brush-cpp": "^4.0.1", - "brush-diff": "^4.0.0", - "brush-javascript": "^4.0.0", - "brush-plain": "^4.0.1", - "brush-yaml": "^4.0.0", - "devbridge-autocomplete": "^1.5.0", - "esbuild": "^0.25.11", - "esbuild-plugin-less": "^1.3.28", - "jquery": "^3.7.1", - "less": "^4.4.2", - "minimist": "^1.2.8", - "mousetrap": "^1.6.5", - "qtip2": "^3.0.3", - "syntaxhighlighter": "^4.0.1", - "tablesorter": "^2.32.0" - } + "name": "metacpan-web", + "version": "1.0.0", + "scripts": { + "build": "./build-assets.mjs", + "build:min": "./build-assets.mjs --minify", + "build:watch": "./build-assets.mjs --watch", + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "git+https://github.com/metacpan/metacpan-web.git" + }, + "author": "", + "bugs": { + "url": "https://github.com/metacpan/metacpan-web/issues" + }, + "homepage": "https://github.com/metacpan/metacpanweb#readme", + "devDependencies": { + "@eslint/js": "^9.38.0", + "@playwright/test": "^1.56.1", + "@stylistic/eslint-plugin": "^2.9.0", + "eslint": "^9.38.0", + "globals": "^16.4.0", + "js-beautify": "^1.15.4", + "prettier": "3.6.2" + }, + "dependencies": { + "@fortawesome/fontawesome-free": "^6.7.2", + "bootstrap": "^3.4.1", + "brush-cpp": "^4.0.1", + "brush-diff": "^4.0.0", + "brush-javascript": "^4.0.0", + "brush-plain": "^4.0.1", + "brush-yaml": "^4.0.0", + "devbridge-autocomplete": "^1.5.0", + "esbuild": "^0.25.11", + "esbuild-plugin-less": "^1.3.28", + "jquery": "^3.7.1", + "less": "^4.4.2", + "minimist": "^1.2.8", + "mousetrap": "^1.6.5", + "qtip2": "^3.0.3", + "syntaxhighlighter": "^4.0.1", + "tablesorter": "^2.32.0" + } } diff --git a/precious.toml b/precious.toml index 136ef7a597..521e6b3bae 100644 --- a/precious.toml +++ b/precious.toml @@ -46,7 +46,7 @@ ignore-stderr = [ [commands.prettier] type = "both" -include = [ "**/*.md", "**/*.yml", "**/*.yaml", "**/*.css", "**/*.less", "**/*.scss" ] +include = [ "**/*.md", "**/*.yml", "**/*.yaml", "**/*.css", "**/*.less", "**/*.scss", "**/*.json" ] cmd = [ "npx", "-s", "prettier" ]