diff --git a/package-lock.json b/package-lock.json index 34d544496..d5273c218 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,16 +13,16 @@ "acorn-jsx": "^5.3.2", "acorn-jsx-walk": "^2.0.0", "acorn-loose": "^8.4.0", - "acorn-walk": "^8.3.3", + "acorn-walk": "^8.3.4", "ajv": "^8.17.1", "commander": "^12.1.0", "enhanced-resolve": "^5.17.1", - "ignore": "^5.3.2", + "ignore": "^6.0.2", "interpret": "^3.1.1", "is-installed-globally": "^1.0.0", "json5": "^2.2.3", "memoize": "^10.0.0", - "picocolors": "^1.0.1", + "picocolors": "^1.1.0", "picomatch": "^4.0.2", "prompts": "^2.4.2", "rechoir": "^0.8.0", @@ -44,27 +44,27 @@ "@babel/core": "7.25.2", "@babel/plugin-transform-modules-commonjs": "7.24.8", "@babel/preset-typescript": "7.24.7", - "@swc/core": "1.7.22", - "@types/node": "22.5.1", + "@swc/core": "1.7.26", + "@types/node": "22.5.5", "@types/prompts": "2.4.9", - "@typescript-eslint/eslint-plugin": "8.3.0", - "@typescript-eslint/parser": "8.3.0", - "@vue/compiler-sfc": "3.4.38", + "@typescript-eslint/eslint-plugin": "8.6.0", + "@typescript-eslint/parser": "8.6.0", + "@vue/compiler-sfc": "3.5.7", "c8": "10.1.2", "clean-pkg-json": "1.2.0", "coffeescript": "2.7.0", - "eslint": "^8.57.0", + "eslint": "^8.57.1", "eslint-config-moving-meadow": "4.0.2", "eslint-config-prettier": "9.1.0", "eslint-plugin-budapestian": "6.0.0", "eslint-plugin-eslint-comments": "3.2.0", - "eslint-plugin-import": "2.29.1", + "eslint-plugin-import": "2.30.0", "eslint-plugin-mocha": "10.5.0", "eslint-plugin-node": "11.1.0", "eslint-plugin-security": "3.0.1", "eslint-plugin-unicorn": "^55.0.0", - "husky": "9.1.5", - "lint-staged": "15.2.9", + "husky": "9.1.6", + "lint-staged": "15.2.10", "mocha": "10.7.3", "normalize-newline": "4.1.0", "npm-run-all": "4.1.5", @@ -72,7 +72,7 @@ "proxyquire": "2.1.3", "svelte": "^4.2.19", "symlink-dir": "6.0.2", - "typescript": "5.5.4", + "typescript": "5.6.2", "upem": "9.0.4", "vue-template-compiler": "2.7.16", "yarn": "1.22.22" @@ -650,6 +650,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@eslint/eslintrc/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/@eslint/eslintrc/node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -684,9 +694,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", "dev": true, "license": "MIT", "engines": { @@ -694,14 +704,14 @@ } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", "deprecated": "Use @eslint/config-array instead", "dev": true, "license": "Apache-2.0", "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", + "@humanwhocodes/object-schema": "^2.0.3", "debug": "^4.3.1", "minimatch": "^3.0.5" }, @@ -970,10 +980,17 @@ "node": ">=14" } }, + "node_modules/@rtsao/scc": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", + "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", + "dev": true, + "license": "MIT" + }, "node_modules/@swc/core": { - "version": "1.7.22", - "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.7.22.tgz", - "integrity": "sha512-Asn79WKqyjEuO2VEeSnVjn2YiRMToRhFJwOsQeqftBvwWMn1FGUuzVcXtkQFBk37si8Gh2Vkk/+p0u4K5NxDig==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core/-/core-1.7.26.tgz", + "integrity": "sha512-f5uYFf+TmMQyYIoxkn/evWhNGuUzC730dFwAKGwBVHHVoPyak1/GvJUm6i1SKl+2Hrj9oN0i3WSoWWZ4pgI8lw==", "dev": true, "hasInstallScript": true, "license": "Apache-2.0", @@ -989,16 +1006,16 @@ "url": "https://opencollective.com/swc" }, "optionalDependencies": { - "@swc/core-darwin-arm64": "1.7.22", - "@swc/core-darwin-x64": "1.7.22", - "@swc/core-linux-arm-gnueabihf": "1.7.22", - "@swc/core-linux-arm64-gnu": "1.7.22", - "@swc/core-linux-arm64-musl": "1.7.22", - "@swc/core-linux-x64-gnu": "1.7.22", - "@swc/core-linux-x64-musl": "1.7.22", - "@swc/core-win32-arm64-msvc": "1.7.22", - "@swc/core-win32-ia32-msvc": "1.7.22", - "@swc/core-win32-x64-msvc": "1.7.22" + "@swc/core-darwin-arm64": "1.7.26", + "@swc/core-darwin-x64": "1.7.26", + "@swc/core-linux-arm-gnueabihf": "1.7.26", + "@swc/core-linux-arm64-gnu": "1.7.26", + "@swc/core-linux-arm64-musl": "1.7.26", + "@swc/core-linux-x64-gnu": "1.7.26", + "@swc/core-linux-x64-musl": "1.7.26", + "@swc/core-win32-arm64-msvc": "1.7.26", + "@swc/core-win32-ia32-msvc": "1.7.26", + "@swc/core-win32-x64-msvc": "1.7.26" }, "peerDependencies": { "@swc/helpers": "*" @@ -1010,9 +1027,9 @@ } }, "node_modules/@swc/core-darwin-arm64": { - "version": "1.7.22", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.22.tgz", - "integrity": "sha512-B2Bh2W+C7ALdGwDxRWAJ+UtNExfozvwyayGiNkbR3wmDKXXeQfhGM5MK+QYUWKu7UQ6ATq69OyZrxofDobKUug==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-arm64/-/core-darwin-arm64-1.7.26.tgz", + "integrity": "sha512-FF3CRYTg6a7ZVW4yT9mesxoVVZTrcSWtmZhxKCYJX9brH4CS/7PRPjAKNk6kzWgWuRoglP7hkjQcd6EpMcZEAw==", "cpu": [ "arm64" ], @@ -1027,9 +1044,9 @@ } }, "node_modules/@swc/core-darwin-x64": { - "version": "1.7.22", - "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.7.22.tgz", - "integrity": "sha512-s34UQntnQ6tL9hS9aX3xG7OfGhpmy05FEEndbHaooGO8O+L5k8uWxhE5KhYCOC0N803sGdZg6YZmKtYrWN/YxA==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-darwin-x64/-/core-darwin-x64-1.7.26.tgz", + "integrity": "sha512-az3cibZdsay2HNKmc4bjf62QVukuiMRh5sfM5kHR/JMTrLyS6vSw7Ihs3UTkZjUxkLTT8ro54LI6sV6sUQUbLQ==", "cpu": [ "x64" ], @@ -1044,9 +1061,9 @@ } }, "node_modules/@swc/core-linux-arm-gnueabihf": { - "version": "1.7.22", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.22.tgz", - "integrity": "sha512-SE69+oos1jLOXx5YdMH//Qc5zQc2xYukajB+0BWmkcFd/S/cCanGWYtdSzYausm8af2Fw1hPJMNIfndJLnBDFw==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm-gnueabihf/-/core-linux-arm-gnueabihf-1.7.26.tgz", + "integrity": "sha512-VYPFVJDO5zT5U3RpCdHE5v1gz4mmR8BfHecUZTmD2v1JeFY6fv9KArJUpjrHEEsjK/ucXkQFmJ0jaiWXmpOV9Q==", "cpu": [ "arm" ], @@ -1061,9 +1078,9 @@ } }, "node_modules/@swc/core-linux-arm64-gnu": { - "version": "1.7.22", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.22.tgz", - "integrity": "sha512-59FzDW/ojgiTj4dlnv3Z3ESuVlzhSAq9X12CNYh4/WTCNA8BoJqOnWMRQKspWtoNlnVviFLMvpek0pGXHndEBA==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-gnu/-/core-linux-arm64-gnu-1.7.26.tgz", + "integrity": "sha512-YKevOV7abpjcAzXrhsl+W48Z9mZvgoVs2eP5nY+uoMAdP2b3GxC0Df1Co0I90o2lkzO4jYBpTMcZlmUXLdXn+Q==", "cpu": [ "arm64" ], @@ -1078,9 +1095,9 @@ } }, "node_modules/@swc/core-linux-arm64-musl": { - "version": "1.7.22", - "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.22.tgz", - "integrity": "sha512-cMQMI8YRO/XR3OrYuiUlWksNsJOZSkA6gSLNyH6eHTw+FOAzv05oJ4SFYe6s1WesrOqRwhpez6y5H6OIP/EKzg==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-linux-arm64-musl/-/core-linux-arm64-musl-1.7.26.tgz", + "integrity": "sha512-3w8iZICMkQQON0uIcvz7+Q1MPOW6hJ4O5ETjA0LSP/tuKqx30hIniCGOgPDnv3UTMruLUnQbtBwVCZTBKR3Rkg==", "cpu": [ "arm64" ], @@ -1095,9 +1112,9 @@ } }, "node_modules/@swc/core-linux-x64-gnu": { - "version": "1.7.22", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.22.tgz", - "integrity": "sha512-639kA7MXrWqWYfwuSJ+XTg21VYb/5o99R1zJrndoEjEX6m7Wza/sXssQKU5jbbkPoSEKVKNP3n/gazLWiUKgiQ==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-gnu/-/core-linux-x64-gnu-1.7.26.tgz", + "integrity": "sha512-c+pp9Zkk2lqb06bNGkR2Looxrs7FtGDMA4/aHjZcCqATgp348hOKH5WPvNLBl+yPrISuWjbKDVn3NgAvfvpH4w==", "cpu": [ "x64" ], @@ -1112,9 +1129,9 @@ } }, "node_modules/@swc/core-linux-x64-musl": { - "version": "1.7.22", - "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.22.tgz", - "integrity": "sha512-f3zfGgY8EJQUOk3ve25ZTkNkhB/kHo9QlN2r+0exaE1g9W7X8IS6J8pWzF3hJrV2P9dBi6ofMOt+opVA89JKHA==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-linux-x64-musl/-/core-linux-x64-musl-1.7.26.tgz", + "integrity": "sha512-PgtyfHBF6xG87dUSSdTJHwZ3/8vWZfNIXQV2GlwEpslrOkGqy+WaiiyE7Of7z9AvDILfBBBcJvJ/r8u980wAfQ==", "cpu": [ "x64" ], @@ -1129,9 +1146,9 @@ } }, "node_modules/@swc/core-win32-arm64-msvc": { - "version": "1.7.22", - "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.22.tgz", - "integrity": "sha512-p/Fav5U+LtTJD/tbbS0dKK8SVVAhXo5Jdm1TDeBPJ4BEIVguYBZEXgD3CW9wY4K34g1hscpiz2Q2rktfhFj1+A==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-win32-arm64-msvc/-/core-win32-arm64-msvc-1.7.26.tgz", + "integrity": "sha512-9TNXPIJqFynlAOrRD6tUQjMq7KApSklK3R/tXgIxc7Qx+lWu8hlDQ/kVPLpU7PWvMMwC/3hKBW+p5f+Tms1hmA==", "cpu": [ "arm64" ], @@ -1146,9 +1163,9 @@ } }, "node_modules/@swc/core-win32-ia32-msvc": { - "version": "1.7.22", - "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.22.tgz", - "integrity": "sha512-HbmfasaCNTqeCTvDjleYj+jJZQ6MlraiVOdhW55KtbA9mAVQdPBq6DDAvR7VOero3wUNYUM/e36otFKgEJI5Rg==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-win32-ia32-msvc/-/core-win32-ia32-msvc-1.7.26.tgz", + "integrity": "sha512-9YngxNcG3177GYdsTum4V98Re+TlCeJEP4kEwEg9EagT5s3YejYdKwVAkAsJszzkXuyRDdnHUpYbTrPG6FiXrQ==", "cpu": [ "ia32" ], @@ -1163,9 +1180,9 @@ } }, "node_modules/@swc/core-win32-x64-msvc": { - "version": "1.7.22", - "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.22.tgz", - "integrity": "sha512-lppIveE+hpe7WXny/9cUT+T6sBM/ND0E+dviKWJ5jFBISj2KWomlSJGUjYEsRGJVPnTEc8uOlKK7etmXBhQx9A==", + "version": "1.7.26", + "resolved": "https://registry.npmjs.org/@swc/core-win32-x64-msvc/-/core-win32-x64-msvc-1.7.26.tgz", + "integrity": "sha512-VR+hzg9XqucgLjXxA13MtV5O3C0bK0ywtLIBw/+a+O+Oc6mxFWHtdUeXDbIi5AiPbn0fjgVJMqYnyjGyyX8u0w==", "cpu": [ "x64" ], @@ -1218,9 +1235,9 @@ "license": "MIT" }, "node_modules/@types/node": { - "version": "22.5.1", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.1.tgz", - "integrity": "sha512-KkHsxej0j9IW1KKOOAA/XBA0z08UFSrRQHErzEfA3Vgq57eXIMYboIlHJuYIfd+lwCQjtKqUu3UnmKbtUc9yRw==", + "version": "22.5.5", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.5.5.tgz", + "integrity": "sha512-Xjs4y5UPO/CLdzpgR6GirZJx36yScjh73+2NlLlkFRSoQN8B0DpfXPdZGnvVmLRLOsqDpOfTNv7D9trgGhmOIA==", "dev": true, "license": "MIT", "dependencies": { @@ -1246,17 +1263,17 @@ } }, "node_modules/@typescript-eslint/eslint-plugin": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.3.0.tgz", - "integrity": "sha512-FLAIn63G5KH+adZosDYiutqkOkYEx0nvcwNNfJAf+c7Ae/H35qWwTYvPZUKFj5AS+WfHG/WJJfWnDnyNUlp8UA==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-8.6.0.tgz", + "integrity": "sha512-UOaz/wFowmoh2G6Mr9gw60B1mm0MzUtm6Ic8G2yM1Le6gyj5Loi/N+O5mocugRGY+8OeeKmkMmbxNqUCq3B4Sg==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/regexpp": "^4.10.0", - "@typescript-eslint/scope-manager": "8.3.0", - "@typescript-eslint/type-utils": "8.3.0", - "@typescript-eslint/utils": "8.3.0", - "@typescript-eslint/visitor-keys": "8.3.0", + "@typescript-eslint/scope-manager": "8.6.0", + "@typescript-eslint/type-utils": "8.6.0", + "@typescript-eslint/utils": "8.6.0", + "@typescript-eslint/visitor-keys": "8.6.0", "graphemer": "^1.4.0", "ignore": "^5.3.1", "natural-compare": "^1.4.0", @@ -1279,17 +1296,27 @@ } } }, + "node_modules/@typescript-eslint/eslint-plugin/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/@typescript-eslint/parser": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.3.0.tgz", - "integrity": "sha512-h53RhVyLu6AtpUzVCYLPhZGL5jzTD9fZL+SYf/+hYOx2bDkyQXztXSc4tbvKYHzfMXExMLiL9CWqJmVz6+78IQ==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-8.6.0.tgz", + "integrity": "sha512-eQcbCuA2Vmw45iGfcyG4y6rS7BhWfz9MQuk409WD47qMM+bKCGQWXxvoOs1DUp+T7UBMTtRTVT+kXr7Sh4O9Ow==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/scope-manager": "8.3.0", - "@typescript-eslint/types": "8.3.0", - "@typescript-eslint/typescript-estree": "8.3.0", - "@typescript-eslint/visitor-keys": "8.3.0", + "@typescript-eslint/scope-manager": "8.6.0", + "@typescript-eslint/types": "8.6.0", + "@typescript-eslint/typescript-estree": "8.6.0", + "@typescript-eslint/visitor-keys": "8.6.0", "debug": "^4.3.4" }, "engines": { @@ -1309,14 +1336,14 @@ } }, "node_modules/@typescript-eslint/scope-manager": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.3.0.tgz", - "integrity": "sha512-mz2X8WcN2nVu5Hodku+IR8GgCOl4C0G/Z1ruaWN4dgec64kDBabuXyPAr+/RgJtumv8EEkqIzf3X2U5DUKB2eg==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-8.6.0.tgz", + "integrity": "sha512-ZuoutoS5y9UOxKvpc/GkvF4cuEmpokda4wRg64JEia27wX+PysIE9q+lzDtlHHgblwUWwo5/Qn+/WyTUvDwBHw==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.3.0", - "@typescript-eslint/visitor-keys": "8.3.0" + "@typescript-eslint/types": "8.6.0", + "@typescript-eslint/visitor-keys": "8.6.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1327,14 +1354,14 @@ } }, "node_modules/@typescript-eslint/type-utils": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.3.0.tgz", - "integrity": "sha512-wrV6qh//nLbfXZQoj32EXKmwHf4b7L+xXLrP3FZ0GOUU72gSvLjeWUl5J5Ue5IwRxIV1TfF73j/eaBapxx99Lg==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-8.6.0.tgz", + "integrity": "sha512-dtePl4gsuenXVwC7dVNlb4mGDcKjDT/Ropsk4za/ouMBPplCLyznIaR+W65mvCvsyS97dymoBRrioEXI7k0XIg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/typescript-estree": "8.3.0", - "@typescript-eslint/utils": "8.3.0", + "@typescript-eslint/typescript-estree": "8.6.0", + "@typescript-eslint/utils": "8.6.0", "debug": "^4.3.4", "ts-api-utils": "^1.3.0" }, @@ -1352,9 +1379,9 @@ } }, "node_modules/@typescript-eslint/types": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.3.0.tgz", - "integrity": "sha512-y6sSEeK+facMaAyixM36dQ5NVXTnKWunfD1Ft4xraYqxP0lC0POJmIaL/mw72CUMqjY9qfyVfXafMeaUj0noWw==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-8.6.0.tgz", + "integrity": "sha512-rojqFZGd4MQxw33SrOy09qIDS8WEldM8JWtKQLAjf/X5mGSeEFh5ixQlxssMNyPslVIk9yzWqXCsV2eFhYrYUw==", "dev": true, "license": "MIT", "engines": { @@ -1366,14 +1393,14 @@ } }, "node_modules/@typescript-eslint/typescript-estree": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.3.0.tgz", - "integrity": "sha512-Mq7FTHl0R36EmWlCJWojIC1qn/ZWo2YiWYc1XVtasJ7FIgjo0MVv9rZWXEE7IK2CGrtwe1dVOxWwqXUdNgfRCA==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-8.6.0.tgz", + "integrity": "sha512-MOVAzsKJIPIlLK239l5s06YXjNqpKTVhBVDnqUumQJja5+Y94V3+4VUFRA0G60y2jNnTVwRCkhyGQpavfsbq/g==", "dev": true, "license": "BSD-2-Clause", "dependencies": { - "@typescript-eslint/types": "8.3.0", - "@typescript-eslint/visitor-keys": "8.3.0", + "@typescript-eslint/types": "8.6.0", + "@typescript-eslint/visitor-keys": "8.6.0", "debug": "^4.3.4", "fast-glob": "^3.3.2", "is-glob": "^4.0.3", @@ -1395,16 +1422,16 @@ } }, "node_modules/@typescript-eslint/utils": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.3.0.tgz", - "integrity": "sha512-F77WwqxIi/qGkIGOGXNBLV7nykwfjLsdauRB/DOFPdv6LTF3BHHkBpq81/b5iMPSF055oO2BiivDJV4ChvNtXA==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-8.6.0.tgz", + "integrity": "sha512-eNp9cWnYf36NaOVjkEUznf6fEgVy1TWpE0o52e4wtojjBx7D1UV2WAWGzR+8Y5lVFtpMLPwNbC67T83DWSph4A==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.4.0", - "@typescript-eslint/scope-manager": "8.3.0", - "@typescript-eslint/types": "8.3.0", - "@typescript-eslint/typescript-estree": "8.3.0" + "@typescript-eslint/scope-manager": "8.6.0", + "@typescript-eslint/types": "8.6.0", + "@typescript-eslint/typescript-estree": "8.6.0" }, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" @@ -1418,13 +1445,13 @@ } }, "node_modules/@typescript-eslint/visitor-keys": { - "version": "8.3.0", - "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.3.0.tgz", - "integrity": "sha512-RmZwrTbQ9QveF15m/Cl28n0LXD6ea2CjkhH5rQ55ewz3H24w+AMCJHPVYaZ8/0HoG8Z3cLLFFycRXxeO2tz9FA==", + "version": "8.6.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-8.6.0.tgz", + "integrity": "sha512-wapVFfZg9H0qOYh4grNVQiMklJGluQrOUiOhYRrQWhx7BY/+I1IYb8BczWNbbUpO+pqy0rDciv3lQH5E1bCLrg==", "dev": true, "license": "MIT", "dependencies": { - "@typescript-eslint/types": "8.3.0", + "@typescript-eslint/types": "8.6.0", "eslint-visitor-keys": "^3.4.3" }, "engines": { @@ -1443,63 +1470,63 @@ "license": "ISC" }, "node_modules/@vue/compiler-core": { - "version": "3.4.38", - "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.38.tgz", - "integrity": "sha512-8IQOTCWnLFqfHzOGm9+P8OPSEDukgg3Huc92qSG49if/xI2SAwLHQO2qaPQbjCWPBcQoO1WYfXfTACUrWV3c5A==", + "version": "3.5.7", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.5.7.tgz", + "integrity": "sha512-A0gay3lK71MddsSnGlBxRPOugIVdACze9L/rCo5X5srCyjQfZOfYtSFMJc3aOZCM+xN55EQpb4R97rYn/iEbSw==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.24.7", - "@vue/shared": "3.4.38", + "@babel/parser": "^7.25.3", + "@vue/shared": "3.5.7", "entities": "^4.5.0", "estree-walker": "^2.0.2", "source-map-js": "^1.2.0" } }, "node_modules/@vue/compiler-dom": { - "version": "3.4.38", - "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.38.tgz", - "integrity": "sha512-Osc/c7ABsHXTsETLgykcOwIxFktHfGSUDkb05V61rocEfsFDcjDLH/IHJSNJP+/Sv9KeN2Lx1V6McZzlSb9EhQ==", + "version": "3.5.7", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.5.7.tgz", + "integrity": "sha512-GYWl3+gO8/g0ZdYaJ18fYHdI/WVic2VuuUd1NsPp60DWXKy+XjdhFsDW7FbUto8siYYZcosBGn9yVBkjhq1M8Q==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-core": "3.4.38", - "@vue/shared": "3.4.38" + "@vue/compiler-core": "3.5.7", + "@vue/shared": "3.5.7" } }, "node_modules/@vue/compiler-sfc": { - "version": "3.4.38", - "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.38.tgz", - "integrity": "sha512-s5QfZ+9PzPh3T5H4hsQDJtI8x7zdJaew/dCGgqZ2630XdzaZ3AD8xGZfBqpT8oaD/p2eedd+pL8tD5vvt5ZYJQ==", + "version": "3.5.7", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.5.7.tgz", + "integrity": "sha512-EjOJtCWJrC7HqoCEzOwpIYHm+JH7YmkxC1hG6VkqIukYRqj8KFUlTLK6hcT4nGgtVov2+ZfrdrRlcaqS78HnBA==", "dev": true, "license": "MIT", "dependencies": { - "@babel/parser": "^7.24.7", - "@vue/compiler-core": "3.4.38", - "@vue/compiler-dom": "3.4.38", - "@vue/compiler-ssr": "3.4.38", - "@vue/shared": "3.4.38", + "@babel/parser": "^7.25.3", + "@vue/compiler-core": "3.5.7", + "@vue/compiler-dom": "3.5.7", + "@vue/compiler-ssr": "3.5.7", + "@vue/shared": "3.5.7", "estree-walker": "^2.0.2", - "magic-string": "^0.30.10", - "postcss": "^8.4.40", + "magic-string": "^0.30.11", + "postcss": "^8.4.47", "source-map-js": "^1.2.0" } }, "node_modules/@vue/compiler-ssr": { - "version": "3.4.38", - "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.38.tgz", - "integrity": "sha512-YXznKFQ8dxYpAz9zLuVvfcXhc31FSPFDcqr0kyujbOwNhlmaNvL2QfIy+RZeJgSn5Fk54CWoEUeW+NVBAogGaw==", + "version": "3.5.7", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.5.7.tgz", + "integrity": "sha512-oZx+jXP2k5arV/8Ly3TpQbfFyimMw2ANrRqvHJoKjPqtEzazxQGZjCLOfq8TnZ3wy2TOXdqfmVp4q7FyYeHV4g==", "dev": true, "license": "MIT", "dependencies": { - "@vue/compiler-dom": "3.4.38", - "@vue/shared": "3.4.38" + "@vue/compiler-dom": "3.5.7", + "@vue/shared": "3.5.7" } }, "node_modules/@vue/shared": { - "version": "3.4.38", - "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.38.tgz", - "integrity": "sha512-q0xCiLkuWWQLzVrecPb0RMsNWyxICOjPrcrwxTUEHb1fsnvni4dcuyG7RT/Ie7VPTvnjzIaWzRMUBsrqNj/hhw==", + "version": "3.5.7", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.5.7.tgz", + "integrity": "sha512-NBE1PBIvzIedxIc2RZiKXvGbJkrZ2/hLf3h8GlS4/sP9xcXEZMFWOazFkNd6aGeUCMaproe5MHVYB3/4AW9q9g==", "dev": true, "license": "MIT" }, @@ -1553,9 +1580,9 @@ } }, "node_modules/acorn-walk": { - "version": "8.3.3", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.3.tgz", - "integrity": "sha512-MxXdReSRhGO7VlFe1bRG/oI7/mdLV9B9JJT0N8vZOhF7gFRR5l3M8W9G8JxmKV+JC5mGqJ0QvqfSOLsCPa4nUw==", + "version": "8.3.4", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.4.tgz", + "integrity": "sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==", "license": "MIT", "dependencies": { "acorn": "^8.11.0" @@ -2782,17 +2809,17 @@ } }, "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", "dev": true, "license": "MIT", "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -2893,9 +2920,9 @@ } }, "node_modules/eslint-module-utils": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", - "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", + "version": "2.11.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.11.0.tgz", + "integrity": "sha512-gbBE5Hitek/oG6MUVj6sFuzEjA/ClzNflVrLovHi/JgLdC7fiN5gLAY1WIPW1a0V5I999MnsrvVrCOGmmVqDBQ==", "dev": true, "license": "MIT", "dependencies": { @@ -3003,28 +3030,39 @@ "eslint": ">=4.19.1" } }, + "node_modules/eslint-plugin-eslint-comments/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/eslint-plugin-import": { - "version": "2.29.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", - "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.30.0.tgz", + "integrity": "sha512-/mHNE9jINJfiD2EKkg1BKyPyUk4zdnT54YgbOgfjSakWT5oyX/qQLVNTkehyfpcMxZXMy1zyonZ2v7hZTX43Yw==", "dev": true, "license": "MIT", "dependencies": { - "array-includes": "^3.1.7", - "array.prototype.findlastindex": "^1.2.3", + "@rtsao/scc": "^1.1.0", + "array-includes": "^3.1.8", + "array.prototype.findlastindex": "^1.2.5", "array.prototype.flat": "^1.3.2", "array.prototype.flatmap": "^1.3.2", "debug": "^3.2.7", "doctrine": "^2.1.0", "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.8.0", - "hasown": "^2.0.0", - "is-core-module": "^2.13.1", + "eslint-module-utils": "^2.9.0", + "hasown": "^2.0.2", + "is-core-module": "^2.15.1", "is-glob": "^4.0.3", "minimatch": "^3.1.2", - "object.fromentries": "^2.0.7", - "object.groupby": "^1.0.1", - "object.values": "^1.1.7", + "object.fromentries": "^2.0.8", + "object.groupby": "^1.0.3", + "object.values": "^1.2.0", "semver": "^6.3.1", "tsconfig-paths": "^3.15.0" }, @@ -3187,6 +3225,16 @@ "node": ">=4" } }, + "node_modules/eslint-plugin-node/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/eslint-plugin-node/node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -3455,6 +3503,16 @@ "node": ">=8" } }, + "node_modules/eslint/node_modules/ignore": { + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 4" + } + }, "node_modules/eslint/node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -4189,9 +4247,9 @@ } }, "node_modules/husky": { - "version": "9.1.5", - "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.5.tgz", - "integrity": "sha512-rowAVRUBfI0b4+niA4SJMhfQwc107VLkBUgEYYAOQAbqDCnra1nYh83hF/MDmhYs9t9n1E3DuKOrs2LYNC+0Ag==", + "version": "9.1.6", + "resolved": "https://registry.npmjs.org/husky/-/husky-9.1.6.tgz", + "integrity": "sha512-sqbjZKK7kf44hfdE94EoX8MZNk0n7HeW37O4YrVGCF4wzgQjp+akPAkfUK5LZ6KuR/6sqeAVuXHji+RzQgOn5A==", "dev": true, "license": "MIT", "bin": { @@ -4205,9 +4263,9 @@ } }, "node_modules/ignore": { - "version": "5.3.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", - "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-6.0.2.tgz", + "integrity": "sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A==", "license": "MIT", "engines": { "node": ">= 4" @@ -5042,9 +5100,9 @@ "license": "MIT" }, "node_modules/lint-staged": { - "version": "15.2.9", - "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.9.tgz", - "integrity": "sha512-BZAt8Lk3sEnxw7tfxM7jeZlPRuT4M68O0/CwZhhaw6eeWu0Lz5eERE3m386InivXB64fp/mDID452h48tvKlRQ==", + "version": "15.2.10", + "resolved": "https://registry.npmjs.org/lint-staged/-/lint-staged-15.2.10.tgz", + "integrity": "sha512-5dY5t743e1byO19P9I4b3x8HJwalIznL5E1FWYnU6OWw33KxNBSLAc6Cy7F2PsFEO8FKnLwjwm5hx7aMF0jzZg==", "dev": true, "license": "MIT", "dependencies": { @@ -5054,7 +5112,7 @@ "execa": "~8.0.1", "lilconfig": "~3.1.2", "listr2": "~8.2.4", - "micromatch": "~4.0.7", + "micromatch": "~4.0.8", "pidtree": "~0.6.0", "string-argv": "~0.3.2", "yaml": "~2.5.0" @@ -6292,9 +6350,9 @@ } }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", "license": "ISC" }, "node_modules/picomatch": { @@ -6353,9 +6411,9 @@ } }, "node_modules/postcss": { - "version": "8.4.41", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.41.tgz", - "integrity": "sha512-TesUflQ0WKZqAvg52PWL6kHgLKP6xB6heTOdoYM0Wt2UHyxNa4K25EZZMgKns3BH1RLVbZCREPpLY0rhnNoHVQ==", + "version": "8.4.47", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", + "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", "dev": true, "funding": [ { @@ -6374,8 +6432,8 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.0.1", - "source-map-js": "^1.2.0" + "picocolors": "^1.1.0", + "source-map-js": "^1.2.1" }, "engines": { "node": "^10 || ^12 || >=14" @@ -7161,9 +7219,9 @@ } }, "node_modules/source-map-js": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", - "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", "dev": true, "license": "BSD-3-Clause", "engines": { @@ -7839,9 +7897,9 @@ } }, "node_modules/typescript": { - "version": "5.5.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.5.4.tgz", - "integrity": "sha512-Mtq29sKDAEYP7aljRgtPOpTvOfbwRWlS6dPRzwjdE+C0R4brX/GUyhHSecbHMFLNBLcJIPt9nl9yG5TZ1weH+Q==", + "version": "5.6.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.2.tgz", + "integrity": "sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==", "dev": true, "license": "Apache-2.0", "bin": { diff --git a/package.json b/package.json index 5dd849afc..7b57004d6 100644 --- a/package.json +++ b/package.json @@ -209,16 +209,16 @@ "acorn-jsx": "^5.3.2", "acorn-jsx-walk": "^2.0.0", "acorn-loose": "^8.4.0", - "acorn-walk": "^8.3.3", + "acorn-walk": "^8.3.4", "ajv": "^8.17.1", "commander": "^12.1.0", "enhanced-resolve": "^5.17.1", - "ignore": "^5.3.2", + "ignore": "^6.0.2", "interpret": "^3.1.1", "is-installed-globally": "^1.0.0", "json5": "^2.2.3", "memoize": "^10.0.0", - "picocolors": "^1.0.1", + "picocolors": "^1.1.0", "picomatch": "^4.0.2", "prompts": "^2.4.2", "rechoir": "^0.8.0", @@ -232,27 +232,27 @@ "@babel/core": "7.25.2", "@babel/plugin-transform-modules-commonjs": "7.24.8", "@babel/preset-typescript": "7.24.7", - "@swc/core": "1.7.22", - "@types/node": "22.5.1", + "@swc/core": "1.7.26", + "@types/node": "22.5.5", "@types/prompts": "2.4.9", - "@typescript-eslint/eslint-plugin": "8.3.0", - "@typescript-eslint/parser": "8.3.0", - "@vue/compiler-sfc": "3.4.38", + "@typescript-eslint/eslint-plugin": "8.6.0", + "@typescript-eslint/parser": "8.6.0", + "@vue/compiler-sfc": "3.5.7", "c8": "10.1.2", "clean-pkg-json": "1.2.0", "coffeescript": "2.7.0", - "eslint": "^8.57.0", + "eslint": "^8.57.1", "eslint-config-moving-meadow": "4.0.2", "eslint-config-prettier": "9.1.0", "eslint-plugin-budapestian": "6.0.0", "eslint-plugin-eslint-comments": "3.2.0", - "eslint-plugin-import": "2.29.1", + "eslint-plugin-import": "2.30.0", "eslint-plugin-mocha": "10.5.0", "eslint-plugin-node": "11.1.0", "eslint-plugin-security": "3.0.1", "eslint-plugin-unicorn": "^55.0.0", - "husky": "9.1.5", - "lint-staged": "15.2.9", + "husky": "9.1.6", + "lint-staged": "15.2.10", "mocha": "10.7.3", "normalize-newline": "4.1.0", "npm-run-all": "4.1.5", @@ -260,7 +260,7 @@ "proxyquire": "2.1.3", "svelte": "^4.2.19", "symlink-dir": "6.0.2", - "typescript": "5.5.4", + "typescript": "5.6.2", "upem": "9.0.4", "vue-template-compiler": "2.7.16", "yarn": "1.22.22" @@ -309,4 +309,4 @@ "vue-template-compiler": ">=2.0.0 <3.0.0", "@vue/compiler-sfc": ">=3.0.0 <4.0.0" } -} +} \ No newline at end of file diff --git a/src/enrich/summarize/index.mjs b/src/enrich/summarize/index.mjs index 830505e99..7f0a63782 100644 --- a/src/enrich/summarize/index.mjs +++ b/src/enrich/summarize/index.mjs @@ -7,7 +7,7 @@ import { getModulesCruised, getDependenciesCruised, } from "./get-stats.mjs"; -import compare from "#graph-utl/compare.mjs"; +import { compareViolations } from "#graph-utl/compare.mjs"; /** * @@ -31,7 +31,7 @@ export default function summarize( ) { const lViolations = summarizeModules(pModules, pOptions.ruleSet) .concat(summarizeFolders(pFolders || [], pOptions.ruleSet)) - .sort(compare.violations); + .sort(compareViolations); return { violations: lViolations, diff --git a/src/enrich/summarize/summarize-modules.mjs b/src/enrich/summarize/summarize-modules.mjs index 0f2ef18d9..07167b24a 100644 --- a/src/enrich/summarize/summarize-modules.mjs +++ b/src/enrich/summarize/summarize-modules.mjs @@ -1,6 +1,6 @@ import isSameViolation from "./is-same-violation.mjs"; import { findRuleByName } from "#graph-utl/rule-set.mjs"; -import compare from "#graph-utl/compare.mjs"; +import { compareViolations } from "#graph-utl/compare.mjs"; import { uniqWith } from "#utl/array-util.mjs"; function cutNonTransgressions(pModule) { @@ -135,7 +135,7 @@ export default function summarizeModules(pModules, pRuleSet) { return uniqWith( extractDependencyViolations(pModules, pRuleSet) .concat(extractModuleViolations(pModules, pRuleSet)) - .sort(compare.violations), + .sort(compareViolations), isSameViolation, ); } diff --git a/src/extract/acorn/extract.mjs b/src/extract/acorn/extract.mjs index bb5481a8b..1494edb85 100644 --- a/src/extract/acorn/extract.mjs +++ b/src/extract/acorn/extract.mjs @@ -2,7 +2,7 @@ import { join } from "node:path"; import extractES6Deps from "./extract-es6-deps.mjs"; import extractCommonJSDeps from "./extract-cjs-deps.mjs"; import extractAMDDeps from "./extract-amd-deps.mjs"; -import parse from "./parse.mjs"; +import { getASTCached } from "./parse.mjs"; import extractStats from "./extract-stats.mjs"; export function extract( @@ -11,7 +11,7 @@ export function extract( pTranspileOptions, ) { let lDependencies = []; - const lAST = parse.getASTCached(join(baseDir, pFileName), pTranspileOptions); + const lAST = getASTCached(join(baseDir, pFileName), pTranspileOptions); if (moduleSystems.includes("cjs")) { extractCommonJSDeps(lAST, lDependencies, "cjs", exoticRequireStrings); @@ -27,6 +27,6 @@ export function extract( } export function getStats({ baseDir }, pFileName, pTranspileOptions) { - const lAST = parse.getASTCached(join(baseDir, pFileName), pTranspileOptions); + const lAST = getASTCached(join(baseDir, pFileName), pTranspileOptions); return extractStats(lAST); } diff --git a/src/extract/acorn/parse.mjs b/src/extract/acorn/parse.mjs index 9c71592c7..1d7c58dca 100644 --- a/src/extract/acorn/parse.mjs +++ b/src/extract/acorn/parse.mjs @@ -92,9 +92,3 @@ export const getASTCached = memoize(getAST); export function clearCache() { memoizeClear(getASTCached); } - -export default { - getASTFromSource, - getASTCached, - clearCache, -}; diff --git a/src/extract/clear-caches.mjs b/src/extract/clear-caches.mjs index e6a5dbb4f..2d83204f0 100644 --- a/src/extract/clear-caches.mjs +++ b/src/extract/clear-caches.mjs @@ -1,15 +1,15 @@ -import tscParse from "./tsc/parse.mjs"; -import acornParse from "./acorn/parse.mjs"; -import swcParse from "./swc/parse.mjs"; +import { clearCache as tscClearCache } from "./tsc/parse.mjs"; +import { clearCache as acornClearCache } from "./acorn/parse.mjs"; +import { clearCache as swcClearCache } from "./swc/parse.mjs"; import { clearCache as externalModuleHelpers_clearCache } from "./resolve/external-module-helpers.mjs"; import { clearCache as getManifest_clearCache } from "./resolve/get-manifest.mjs"; import { clearCache as resolveAMD_clearCache } from "./resolve/resolve-amd.mjs"; import { clearCache as resolve_clearCache } from "./resolve/resolve.mjs"; export default function clearCaches() { - tscParse.clearCache(); - acornParse.clearCache(); - swcParse.clearCache(); + tscClearCache(); + acornClearCache(); + swcClearCache(); externalModuleHelpers_clearCache(); getManifest_clearCache(); resolveAMD_clearCache(); diff --git a/src/extract/swc/extract.mjs b/src/extract/swc/extract.mjs index 646341ea7..5c2aa277e 100644 --- a/src/extract/swc/extract.mjs +++ b/src/extract/swc/extract.mjs @@ -1,12 +1,10 @@ import { join } from "node:path/posix"; import { isTypeScriptCompatible } from "../helpers.mjs"; import extractSwcDeps from "./extract-swc-deps.mjs"; -import parse from "./parse.mjs"; +import { getASTCached, isAvailable } from "./parse.mjs"; export function shouldUse({ parser }, pFileName) { - return ( - parser === "swc" && parse.isAvailable() && isTypeScriptCompatible(pFileName) - ); + return parser === "swc" && isAvailable() && isTypeScriptCompatible(pFileName); } export function extract( @@ -14,7 +12,7 @@ export function extract( pFileName, ) { return extractSwcDeps( - parse.getASTCached(join(baseDir, pFileName)), + getASTCached(join(baseDir, pFileName)), exoticRequireStrings, ).filter(({ moduleSystem }) => moduleSystems.includes(moduleSystem)); } diff --git a/src/extract/swc/parse.mjs b/src/extract/swc/parse.mjs index 8c68cb07d..51cfae699 100644 --- a/src/extract/swc/parse.mjs +++ b/src/extract/swc/parse.mjs @@ -26,31 +26,23 @@ function getAST(pFileName) { return swc.parseFileSync(pFileName, SWC_PARSE_OPTIONS); } +/** + * Compiles the file identified by pFileName into an (swc) + * AST and returns it. Subsequent calls for the same file name will + * return the result from a cache + * + * @param {string} pFileName - the name of the file to compile + * @return {import('@swc/core').ModuleItem[]} - an (swc) AST + */ export const getASTCached = memoize(getAST); export function clearCache() { memoizeClear(getASTCached); } -export default { - getASTFromSource, - - /** - * @return {boolean} - true if the swc compiler is available, - * false in all other cases - */ - // @ts-expect-error dfdfd - isAvailable: () => swc !== false, - - /** - * Compiles the file identified by pFileName into an (swc) - * AST and returns it. Subsequent calls for the same file name will - * return the result from a cache - * - * @param {string} pFileName - the name of the file to compile - * @return {import('@swc/core').ModuleItem[]} - an (swc) AST - */ - getASTCached, - - clearCache, -}; +/** + * @return {boolean} - true if the swc compiler is available, + * false in all other cases + */ +// @ts-expect-error dfdfd +export const isAvailable = () => swc !== false; diff --git a/src/extract/tsc/extract.mjs b/src/extract/tsc/extract.mjs index 02430bf3d..00adaec3d 100644 --- a/src/extract/tsc/extract.mjs +++ b/src/extract/tsc/extract.mjs @@ -1,13 +1,13 @@ import { join } from "node:path"; import { isTypeScriptCompatible } from "../helpers.mjs"; import extractTypeScriptDeps from "./extract-typescript-deps.mjs"; -import parse from "./parse.mjs"; +import { getASTCached, isAvailable } from "./parse.mjs"; import extractStats from "./extract-stats.mjs"; export function shouldUse({ tsPreCompilationDeps, parser }, pFileName) { return ( (tsPreCompilationDeps || parser === "tsc") && - parse.isAvailable() && + isAvailable() && isTypeScriptCompatible(pFileName) ); } @@ -18,12 +18,12 @@ export function extract( pTranspileOptions, ) { return extractTypeScriptDeps( - parse.getASTCached(join(baseDir, pFileName), pTranspileOptions), + getASTCached(join(baseDir, pFileName), pTranspileOptions), exoticRequireStrings, ).filter(({ moduleSystem }) => moduleSystems.includes(moduleSystem)); } export function getStats({ baseDir }, pFileName, pTranspileOptions) { - const lAST = parse.getASTCached(join(baseDir, pFileName), pTranspileOptions); + const lAST = getASTCached(join(baseDir, pFileName), pTranspileOptions); return extractStats(lAST); } diff --git a/src/extract/tsc/parse.mjs b/src/extract/tsc/parse.mjs index 1a031f52f..74e2ca1c4 100644 --- a/src/extract/tsc/parse.mjs +++ b/src/extract/tsc/parse.mjs @@ -53,30 +53,22 @@ function getAST(pFileName, pTranspileOptions) { ); } +/** + * Compiles the file identified by pFileName into a (typescript) + * AST and returns it. Subsequent calls for the same file name will + * return the result from a cache + * + * @param {string} pFileName - the name of the file to compile + * @return {object} - a (typescript) AST + */ export const getASTCached = memoize(getAST); +/** + * @return {boolean} - true if the typescript compiler is available, + * false in all other cases + */ +export const isAvailable = () => typescript !== false; + export function clearCache() { memoizeClear(getASTCached); } - -export default { - getASTFromSource, - - /** - * @return {boolean} - true if the typescript compiler is available, - * false in all other cases - */ - isAvailable: () => typescript !== false, - - /** - * Compiles the file identified by pFileName into a (typescript) - * AST and returns it. Subsequent calls for the same file name will - * return the result from a cache - * - * @param {string} pFileName - the name of the file to compile - * @return {object} - a (typescript) AST - */ - getASTCached, - - clearCache, -}; diff --git a/src/graph-utl/compare.mjs b/src/graph-utl/compare.mjs index 5ae1051b3..cb0b59b22 100644 --- a/src/graph-utl/compare.mjs +++ b/src/graph-utl/compare.mjs @@ -10,35 +10,35 @@ function severity2number(pSeverity) { return lSeverity2Number.get(pSeverity) || -1; } -export function severities(pFirstSeverity, pSecondSeverity) { +export function compareSeverities(pFirstSeverity, pSecondSeverity) { return Math.sign( - severity2number(pFirstSeverity) - severity2number(pSecondSeverity) + severity2number(pFirstSeverity) - severity2number(pSecondSeverity), ); } -export function violations(pFirstViolation, pSecondViolation) { +export function compareViolations(pFirstViolation, pSecondViolation) { return ( - severities(pFirstViolation.rule.severity, pSecondViolation.rule.severity) || + compareSeverities( + pFirstViolation.rule.severity, + pSecondViolation.rule.severity, + ) || pFirstViolation.rule.name.localeCompare(pSecondViolation.rule.name) || pFirstViolation.from.localeCompare(pSecondViolation.from) || pFirstViolation.to.localeCompare(pSecondViolation.to) ); } -export function rules(pLeftRule, pRightRule) { +export function compareRules(pLeftRule, pRightRule) { return ( - severities(pLeftRule.severity, pRightRule.severity) || + compareSeverities(pLeftRule.severity, pRightRule.severity) || pLeftRule.name.localeCompare(pRightRule.name) ); } -export function modules(pLeftModule, pRightModule) { +export function compareModules(pLeftModule, pRightModule) { return pLeftModule.source > pRightModule.source ? 1 : -1; } export default { - modules, - rules, - severities, - violations, + violations: compareViolations, }; diff --git a/src/graph-utl/consolidate-module-dependencies.mjs b/src/graph-utl/consolidate-module-dependencies.mjs index 41b516972..aecc98c6c 100644 --- a/src/graph-utl/consolidate-module-dependencies.mjs +++ b/src/graph-utl/consolidate-module-dependencies.mjs @@ -1,4 +1,4 @@ -import compare from "./compare.mjs"; +import { compareRules } from "./compare.mjs"; import { uniq } from "#utl/array-util.mjs"; function mergeDependency(pLeftDependency, pRightDependency) { @@ -10,7 +10,7 @@ function mergeDependency(pLeftDependency, pRightDependency) { ), rules: pLeftDependency.rules .concat(pRightDependency?.rules ?? []) - .sort(compare.rules), + .sort(compareRules), valid: pLeftDependency.valid && pRightDependency.valid, }; } diff --git a/src/graph-utl/consolidate-modules.mjs b/src/graph-utl/consolidate-modules.mjs index 3b0a6d980..b90c7b4e3 100644 --- a/src/graph-utl/consolidate-modules.mjs +++ b/src/graph-utl/consolidate-modules.mjs @@ -1,4 +1,4 @@ -import compare from "./compare.mjs"; +import { compareRules } from "./compare.mjs"; import { uniqBy } from "#utl/array-util.mjs"; function mergeModule(pLeftModule, pRightModule) { @@ -11,7 +11,7 @@ function mergeModule(pLeftModule, pRightModule) { ), rules: pLeftModule.rules .concat(pRightModule?.rules ?? []) - .sort(compare.rules), + .sort(compareRules), valid: pLeftModule.valid && pRightModule.valid, consolidated: Boolean(pLeftModule.consolidated) || Boolean(pRightModule.consolidated), diff --git a/src/main/report-wrap.mjs b/src/main/report-wrap.mjs index 14cb5f92b..752e9981d 100644 --- a/src/main/report-wrap.mjs +++ b/src/main/report-wrap.mjs @@ -2,7 +2,7 @@ import report from "#report/index.mjs"; import summarize from "#enrich/summarize/index.mjs"; import { applyFilters } from "#graph-utl/filter-bank.mjs"; import consolidateToPattern from "#graph-utl/consolidate-to-pattern.mjs"; -import compare from "#graph-utl/compare.mjs"; +import { compareModules } from "#graph-utl/compare.mjs"; import stripSelfTransitions from "#graph-utl/strip-self-transitions.mjs"; /** @@ -16,7 +16,7 @@ function reSummarizeResults(pResult, pFormatOptions) { if (Object.hasOwn(pFormatOptions, "collapse")) { lModules = consolidateToPattern(lModules, pFormatOptions.collapse) - .sort(compare.modules) + .sort(compareModules) .map(stripSelfTransitions); } return { diff --git a/src/report/dot/prepare-custom-level.mjs b/src/report/dot/prepare-custom-level.mjs index 43ae4d557..32906ada3 100644 --- a/src/report/dot/prepare-custom-level.mjs +++ b/src/report/dot/prepare-custom-level.mjs @@ -1,6 +1,6 @@ import moduleUtl from "./module-utl.mjs"; import consolidateToPattern from "#graph-utl/consolidate-to-pattern.mjs"; -import compare from "#graph-utl/compare.mjs"; +import { compareModules } from "#graph-utl/compare.mjs"; import stripSelfTransitions from "#graph-utl/strip-self-transitions.mjs"; export default function prepareCustomLevel( @@ -14,7 +14,7 @@ export default function prepareCustomLevel( ? consolidateToPattern(pResults.modules, pCollapsePattern) : pResults.modules ) - .sort(compare.modules) + .sort(compareModules) .map(moduleUtl.folderify(pShowMetrics)) .map(moduleUtl.extractFirstTransgression) .map(stripSelfTransitions) diff --git a/src/report/dot/prepare-flat-level.mjs b/src/report/dot/prepare-flat-level.mjs index c477e86c7..fcf0e700f 100644 --- a/src/report/dot/prepare-flat-level.mjs +++ b/src/report/dot/prepare-flat-level.mjs @@ -1,9 +1,9 @@ import moduleUtl from "./module-utl.mjs"; -import compare from "#graph-utl/compare.mjs"; +import { compareModules } from "#graph-utl/compare.mjs"; export default function prepareFlatLevel(pResults, pTheme, _, pShowMetrics) { return pResults.modules - .sort(compare.modules) + .sort(compareModules) .map(moduleUtl.flatLabel(pShowMetrics)) .map(moduleUtl.extractFirstTransgression) .map(moduleUtl.applyTheme(pTheme)) diff --git a/src/report/dot/prepare-folder-level.mjs b/src/report/dot/prepare-folder-level.mjs index 20d9fcb03..f92776375 100644 --- a/src/report/dot/prepare-folder-level.mjs +++ b/src/report/dot/prepare-folder-level.mjs @@ -1,11 +1,11 @@ import moduleUtl from "./module-utl.mjs"; import consolidateToFolder from "#graph-utl/consolidate-to-folder.mjs"; -import compare from "#graph-utl/compare.mjs"; +import { compareModules } from "#graph-utl/compare.mjs"; import stripSelfTransitions from "#graph-utl/strip-self-transitions.mjs"; export default function prepareFolderLevel(pResults, pTheme, _, pShowMetrics) { return consolidateToFolder(pResults.modules) - .sort(compare.modules) + .sort(compareModules) .map(moduleUtl.extractFirstTransgression) .map(moduleUtl.folderify(pShowMetrics)) .map(stripSelfTransitions) diff --git a/src/report/error-html/utl.mjs b/src/report/error-html/utl.mjs index 554d43bbb..6adca6229 100644 --- a/src/report/error-html/utl.mjs +++ b/src/report/error-html/utl.mjs @@ -1,7 +1,7 @@ import { formatViolation, formatPercentage } from "../utl/index.mjs"; import meta from "#meta.cjs"; -function getFormattedAllowedRule(pRuleSetUsed) { +export function getFormattedAllowedRule(pRuleSetUsed) { const lAllowed = pRuleSetUsed?.allowed ?? []; const lCommentedRule = lAllowed.find((pRule) => Object.hasOwn(pRule, "comment"), @@ -17,7 +17,7 @@ function getFormattedAllowedRule(pRuleSetUsed) { : []; } -function mergeCountsIntoRule(pRule, pViolationCounts) { +export function mergeCountsIntoRule(pRule, pViolationCounts) { const lCounts = pViolationCounts[pRule.name] ? pViolationCounts[pRule.name] : { count: 0, ignoredCount: 0 }; @@ -138,12 +138,3 @@ export function aggregateViolations(pViolations, pRuleSetUsed) { pFirst.name.localeCompare(pSecond.name), ); } - -export default { - aggregateViolations, - getFormattedAllowedRule, - mergeCountsIntoRule, - formatSummaryForReport, - determineFromExtras, - determineTo, -}; diff --git a/src/report/markdown.mjs b/src/report/markdown.mjs index baeb906a8..36cb1205f 100644 --- a/src/report/markdown.mjs +++ b/src/report/markdown.mjs @@ -1,8 +1,10 @@ -import errorHtmlUtl from "./error-html/utl.mjs"; +import { + aggregateViolations, + determineTo, + determineFromExtras, +} from "./error-html/utl.mjs"; import meta from "#meta.cjs"; -const { aggregateViolations, determineTo, determineFromExtras } = errorHtmlUtl; - const REPORT_DEFAULTS = { showTitle: true, title: "## Forbidden dependency check - results", diff --git a/test/extract/normalize-source.utl.mjs b/test/extract/normalize-source.utl.mjs index 21b377dce..3414f1a68 100644 --- a/test/extract/normalize-source.utl.mjs +++ b/test/extract/normalize-source.utl.mjs @@ -1,7 +1,7 @@ -import prettier from "prettier"; +import { format } from "prettier"; import normalizeNewline from "normalize-newline"; export default async function normalizeSource(pSource) { - const lData = await prettier.format(pSource, { parser: "babel" }); + const lData = await format(pSource, { parser: "babel" }); return normalizeNewline(lData); } diff --git a/test/graph-utl/compare.rules.spec.mjs b/test/graph-utl/compare.rules.spec.mjs index 637167a7b..9c59a6d8e 100644 --- a/test/graph-utl/compare.rules.spec.mjs +++ b/test/graph-utl/compare.rules.spec.mjs @@ -1,10 +1,10 @@ import { equal } from "node:assert/strict"; -import { rules } from "#graph-utl/compare.mjs"; +import { compareRules } from "#graph-utl/compare.mjs"; describe("[U] graph-utl/compare - rules", () => { it("samesies yield 0", () => { equal( - rules( + compareRules( { severity: "error", name: "thing" }, { severity: "error", name: "thing" }, ), @@ -14,7 +14,7 @@ describe("[U] graph-utl/compare - rules", () => { it("unknown severity > error", () => { equal( - rules( + compareRules( { severity: "not defined", name: "thing" }, { severity: "error", name: "thing" }, ), @@ -24,7 +24,7 @@ describe("[U] graph-utl/compare - rules", () => { it("same name, different severity sorts on severity", () => { equal( - rules( + compareRules( { severity: "info", name: "thing" }, { severity: "warn", name: "thing" }, ), @@ -34,7 +34,7 @@ describe("[U] graph-utl/compare - rules", () => { it("differnt name, different severity sorts on severity", () => { equal( - rules( + compareRules( { severity: "info", name: "aaa" }, { severity: "warn", name: "zzz" }, ), @@ -44,7 +44,7 @@ describe("[U] graph-utl/compare - rules", () => { it("same severity, different name sorts on name", () => { equal( - rules( + compareRules( { severity: "info", name: "thing" }, { severity: "info", name: "thang" }, ), diff --git a/test/graph-utl/compare.severities.spec.mjs b/test/graph-utl/compare.severities.spec.mjs index df80e2cf8..a3bd93f8a 100644 --- a/test/graph-utl/compare.severities.spec.mjs +++ b/test/graph-utl/compare.severities.spec.mjs @@ -1,28 +1,28 @@ import { equal } from "node:assert/strict"; -import { severities } from "#graph-utl/compare.mjs"; +import { compareSeverities } from "#graph-utl/compare.mjs"; describe("[U] graph-utl/compare - severities", () => { it("returns 0 for identical severities", () => { - equal(severities("warn", "warn"), 0); + equal(compareSeverities("warn", "warn"), 0); }); it("returns 0 for identical severities - even unknown ones", () => { - equal(severities("unknown", "unknown"), 0); + equal(compareSeverities("unknown", "unknown"), 0); }); it("returns -1 when comparing an unknown severity with a known one", () => { - equal(severities("unknown", "error"), -1); + equal(compareSeverities("unknown", "error"), -1); }); it("returns 1 when comparing a known severity with an unknown one", () => { - equal(severities("info", "unknown"), 1); + equal(compareSeverities("info", "unknown"), 1); }); it("returns 1 when comparing a less severe severity with a more severe one", () => { - equal(severities("info", "error"), 1); + equal(compareSeverities("info", "error"), 1); }); it("returns -1 when comparing a more severe severity with a less severe one", () => { - equal(severities("error", "info"), -1); + equal(compareSeverities("error", "info"), -1); }); }); diff --git a/test/graph-utl/compare.violations.spec.mjs b/test/graph-utl/compare.violations.spec.mjs index b735cf75d..cb37a07c6 100644 --- a/test/graph-utl/compare.violations.spec.mjs +++ b/test/graph-utl/compare.violations.spec.mjs @@ -1,5 +1,5 @@ import { equal } from "node:assert/strict"; -import { violations } from "#graph-utl/compare.mjs"; +import { compareViolations } from "#graph-utl/compare.mjs"; describe("[U] graph-utl/compare - violations", () => { const lViolation = { @@ -48,26 +48,26 @@ describe("[U] graph-utl/compare - violations", () => { }; it("returns 0 for identical violations", () => { - equal(violations(lViolation, lViolation), 0); + equal(compareViolations(lViolation, lViolation), 0); }); it("returns -1 when severity > the one compared against", () => { - equal(violations(lViolation, lLessSevereViolation), -1); + equal(compareViolations(lViolation, lLessSevereViolation), -1); }); it("returns 1 when severity < the one compared against", () => { - equal(violations(lLessSevereViolation, lViolation), 1); + equal(compareViolations(lLessSevereViolation, lViolation), 1); }); it("returns -1 when rule name < the one compared against", () => { - equal(violations(lViolation, lLaterNameViolation), -1); + equal(compareViolations(lViolation, lLaterNameViolation), -1); }); it("returns -1 when rule 'from' < the one compared against", () => { - equal(violations(lViolation, lLaterFromViolation), -1); + equal(compareViolations(lViolation, lLaterFromViolation), -1); }); it("returns -1 when rule 'to' < the one compared against", () => { - equal(violations(lViolation, lLaterToViolation), -1); + equal(compareViolations(lViolation, lLaterToViolation), -1); }); }); diff --git a/test/report/error-html/utl.spec.mjs b/test/report/error-html/utl.spec.mjs index a43be2d06..6ad422a23 100644 --- a/test/report/error-html/utl.spec.mjs +++ b/test/report/error-html/utl.spec.mjs @@ -1,5 +1,11 @@ import { deepEqual, equal } from "node:assert/strict"; -import utl from "#report/error-html/utl.mjs"; +import { + getFormattedAllowedRule, + mergeCountsIntoRule, + formatSummaryForReport, + determineTo, + determineFromExtras, +} from "#report/error-html/utl.mjs"; function summaryHasMinimalAttributes(pResult) { equal(pResult.hasOwnProperty("depcruiseVersion"), true); @@ -9,16 +15,16 @@ function summaryHasMinimalAttributes(pResult) { describe("[U] report/error-html/utl", () => { it("getFormattedAllowedRule - no allowed rule available returns empty array", () => { - deepEqual(utl.getFormattedAllowedRule({}), []); + deepEqual(getFormattedAllowedRule({}), []); }); it("getFormattedAllowedRule - empty allowed array returns empty array", () => { - deepEqual(utl.getFormattedAllowedRule({ allowed: [] }), []); + deepEqual(getFormattedAllowedRule({ allowed: [] }), []); }); it("getFormattedAllowedRule - one rule with no comment, no severity returns default comment & severity", () => { deepEqual( - utl.getFormattedAllowedRule({ + getFormattedAllowedRule({ allowed: [{ from: {}, to: {} }], }), { @@ -31,7 +37,7 @@ describe("[U] report/error-html/utl", () => { it("getFormattedAllowedRule - a rule with a comment, no severity returns that comment & default severity", () => { deepEqual( - utl.getFormattedAllowedRule({ + getFormattedAllowedRule({ allowed: [ { from: { @@ -62,7 +68,7 @@ describe("[U] report/error-html/utl", () => { it("getFormattedAllowedRule - a rule with a severity, no comment returns a default comment & that severity", () => { deepEqual( - utl.getFormattedAllowedRule({ + getFormattedAllowedRule({ allowed: [ { from: { @@ -84,7 +90,7 @@ describe("[U] report/error-html/utl", () => { }); it("mergeCountIntoRule - no violation", () => { - deepEqual(utl.mergeCountsIntoRule({ name: "blah" }, {}), { + deepEqual(mergeCountsIntoRule({ name: "blah" }, {}), { name: "blah", count: 0, ignoredCount: 0, @@ -94,7 +100,7 @@ describe("[U] report/error-html/utl", () => { it("mergeCountIntoRule - some violations", () => { deepEqual( - utl.mergeCountsIntoRule( + mergeCountsIntoRule( { name: "blah" }, { blah: { count: 69, ignoredCount: 0 } }, ), @@ -108,14 +114,14 @@ describe("[U] report/error-html/utl", () => { }); it("formatSummaryForReport - empty", () => { - const lResult = utl.formatSummaryForReport({}); + const lResult = formatSummaryForReport({}); summaryHasMinimalAttributes(lResult); deepEqual(lResult.violations, []); }); it("formatSummaryForReport - one module violation", () => { - const lResult = utl.formatSummaryForReport({ + const lResult = formatSummaryForReport({ violations: [ { type: "dependency", @@ -137,7 +143,7 @@ describe("[U] report/error-html/utl", () => { }); it("formatSummaryForReport - one dependency violation", () => { - const lResult = utl.formatSummaryForReport({ + const lResult = formatSummaryForReport({ violations: [ { type: "module", @@ -174,7 +180,7 @@ describe("[U] report/error-html/utl", () => { const lExpectation = "thing/a →
b →
thingy/bingy/c →
a"; - deepEqual(utl.determineTo(lInputViolation), lExpectation); + deepEqual(determineTo(lInputViolation), lExpectation); }); it("determineTo - via violation", () => { @@ -193,7 +199,7 @@ describe("[U] report/error-html/utl", () => { const lExpectation = "thing/a
thing/a →
b →
thingy/bingy/c →
a"; - deepEqual(utl.determineTo(lInputViolation), lExpectation); + deepEqual(determineTo(lInputViolation), lExpectation); }); it("determineTo - dependency violation", () => { @@ -205,7 +211,7 @@ describe("[U] report/error-html/utl", () => { const lExpectation = "thing/a"; - deepEqual(utl.determineTo(lInputViolation), lExpectation); + deepEqual(determineTo(lInputViolation), lExpectation); }); it("determineTo - module violation", () => { @@ -217,7 +223,7 @@ describe("[U] report/error-html/utl", () => { const lExpectation = ""; - deepEqual(utl.determineTo(lInputViolation), lExpectation); + deepEqual(determineTo(lInputViolation), lExpectation); }); it("determineTo - instability violation", () => { @@ -230,7 +236,7 @@ describe("[U] report/error-html/utl", () => { const lExpectation = 'b (I: 100%)'; - deepEqual(utl.determineTo(lInputViolation), lExpectation); + deepEqual(determineTo(lInputViolation), lExpectation); }); it("determineFromExtras - instability violation", () => { @@ -243,6 +249,6 @@ describe("[U] report/error-html/utl", () => { const lExpectation = ' (I: 10%)'; - deepEqual(utl.determineFromExtras(lInputViolation), lExpectation); + deepEqual(determineFromExtras(lInputViolation), lExpectation); }); }); diff --git a/tools/generate-meta.utl.mjs b/tools/generate-meta.utl.mjs index 85dd16427..4f8822e07 100644 --- a/tools/generate-meta.utl.mjs +++ b/tools/generate-meta.utl.mjs @@ -1,5 +1,5 @@ /* eslint-disable no-console */ -import prettier from "prettier"; +import { format } from "prettier"; function getStream(pStream) { return new Promise((pResolve, pReject) => { @@ -30,4 +30,4 @@ const lGeneratedSource = `/* generated - don't edit */ supportedTranspilers: ${JSON.stringify($package.supportedTranspilers)} }`; -console.log(await prettier.format(lGeneratedSource, { parser: "babel" })); +console.log(await format(lGeneratedSource, { parser: "babel" })); diff --git a/tools/generate-schemas.utl.mjs b/tools/generate-schemas.utl.mjs index efd740621..dd70cc6ae 100644 --- a/tools/generate-schemas.utl.mjs +++ b/tools/generate-schemas.utl.mjs @@ -1,7 +1,7 @@ /* eslint-disable security/detect-object-injection */ import { writeFileSync } from "node:fs"; import { extname } from "node:path"; -import prettier from "prettier"; +import { format } from "prettier"; import babel from "@babel/core"; function stripAttribute(pObject, pAttribute) { @@ -20,7 +20,7 @@ function stripAttribute(pObject, pAttribute) { function emitConsolidatedSchema(pOutputFileName) { if (extname(pOutputFileName) === ".json") { return async (pJSONSchemaObject) => { - const lFormattedJSON = await prettier.format( + const lFormattedJSON = await format( JSON.stringify(pJSONSchemaObject.default), { parser: "json", @@ -34,7 +34,7 @@ function emitConsolidatedSchema(pOutputFileName) { stripAttribute(pJSONSchemaObject.default, "description"), )}`; // to strip quoted attributes {"thing": 481} => {thing: 481} - const lFormatted = await prettier.format(lUnMinified, { parser: "babel" }); + const lFormatted = await format(lUnMinified, { parser: "babel" }); const lMinified = babel.transformSync(lFormatted, { minified: true }).code; writeFileSync(pOutputFileName, lMinified, "utf8"); }; diff --git a/tools/regenerate-main-fixtures.utl.mjs b/tools/regenerate-main-fixtures.utl.mjs index de6276348..15701ab62 100644 --- a/tools/regenerate-main-fixtures.utl.mjs +++ b/tools/regenerate-main-fixtures.utl.mjs @@ -1,7 +1,7 @@ import { fileURLToPath } from "node:url"; import { writeFileSync } from "node:fs"; import { join } from "node:path"; -import prettier from "prettier"; +import { format } from "prettier"; import main from "../src/main/index.mjs"; const __dirname = fileURLToPath(new URL(".", import.meta.url)); @@ -14,7 +14,7 @@ async function barfTheJSON( pResult, pTargetDirectory = MAIN_MOCKS_DIR, ) { - const lFormatted = await prettier.format(JSON.stringify(pResult.output), { + const lFormatted = await format(JSON.stringify(pResult.output), { parser: "json", }); writeFileSync(join(pTargetDirectory, pTargetFileName), lFormatted, {