From a7e3a2c0d881470cd7700681dc7b380211a85262 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Marie=20De=20Mey?= Date: Thu, 7 Nov 2024 13:45:19 +0200 Subject: [PATCH] -> biome --- CHANGELOG.md | 4 + biome.json | 42 +++++++++ eslint.config.cjs | 29 ------ package-lock.json | 181 ++++++++++++++++++++++++++++++-------- package.json | 6 +- src/diamond.ts | 36 ++++---- src/seclude.ts | 70 +++++++-------- src/utils.ts | 31 ++++--- test/abcd.test.ts | 10 +-- test/construction.test.ts | 32 +++---- test/dynamic.test.ts | 4 +- test/edge-cases.test.ts | 8 +- test/inheritance.test.ts | 2 +- test/instanceOf.test.ts | 4 +- test/seclude.test.ts | 20 ++--- 15 files changed, 303 insertions(+), 176 deletions(-) create mode 100644 biome.json delete mode 100644 eslint.config.cjs diff --git a/CHANGELOG.md b/CHANGELOG.md index e5bec6a..f92165a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # 1.0.10 +## Change + +- linter from prettier+eslint to biome + ## Bug-fix - `KeySet` now rooted on `Object.create(null)` instead of `{}` so that `'constructor' in secludedProperties` is false diff --git a/biome.json b/biome.json new file mode 100644 index 0000000..bf236ce --- /dev/null +++ b/biome.json @@ -0,0 +1,42 @@ +{ + "$schema": "https://biomejs.dev/schemas/1.9.4/schema.json", + "files": { + "include": ["src/**/*.ts", "test/**/*.ts"] + }, + "javascript": { + "formatter": { + "lineWidth": 100, + "quoteStyle": "single", + "semicolons": "asNeeded", + "trailingCommas": "es5", + "indentStyle": "tab" + } + }, + "linter": { + "rules": { + "style": { + "noNonNullAssertion": "off", + "useSingleVarDeclarator": { + "level": "warn", + "fix": "safe" + }, + "useTemplate": { + "level": "warn", + "fix": "safe" + } + }, + "suspicious": { + "noExplicitAny": "off", + "noDebugger": "error", + "noConsole": "error" + }, + "performance": { + "noAccumulatingSpread": "off" + }, + "complexity": {}, + "security": {}, + "correctness": {}, + "nursery": {} + } + } +} diff --git a/eslint.config.cjs b/eslint.config.cjs deleted file mode 100644 index 88d71a9..0000000 --- a/eslint.config.cjs +++ /dev/null @@ -1,29 +0,0 @@ -const tsEsLint = require('typescript-eslint') - -module.exports = [ - { - files: ['src/**/*.ts'], - plugins: { - '@typescript-eslint': tsEsLint.plugin - }, - languageOptions: { - parser: tsEsLint.parser, - parserOptions: { - projectService: true, - tsconfigRootDir: __dirname - } - }, - rules: { - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-empty-interface': 'off', - '@typescript-eslint/ban-types': 'off', - '@typescript-eslint/no-empty-function': 'off', - '@typescript-eslint/no-namespace': 'off', - 'lit-a11y/click-events-have-key-events': 'off', - 'no-debugger': 'error', - 'no-console': 'error', - indent: 'off', - semi: ['error', 'never'] - } - } -] diff --git a/package-lock.json b/package-lock.json index 6ebffb0..abd32d1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -15,7 +15,6 @@ "@types/jest": "^29.5.12", "@typescript-eslint/eslint-plugin": "^8.12.2", "@typescript-eslint/parser": "^8.12.2", - "eslint": "^9.13.0", "jest": "^29.7.0", "rollup": "^4.18.0", "rollup-plugin-dts": "^6.1.0", @@ -737,6 +736,7 @@ "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", "dev": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "@eslint/object-schema": "^2.1.4", "debug": "^4.3.1", @@ -752,6 +752,7 @@ "integrity": "sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==", "dev": true, "license": "Apache-2.0", + "peer": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } @@ -762,6 +763,7 @@ "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -785,7 +787,8 @@ "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", "dev": true, - "license": "Python-2.0" + "license": "Python-2.0", + "peer": true }, "node_modules/@eslint/eslintrc/node_modules/globals": { "version": "14.0.0", @@ -793,6 +796,7 @@ "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=18" }, @@ -806,6 +810,7 @@ "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "argparse": "^2.0.1" }, @@ -819,6 +824,7 @@ "integrity": "sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } @@ -829,6 +835,7 @@ "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", "dev": true, "license": "Apache-2.0", + "peer": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" } @@ -839,6 +846,7 @@ "integrity": "sha512-CXtq5nR4Su+2I47WPOlWud98Y5Lv8Kyxp2ukhgFx/eW6Blm18VXJO5WuQylPugRo8nbluoi6GvvxBLqHcvqUUw==", "dev": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "levn": "^0.4.1" }, @@ -852,6 +860,7 @@ "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", "dev": true, "license": "Apache-2.0", + "peer": true, "engines": { "node": ">=18.18.0" } @@ -862,6 +871,7 @@ "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", "dev": true, "license": "Apache-2.0", + "peer": true, "dependencies": { "@humanfs/core": "^0.19.1", "@humanwhocodes/retry": "^0.3.0" @@ -876,6 +886,7 @@ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", "dev": true, "license": "Apache-2.0", + "peer": true, "engines": { "node": ">=12.22" }, @@ -890,6 +901,7 @@ "integrity": "sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==", "dev": true, "license": "Apache-2.0", + "peer": true, "engines": { "node": ">=18.18" }, @@ -1823,7 +1835,8 @@ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/@types/node": { "version": "22.8.5", @@ -2114,6 +2127,7 @@ "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", "dev": true, "license": "MIT", + "peer": true, "bin": { "acorn": "bin/acorn" }, @@ -2127,6 +2141,7 @@ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, "license": "MIT", + "peer": true, "peerDependencies": { "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0" } @@ -2137,6 +2152,7 @@ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -2671,7 +2687,8 @@ "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, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/deepmerge": { "version": "4.3.1", @@ -2782,6 +2799,7 @@ "integrity": "sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.11.0", @@ -2843,6 +2861,7 @@ "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "dev": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -2860,6 +2879,7 @@ "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", "dev": true, "license": "Apache-2.0", + "peer": true, "engines": { "node": "^18.18.0 || ^20.9.0 || >=21.1.0" }, @@ -2873,6 +2893,7 @@ "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=10" }, @@ -2886,6 +2907,7 @@ "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -2903,6 +2925,7 @@ "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "p-locate": "^5.0.0" }, @@ -2919,6 +2942,7 @@ "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "p-limit": "^3.0.2" }, @@ -2935,6 +2959,7 @@ "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", @@ -2967,6 +2992,7 @@ "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "license": "BSD-3-Clause", + "peer": true, "dependencies": { "estraverse": "^5.1.0" }, @@ -2980,6 +3006,7 @@ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "estraverse": "^5.2.0" }, @@ -2993,6 +3020,7 @@ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", "dev": true, "license": "BSD-2-Clause", + "peer": true, "engines": { "node": ">=4.0" } @@ -3010,6 +3038,7 @@ "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", "dev": true, "license": "BSD-2-Clause", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -3069,7 +3098,8 @@ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/fast-glob": { "version": "3.3.2", @@ -3113,7 +3143,8 @@ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/fastq": { "version": "1.17.1", @@ -3141,6 +3172,7 @@ "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "flat-cache": "^4.0.0" }, @@ -3248,6 +3280,7 @@ "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "flatted": "^3.2.9", "keyv": "^4.5.4" @@ -3261,7 +3294,8 @@ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", "dev": true, - "license": "ISC" + "license": "ISC", + "peer": true }, "node_modules/fs-extra": { "version": "10.1.0", @@ -3381,6 +3415,7 @@ "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, "license": "ISC", + "peer": true, "dependencies": { "is-glob": "^4.0.3" }, @@ -3468,6 +3503,7 @@ "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -3485,6 +3521,7 @@ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=4" } @@ -4389,7 +4426,8 @@ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz", "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/json-parse-even-better-errors": { "version": "2.3.1", @@ -4403,14 +4441,16 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/json-stable-stringify-without-jsonify": { "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, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/json5": { "version": "2.2.3", @@ -4444,6 +4484,7 @@ "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "json-buffer": "3.0.1" } @@ -4474,6 +4515,7 @@ "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -4514,7 +4556,8 @@ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/lru-cache": { "version": "5.1.1", @@ -4719,6 +4762,7 @@ "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -4792,6 +4836,7 @@ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "callsites": "^3.0.0" }, @@ -4904,6 +4949,7 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">= 0.8.0" } @@ -4956,6 +5002,7 @@ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=6" } @@ -5426,7 +5473,8 @@ "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", "dev": true, - "license": "MIT" + "license": "MIT", + "peer": true }, "node_modules/tmpl": { "version": "1.0.5", @@ -5536,6 +5584,7 @@ "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "prelude-ls": "^1.2.1" }, @@ -5658,6 +5707,7 @@ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, "license": "BSD-2-Clause", + "peer": true, "dependencies": { "punycode": "^2.1.0" } @@ -5709,6 +5759,7 @@ "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=0.10.0" } @@ -6248,6 +6299,7 @@ "resolved": "https://registry.npmjs.org/@eslint/config-array/-/config-array-0.18.0.tgz", "integrity": "sha512-fTxvnS1sRMu3+JjXwJG0j/i4RT9u4qJ+lqS/yCGap4lH4zZGzQ7tu+xZqQmcMZq5OBZDL4QRxQzRjkWcGt8IVw==", "dev": true, + "peer": true, "requires": { "@eslint/object-schema": "^2.1.4", "debug": "^4.3.1", @@ -6258,13 +6310,15 @@ "version": "0.7.0", "resolved": "https://registry.npmjs.org/@eslint/core/-/core-0.7.0.tgz", "integrity": "sha512-xp5Jirz5DyPYlPiKat8jaq0EmYvDXKKpzTbxXMpT9eqlRJkRKIz9AGMdlvYjih+im+QlhWrpvVjl8IPC/lHlUw==", - "dev": true + "dev": true, + "peer": true }, "@eslint/eslintrc": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-3.1.0.tgz", "integrity": "sha512-4Bfj15dVJdoy3RfZmmo86RK1Fwzn6SstsvK9JS+BaVKqC6QQQQyXekNaC+g+LKNgkQ+2VhGAzm6hO40AhMR3zQ==", "dev": true, + "peer": true, "requires": { "ajv": "^6.12.4", "debug": "^4.3.2", @@ -6281,19 +6335,22 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true + "dev": true, + "peer": true }, "globals": { "version": "14.0.0", "resolved": "https://registry.npmjs.org/globals/-/globals-14.0.0.tgz", "integrity": "sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==", - "dev": true + "dev": true, + "peer": true }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", "dev": true, + "peer": true, "requires": { "argparse": "^2.0.1" } @@ -6304,19 +6361,22 @@ "version": "9.13.0", "resolved": "https://registry.npmjs.org/@eslint/js/-/js-9.13.0.tgz", "integrity": "sha512-IFLyoY4d72Z5y/6o/BazFBezupzI/taV8sGumxTAVw3lXG9A6md1Dc34T9s1FoD/an9pJH8RHbAxsaEbBed9lA==", - "dev": true + "dev": true, + "peer": true }, "@eslint/object-schema": { "version": "2.1.4", "resolved": "https://registry.npmjs.org/@eslint/object-schema/-/object-schema-2.1.4.tgz", "integrity": "sha512-BsWiH1yFGjXXS2yvrf5LyuoSIIbPrGUWob917o+BTKuZ7qJdxX8aJLRxs1fS9n6r7vESrq1OUqb68dANcFXuQQ==", - "dev": true + "dev": true, + "peer": true }, "@eslint/plugin-kit": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/@eslint/plugin-kit/-/plugin-kit-0.2.2.tgz", "integrity": "sha512-CXtq5nR4Su+2I47WPOlWud98Y5Lv8Kyxp2ukhgFx/eW6Blm18VXJO5WuQylPugRo8nbluoi6GvvxBLqHcvqUUw==", "dev": true, + "peer": true, "requires": { "levn": "^0.4.1" } @@ -6325,13 +6385,15 @@ "version": "0.19.1", "resolved": "https://registry.npmjs.org/@humanfs/core/-/core-0.19.1.tgz", "integrity": "sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==", - "dev": true + "dev": true, + "peer": true }, "@humanfs/node": { "version": "0.16.6", "resolved": "https://registry.npmjs.org/@humanfs/node/-/node-0.16.6.tgz", "integrity": "sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==", "dev": true, + "peer": true, "requires": { "@humanfs/core": "^0.19.1", "@humanwhocodes/retry": "^0.3.0" @@ -6341,13 +6403,15 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz", "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==", - "dev": true + "dev": true, + "peer": true }, "@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 + "dev": true, + "peer": true }, "@istanbuljs/load-nyc-config": { "version": "1.1.0", @@ -6976,7 +7040,8 @@ "version": "7.0.15", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz", "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", - "dev": true + "dev": true, + "peer": true }, "@types/node": { "version": "22.8.5", @@ -7148,13 +7213,15 @@ "version": "8.14.0", "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.14.0.tgz", "integrity": "sha512-cl669nCJTZBsL97OF4kUQm5g5hC2uihk0NxY3WENAC0TYdILVkAyHymAntgxGkl7K+t0cXIrH5siy5S4XkFycA==", - "dev": true + "dev": true, + "peer": true }, "acorn-jsx": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", "dev": true, + "peer": true, "requires": {} }, "ajv": { @@ -7162,6 +7229,7 @@ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, + "peer": true, "requires": { "fast-deep-equal": "^3.1.1", "fast-json-stable-stringify": "^2.0.0", @@ -7515,7 +7583,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, + "peer": true }, "deepmerge": { "version": "4.3.1", @@ -7588,6 +7657,7 @@ "resolved": "https://registry.npmjs.org/eslint/-/eslint-9.13.0.tgz", "integrity": "sha512-EYZK6SX6zjFHST/HRytOdA/zE72Cq/bfw45LSyuwrdvcclb/gqV8RRQxywOBEWO2+WDpva6UZa4CcDeJKzUCFA==", "dev": true, + "peer": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.11.0", @@ -7630,13 +7700,15 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true + "dev": true, + "peer": true }, "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, + "peer": true, "requires": { "locate-path": "^6.0.0", "path-exists": "^4.0.0" @@ -7647,6 +7719,7 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", "dev": true, + "peer": true, "requires": { "p-locate": "^5.0.0" } @@ -7656,6 +7729,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, + "peer": true, "requires": { "p-limit": "^3.0.2" } @@ -7667,6 +7741,7 @@ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", "dev": true, + "peer": true, "requires": { "esrecurse": "^4.3.0", "estraverse": "^5.2.0" @@ -7676,13 +7751,15 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-4.2.0.tgz", "integrity": "sha512-UyLnSehNt62FFhSwjZlHmeokpRK59rcz29j+F1/aDgbkbRTk7wIc9XzdoasMUbRNKDM0qQt/+BJ4BrpFeABemw==", - "dev": true + "dev": true, + "peer": true }, "espree": { "version": "10.3.0", "resolved": "https://registry.npmjs.org/espree/-/espree-10.3.0.tgz", "integrity": "sha512-0QYC8b24HWY8zjRnDTL6RiHfDbAWn63qb4LMj1Z4b076A4une81+z03Kg7l7mn/48PUTqoLptSXez8oknU8Clg==", "dev": true, + "peer": true, "requires": { "acorn": "^8.14.0", "acorn-jsx": "^5.3.2", @@ -7700,6 +7777,7 @@ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, + "peer": true, "requires": { "estraverse": "^5.1.0" } @@ -7709,6 +7787,7 @@ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", "dev": true, + "peer": true, "requires": { "estraverse": "^5.2.0" } @@ -7717,7 +7796,8 @@ "version": "5.3.0", "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz", "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==", - "dev": true + "dev": true, + "peer": true }, "estree-walker": { "version": "2.0.2", @@ -7729,7 +7809,8 @@ "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true + "dev": true, + "peer": true }, "execa": { "version": "5.1.1", @@ -7771,7 +7852,8 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true + "dev": true, + "peer": true }, "fast-glob": { "version": "3.3.2", @@ -7807,7 +7889,8 @@ "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, + "peer": true }, "fastq": { "version": "1.17.1", @@ -7832,6 +7915,7 @@ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-8.0.0.tgz", "integrity": "sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==", "dev": true, + "peer": true, "requires": { "flat-cache": "^4.0.0" } @@ -7911,6 +7995,7 @@ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-4.0.1.tgz", "integrity": "sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==", "dev": true, + "peer": true, "requires": { "flatted": "^3.2.9", "keyv": "^4.5.4" @@ -7920,7 +8005,8 @@ "version": "3.3.1", "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.3.1.tgz", "integrity": "sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==", - "dev": true + "dev": true, + "peer": true }, "fs-extra": { "version": "10.1.0", @@ -7995,6 +8081,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz", "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==", "dev": true, + "peer": true, "requires": { "is-glob": "^4.0.3" } @@ -8055,6 +8142,7 @@ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, + "peer": true, "requires": { "parent-module": "^1.0.0", "resolve-from": "^4.0.0" @@ -8064,7 +8152,8 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", - "dev": true + "dev": true, + "peer": true } } }, @@ -8706,7 +8795,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, + "peer": true }, "json-parse-even-better-errors": { "version": "2.3.1", @@ -8718,13 +8808,15 @@ "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true + "dev": true, + "peer": true }, "json-stable-stringify-without-jsonify": { "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, + "peer": true }, "json5": { "version": "2.2.3", @@ -8747,6 +8839,7 @@ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz", "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==", "dev": true, + "peer": true, "requires": { "json-buffer": "3.0.1" } @@ -8768,6 +8861,7 @@ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz", "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==", "dev": true, + "peer": true, "requires": { "prelude-ls": "^1.2.1", "type-check": "~0.4.0" @@ -8798,7 +8892,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, + "peer": true }, "lru-cache": { "version": "5.1.1", @@ -8949,6 +9044,7 @@ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.4.tgz", "integrity": "sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==", "dev": true, + "peer": true, "requires": { "deep-is": "^0.1.3", "fast-levenshtein": "^2.0.6", @@ -8998,6 +9094,7 @@ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", "dev": true, + "peer": true, "requires": { "callsites": "^3.0.0" } @@ -9069,7 +9166,8 @@ "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", - "dev": true + "dev": true, + "peer": true }, "pretty-format": { "version": "29.7.0", @@ -9104,7 +9202,8 @@ "version": "2.3.1", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz", "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==", - "dev": true + "dev": true, + "peer": true }, "pure-rand": { "version": "6.1.0", @@ -9394,7 +9493,8 @@ "version": "0.2.0", "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==", - "dev": true + "dev": true, + "peer": true }, "tmpl": { "version": "1.0.5", @@ -9454,6 +9554,7 @@ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz", "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==", "dev": true, + "peer": true, "requires": { "prelude-ls": "^1.2.1" } @@ -9514,6 +9615,7 @@ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", "dev": true, + "peer": true, "requires": { "punycode": "^2.1.0" } @@ -9551,7 +9653,8 @@ "version": "1.2.5", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.5.tgz", "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", - "dev": true + "dev": true, + "peer": true }, "wrap-ansi": { "version": "7.0.0", diff --git a/package.json b/package.json index 8c964ae..577cbba 100644 --- a/package.json +++ b/package.json @@ -3,6 +3,7 @@ "version": "1.0.10", "types": "./lib/index.d.ts", "exports": { + "./biome": "./biome.json", ".": { "import": "./lib/esm.js", "require": "./lib/cjs.js", @@ -26,9 +27,9 @@ "scripts": { "test": "jest", "test:coverage": "jest --coverage", - "lint": "eslint src/**/*.ts", "build": "rollup -c", - "prepack": "npm run lint && npm run test && npm run build" + "biome": "biome check --write", + "prepack": "npm run biome && npm run test && npm run build" }, "repository": { "type": "git", @@ -43,7 +44,6 @@ "@types/jest": "^29.5.12", "@typescript-eslint/eslint-plugin": "^8.12.2", "@typescript-eslint/parser": "^8.12.2", - "eslint": "^9.13.0", "jest": "^29.7.0", "rollup": "^4.18.0", "rollup-plugin-dts": "^6.1.0", diff --git a/src/diamond.ts b/src/diamond.ts index 72403e0..4822134 100644 --- a/src/diamond.ts +++ b/src/diamond.ts @@ -1,15 +1,15 @@ -import { Ctor, HasBases, Newable } from './types' +import type { Ctor, HasBases, Newable } from './types' import { + LateSuperError, allFLegs, bottomLeg, emptySecludedProxyHandler, fLegs, hasInstanceManager, hasInstanceManagers, - LateSuperError, linearLeg, manageHasInstance, - nextInFLeg + nextInFLeg, } from './utils' type BuildingStrategy = { @@ -47,12 +47,12 @@ const diamondHandler: { value: v, writable: true, enumerable: true, - configurable: true + configurable: true, }) - else if (pd && pd.set) pd.set.call(receiver, v) + else if (pd?.set) pd.set.call(receiver, v) else return false return true - } + }, } /** @@ -66,8 +66,8 @@ export default function Diamond( const bases: Ctor[] = [] for (const base of baseClasses) { let fLeg = [base, ...(fLegs(base) || [])] - let iBases = 0, - iFLeg: number + let iBases = 0 + let iFLeg: number do { iFLeg = -1 for (iBases = 0; iBases < bases.length; iBases++) { @@ -90,20 +90,20 @@ export default function Diamond( lastDiamondProperties = null const { responsibility, bdRestore } = !buildingDiamond ? { - responsibility: myResponsibility + responsibility: myResponsibility, } : buildingDiamond.strategy[0].target === Diamond ? { - responsibility: buildingDiamond.strategy.shift()!.subs + responsibility: buildingDiamond.strategy.shift()!.subs, } : { bdRestore: buildingDiamond, - responsibility: myResponsibility + responsibility: myResponsibility, } if (!buildingDiamond || bdRestore) buildingDiamond = { built: this, - strategy: [...buildingStrategy] + strategy: [...buildingStrategy], } // It will be set to `null` on purpose in the process and needs to be restored const locallyStoredDiamond = buildingDiamond! try { @@ -140,12 +140,13 @@ This happens if a diamond creates another instance of the same diamond in the co lastDiamondProperties = Object.getOwnPropertyDescriptors(locallyStoredDiamond.built) // Value used by `this` on `super(...)` return // @ts-expect-error `Symbol.toStringTag` + // biome-ignore lint/correctness/noConstructorReturn: This is the whole purpose of this library return locallyStoredDiamond.built } static [Symbol.hasInstance] = hasInstanceManager(Diamond) get [Symbol.toStringTag]() { - return 'Diamond<' + bases.map((base) => base.name).join(',') + '>' + return `Diamond<${bases.map((base) => base.name).join(',')}>` } } hasInstanceManagers.add(Diamond) @@ -158,8 +159,13 @@ This happens if a diamond creates another instance of the same diamond in the co let nextResponsibility = myResponsibility for (const base of bases) { nextResponsibility.unshift(base) - if (fLegs(base)) - buildingStrategy.push({ target: bottomLeg(base), subs: (nextResponsibility = []) }) + if (fLegs(base)) { + nextResponsibility = [] + buildingStrategy.push({ + target: bottomLeg(base), + subs: nextResponsibility, + }) + } } Object.setPrototypeOf(Diamond.prototype, new Proxy(Diamond, diamondHandler)) diff --git a/src/seclude.ts b/src/seclude.ts index b9af7e1..ca009cb 100644 --- a/src/seclude.ts +++ b/src/seclude.ts @@ -1,12 +1,12 @@ import Diamond, { lastDiamondProperties } from './diamond' -import { Ctor, KeySet, Newable } from './types' +import type { Ctor, KeySet, Newable } from './types' import { allFLegs, bottomLeg, fLegs, nextInLine, secludedPropertyDescriptor, - secludedProxyHandler + secludedProxyHandler, } from './utils' const publicPart = (x: T): T => Object.getPrototypeOf(Object.getPrototypeOf(x)) @@ -24,22 +24,21 @@ type SecludedClass)[ > export type Secluded< TBase extends Ctor, - Keys extends (keyof InstanceType)[] -> = SecludedClass & { - (obj: InstanceType>): InstanceType | undefined -} + Keys extends (keyof InstanceType)[], +> = SecludedClass & + ((obj: InstanceType>) => InstanceType | undefined) export function Seclude)[]>( base: TBase, //@ts-expect-error Cannot convert `never[]` to `Keys` properties: Keys = [] ): Secluded { const secludedProperties: KeySet = properties.reduce( - (acc, p) => ({ ...acc, [p]: true }) as KeySet, - Object.create(null) - ), - initPropertiesBasket: BasketBall[] = [] - const privates = new WeakMap(), - diamondSecluded = !fLegs(base) + (acc, p) => ({ ...acc, [p]: true }) as KeySet, + Object.create(null) + ) + const initPropertiesBasket: BasketBall[] = [] + const privates = new WeakMap() + const diamondSecluded = !fLegs(base) /** * In order to integrate well in diamonds, we need to be a diamond * When we create a diamond between the Secluded and the base, the private properties of the base *have to* @@ -49,8 +48,8 @@ export function Seclude ?? - protoProxy = new Proxy(this, secludedProxyHandler(base, secludedProperties)) + protoProxy = new Proxy( + this, + //@ts-expect-error ProxyHandler ?? + secludedProxyHandler(base, secludedProperties) + ) let secluded: InstanceType /* Here, what happens: `init.initialObject` is the instance of the secluded class who contains all its public properties @@ -92,7 +94,7 @@ export function Seclude diamond.prototype + getPrototypeOf: (target) => diamond.prototype, }) Object.setPrototypeOf(GateKeeper.prototype, fakeCtor.prototype) return GateKeeperProxy as any diff --git a/src/utils.ts b/src/utils.ts index 14455a0..5349067 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -1,4 +1,4 @@ -import { Ctor, KeySet } from './types' +import type { Ctor, KeySet } from './types' export class LateSuperError extends Error { constructor(message: string) { @@ -24,9 +24,9 @@ export function* linearLeg(base: Ctor): IterableIterator { /** * Gets the bottom (uni-)legacy of a class just before Object (like Diamond) */ -export function bottomLeg(ctor: Ctor) { +export function bottomLeg(base: Ctor) { let last: Ctor = Object - for (; ctor !== Object; ctor = Object.getPrototypeOf(ctor.prototype).constructor) { + for (let ctor = base; ctor !== Object; ctor = Object.getPrototypeOf(ctor.prototype).constructor) { if (allFLegs.has(ctor)) return ctor last = ctor } @@ -38,9 +38,10 @@ export function bottomLeg(ctor: Ctor) { */ export function nextInLine(ctor: Ctor, name: PropertyKey) { let rv: PropertyDescriptor | undefined - for (const uniLeg of linearLeg(ctor)) - if ((rv = Object.getOwnPropertyDescriptor(uniLeg.prototype, name))) - return rv === secludedPropertyDescriptor ? undefined : rv + for (const uniLeg of linearLeg(ctor)) { + rv = Object.getOwnPropertyDescriptor(uniLeg.prototype, name) + if (rv) return rv === secludedPropertyDescriptor ? undefined : rv + } } /** @@ -53,7 +54,7 @@ export function fLegs(ctor: Ctor) { // Communication unique constant for `seclude` to communicate with `diamond` export const secludedPropertyDescriptor: PropertyDescriptor = { value: undefined, - configurable: true + configurable: true, } /** @@ -106,13 +107,13 @@ export function secludedProxyHandler( value, writable: true, enumerable: true, - configurable: true + configurable: true, }) return true } return Reflect.set(target, p, value, target) }, - getPrototypeOf: (target) => target + getPrototypeOf: (target) => target, } as ProxyHandler } export const emptySecludedProxyHandler = secludedProxyHandler(null, Object.create(null)) @@ -121,9 +122,9 @@ export function hasInstanceManager( cls: Class, original?: (obj: any) => boolean ) { - function nativeLinear(ctor: Ctor) { + function nativeLinear(base: Ctor) { // linearLeg ignore last diamond (that we need) - for (; ctor !== Object; ctor = Object.getPrototypeOf(ctor.prototype).constructor) + for (let ctor = base; ctor !== Object; ctor = Object.getPrototypeOf(ctor.prototype).constructor) if (ctor === cls) return true return false } @@ -134,7 +135,7 @@ export function hasInstanceManager( if (!obj || typeof obj !== 'object') return false if (inheritsFrom(obj.constructor)) return true const fLeg = fLegs(obj.constructor) - if (fLeg && fLeg.some(inheritsFrom)) return true + if (fLeg?.some(inheritsFrom)) return true const protoObj = Object.getPrototypeOf(obj) return obj.constructor.prototype !== protoObj && protoObj instanceof cls } @@ -146,9 +147,11 @@ export function manageHasInstance(ctor: Ctor) { Object.defineProperty(ctor, Symbol.hasInstance, { value: hasInstanceManager( ctor, - ctor.hasOwnProperty(Symbol.hasInstance) ? ctor[Symbol.hasInstance] : undefined + Object.getOwnPropertySymbols(ctor).includes(Symbol.hasInstance) + ? ctor[Symbol.hasInstance] + : undefined ), - configurable: true + configurable: true, }) return true } diff --git a/test/abcd.test.ts b/test/abcd.test.ts index 135d9c7..88e0bdc 100644 --- a/test/abcd.test.ts +++ b/test/abcd.test.ts @@ -20,7 +20,7 @@ abstract class A { } abstract class B extends Diamond(A) { constructor(arg: string) { - super(arg + 'B') + super(`${arg}B`) this.log('construct B') } absFunc(x: number): number { @@ -34,7 +34,7 @@ abstract class B extends Diamond(A) { } abstract class C extends Diamond(A) { constructor(arg: string) { - super(arg + 'C') + super(`${arg}C`) this.log('construct C') } fieldC = true @@ -46,7 +46,7 @@ abstract class C extends Diamond(A) { //@ts-expect-error Here, if D extends diamond(B, C), then it's not considered abstract - cf README.md#abstraction class D extends Diamond(C, B) { constructor(arg: string) { - super(arg + 'D') + super(`${arg}D`) this.log('construct D') } fieldD = true @@ -67,7 +67,7 @@ test('call orders', () => { '[class=A] construct A', '[class=D] construct B', '[class=D] construct C', - '[class=D] construct D' + '[class=D] construct D', ]) expect([obj.fieldA, obj.fieldB, obj.fieldC, obj.fieldD]).toEqual([true, true, true, true]) expect(obj.func(0)).toBe(6) @@ -76,6 +76,6 @@ test('call orders', () => { '[class=D] func D', '[class=D] func C', '[class=D] func B', - '[class=D] func A' + '[class=D] func A', ]) }) diff --git a/test/construction.test.ts b/test/construction.test.ts index 7fae7a3..df71a6e 100644 --- a/test/construction.test.ts +++ b/test/construction.test.ts @@ -26,14 +26,14 @@ test('construction', () => { class Y extends Diamond(X) { constructor(aValue: string) { - super(aValue + ' and Y') + super(`${aValue} and Y`) log('Y:', aValue) } } let constructedObjectFromA: any = null class A extends Diamond() { constructor(aValue: string) { - super(aValue + ' and A') + super(`${aValue} and A`) constructedObjectFromA = this log('A:', aValue) } @@ -41,14 +41,14 @@ test('construction', () => { class B extends Diamond(End2, A) { constructor(aValue: string) { - super(aValue + ' and B') + super(`${aValue} and B`) log('B:', aValue) new Y('B...') } } class C extends Diamond(B, End1, A) { constructor(aValue: string) { - super(aValue + ' and C') + super(`${aValue} and C`) log('C:', aValue) } } @@ -62,7 +62,7 @@ test('construction', () => { 'B: X and C', 'X: B... and Y', 'Y: B...', - 'C: X' + 'C: X', ]) expect(c).toBe(constructedObjectFromA) }) @@ -93,17 +93,17 @@ test('sub-diamond', () => { } const a = new A() const distinct: any = { - a: a, - //aX1: a.x1, - //aX2: a.x2, - aY1X1: a.y1.x1, - aY1X2: a.y1.x2, - aY2X1: a.y2.x1, - aY2X2: a.y2.x2 - }, - distinctMap = new Map() - for (let k in distinct) { - expect(distinctMap.has(distinct[k]) && k + '=' + distinctMap.get(distinct[k])).toBe(false) + a: a, + //aX1: a.x1, + //aX2: a.x2, + aY1X1: a.y1.x1, + aY1X2: a.y1.x2, + aY2X1: a.y2.x1, + aY2X2: a.y2.x2, + } + const distinctMap = new Map() + for (const k in distinct) { + expect(distinctMap.has(distinct[k]) && `${k}=${distinctMap.get(distinct[k])}`).toBe(false) distinctMap.set(distinct[k], k) } }) diff --git a/test/dynamic.test.ts b/test/dynamic.test.ts index 6710476..00b8b39 100644 --- a/test/dynamic.test.ts +++ b/test/dynamic.test.ts @@ -28,9 +28,7 @@ test('dynamic diamond', () => { // const d = new D() expect(d.method(0)).toBe(10) - A.prototype.method = function (x) { - return x + 5 - } + A.prototype.method = (x) => x + 5 expect(d.method(0)).toBe(14) B.prototype.method = function (this: B, x) { return x + 42 diff --git a/test/edge-cases.test.ts b/test/edge-cases.test.ts index 8f49bef..2da5168 100644 --- a/test/edge-cases.test.ts +++ b/test/edge-cases.test.ts @@ -2,11 +2,11 @@ import Diamond, { Seclude } from '../src' test('toStringTags', () => { class X {} - const S = Seclude(X), - s = new S() + const S = Seclude(X) + const s = new S() expect(s.toString()).toBe('[object Secluded]') - const D = Diamond(X), - d = new D() + const D = Diamond(X) + const d = new D() expect(d.toString()).toBe('[object Diamond]') }) diff --git a/test/inheritance.test.ts b/test/inheritance.test.ts index c9a7adb..4f8f7e5 100644 --- a/test/inheritance.test.ts +++ b/test/inheritance.test.ts @@ -82,7 +82,7 @@ test('constructors', () => { 'parent constructor', 'mum constructor', 'dad constructor', - 'child constructor' + 'child constructor', ]) }) test('methods', () => { diff --git a/test/instanceOf.test.ts b/test/instanceOf.test.ts index 55ca530..769f891 100644 --- a/test/instanceOf.test.ts +++ b/test/instanceOf.test.ts @@ -11,8 +11,8 @@ class D2 extends D1 {} class X1 extends D(A2, B2) {} class X2 extends D(C2, D2) {} -const x1 = new X1(), - x2 = new X2() +const x1 = new X1() +const x2 = new X2() test('instanceof', () => { expect(x1 instanceof X1).toBe(true) diff --git a/test/seclude.test.ts b/test/seclude.test.ts index 4a76a60..213245d 100644 --- a/test/seclude.test.ts +++ b/test/seclude.test.ts @@ -32,7 +32,7 @@ class X { return this.pubFld } methodA() { - return 'Xa' + this.methodB() + return `Xa${this.methodB()}` } methodB() { return 'Xb' @@ -46,7 +46,7 @@ class X { } const P = Seclude(X, ['prvFld', 'methodB']) -function testScenario(t: Scenario, P: { (t: any): any }) { +function testScenario(t: Scenario, P: (t: any) => any) { expect(t.pubFld).toBe(0) expect(t.accFld).toBe(8) expect(t.prvFld).toBe(10) @@ -79,18 +79,18 @@ test('leg-less', () => { prvFld = 10 //@ts-ignore https://github.com/microsoft/TypeScript/issues/27689 methodA() { - return 'y' + super.methodA() + return `y${super.methodA()}` } } - let t = testScenario(new Y(), P) + const t = testScenario(new Y(), P) expect(t instanceof X).toBe(true) expect(builtX! instanceof X).toBe(true) expect(builtX).toBe(P(t)) // This is no code to run but to type-check function tsTest() { - let p = new P() + const p = new P() p.pubFld++ //@ts-expect-error P.prvFld++ @@ -104,13 +104,13 @@ test('leg-half', () => { class D extends Diamond(P, Y) { //@ts-ignore https://github.com/microsoft/TypeScript/issues/27689 methodA() { - return 'y' + super.methodA() + return `y${super.methodA()}` } } class E extends Diamond(Y, P) { //@ts-ignore https://github.com/microsoft/TypeScript/issues/27689 methodA() { - return 'y' + super.methodA() + return `y${super.methodA()}` } } @@ -143,7 +143,7 @@ test('leg-full', () => { return this.pubFld } methodA() { - return 'Xa' + this.methodB() + return `Xa${this.methodB()}` } methodB() { return 'Xb' @@ -162,13 +162,13 @@ test('leg-full', () => { class D extends Diamond(P, Y) { //@ts-ignore https://github.com/microsoft/TypeScript/issues/27689 methodA() { - return 'y' + super.methodA() + return `y${super.methodA()}` } } class E extends Diamond(Y, P) { //@ts-ignore https://github.com/microsoft/TypeScript/issues/27689 methodA() { - return 'y' + super.methodA() + return `y${super.methodA()}` } }