From ea72ed8f2a2347cd6a2de058cb6f92c4a23327de Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 25 Aug 2023 13:45:22 -0700 Subject: [PATCH 01/40] Add config --- .eslintrc.json | 23 +- package-lock.json | 1156 ++++++++++++++++++++++++++++++++++++++++++++- package.json | 1 + 3 files changed, 1173 insertions(+), 7 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 5f3d49fde9631..cb77eabd28cab 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -16,7 +16,7 @@ "plugin:@typescript-eslint/stylistic" ], "plugins": [ - "@typescript-eslint", "no-null", "eslint-plugin-local", "simple-import-sort" + "@typescript-eslint", "no-null", "eslint-plugin-local", "simple-import-sort", "unicorn" ], "ignorePatterns": [ "**/node_modules/**", @@ -123,6 +123,27 @@ "local/no-keywords": "error", "local/jsdoc-format": "error", + // eslint-plugin-unicorn + "unicorn/prefer-includes": "error", + "unicorn/new-for-builtins": "error", + "unicorn/prefer-logical-operator-over-ternary": "error", + "unicorn/no-instanceof-array": "error", + "unicorn/prefer-optional-catch-binding": "error", + "unicorn/require-array-join-separator": "error", + "unicorn/throw-new-error": "error", + "unicorn/no-useless-spread": "error", + "unicorn/no-useless-fallback-in-spread": "error", + "unicorn/prefer-modern-math-apis": "error", + "unicorn/prefer-array-find": "error", + "unicorn/prefer-array-some": "error", + // TODO(jakebailey): Require manual fixups + // "unicorn/prefer-date-now": "error", + // "unicorn/prefer-object-from-entries": "error", + // "unicorn/no-new-buffer": "error", + // "unicorn/prefer-string-slice": "error", + // "unicorn/prefer-string-trim-start-end": "error", // check perf vs helper + // "unicorn/prefer-set-has": "error", // fix the ones that are okay + // eslint-plugin-no-null "no-null/no-null": "error", diff --git a/package-lock.json b/package-lock.json index 8ac9d6ef09e27..7dd1fd60f9196 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,6 +40,7 @@ "eslint-plugin-local": "^1.0.0", "eslint-plugin-no-null": "^1.0.2", "eslint-plugin-simple-import-sort": "^10.0.0", + "eslint-plugin-unicorn": "^48.0.1", "fast-xml-parser": "^4.0.11", "glob": "^8.1.0", "hereby": "^1.6.4", @@ -67,6 +68,184 @@ "node": ">=0.10.0" } }, + "node_modules/@babel/code-frame": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz", + "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.22.10", + "chalk": "^2.4.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/code-frame/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/code-frame/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/code-frame/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/code-frame/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/code-frame/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", + "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz", + "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.5", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", @@ -942,6 +1121,12 @@ "integrity": "sha512-Gi5wRGPbbyOTX+4Y2iULQ27oUPrefaB0PxGQJnfyWN3kvEDGM3mIB5M/gQLmitZf7A9FmLeaqxD3L1CXpm3VKQ==", "dev": true }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", + "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", + "dev": true + }, "node_modules/@types/semver": { "version": "7.5.0", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", @@ -1333,6 +1518,18 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, + "node_modules/builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/c8": { "version": "7.14.0", "resolved": "https://registry.npmjs.org/c8/-/c8-7.14.0.tgz", @@ -1463,6 +1660,42 @@ "fsevents": "~2.3.2" } }, + "node_modules/ci-info": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, + "node_modules/clean-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", + "integrity": "sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/clean-regexp/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -1738,6 +1971,15 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, "node_modules/esbuild": { "version": "0.19.2", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.2.tgz", @@ -1893,6 +2135,38 @@ "eslint": ">=5.0.0" } }, + "node_modules/eslint-plugin-unicorn": { + "version": "48.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-48.0.1.tgz", + "integrity": "sha512-FW+4r20myG/DqFcCSzoumaddKBicIPeFnTrifon2mWIzlfyvzwyqZjqVP7m4Cqr/ZYisS2aiLghkUWaPg6vtCw==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.22.5", + "@eslint-community/eslint-utils": "^4.4.0", + "ci-info": "^3.8.0", + "clean-regexp": "^1.0.0", + "esquery": "^1.5.0", + "indent-string": "^4.0.0", + "is-builtin-module": "^3.2.1", + "jsesc": "^3.0.2", + "lodash": "^4.17.21", + "pluralize": "^8.0.0", + "read-pkg-up": "^7.0.1", + "regexp-tree": "^0.1.27", + "regjsparser": "^0.10.0", + "semver": "^7.5.4", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=16" + }, + "funding": { + "url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1" + }, + "peerDependencies": { + "eslint": ">=8.44.0" + } + }, "node_modules/eslint-scope": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", @@ -2408,6 +2682,12 @@ "node": ">= 12.20" } }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -2458,6 +2738,15 @@ "node": ">=0.8.19" } }, + "node_modules/indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -2483,6 +2772,12 @@ "node": ">=8" } }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -2495,6 +2790,33 @@ "node": ">=8" } }, + "node_modules/is-builtin-module": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", + "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", + "dev": true, + "dependencies": { + "builtin-modules": "^3.3.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-core-module": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", + "dev": true, + "dependencies": { + "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -2615,6 +2937,12 @@ "node": ">=8" } }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -2627,6 +2955,24 @@ "js-yaml": "bin/js-yaml.js" } }, + "node_modules/jsesc": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -2658,6 +3004,12 @@ "node": ">= 0.8.0" } }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -2673,6 +3025,12 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -2753,6 +3111,15 @@ "node": ">=8.6" } }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -2967,13 +3334,34 @@ "url": "https://opencollective.com/node-fetch" } }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", "dev": true, - "engines": { - "node": ">=0.10.0" + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, + "node_modules/normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true, + "engines": { + "node": ">=0.10.0" } }, "node_modules/object-inspect": { @@ -3041,6 +3429,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -3053,6 +3450,24 @@ "node": ">=6" } }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/parse-ms": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-3.0.0.tgz", @@ -3092,6 +3507,12 @@ "node": ">=8" } }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, "node_modules/path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -3143,6 +3564,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -3220,6 +3650,108 @@ "safe-buffer": "^5.1.0" } }, + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -3241,6 +3773,36 @@ "node": ">=6" } }, + "node_modules/regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "dev": true, + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, + "node_modules/regjsparser": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.10.0.tgz", + "integrity": "sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==", + "dev": true, + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -3250,6 +3812,23 @@ "node": ">=0.10.0" } }, + "node_modules/resolve": { + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", + "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -3440,6 +4019,38 @@ "source-map": "^0.6.0" } }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.13", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz", + "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", + "dev": true + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -3466,6 +4077,18 @@ "node": ">=8" } }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -3496,6 +4119,18 @@ "node": ">=8" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/table-layout": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", @@ -3697,6 +4332,16 @@ "node": ">=10.12.0" } }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "node_modules/web-streams-polyfill": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", @@ -3856,6 +4501,149 @@ "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==", "dev": true }, + "@babel/code-frame": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.10.tgz", + "integrity": "sha512-/KKIMG4UEL35WmI9OlvMhurwtytjvXoFcGNrOvyG9zIzA8YmPjVtIZUf7b05+TPO7G7/GEmLHDaoCgACHl9hhA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.22.10", + "chalk": "^2.4.2" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@babel/helper-validator-identifier": { + "version": "7.22.5", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", + "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "dev": true + }, + "@babel/highlight": { + "version": "7.22.10", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.10.tgz", + "integrity": "sha512-78aUtVcT7MUscr0K5mIEnkwxPE0MaxkR5RxRwuHaQ+JuU5AmTPhY+do2mdzVTnIJJpyBglql2pehuBIWHug+WQ==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.22.5", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "@bcoe/v8-coverage": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", @@ -4412,6 +5200,12 @@ "integrity": "sha512-Gi5wRGPbbyOTX+4Y2iULQ27oUPrefaB0PxGQJnfyWN3kvEDGM3mIB5M/gQLmitZf7A9FmLeaqxD3L1CXpm3VKQ==", "dev": true }, + "@types/normalize-package-data": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz", + "integrity": "sha512-Gj7cI7z+98M282Tqmp2K5EIsoouUEzbBJhQQzDE3jSIRk6r9gsz0oUokqIUR4u1R3dMHo0pDHM7sNOHyhulypw==", + "dev": true + }, "@types/semver": { "version": "7.5.0", "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.0.tgz", @@ -4672,6 +5466,12 @@ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, + "builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "dev": true + }, "c8": { "version": "7.14.0", "resolved": "https://registry.npmjs.org/c8/-/c8-7.14.0.tgz", @@ -4761,6 +5561,29 @@ "readdirp": "~3.6.0" } }, + "ci-info": { + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.8.0.tgz", + "integrity": "sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw==", + "dev": true + }, + "clean-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", + "integrity": "sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + }, + "dependencies": { + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + } + } + }, "cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -4980,6 +5803,15 @@ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", "dev": true }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, "esbuild": { "version": "0.19.2", "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.2.tgz", @@ -5108,6 +5940,29 @@ "dev": true, "requires": {} }, + "eslint-plugin-unicorn": { + "version": "48.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-48.0.1.tgz", + "integrity": "sha512-FW+4r20myG/DqFcCSzoumaddKBicIPeFnTrifon2mWIzlfyvzwyqZjqVP7m4Cqr/ZYisS2aiLghkUWaPg6vtCw==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.22.5", + "@eslint-community/eslint-utils": "^4.4.0", + "ci-info": "^3.8.0", + "clean-regexp": "^1.0.0", + "esquery": "^1.5.0", + "indent-string": "^4.0.0", + "is-builtin-module": "^3.2.1", + "jsesc": "^3.0.2", + "lodash": "^4.17.21", + "pluralize": "^8.0.0", + "read-pkg-up": "^7.0.1", + "regexp-tree": "^0.1.27", + "regjsparser": "^0.10.0", + "semver": "^7.5.4", + "strip-indent": "^3.0.0" + } + }, "eslint-scope": { "version": "7.2.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz", @@ -5460,6 +6315,12 @@ "pretty-ms": "^8.0.0" } }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, "html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -5494,6 +6355,12 @@ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==", "dev": true }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + }, "inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", @@ -5516,6 +6383,12 @@ "integrity": "sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==", "dev": true }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -5525,6 +6398,24 @@ "binary-extensions": "^2.0.0" } }, + "is-builtin-module": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", + "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", + "dev": true, + "requires": { + "builtin-modules": "^3.3.0" + } + }, + "is-core-module": { + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.0.tgz", + "integrity": "sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -5609,6 +6500,12 @@ "istanbul-lib-report": "^3.0.0" } }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -5618,6 +6515,18 @@ "argparse": "^2.0.1" } }, + "jsesc": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "dev": true + }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -5646,6 +6555,12 @@ "type-check": "~0.4.0" } }, + "lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, "locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -5655,6 +6570,12 @@ "p-locate": "^5.0.0" } }, + "lodash": { + "version": "4.17.21", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", + "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", + "dev": true + }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -5714,6 +6635,12 @@ "picomatch": "^2.3.1" } }, + "min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true + }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -5867,6 +6794,26 @@ "formdata-polyfill": "^4.0.10" } }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true + } + } + }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -5920,6 +6867,12 @@ "p-limit": "^3.0.2" } }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, "parent-module": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", @@ -5929,6 +6882,18 @@ "callsites": "^3.0.0" } }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, "parse-ms": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-3.0.0.tgz", @@ -5953,6 +6918,12 @@ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, "path-type": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", @@ -5986,6 +6957,12 @@ "irregular-plurals": "^3.2.0" } }, + "pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -6031,6 +7008,82 @@ "safe-buffer": "^5.1.0" } }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + } + } + }, "readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -6046,12 +7099,46 @@ "integrity": "sha512-EJ4UNY/U1t2P/2k6oqotuX2Cc3T6nxJwsM0N0asT7dhrtH1ltUxDn4NalSYmPE2rCkVpcf/X6R0wDwcFpzhd4w==", "dev": true }, + "regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "dev": true + }, + "regjsparser": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.10.0.tgz", + "integrity": "sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "dev": true + } + } + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, + "resolve": { + "version": "1.22.4", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.4.tgz", + "integrity": "sha512-PXNdCiPqDqeUou+w1C2eTQbNfxKSuMxqTCuvlmmMsk1NWHL5fRrhY6Pl0qEYYc6+QqGClco1Qj8XnjPego4wfg==", + "dev": true, + "requires": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -6176,6 +7263,38 @@ "source-map": "^0.6.0" } }, + "spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.13", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.13.tgz", + "integrity": "sha512-XkD+zwiqXHikFZm4AX/7JSCXA98U5Db4AFd5XUg/+9UNtnH75+Z9KxtpYiJZx36mUDVOwH83pl7yvCer6ewM3w==", + "dev": true + }, "string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -6196,6 +7315,15 @@ "ansi-regex": "^5.0.1" } }, + "strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "requires": { + "min-indent": "^1.0.0" + } + }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -6217,6 +7345,12 @@ "has-flag": "^4.0.0" } }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, "table-layout": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", @@ -6372,6 +7506,16 @@ "convert-source-map": "^1.6.0" } }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "web-streams-polyfill": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", diff --git a/package.json b/package.json index 75ca0cc206ae1..3cfbaa421a29e 100644 --- a/package.json +++ b/package.json @@ -66,6 +66,7 @@ "eslint-plugin-local": "^1.0.0", "eslint-plugin-no-null": "^1.0.2", "eslint-plugin-simple-import-sort": "^10.0.0", + "eslint-plugin-unicorn": "^48.0.1", "fast-xml-parser": "^4.0.11", "glob": "^8.1.0", "hereby": "^1.6.4", From e72cade8f09679ad76f0b54301394603af53ec1c Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 25 Aug 2023 13:50:43 -0700 Subject: [PATCH 02/40] [generated] eslint --fix [git-generate] npm ci npx hereby lint --fix || true npx dprint fmt --- scripts/browserIntegrationTest.mjs | 2 +- scripts/errorCheck.mjs | 2 +- scripts/failed-tests.cjs | 2 +- scripts/find-unused-diganostic-messages.mjs | 2 +- scripts/update-experimental-branches.mjs | 2 +- src/compiler/builder.ts | 2 +- src/compiler/checker.ts | 2 +- src/compiler/commandLineParser.ts | 4 ++-- src/compiler/debug.ts | 8 ++++---- src/compiler/parser.ts | 4 ++-- src/compiler/perfLogger.ts | 2 +- src/compiler/sys.ts | 14 +++++++------- src/compiler/utilities.ts | 2 +- src/compiler/utilitiesPublic.ts | 2 +- src/compiler/watch.ts | 4 ++-- src/compiler/watchUtilities.ts | 2 +- src/harness/fourslashImpl.ts | 2 +- src/harness/harnessIO.ts | 2 +- src/harness/harnessUtils.ts | 2 +- src/server/project.ts | 2 +- src/services/findAllReferences.ts | 2 +- src/services/formatting/rules.ts | 2 +- src/services/jsDoc.ts | 4 ++-- src/services/navigationBar.ts | 2 +- src/services/shims.ts | 2 +- src/testRunner/projectsRunner.ts | 2 +- .../unittests/config/commandLineParsing.ts | 4 ++-- .../unittests/config/configurationExtension.ts | 2 +- src/testRunner/unittests/config/tsconfigParsing.ts | 2 +- .../unittests/tsserver/projectReferences.ts | 4 ++-- src/tsserver/nodeServer.ts | 4 ++-- src/typingsInstaller/nodeTypingsInstaller.ts | 2 +- 32 files changed, 48 insertions(+), 48 deletions(-) diff --git a/scripts/browserIntegrationTest.mjs b/scripts/browserIntegrationTest.mjs index bb1007743b4a6..9aff35a960f54 100644 --- a/scripts/browserIntegrationTest.mjs +++ b/scripts/browserIntegrationTest.mjs @@ -11,7 +11,7 @@ try { // @ts-ignore-error playwright = await import("playwright"); } -catch (error) { +catch { throw new Error("Playwright is expected to be installed manually before running this script"); } diff --git a/scripts/errorCheck.mjs b/scripts/errorCheck.mjs index 89c354a56710c..1288ff3cebf56 100644 --- a/scripts/errorCheck.mjs +++ b/scripts/errorCheck.mjs @@ -27,7 +27,7 @@ async function checkErrorBaselines() { let g; while (g = errRegex.exec(baseline)) { const errCode = +g[1]; - const msg = keys.filter(k => messages[k].code === errCode)[0]; + const msg = keys.find(k => messages[k].code === errCode); messages[msg].seen = true; } }); diff --git a/scripts/failed-tests.cjs b/scripts/failed-tests.cjs index c214f6eea90b1..e871cb37a2888 100644 --- a/scripts/failed-tests.cjs +++ b/scripts/failed-tests.cjs @@ -45,7 +45,7 @@ class FailedTestsReporter extends Mocha.reporters.Base { try { reporter = require(reporterOptions.reporter); } - catch (_) { + catch { reporter = require(path.resolve(process.cwd(), reporterOptions.reporter)); } } diff --git a/scripts/find-unused-diganostic-messages.mjs b/scripts/find-unused-diganostic-messages.mjs index b4aff5913b437..e6c7a2a026a33 100644 --- a/scripts/find-unused-diganostic-messages.mjs +++ b/scripts/find-unused-diganostic-messages.mjs @@ -24,7 +24,7 @@ startOfDiags.split(EOL).forEach(line => { execSync(`grep -rnw 'src' -e 'Diagnostics.${diagName}'`).toString(); process.stdout.write("."); } - catch (error) { + catch { missingNames.push(diagName); process.stdout.write("x"); } diff --git a/scripts/update-experimental-branches.mjs b/scripts/update-experimental-branches.mjs index 3f3493296c36f..59337fbd6d35a 100644 --- a/scripts/update-experimental-branches.mjs +++ b/scripts/update-experimental-branches.mjs @@ -26,7 +26,7 @@ async function main() { owner: "Microsoft", repo: "TypeScript", })).data.filter(i => !!i.pull_request).map(i => i.number); - if (triggeredPR && !prnums.some(n => n === +triggeredPR)) { + if (triggeredPR && !prnums.includes(+triggeredPR)) { return; // Only have work to do for enlisted PRs } console.log(`Performing experimental branch updating and merging for pull requests ${prnums.join(", ")}`); diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts index 40579969a48b6..90190285311d3 100644 --- a/src/compiler/builder.ts +++ b/src/compiler/builder.ts @@ -1217,7 +1217,7 @@ function getBuildInfo(state: BuilderProgramState, bundle: BundleBuildInfo | unde function toFileIdListId(set: ReadonlySet): ProgramBuildInfoFileIdListId { const fileIds = arrayFrom(set.keys(), toFileId).sort(compareValues); - const key = fileIds.join(); + const key = fileIds.join(","); let fileIdListId = fileNamesToFileIdListId?.get(key); if (fileIdListId === undefined) { (fileIdsList ||= []).push(fileIds); diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 21ed301c23eb6..c7553ec3a33e9 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -16369,7 +16369,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { return readonly ? globalReadonlyArrayType : globalArrayType; } const memberIds = mapDefined(namedMemberDeclarations, node => node ? getNodeId(node) : undefined); - const key = map(elementFlags, f => f & ElementFlags.Required ? "#" : f & ElementFlags.Optional ? "?" : f & ElementFlags.Rest ? "." : "*").join() + + const key = map(elementFlags, f => f & ElementFlags.Required ? "#" : f & ElementFlags.Optional ? "?" : f & ElementFlags.Rest ? "." : "*").join(",") + (readonly ? "R" : "") + (memberIds.length ? "," + memberIds.join(",") : ""); let type = tupleTypes.get(key); diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 61058f8e8be26..69b770e43c658 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -2615,7 +2615,7 @@ export function getCompilerOptionsDiffValue(options: CompilerOptions, newLine: s return getOverwrittenDefaultOptions(); function makePadding(paddingLength: number): string { - return Array(paddingLength + 1).join(" "); + return new Array(paddingLength + 1).join(" "); } function getOverwrittenDefaultOptions() { @@ -2659,7 +2659,7 @@ export function generateTSConfig(options: CompilerOptions, fileNames: readonly s return writeConfigurations(); function makePadding(paddingLength: number): string { - return Array(paddingLength + 1).join(" "); + return new Array(paddingLength + 1).join(" "); } function isAllowedOptionForOutput({ category, name, isCommandLineOnly }: CommandLineOption): boolean { diff --git a/src/compiler/debug.ts b/src/compiler/debug.ts index 7b5a81d93a89d..cd64211143623 100644 --- a/src/compiler/debug.ts +++ b/src/compiler/debug.ts @@ -1048,7 +1048,7 @@ m2: ${(this.mapper2 as unknown as DebugTypeMapper).__debugToString().split("\n") } function computeColumnWidths(height: number) { - const columns: number[] = fill(Array(height), 0); + const columns: number[] = fill(new Array(height), 0); for (const node of nodes) { columns[node.level] = Math.max(columns[node.level], node.text.length); } @@ -1121,9 +1121,9 @@ m2: ${(this.mapper2 as unknown as DebugTypeMapper).__debugToString().split("\n") function renderGraph() { const columnCount = columnWidths.length; const laneCount = nodes.reduce((x, n) => Math.max(x, n.lane), 0) + 1; - const lanes: string[] = fill(Array(laneCount), ""); - const grid: (FlowGraphNode | undefined)[][] = columnWidths.map(() => Array(laneCount)); - const connectors: Connection[][] = columnWidths.map(() => fill(Array(laneCount), 0)); + const lanes: string[] = fill(new Array(laneCount), ""); + const grid: (FlowGraphNode | undefined)[][] = columnWidths.map(() => new Array(laneCount)); + const connectors: Connection[][] = columnWidths.map(() => fill(new Array(laneCount), 0)); // build connectors for (const node of nodes) { diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index ad0f132b4e5ab..e913b03d6fe11 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -10437,7 +10437,7 @@ export function processCommentPragmas(context: PragmaContext, sourceText: string for (const pragma of pragmas) { if (context.pragmas.has(pragma.name)) { const currentValue = context.pragmas.get(pragma.name); - if (currentValue instanceof Array) { + if (Array.isArray(currentValue)) { currentValue.push(pragma.args); } else { @@ -10497,7 +10497,7 @@ export function processPragmasIntoFields(context: PragmaContext, reportDiagnosti break; } case "amd-module": { - if (entryOrList instanceof Array) { + if (Array.isArray(entryOrList)) { for (const entry of entryOrList) { if (context.moduleName) { // TODO: It's probably fine to issue this diagnostic on all instances of the pragma diff --git a/src/compiler/perfLogger.ts b/src/compiler/perfLogger.ts index f2476db967541..66dbff8a38d96 100644 --- a/src/compiler/perfLogger.ts +++ b/src/compiler/perfLogger.ts @@ -32,7 +32,7 @@ try { // It may also return undefined if not installed properly etwModule = require(etwModulePath); } -catch (e) { +catch { etwModule = undefined; } diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index d888a3d599bb3..7217ce5fce756 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -1797,7 +1797,7 @@ export let sys: System = (() => { try { buffer = _fs.readFileSync(fileName); } - catch (e) { + catch { return undefined; } let len = buffer.length; @@ -1877,7 +1877,7 @@ export let sys: System = (() => { continue; } } - catch (e) { + catch { continue; } } @@ -1896,7 +1896,7 @@ export let sys: System = (() => { directories.sort(); return { files, directories }; } - catch (e) { + catch { return emptyFileSystemEntries; } } @@ -1925,7 +1925,7 @@ export let sys: System = (() => { return false; } } - catch (e) { + catch { return false; } finally { @@ -1966,7 +1966,7 @@ export let sys: System = (() => { try { return statSync(path)?.mtime; } - catch (e) { + catch { return undefined; } finally { @@ -1978,7 +1978,7 @@ export let sys: System = (() => { try { _fs.utimesSync(path, time, time); } - catch (e) { + catch { return; } } @@ -1987,7 +1987,7 @@ export let sys: System = (() => { try { return _fs.unlinkSync(path); } - catch (e) { + catch { return; } } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index bd5958feaf660..936c0435cdfa6 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -9523,7 +9523,7 @@ export function tryParsePattern(pattern: string): string | Pattern | undefined { if (indexOfStar === -1) { return pattern; } - return pattern.indexOf("*", indexOfStar + 1) !== -1 + return pattern.includes("*", indexOfStar + 1) ? undefined : { prefix: pattern.substr(0, indexOfStar), diff --git a/src/compiler/utilitiesPublic.ts b/src/compiler/utilitiesPublic.ts index 56ee00f89a04c..fd1283d05cd82 100644 --- a/src/compiler/utilitiesPublic.ts +++ b/src/compiler/utilitiesPublic.ts @@ -667,7 +667,7 @@ export function validateLocaleAndSetLanguage( try { fileContents = sys.readFile(filePath); } - catch (e) { + catch { if (errors) { errors.push(createCompilerDiagnostic(Diagnostics.Unable_to_open_file_0, filePath)); } diff --git a/src/compiler/watch.ts b/src/compiler/watch.ts index fd4d4a8b6ca28..bef3f252db0f7 100644 --- a/src/compiler/watch.ts +++ b/src/compiler/watch.ts @@ -303,7 +303,7 @@ function createTabularErrorsDisplay(filesInError: (ReportFileInError | undefined const distinctFiles = filesInError.filter((value, index, self) => index === self.findIndex(file => file?.fileName === value?.fileName)); if (distinctFiles.length === 0) return ""; - const numberLength = (num: number) => Math.log(num) * Math.LOG10E + 1; + const numberLength = (num: number) => Math.log10(num) + 1; const fileToErrorCount = distinctFiles.map(file => ([file, countWhere(filesInError, fileInError => fileInError!.fileName === file!.fileName)] as const)); const maxErrors = fileToErrorCount.reduce((acc, value) => Math.max(acc, value[1] || 0), 0); @@ -316,7 +316,7 @@ function createTabularErrorsDisplay(filesInError: (ReportFileInError | undefined tabularData += " ".repeat(headerPadding) + headerRow + "\n"; fileToErrorCount.forEach(row => { const [file, errorCount] = row; - const errorCountDigitsLength = Math.log(errorCount) * Math.LOG10E + 1 | 0; + const errorCountDigitsLength = Math.log10(errorCount) + 1 | 0; const leftPadding = errorCountDigitsLength < leftPaddingGoal ? " ".repeat(leftPaddingGoal - errorCountDigitsLength) : ""; diff --git a/src/compiler/watchUtilities.ts b/src/compiler/watchUtilities.ts index 7073986dd5951..a3337d093564b 100644 --- a/src/compiler/watchUtilities.ts +++ b/src/compiler/watchUtilities.ts @@ -194,7 +194,7 @@ export function createCachedDirectoryStructureHost(host: DirectoryStructureHost, try { return createCachedFileSystemEntries(rootDir, rootDirPath); } - catch (_e) { + catch { // If there is exception to read directories, dont cache the result and direct the calls to host Debug.assert(!cachedReadDirectoryResult.has(ensureTrailingDirectorySeparator(rootDirPath))); return undefined; diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts index 8f9a5e5738f36..44864bc416b06 100644 --- a/src/harness/fourslashImpl.ts +++ b/src/harness/fourslashImpl.ts @@ -4672,7 +4672,7 @@ function parseTestData(basePath: string, contents: string, fileName: string): Fo directive = getNonFileNameOptionInObject(globalOptions); } if (directive) { - throw Error(`It is not allowed to use ${config.fileName} along with directive '${directive}'`); + throw new Error(`It is not allowed to use ${config.fileName} along with directive '${directive}'`); } } diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index 27c7436800bf4..2a5cef67fed73 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -128,7 +128,7 @@ function createNodeIO(): IO { } return { files, directories }; } - catch (e) { + catch { return { files: [], directories: [] }; } } diff --git a/src/harness/harnessUtils.ts b/src/harness/harnessUtils.ts index 752e52bdba925..39156cd2a226a 100644 --- a/src/harness/harnessUtils.ts +++ b/src/harness/harnessUtils.ts @@ -41,7 +41,7 @@ export function readTestFile(path: string) { try { content = Harness.IO.readFile(Harness.userSpecifiedRoot + path); } - catch (err) { + catch { return undefined; } diff --git a/src/server/project.ts b/src/server/project.ts index 8df08a36cd747..9a35cece4fba8 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -2245,7 +2245,7 @@ function extractUnresolvedImportsFromSourceFile(file: SourceFile, ambientModules if ( (!resolvedModule || !resolutionExtensionIsTSOrJson(resolvedModule.extension)) && !isExternalModuleNameRelative(name) && - !ambientModules.some(m => m === name) + !ambientModules.includes(name) ) { unresolvedImports = append(unresolvedImports, parsePackageName(name).packageName); } diff --git a/src/services/findAllReferences.ts b/src/services/findAllReferences.ts index 11a00e51954da..aaecd140bf941 100644 --- a/src/services/findAllReferences.ts +++ b/src/services/findAllReferences.ts @@ -1751,7 +1751,7 @@ export namespace Core { const called = climbPastPropertyAccess(name); const call = isCallExpression(called.parent) && called.parent.expression === called ? called.parent : undefined; const referenceSymbol = checker.getSymbolAtLocation(name); - if (referenceSymbol && checker.getRootSymbols(referenceSymbol).some(s => s === symbol)) { + if (referenceSymbol && checker.getRootSymbols(referenceSymbol).includes(symbol)) { if (cb(name, call)) { return true; } diff --git a/src/services/formatting/rules.ts b/src/services/formatting/rules.ts index 98b8be1fe8c21..0baf0d6e3f476 100644 --- a/src/services/formatting/rules.ts +++ b/src/services/formatting/rules.ts @@ -49,7 +49,7 @@ export function getAllRules(): RuleSpec[] { } } function anyTokenExcept(...tokens: SyntaxKind[]): TokenRange { - return { tokens: allTokens.filter(t => !tokens.some(t2 => t2 === t)), isSpecific: false }; + return { tokens: allTokens.filter(t => !tokens.includes(t)), isSpecific: false }; } const anyToken: TokenRange = { tokens: allTokens, isSpecific: false }; diff --git a/src/services/jsDoc.ts b/src/services/jsDoc.ts index a68fdfcbfbae6..0b41817914734 100644 --- a/src/services/jsDoc.ts +++ b/src/services/jsDoc.ts @@ -291,12 +291,12 @@ function getCommentDisplayParts(tag: JSDocTag, checker?: TypeChecker): SymbolDis forEach(templateTag.typeParameters, tp => { displayParts.push(namePart(tp.getText())); if (lastTypeParameter !== tp) { - displayParts.push(...[punctuationPart(SyntaxKind.CommaToken), spacePart()]); + displayParts.push(punctuationPart(SyntaxKind.CommaToken), spacePart()); } }); } if (comment) { - displayParts.push(...[spacePart(), ...getDisplayPartsFromComment(comment, checker)]); + displayParts.push(spacePart(), ...getDisplayPartsFromComment(comment, checker)); } return displayParts; case SyntaxKind.JSDocTypeTag: diff --git a/src/services/navigationBar.ts b/src/services/navigationBar.ts index d4bb1f7358587..b4893a20c3a92 100644 --- a/src/services/navigationBar.ts +++ b/src/services/navigationBar.ts @@ -594,7 +594,7 @@ function mergeChildren(children: NavigationBarNode[], node: NavigationBarNode): return true; } - if (itemsWithSameName instanceof Array) { + if (Array.isArray(itemsWithSameName)) { for (const itemWithSameName of itemsWithSameName) { if (tryMerge(itemWithSameName, child, index, node)) { return false; diff --git a/src/services/shims.ts b/src/services/shims.ts index 1fe06d9e1fbf5..2148a281c5bba 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -500,7 +500,7 @@ export class LanguageServiceShimHostAdapter implements LanguageServiceHost { const settingsJson = this.shimHost.getCompilationSettings(); // eslint-disable-next-line no-null/no-null if (settingsJson === null || settingsJson === "") { - throw Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings"); + throw new Error("LanguageServiceShimHostAdapter.getCompilationSettings: empty compilationSettings"); } const compilerOptions = JSON.parse(settingsJson) as CompilerOptions; // permit language service to handle all files (filtering should be performed on the host side) diff --git a/src/testRunner/projectsRunner.ts b/src/testRunner/projectsRunner.ts index dd2a2f40f6ead..6b092fd85eb58 100644 --- a/src/testRunner/projectsRunner.ts +++ b/src/testRunner/projectsRunner.ts @@ -269,7 +269,7 @@ class ProjectTestCase { } if (errs.length) { - throw Error(errs.join("\n ")); + throw new Error(errs.join("\n ")); } } } diff --git a/src/testRunner/unittests/config/commandLineParsing.ts b/src/testRunner/unittests/config/commandLineParsing.ts index cb40ec6527ac4..6cd92d488f09b 100644 --- a/src/testRunner/unittests/config/commandLineParsing.ts +++ b/src/testRunner/unittests/config/commandLineParsing.ts @@ -12,7 +12,7 @@ describe("unittests:: config:: commandLineParsing:: parseCommandLine", () => { baseline.push("WatchOptions::"); baseline.push(JSON.stringify(parsed.watchOptions, /*replacer*/ undefined, " ")); baseline.push("FileNames::"); - baseline.push(parsed.fileNames.join()); + baseline.push(parsed.fileNames.join(",")); baseline.push("Errors::"); baseline.push(ts.formatDiagnostics(parsed.errors, { getCurrentDirectory: () => "/", @@ -204,7 +204,7 @@ describe("unittests:: config:: commandLineParsing:: parseBuildOptions", () => { baseline.push("WatchOptions::"); baseline.push(JSON.stringify(parsed.watchOptions, /*replacer*/ undefined, " ")); baseline.push("Projects::"); - baseline.push(parsed.projects.join()); + baseline.push(parsed.projects.join(",")); baseline.push("Errors::"); baseline.push(ts.formatDiagnostics(parsed.errors, { getCurrentDirectory: () => "/", diff --git a/src/testRunner/unittests/config/configurationExtension.ts b/src/testRunner/unittests/config/configurationExtension.ts index 96bfc206db8ca..0b7f5b299a46c 100644 --- a/src/testRunner/unittests/config/configurationExtension.ts +++ b/src/testRunner/unittests/config/configurationExtension.ts @@ -316,7 +316,7 @@ describe("unittests:: config:: configurationExtension", () => { baseline.push("CompilerOptions::"); baseline.push(JSON.stringify(parsed.options, undefined, " ")); baseline.push("FileNames::"); - baseline.push(parsed.fileNames.join()); + baseline.push(parsed.fileNames.join(",")); }, })), skipFs: true, diff --git a/src/testRunner/unittests/config/tsconfigParsing.ts b/src/testRunner/unittests/config/tsconfigParsing.ts index e0121594605c6..dd10c399030b1 100644 --- a/src/testRunner/unittests/config/tsconfigParsing.ts +++ b/src/testRunner/unittests/config/tsconfigParsing.ts @@ -60,7 +60,7 @@ describe("unittests:: config:: tsconfigParsing:: parseConfigFileTextToJson", () basePath, baselineParsed: (baseline, parsed) => { baseline.push("FileNames::"); - baseline.push(parsed.fileNames.join()); + baseline.push(parsed.fileNames.join(",")); }, })), skipJson, diff --git a/src/testRunner/unittests/tsserver/projectReferences.ts b/src/testRunner/unittests/tsserver/projectReferences.ts index 00b764b72f10a..96de65b608a23 100644 --- a/src/testRunner/unittests/tsserver/projectReferences.ts +++ b/src/testRunner/unittests/tsserver/projectReferences.ts @@ -1218,7 +1218,7 @@ bar;`, compilerOptions: { module: "none", composite: true, - ...(extendOptionsProject2 || {}), + ...extendOptionsProject2, }, references: [ { path: "../project1" }, @@ -1421,7 +1421,7 @@ bar;`, const config: File = { path: `/user/username/projects/myproject/${packageName}/tsconfig.json`, content: JSON.stringify({ - compilerOptions: { composite: true, ...optionsToExtend || {} }, + compilerOptions: { composite: true, ...optionsToExtend }, references: references?.map(path => ({ path: `../${path}` })), }), }; diff --git a/src/tsserver/nodeServer.ts b/src/tsserver/nodeServer.ts index 0ed4bac6b228a..32edc9f7fb4ab 100644 --- a/src/tsserver/nodeServer.ts +++ b/src/tsserver/nodeServer.ts @@ -219,7 +219,7 @@ export function initializeNodeSystem(): StartInput { try { this.fd = fs.openSync(this.logFilename, "w"); } - catch (_) { + catch { // swallow the error and keep logging disabled if file cannot be opened } } @@ -387,7 +387,7 @@ export function initializeNodeSystem(): StartInput { const factory = require("./cancellationToken"); cancellationToken = factory(sys.args); } - catch (e) { + catch { cancellationToken = nullCancellationToken; } diff --git a/src/typingsInstaller/nodeTypingsInstaller.ts b/src/typingsInstaller/nodeTypingsInstaller.ts index fcf8b61cf5baf..98223ebdc5942 100644 --- a/src/typingsInstaller/nodeTypingsInstaller.ts +++ b/src/typingsInstaller/nodeTypingsInstaller.ts @@ -48,7 +48,7 @@ class FileLog implements Log { try { fs.appendFileSync(this.logFile, `[${nowString()}] ${text}${sys.newLine}`); } - catch (e) { + catch { this.logFile = undefined; } }; From c9ed25d9c063d5af7253cd443f2a4802e069c0b4 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 25 Aug 2023 14:08:55 -0700 Subject: [PATCH 03/40] Manual fixes --- scripts/eslint/rules/only-arrow-functions.cjs | 2 +- src/compiler/builder.ts | 2 +- src/compiler/checker.ts | 7 +++++-- src/compiler/commandLineParser.ts | 2 +- src/compiler/performanceCore.ts | 1 + src/compiler/utilitiesPublic.ts | 1 + src/harness/client.ts | 2 +- src/server/editorServices.ts | 2 +- src/server/scriptInfo.ts | 4 +--- src/server/session.ts | 4 ++-- src/services/codefixes/convertToAsyncFunction.ts | 2 +- src/services/codefixes/fixAddMissingMember.ts | 2 +- src/services/sourcemaps.ts | 4 ++-- src/testRunner/unittests/helpers/baseline.ts | 4 ++-- .../unittests/helpers/virtualFileSystemWithWatch.ts | 4 ++-- 15 files changed, 23 insertions(+), 20 deletions(-) diff --git a/scripts/eslint/rules/only-arrow-functions.cjs b/scripts/eslint/rules/only-arrow-functions.cjs index 9abde8775c08d..c3afd14e7c4d8 100644 --- a/scripts/eslint/rules/only-arrow-functions.cjs +++ b/scripts/eslint/rules/only-arrow-functions.cjs @@ -28,7 +28,7 @@ module.exports = createRule({ create(context, [{ allowNamedFunctions, allowDeclarations }]) { /** @type {(node: TSESTree.FunctionDeclaration | TSESTree.FunctionExpression) => boolean} */ - const isThisParameter = node => !!node.params.length && !!node.params.find(param => param.type === AST_NODE_TYPES.Identifier && param.name === "this"); + const isThisParameter = node => node.params.some(param => param.type === AST_NODE_TYPES.Identifier && param.name === "this"); /** @type {(node: TSESTree.Node) => boolean} */ const isMethodType = node => { diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts index 90190285311d3..d434375aa82e0 100644 --- a/src/compiler/builder.ts +++ b/src/compiler/builder.ts @@ -1783,7 +1783,7 @@ export function toBuilderFileEmit(value: ProgramBuilderInfoFilePendingEmit, full /** @internal */ export function toProgramEmitPending(value: ProgramBuildInfoBundlePendingEmit, options: CompilerOptions | undefined): BuilderFileEmit | undefined { - return !value ? getBuilderFileEmit(options || {}) : value; + return value || getBuilderFileEmit(options || {}); } /** @internal */ diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index c7553ec3a33e9..a8230a7bb0835 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -11722,6 +11722,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // up recursively calling getTypeOfAlias, causing a stack overflow. links.type = exportSymbol?.declarations && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations!.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType + // eslint-disable-next-line unicorn/prefer-logical-operator-over-ternary : declaredType ? declaredType : getSymbolFlags(targetSymbol) & SymbolFlags.Value ? getTypeOfSymbol(targetSymbol) : errorType; @@ -14364,7 +14365,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { } const writeType = getWriteTypeOfSymbol(prop); if (writeTypes || writeType !== type) { - writeTypes = append(!writeTypes ? propTypes.slice() : writeTypes, writeType); + writeTypes = append(writeTypes ?? propTypes.slice(), writeType); } else if (type !== firstType) { checkFlags |= CheckFlags.HasNonUniformType; @@ -14641,6 +14642,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // the intersected key type, we just use unknownType for the key type as nothing actually depends on the // keyType property of the returned IndexInfo. return applicableInfos ? createIndexInfo(unknownType, getIntersectionType(map(applicableInfos, info => info.type)), reduceLeft(applicableInfos, (isReadonly, info) => isReadonly && info.isReadonly, /*initial*/ true)) : + // eslint-disable-next-line unicorn/prefer-logical-operator-over-ternary applicableInfo ? applicableInfo : stringIndexInfo && isApplicableIndexType(keyType, stringType) ? stringIndexInfo : undefined; @@ -46412,7 +46414,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { else { const copy = createSymbol(SymbolFlags.Signature, InternalSymbolName.Index); copy.declarations = mapDefined(infos, i => i.declaration); - copy.parent = type.aliasSymbol ? type.aliasSymbol : type.symbol ? type.symbol : getSymbolAtLocation(copy.declarations[0].parent); + copy.parent = type.aliasSymbol ?? type.symbol ?? getSymbolAtLocation(copy.declarations[0].parent); symbolLinks.filteredIndexSymbolCache.set(nodeListId, copy); return copy; } @@ -49858,6 +49860,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { function getEffectivePropertyNameForPropertyNameNode(node: PropertyName) { const name = getPropertyNameForPropertyNameNode(node); + // eslint-disable-next-line unicorn/prefer-logical-operator-over-ternary return name ? name : isComputedPropertyName(node) ? tryGetNameFromType(getTypeOfExpression(node.expression)) : undefined; } diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 69b770e43c658..2608984d7b4e6 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -2481,7 +2481,7 @@ export function convertToTSConfig(configParseResult: ParsedCommandLine, configFi version: undefined, }, watchOptions: watchOptionMap && optionMapToObject(watchOptionMap), - references: map(configParseResult.projectReferences, r => ({ ...r, path: r.originalPath ? r.originalPath : "", originalPath: undefined })), + references: map(configParseResult.projectReferences, r => ({ ...r, path: r.originalPath || "", originalPath: undefined })), files: length(files) ? files : undefined, ...(configParseResult.options.configFile?.configFileSpecs ? { include: filterSameAsDefaultInclude(configParseResult.options.configFile.configFileSpecs.validatedIncludeSpecs), diff --git a/src/compiler/performanceCore.ts b/src/compiler/performanceCore.ts index a214ced47ef2c..38e3ad8bd6d8f 100644 --- a/src/compiler/performanceCore.ts +++ b/src/compiler/performanceCore.ts @@ -117,5 +117,6 @@ export function tryGetNativePerformanceHooks() { * @internal */ export const timestamp = nativePerformance ? () => nativePerformance.now() : + // eslint-disable-next-line unicorn/prefer-logical-operator-over-ternary Date.now ? Date.now : () => +(new Date()); diff --git a/src/compiler/utilitiesPublic.ts b/src/compiler/utilitiesPublic.ts index fd1283d05cd82..bae13c434dd14 100644 --- a/src/compiler/utilitiesPublic.ts +++ b/src/compiler/utilitiesPublic.ts @@ -1283,6 +1283,7 @@ export function getEffectiveTypeParameterDeclarations(node: DeclarationWithTypeP } export function getEffectiveConstraintOfTypeParameter(node: TypeParameterDeclaration): TypeNode | undefined { + // eslint-disable-next-line unicorn/prefer-logical-operator-over-ternary return node.constraint ? node.constraint : isJSDocTemplateTag(node.parent) && node === node.parent.typeParameters[0] ? node.parent.constraint : undefined; diff --git a/src/harness/client.ts b/src/harness/client.ts index 6f3a3cf9bbac5..d7faba736343a 100644 --- a/src/harness/client.ts +++ b/src/harness/client.ts @@ -907,7 +907,7 @@ export class SessionClient implements LanguageService { convertTextChangeToCodeEdit(change: protocol.CodeEdit, fileName: string): TextChange { return { span: this.decodeSpan(change, fileName), - newText: change.newText ? change.newText : "", + newText: change.newText || "", }; } diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index ab02f3548d4bd..5d3f65c21eb6a 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -3094,7 +3094,7 @@ export class ProjectService { sourceMapFileInfo.getSnapshot(); if (sourceMapFileInfo.documentPositionMapper !== undefined) { sourceMapFileInfo.sourceInfos = this.addSourceInfoToSourceMap(sourceFileName, project, sourceMapFileInfo.sourceInfos); - return sourceMapFileInfo.documentPositionMapper ? sourceMapFileInfo.documentPositionMapper : undefined; + return sourceMapFileInfo.documentPositionMapper || undefined; } } declarationInfo.sourceMapFilePath = undefined; diff --git a/src/server/scriptInfo.ts b/src/server/scriptInfo.ts index ca9f11d2e612a..9550ba4eefc59 100644 --- a/src/server/scriptInfo.ts +++ b/src/server/scriptInfo.ts @@ -412,9 +412,7 @@ export class ScriptInfo { if (hasMixedContent || this.isDynamic) { this.realpath = this.path; } - this.scriptKind = scriptKind - ? scriptKind - : getScriptKindFromFileName(fileName); + this.scriptKind = scriptKind || getScriptKindFromFileName(fileName); } /** @internal */ diff --git a/src/server/session.ts b/src/server/session.ts index 39a57df5ebfcf..523f774a32d36 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -2283,7 +2283,7 @@ export class Session implements EventSender { return { start: scriptInfo.positionToLineOffset(edit.span.start), end: scriptInfo.positionToLineOffset(textSpanEnd(edit.span)), - newText: edit.newText ? edit.newText : "", + newText: edit.newText || "", }; }); } @@ -2931,7 +2931,7 @@ export class Session implements EventSender { return { start: scriptInfo.positionToLineOffset(change.span.start), end: scriptInfo.positionToLineOffset(change.span.start + change.span.length), - newText: change.newText ? change.newText : "", + newText: change.newText || "", }; } diff --git a/src/services/codefixes/convertToAsyncFunction.ts b/src/services/codefixes/convertToAsyncFunction.ts index cb122865c66ac..8becdd8e7af20 100644 --- a/src/services/codefixes/convertToAsyncFunction.ts +++ b/src/services/codefixes/convertToAsyncFunction.ts @@ -882,7 +882,7 @@ function getArgBindingName(funcNode: Expression, transformer: Transformer): Synt } function getOriginalNode(node: Node): Node { - return node.original ? node.original : node; + return node.original ?? node; } } diff --git a/src/services/codefixes/fixAddMissingMember.ts b/src/services/codefixes/fixAddMissingMember.ts index 90b718fe8437d..1c3e3557518fa 100644 --- a/src/services/codefixes/fixAddMissingMember.ts +++ b/src/services/codefixes/fixAddMissingMember.ts @@ -674,7 +674,7 @@ function tryGetValueFromType(context: CodeFixContextBase, checker: TypeChecker, } if (type.flags & TypeFlags.EnumLike) { const enumMember = type.symbol.exports ? firstOrUndefinedIterator(type.symbol.exports.values()) : type.symbol; - const name = checker.symbolToExpression(type.symbol.parent ? type.symbol.parent : type.symbol, SymbolFlags.Value, /*enclosingDeclaration*/ undefined, /*flags*/ undefined); + const name = checker.symbolToExpression(type.symbol.parent ?? type.symbol, SymbolFlags.Value, /*enclosingDeclaration*/ undefined, /*flags*/ undefined); return enumMember === undefined || name === undefined ? factory.createNumericLiteral(0) : factory.createPropertyAccessExpression(name, checker.symbolToString(enumMember)); } if (type.flags & TypeFlags.NumberLiteral) { diff --git a/src/services/sourcemaps.ts b/src/services/sourcemaps.ts index 72947635e6ae0..0d3472abbe5df 100644 --- a/src/services/sourcemaps.ts +++ b/src/services/sourcemaps.ts @@ -131,7 +131,7 @@ export function getSourceMapper(host: SourceMapperHost): SourceMapper { function getOrCreateSourceFileLike(fileName: string): SourceFileLike | undefined { const path = toPath(fileName); const fileFromCache = sourceFileLike.get(path); - if (fileFromCache !== undefined) return fileFromCache ? fileFromCache : undefined; + if (fileFromCache !== undefined) return fileFromCache || undefined; if (!host.readFile || host.fileExists && !host.fileExists(path)) { sourceFileLike.set(path, false); @@ -142,7 +142,7 @@ export function getSourceMapper(host: SourceMapperHost): SourceMapper { const text = host.readFile(path); const file = text ? createSourceFileLike(text) : false; sourceFileLike.set(path, file); - return file ? file : undefined; + return file || undefined; } // This can be called from source mapper in either source program or program that includes generated file diff --git a/src/testRunner/unittests/helpers/baseline.ts b/src/testRunner/unittests/helpers/baseline.ts index 2daac68548942..411eeac8efc9f 100644 --- a/src/testRunner/unittests/helpers/baseline.ts +++ b/src/testRunner/unittests/helpers/baseline.ts @@ -366,6 +366,6 @@ export function baselineBuildInfo( sys.writeFile(`${buildInfoPath}.baseline.txt`, text); } -export function tscBaselineName(scenario: string, subScenario: string, commandLineArgs: readonly string[], isWatch?: boolean, suffix?: string) { - return `${ts.isBuild(commandLineArgs) ? "tsbuild" : "tsc"}${isWatch ? "Watch" : ""}/${scenario}/${subScenario.split(" ").join("-")}${suffix ? suffix : ""}.js`; +export function tscBaselineName(scenario: string, subScenario: string, commandLineArgs: readonly string[], isWatch?: boolean, suffix = "") { + return `${ts.isBuild(commandLineArgs) ? "tsbuild" : "tsc"}${isWatch ? "Watch" : ""}/${scenario}/${subScenario.split(" ").join("-")}${suffix}.js`; } diff --git a/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts b/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts index ce7d6382c761d..f103990f4afde 100644 --- a/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts +++ b/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts @@ -678,7 +678,7 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost, // TODO:: if (this.inodeWatching && inode !== undefined && inode !== currentInode) return; let relativeFileName = entryFullPath ? this.getRelativePathToDirectory(fullPath, entryFullPath) : ""; - if (useTildeSuffix) relativeFileName = (relativeFileName ? relativeFileName : getBaseFileName(fullPath)) + "~"; + if (useTildeSuffix) relativeFileName = (relativeFileName || getBaseFileName(fullPath)) + "~"; cb(eventName, relativeFileName, modifiedTime); }); } @@ -813,7 +813,7 @@ export class TestServerHost implements server.ServerHost, FormatDiagnosticsHost, const path = this.toFullPath(s); const entry = this.fs.get(path)!; if (isFsFile(entry)) { - return entry.fileSize ? entry.fileSize : entry.content.length; + return entry.fileSize || entry.content.length; } return undefined!; // TODO: GH#18217 } From 4089625390c9e0f33e8a2f9e3b1cece45cd2c50d Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 25 Aug 2023 14:10:10 -0700 Subject: [PATCH 04/40] Date.now --- .eslintrc.json | 2 +- src/compiler/performanceCore.ts | 5 +---- src/testRunner/parallel/host.ts | 4 ++-- src/testRunner/parallel/worker.ts | 4 ++-- 4 files changed, 6 insertions(+), 9 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index cb77eabd28cab..8412ea727ff80 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -136,8 +136,8 @@ "unicorn/prefer-modern-math-apis": "error", "unicorn/prefer-array-find": "error", "unicorn/prefer-array-some": "error", + "unicorn/prefer-date-now": "error", // TODO(jakebailey): Require manual fixups - // "unicorn/prefer-date-now": "error", // "unicorn/prefer-object-from-entries": "error", // "unicorn/no-new-buffer": "error", // "unicorn/prefer-string-slice": "error", diff --git a/src/compiler/performanceCore.ts b/src/compiler/performanceCore.ts index 38e3ad8bd6d8f..9026a074b82e9 100644 --- a/src/compiler/performanceCore.ts +++ b/src/compiler/performanceCore.ts @@ -116,7 +116,4 @@ export function tryGetNativePerformanceHooks() { * * @internal */ -export const timestamp = nativePerformance ? () => nativePerformance.now() : - // eslint-disable-next-line unicorn/prefer-logical-operator-over-ternary - Date.now ? Date.now : - () => +(new Date()); +export const timestamp = nativePerformance ? () => nativePerformance.now() : Date.now; diff --git a/src/testRunner/parallel/host.ts b/src/testRunner/parallel/host.ts index 126e06cff4e4a..5a1ba0752c57f 100644 --- a/src/testRunner/parallel/host.ts +++ b/src/testRunner/parallel/host.ts @@ -215,7 +215,7 @@ export function start() { function startDelayed(perfData: { [testHash: string]: number; } | undefined, totalCost: number) { console.log(`Discovered ${tasks.length} unittest suites` + (newTasks.length ? ` and ${newTasks.length} new suites.` : ".")); console.log("Discovering runner-based tests..."); - const discoverStart = +(new Date()); + const discoverStart = Date.now(); for (const runner of runners) { for (const test of runner.getTestFiles()) { const file = typeof test === "string" ? test : test.file; @@ -255,7 +255,7 @@ export function start() { const packfraction = 0.9; const chunkSize = 1000; // ~1KB or 1s for sending batches near the end of a test const batchSize = (totalCost / workerCount) * packfraction; // Keep spare tests for unittest thread in reserve - console.log(`Discovered ${tasks.length} test files in ${+(new Date()) - discoverStart}ms.`); + console.log(`Discovered ${tasks.length} test files in ${Date.now() - discoverStart}ms.`); console.log(`Starting to run tests using ${workerCount} threads...`); const totalFiles = tasks.length; diff --git a/src/testRunner/parallel/worker.ts b/src/testRunner/parallel/worker.ts index 3637721240732..664079c49b665 100644 --- a/src/testRunner/parallel/worker.ts +++ b/src/testRunner/parallel/worker.ts @@ -225,7 +225,7 @@ export function start() { function runSuite(task: Task, suite: Mocha.Suite, fn: (result: TaskResult) => void) { const errors: ErrorInfo[] = []; const passes: TestInfo[] = []; - const start = +new Date(); + const start = Date.now(); const runner = new Mocha.Runner(suite, { delay: false }); runner @@ -243,7 +243,7 @@ export function start() { runner.dispose(); }) .run(() => { - fn({ task, errors, passes, passing: passes.length, duration: +new Date() - start }); + fn({ task, errors, passes, passing: passes.length, duration: Date.now() - start }); }); } From 85b689bbb29a909e05a8dc85946c45b9806e1412 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 25 Aug 2023 14:20:29 -0700 Subject: [PATCH 05/40] No object reduce --- .eslintrc.json | 2 +- src/compiler/commandLineParser.ts | 6 ++---- src/testRunner/unittests/tsserver/autoImportProvider.ts | 2 +- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 8412ea727ff80..89d16283b7dc7 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -137,8 +137,8 @@ "unicorn/prefer-array-find": "error", "unicorn/prefer-array-some": "error", "unicorn/prefer-date-now": "error", + "unicorn/prefer-object-from-entries": "error", // TODO(jakebailey): Require manual fixups - // "unicorn/prefer-object-from-entries": "error", // "unicorn/no-new-buffer": "error", // "unicorn/prefer-string-slice": "error", // "unicorn/prefer-string-trim-start-end": "error", // check perf vs helper diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 2608984d7b4e6..dad8e99c54465 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -2493,10 +2493,8 @@ export function convertToTSConfig(configParseResult: ParsedCommandLine, configFi } /** @internal */ -export function optionMapToObject(optionMap: Map): object { - return { - ...arrayFrom(optionMap.entries()).reduce((prev, cur) => ({ ...prev, [cur[0]]: cur[1] }), {}), - }; +export function optionMapToObject(optionMap: Map) { + return Object.fromEntries(optionMap.entries()); } function filterSameAsDefaultInclude(specs: readonly string[] | undefined) { diff --git a/src/testRunner/unittests/tsserver/autoImportProvider.ts b/src/testRunner/unittests/tsserver/autoImportProvider.ts index dfa7eb11506cd..0dd131661f0d0 100644 --- a/src/testRunner/unittests/tsserver/autoImportProvider.ts +++ b/src/testRunner/unittests/tsserver/autoImportProvider.ts @@ -258,7 +258,7 @@ describe("unittests:: tsserver:: autoImportProvider", () => { packages.push(createPackage(i)); } - const dependencies = packages.reduce((hash, p) => ({ ...hash, [JSON.parse(p[0].content).name]: "*" }), {}); + const dependencies = Object.fromEntries(packages.map(p => [JSON.parse(p[0].content).name, "*"])); const packageJson: File = { path: "/package.json", content: JSON.stringify(dependencies) }; const { projectService, session } = setup([...ts.flatten(packages), indexTs, tsconfig, packageJson]); From 57b777e15ddb9abd1aae3e05c32d35b6e05356fe Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 25 Aug 2023 14:32:00 -0700 Subject: [PATCH 06/40] Buffer.from --- .eslintrc.json | 2 +- src/compiler/sys.ts | 21 ++++++--------------- 2 files changed, 7 insertions(+), 16 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 89d16283b7dc7..b4513e140850c 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -138,8 +138,8 @@ "unicorn/prefer-array-some": "error", "unicorn/prefer-date-now": "error", "unicorn/prefer-object-from-entries": "error", + "unicorn/no-new-buffer": "error", // TODO(jakebailey): Require manual fixups - // "unicorn/no-new-buffer": "error", // "unicorn/prefer-string-slice": "error", // "unicorn/prefer-string-trim-start-end": "error", // check perf vs helper // "unicorn/prefer-set-has": "error", // fix the ones that are okay diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 7217ce5fce756..6f6e72a74e2d9 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -1465,7 +1465,8 @@ export let sys: System = (() => { const nativePattern = /^native |^\([^)]+\)$|^(internal[\\/]|[a-zA-Z0-9_\s]+(\.js)?$)/; const _fs: typeof import("fs") = require("fs"); const _path: typeof import("path") = require("path"); - const _os = require("os"); + const _os: typeof import("os") = require("os"); + const _buffer: typeof import("buffer") = require("buffer"); // crypto can be absent on reduced node installations let _crypto: typeof import("crypto") | undefined; try { @@ -1477,10 +1478,7 @@ export let sys: System = (() => { let activeSession: import("inspector").Session | "stopping" | undefined; let profilePath = "./profile.cpuprofile"; - const Buffer: { - new (input: string, encoding?: string): any; - from?(input: string, encoding?: string): any; - } = require("buffer").Buffer; + const Buffer = _buffer.Buffer; const isLinuxOrMacOs = process.platform === "linux" || process.platform === "darwin"; @@ -1609,9 +1607,9 @@ export let sys: System = (() => { handle.setBlocking(true); } }, - bufferFrom, - base64decode: input => bufferFrom(input, "base64").toString("utf8"), - base64encode: input => bufferFrom(input).toString("base64"), + bufferFrom: Buffer.from, + base64decode: input => Buffer.from(input, "base64").toString("utf8"), + base64encode: input => Buffer.from(input).toString("base64"), require: (baseDir, moduleName) => { try { const modulePath = resolveJSModule(moduleName, baseDir, nodeSystem); @@ -1720,13 +1718,6 @@ export let sys: System = (() => { } } - function bufferFrom(input: string, encoding?: string): Buffer { - // See https://github.com/Microsoft/TypeScript/issues/25652 - return Buffer.from && Buffer.from !== Int8Array.from - ? Buffer.from(input, encoding) - : new Buffer(input, encoding); - } - function isFileSystemCaseSensitive(): boolean { // win32\win64 are case insensitive platforms if (platform === "win32" || platform === "win64") { From a65798df83036722b290bc6a2be0b17043de3a7d Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 25 Aug 2023 14:37:40 -0700 Subject: [PATCH 07/40] Set --- .eslintrc.json | 2 +- scripts/eslint/rules/no-keywords.cjs | 6 +++--- src/compiler/moduleNameResolver.ts | 2 ++ src/harness/fourslashImpl.ts | 6 +++--- src/testRunner/unittests/moduleResolution.ts | 4 ++-- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index b4513e140850c..4bc80158bd0b4 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -139,10 +139,10 @@ "unicorn/prefer-date-now": "error", "unicorn/prefer-object-from-entries": "error", "unicorn/no-new-buffer": "error", + "unicorn/prefer-set-has": "error", // TODO(jakebailey): Require manual fixups // "unicorn/prefer-string-slice": "error", // "unicorn/prefer-string-trim-start-end": "error", // check perf vs helper - // "unicorn/prefer-set-has": "error", // fix the ones that are okay // eslint-plugin-no-null "no-null/no-null": "error", diff --git a/scripts/eslint/rules/no-keywords.cjs b/scripts/eslint/rules/no-keywords.cjs index a0032bf5ff102..761d62a0975d6 100644 --- a/scripts/eslint/rules/no-keywords.cjs +++ b/scripts/eslint/rules/no-keywords.cjs @@ -22,7 +22,7 @@ module.exports = createRule({ defaultOptions: [], create(context) { - const keywords = [ + const keywords = new Set([ "Undefined", "undefined", "Boolean", @@ -32,10 +32,10 @@ module.exports = createRule({ "Number", "number", "any", - ]; + ]); /** @type {(name: string) => boolean} */ - const isKeyword = name => keywords.includes(name); + const isKeyword = name => keywords.has(name); /** @type {(node: TSESTree.Identifier) => void} */ const report = node => { diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index 0a5088a4c34b9..2dbb2084b89f9 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -2241,6 +2241,7 @@ function loadEntrypointsFromExportMap( }); } else { + // eslint-disable-next-line unicorn/prefer-set-has const partsAfterFirst = getPathComponents(target).slice(2); if (partsAfterFirst.includes("..") || partsAfterFirst.includes(".") || partsAfterFirst.includes("node_modules")) { return false; @@ -2675,6 +2676,7 @@ function getLoadModuleFromTargetImportOrExport(extensions: Extensions, state: Mo return toSearchResult(/*value*/ undefined); } const parts = pathIsRelative(target) ? getPathComponents(target).slice(1) : getPathComponents(target); + // eslint-disable-next-line unicorn/prefer-set-has const partsAfterFirst = parts.slice(1); if (partsAfterFirst.includes("..") || partsAfterFirst.includes(".") || partsAfterFirst.includes("node_modules")) { if (state.traceEnabled) { diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts index 44864bc416b06..b8a2bc1d4b7b8 100644 --- a/src/harness/fourslashImpl.ts +++ b/src/harness/fourslashImpl.ts @@ -429,18 +429,18 @@ export class TestState { this.openFile(0); function memoWrap(ls: ts.LanguageService, target: TestState): ts.LanguageService { - const cacheableMembers: (keyof typeof ls)[] = [ + const cacheableMembers = new Set([ "getCompletionEntryDetails", "getCompletionEntrySymbol", "getQuickInfoAtPosition", "getReferencesAtPosition", "getDocumentHighlights", - ]; + ]); const proxy = {} as ts.LanguageService; const keys = ts.getAllKeys(ls); for (const k of keys) { const key = k as keyof typeof ls; - if (!cacheableMembers.includes(key)) { + if (!cacheableMembers.has(key)) { proxy[key] = (...args: any[]) => (ls[key] as (...args: any[]) => any)(...args); continue; } diff --git a/src/testRunner/unittests/moduleResolution.ts b/src/testRunner/unittests/moduleResolution.ts index 1d349555399fb..0f7c3e2239c36 100644 --- a/src/testRunner/unittests/moduleResolution.ts +++ b/src/testRunner/unittests/moduleResolution.ts @@ -62,8 +62,8 @@ function runBaseline(scenario: string, baselines: readonly string[]) { describe("unittests:: moduleResolution:: Node module resolution - relative paths", () => { // node module resolution does _not_ implicitly append these extensions to an extensionless path (though will still attempt to load them if explicitly) - const nonImplicitExtensions = [ts.Extension.Mts, ts.Extension.Dmts, ts.Extension.Mjs, ts.Extension.Cts, ts.Extension.Dcts, ts.Extension.Cjs]; - const autoExtensions = ts.filter(ts.supportedTSExtensionsFlat, e => !nonImplicitExtensions.includes(e)); + const nonImplicitExtensions = new Set([ts.Extension.Mts, ts.Extension.Dmts, ts.Extension.Mjs, ts.Extension.Cts, ts.Extension.Dcts, ts.Extension.Cjs]); + const autoExtensions = ts.filter(ts.supportedTSExtensionsFlat, e => !nonImplicitExtensions.has(e)); it("load as file", () => { const baselines: string[] = []; From 62206d9cd93949e86f7549449b8673bf2aa35eec Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 1 Sep 2023 15:47:13 -0700 Subject: [PATCH 08/40] Enable lint rule now that helper is gone --- .eslintrc.json | 2 +- src/harness/fourslashImpl.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index dfdee56115f89..c5dfa8757c964 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -144,9 +144,9 @@ "unicorn/prefer-object-from-entries": "error", "unicorn/no-new-buffer": "error", "unicorn/prefer-set-has": "error", + "unicorn/prefer-string-trim-start-end": "error", // TODO(jakebailey): Require manual fixups // "unicorn/prefer-string-slice": "error", - // "unicorn/prefer-string-trim-start-end": "error", // check perf vs helper // eslint-plugin-no-null "no-null/no-null": "error", diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts index 228abb1572c79..baa8341f99edd 100644 --- a/src/harness/fourslashImpl.ts +++ b/src/harness/fourslashImpl.ts @@ -2129,7 +2129,7 @@ export class TestState { const isEmpty = selectionStart.line === selectionEnd.line && selectionStart.character === selectionEnd.character; const selectionPadLength = lineNumber === selectionStart.line ? selectionStart.character : 0; const selectionPad = " ".repeat(selectionPadLength + lineNumberPrefixLength); - const selectionLength = isEmpty ? 0 : Math.max(lineNumber < selectionEnd.line ? spanLine.trimRight().length - selectionPadLength : selectionEnd.character - selectionPadLength, 1); + const selectionLength = isEmpty ? 0 : Math.max(lineNumber < selectionEnd.line ? spanLine.trimEnd().length - selectionPadLength : selectionEnd.character - selectionPadLength, 1); const selectionLine = isEmpty ? "<" : "^".repeat(selectionLength); output.push(`${selectionPad}${selectionLine}`); } @@ -4135,7 +4135,7 @@ export class TestState { let text = ""; text += `${prefix}╭ ${file.fileName}:${startLc.line + 1}:${startLc.character + 1}-${endLc.line + 1}:${endLc.character + 1}\n`; for (const line of lines) { - text += `${prefix}│ ${line.trimRight()}\n`; + text += `${prefix}│ ${line.trimEnd()}\n`; } text += `${trailingPrefix}╰\n`; return text; From d575268e5fdc7ccb6bff7b85212219cddc12d322 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 1 Sep 2023 15:48:46 -0700 Subject: [PATCH 09/40] Drop rule, I'm not gonna fix 240 of these by hand --- .eslintrc.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index c5dfa8757c964..ea858bb6dce5d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -145,8 +145,6 @@ "unicorn/no-new-buffer": "error", "unicorn/prefer-set-has": "error", "unicorn/prefer-string-trim-start-end": "error", - // TODO(jakebailey): Require manual fixups - // "unicorn/prefer-string-slice": "error", // eslint-plugin-no-null "no-null/no-null": "error", From a6a82bfcbd64d5d6f3e5bb993844305be43eb8e1 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 1 Sep 2023 16:01:55 -0700 Subject: [PATCH 10/40] Don't new Array + join for padding --- src/compiler/commandLineParser.ts | 4 ++-- src/harness/fourslashImpl.ts | 5 +---- src/harness/harnessIO.ts | 2 +- 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index 82513430a2d65..d139f2c0e97b8 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -2612,7 +2612,7 @@ export function getCompilerOptionsDiffValue(options: CompilerOptions, newLine: s return getOverwrittenDefaultOptions(); function makePadding(paddingLength: number): string { - return new Array(paddingLength + 1).join(" "); + return " ".repeat(paddingLength); } function getOverwrittenDefaultOptions() { @@ -2656,7 +2656,7 @@ export function generateTSConfig(options: CompilerOptions, fileNames: readonly s return writeConfigurations(); function makePadding(paddingLength: number): string { - return new Array(paddingLength + 1).join(" "); + return " ".repeat(paddingLength); } function isAllowedOptionForOutput({ category, name, isCommandLineOnly }: CommandLineOption): boolean { diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts index baa8341f99edd..01e8eb792afe9 100644 --- a/src/harness/fourslashImpl.ts +++ b/src/harness/fourslashImpl.ts @@ -2594,16 +2594,13 @@ export class TestState { if (info === undefined) return "No completion info."; const { entries } = info; - function pad(s: string, length: number) { - return s + new Array(length - s.length + 1).join(" "); - } function max(arr: T[], selector: (x: T) => number): number { return arr.reduce((prev, x) => Math.max(prev, selector(x)), 0); } const longestNameLength = max(entries, m => m.name.length); const longestKindLength = max(entries, m => m.kind.length); entries.sort((m, n) => m.sortText > n.sortText ? 1 : m.sortText < n.sortText ? -1 : m.name > n.name ? 1 : m.name < n.name ? -1 : 0); - const membersString = entries.map(m => `${pad(m.name, longestNameLength)} ${pad(m.kind, longestKindLength)} ${m.kindModifiers} ${m.isRecommended ? "recommended " : ""}${m.source === undefined ? "" : m.source}`).join("\n"); + const membersString = entries.map(m => `${m.name.padEnd(longestNameLength)} ${m.kind.padEnd(longestKindLength)} ${m.kindModifiers} ${m.isRecommended ? "recommended " : ""}${m.source === undefined ? "" : m.source}`).join("\n"); Harness.IO.log(membersString); } diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index 2a5cef67fed73..005784107fb57 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -690,7 +690,7 @@ export namespace Compiler { // Calculate the start of the squiggle const squiggleStart = Math.max(0, relativeOffset); // TODO/REVIEW: this doesn't work quite right in the browser if a multi file test has files whose names are just the right length relative to one another - outputLines += newLine() + " " + line.substr(0, squiggleStart).replace(/[^\s]/g, " ") + new Array(Math.min(length, line.length - squiggleStart) + 1).join("~"); + outputLines += newLine() + " " + line.substr(0, squiggleStart).replace(/[^\s]/g, " ") + "~".repeat(Math.min(length, line.length - squiggleStart)); // If the error ended here, or we're at the end of the file, emit its message if ((lineIndex === lines.length - 1) || nextLineStart > end) { From c8263be076bda144abf7d84a71cee36eecd23a2a Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Tue, 5 Sep 2023 11:31:05 -0700 Subject: [PATCH 11/40] Fix compile err --- scripts/errorCheck.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/errorCheck.mjs b/scripts/errorCheck.mjs index 1288ff3cebf56..67e3d109fd80d 100644 --- a/scripts/errorCheck.mjs +++ b/scripts/errorCheck.mjs @@ -2,6 +2,7 @@ import fs from "fs"; import fsPromises from "fs/promises"; import _glob from "glob"; import util from "util"; +import assert from "assert"; const glob = util.promisify(_glob); @@ -28,6 +29,7 @@ async function checkErrorBaselines() { while (g = errRegex.exec(baseline)) { const errCode = +g[1]; const msg = keys.find(k => messages[k].code === errCode); + assert(msg); messages[msg].seen = true; } }); From a834ea6d9eafeaca8771fd16536f1d26578d3bb1 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Wed, 6 Sep 2023 11:24:52 -0700 Subject: [PATCH 12/40] Fix lint --- scripts/errorCheck.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/errorCheck.mjs b/scripts/errorCheck.mjs index 67e3d109fd80d..fabfdcf24dac5 100644 --- a/scripts/errorCheck.mjs +++ b/scripts/errorCheck.mjs @@ -1,8 +1,8 @@ +import assert from "assert"; import fs from "fs"; import fsPromises from "fs/promises"; import _glob from "glob"; import util from "util"; -import assert from "assert"; const glob = util.promisify(_glob); From 18f411da8fb2f85bc90c8441ee74211d2e7456dc Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 11 Dec 2023 12:09:51 -0800 Subject: [PATCH 13/40] Bump and fix --- package-lock.json | 61 +++++++++++++------------ package.json | 2 +- src/testRunner/unittests/helpers/tsc.ts | 4 +- 3 files changed, 34 insertions(+), 33 deletions(-) diff --git a/package-lock.json b/package-lock.json index d398ce5887062..3a12c5af21707 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "eslint-plugin-local": "^1.0.0", "eslint-plugin-no-null": "^1.0.2", "eslint-plugin-simple-import-sort": "^10.0.0", - "eslint-plugin-unicorn": "^48.0.1", + "eslint-plugin-unicorn": "^49.0.0", "fast-xml-parser": "^4.0.11", "glob": "^8.1.0", "hereby": "^1.6.4", @@ -154,9 +154,9 @@ } }, "node_modules/@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true, "engines": { "node": ">=6.9.0" @@ -2179,12 +2179,12 @@ } }, "node_modules/eslint-plugin-unicorn": { - "version": "48.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-48.0.1.tgz", - "integrity": "sha512-FW+4r20myG/DqFcCSzoumaddKBicIPeFnTrifon2mWIzlfyvzwyqZjqVP7m4Cqr/ZYisS2aiLghkUWaPg6vtCw==", + "version": "49.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-49.0.0.tgz", + "integrity": "sha512-0fHEa/8Pih5cmzFW5L7xMEfUTvI9WKeQtjmKpTUmY+BiFCDxkxrTdnURJOHKykhtwIeyYsxnecbGvDCml++z4Q==", "dev": true, "dependencies": { - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "@eslint-community/eslint-utils": "^4.4.0", "ci-info": "^3.8.0", "clean-regexp": "^1.0.0", @@ -2192,7 +2192,6 @@ "indent-string": "^4.0.0", "is-builtin-module": "^3.2.1", "jsesc": "^3.0.2", - "lodash": "^4.17.21", "pluralize": "^8.0.0", "read-pkg-up": "^7.0.1", "regexp-tree": "^0.1.27", @@ -2207,7 +2206,7 @@ "url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1" }, "peerDependencies": { - "eslint": ">=8.44.0" + "eslint": ">=8.52.0" } }, "node_modules/eslint-scope": { @@ -2667,6 +2666,15 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, + "node_modules/has": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", + "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, "node_modules/has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -3111,12 +3119,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, "node_modules/lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", @@ -4721,9 +4723,9 @@ } }, "@babel/helper-validator-identifier": { - "version": "7.22.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.5.tgz", - "integrity": "sha512-aJXu+6lErq8ltp+JhkJUfk1MTGyuA4v7f3pA+BJ5HLfNC6nAQ0Cpi9uOquUj8Hehg0aUiHzWQbOVJGao6ztBAQ==", + "version": "7.22.20", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz", + "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==", "dev": true }, "@babel/highlight": { @@ -6125,12 +6127,12 @@ "requires": {} }, "eslint-plugin-unicorn": { - "version": "48.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-48.0.1.tgz", - "integrity": "sha512-FW+4r20myG/DqFcCSzoumaddKBicIPeFnTrifon2mWIzlfyvzwyqZjqVP7m4Cqr/ZYisS2aiLghkUWaPg6vtCw==", + "version": "49.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-49.0.0.tgz", + "integrity": "sha512-0fHEa/8Pih5cmzFW5L7xMEfUTvI9WKeQtjmKpTUmY+BiFCDxkxrTdnURJOHKykhtwIeyYsxnecbGvDCml++z4Q==", "dev": true, "requires": { - "@babel/helper-validator-identifier": "^7.22.5", + "@babel/helper-validator-identifier": "^7.22.20", "@eslint-community/eslint-utils": "^4.4.0", "ci-info": "^3.8.0", "clean-regexp": "^1.0.0", @@ -6138,7 +6140,6 @@ "indent-string": "^4.0.0", "is-builtin-module": "^3.2.1", "jsesc": "^3.0.2", - "lodash": "^4.17.21", "pluralize": "^8.0.0", "read-pkg-up": "^7.0.1", "regexp-tree": "^0.1.27", @@ -6462,6 +6463,12 @@ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==", "dev": true }, + "has": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz", + "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==", + "dev": true + }, "has-flag": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", @@ -6788,12 +6795,6 @@ "p-locate": "^5.0.0" } }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, "lodash.merge": { "version": "4.6.2", "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz", diff --git a/package.json b/package.json index 2ab8331909e89..1dd87605745e6 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "eslint-plugin-local": "^1.0.0", "eslint-plugin-no-null": "^1.0.2", "eslint-plugin-simple-import-sort": "^10.0.0", - "eslint-plugin-unicorn": "^48.0.1", + "eslint-plugin-unicorn": "^49.0.0", "fast-xml-parser": "^4.0.11", "glob": "^8.1.0", "hereby": "^1.6.4", diff --git a/src/testRunner/unittests/helpers/tsc.ts b/src/testRunner/unittests/helpers/tsc.ts index a37d0ce936a62..faa664a07dabb 100644 --- a/src/testRunner/unittests/helpers/tsc.ts +++ b/src/testRunner/unittests/helpers/tsc.ts @@ -368,10 +368,10 @@ function verifyTscEditDiscrepancies({ incrementalReadableBuildInfo.program.emitDiagnosticsPerFile.forEach(([actualFileOrArray]) => { const actualFile = ts.isString(actualFileOrArray) ? actualFileOrArray : actualFileOrArray[0]; if ( - !ts.find( + !ts.some( (cleanReadableBuildInfo!.program! as ReadableProgramMultiFileEmitBuildInfo).emitDiagnosticsPerFile, ([expectedFileOrArray]) => actualFile === (ts.isString(expectedFileOrArray) ? expectedFileOrArray : expectedFileOrArray[0]), - ) && !ts.find( + ) && !ts.some( (cleanReadableBuildInfo!.program! as ReadableProgramMultiFileEmitBuildInfo).affectedFilesPendingEmit, ([expectedFileOrArray]) => actualFile === (ts.isString(expectedFileOrArray) ? expectedFileOrArray : expectedFileOrArray[0]), ) From fef553215fd9fa0c6cb1e842959a281064af8f23 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 19 Jan 2024 20:15:40 -0800 Subject: [PATCH 14/40] Fix lint --- src/compiler/moduleSpecifiers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/moduleSpecifiers.ts b/src/compiler/moduleSpecifiers.ts index 9801e54397c0f..2d9e8ec527a30 100644 --- a/src/compiler/moduleSpecifiers.ts +++ b/src/compiler/moduleSpecifiers.ts @@ -919,7 +919,7 @@ function tryGetModuleNameFromExportsOrImports(options: CompilerOptions, host: Mo else if (typeof exports === "object" && exports !== null) { // eslint-disable-line no-null/no-null // conditional mapping for (const key of getOwnKeys(exports as MapLike)) { - if (key === "default" || conditions.indexOf(key) >= 0 || isApplicableVersionedTypesKey(conditions, key)) { + if (key === "default" || conditions.includes(key) || isApplicableVersionedTypesKey(conditions, key)) { const subTarget = (exports as MapLike)[key]; const result = tryGetModuleNameFromExportsOrImports(options, host, targetFilePath, packageDirectory, packageName, subTarget, conditions, mode, isImports); if (result) { From b1d2b242c2e29e47e748ae1fadfbeb181f3f2ebd Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 19 Jan 2024 20:17:36 -0800 Subject: [PATCH 15/40] Bump --- package-lock.json | 192 ++++++++++++++++++++++++++++++++++++++++++---- package.json | 2 +- 2 files changed, 177 insertions(+), 17 deletions(-) diff --git a/package-lock.json b/package-lock.json index d00926c3aea1b..4f53730e0c55c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -40,7 +40,7 @@ "eslint-plugin-local": "^3.1.0", "eslint-plugin-no-null": "^1.0.2", "eslint-plugin-simple-import-sort": "^10.0.0", - "eslint-plugin-unicorn": "^49.0.0", + "eslint-plugin-unicorn": "^50.0.1", "fast-xml-parser": "^4.3.3", "glob": "^10.3.10", "hereby": "^1.8.9", @@ -1613,6 +1613,38 @@ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, + "node_modules/browserslist": { + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz", + "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001565", + "electron-to-chromium": "^1.4.601", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -1691,6 +1723,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/caniuse-lite": { + "version": "1.0.30001579", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001579.tgz", + "integrity": "sha512-u5AUVkixruKHJjw/pj9wISlcMpgFWzSrczLZbrqBSxukQixmg0SJ5sZTpvaFvxU0HoQKd4yoyAogyrAz9pzJnA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, "node_modules/chai": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", @@ -1765,9 +1817,9 @@ } }, "node_modules/ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.0.0.tgz", + "integrity": "sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==", "dev": true, "funding": [ { @@ -1967,6 +2019,19 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, + "node_modules/core-js-compat": { + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.35.0.tgz", + "integrity": "sha512-5blwFAddknKeNgsjBzilkdQ0+YK8L1PfqPYq40NOYMYFSS38qj+hpTcLLWwpIwA2A5bje/x5jmVn2tzUMg9IVw==", + "dev": true, + "dependencies": { + "browserslist": "^4.22.2" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -2145,6 +2210,12 @@ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true }, + "node_modules/electron-to-chromium": { + "version": "1.4.640", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.640.tgz", + "integrity": "sha512-z/6oZ/Muqk4BaE7P69bXhUhpJbUM9ZJeka43ZwxsDshKtePns4mhBlh8bU5+yrnOnz3fhG82XLzGUXazOmsWnA==", + "dev": true + }, "node_modules/emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", @@ -2327,15 +2398,17 @@ } }, "node_modules/eslint-plugin-unicorn": { - "version": "49.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-49.0.0.tgz", - "integrity": "sha512-0fHEa/8Pih5cmzFW5L7xMEfUTvI9WKeQtjmKpTUmY+BiFCDxkxrTdnURJOHKykhtwIeyYsxnecbGvDCml++z4Q==", + "version": "50.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-50.0.1.tgz", + "integrity": "sha512-KxenCZxqSYW0GWHH18okDlOQcpezcitm5aOSz6EnobyJ6BIByiPDviQRjJIUAjG/tMN11958MxaQ+qCoU6lfDA==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.22.20", "@eslint-community/eslint-utils": "^4.4.0", - "ci-info": "^3.8.0", + "@eslint/eslintrc": "^2.1.4", + "ci-info": "^4.0.0", "clean-regexp": "^1.0.0", + "core-js-compat": "^3.34.0", "esquery": "^1.5.0", "indent-string": "^4.0.0", "is-builtin-module": "^3.2.1", @@ -2354,7 +2427,7 @@ "url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1" }, "peerDependencies": { - "eslint": ">=8.52.0" + "eslint": ">=8.56.0" } }, "node_modules/eslint-scope": { @@ -3653,6 +3726,12 @@ "url": "https://opencollective.com/node-fetch" } }, + "node_modules/node-releases": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "dev": true + }, "node_modules/normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -4830,6 +4909,36 @@ "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==", "dev": true }, + "node_modules/update-browserslist-db": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -6133,6 +6242,18 @@ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, + "browserslist": { + "version": "4.22.2", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz", + "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001565", + "electron-to-chromium": "^1.4.601", + "node-releases": "^2.0.14", + "update-browserslist-db": "^1.0.13" + } + }, "buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", @@ -6187,6 +6308,12 @@ "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true }, + "caniuse-lite": { + "version": "1.0.30001579", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001579.tgz", + "integrity": "sha512-u5AUVkixruKHJjw/pj9wISlcMpgFWzSrczLZbrqBSxukQixmg0SJ5sZTpvaFvxU0HoQKd4yoyAogyrAz9pzJnA==", + "dev": true + }, "chai": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.1.tgz", @@ -6238,9 +6365,9 @@ } }, "ci-info": { - "version": "3.9.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", - "integrity": "sha512-NIxF55hv4nSqQswkAeiOi1r83xy8JldOFDTWiug55KBu9Jnblncd2U6ViHmYgHf01TPZS77NJBhBMKdWj9HQMQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.0.0.tgz", + "integrity": "sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==", "dev": true }, "clean-regexp": { @@ -6398,6 +6525,15 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, + "core-js-compat": { + "version": "3.35.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.35.0.tgz", + "integrity": "sha512-5blwFAddknKeNgsjBzilkdQ0+YK8L1PfqPYq40NOYMYFSS38qj+hpTcLLWwpIwA2A5bje/x5jmVn2tzUMg9IVw==", + "dev": true, + "requires": { + "browserslist": "^4.22.2" + } + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -6532,6 +6668,12 @@ "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", "dev": true }, + "electron-to-chromium": { + "version": "1.4.640", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.640.tgz", + "integrity": "sha512-z/6oZ/Muqk4BaE7P69bXhUhpJbUM9ZJeka43ZwxsDshKtePns4mhBlh8bU5+yrnOnz3fhG82XLzGUXazOmsWnA==", + "dev": true + }, "emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", @@ -6700,15 +6842,17 @@ "requires": {} }, "eslint-plugin-unicorn": { - "version": "49.0.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-49.0.0.tgz", - "integrity": "sha512-0fHEa/8Pih5cmzFW5L7xMEfUTvI9WKeQtjmKpTUmY+BiFCDxkxrTdnURJOHKykhtwIeyYsxnecbGvDCml++z4Q==", + "version": "50.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-50.0.1.tgz", + "integrity": "sha512-KxenCZxqSYW0GWHH18okDlOQcpezcitm5aOSz6EnobyJ6BIByiPDviQRjJIUAjG/tMN11958MxaQ+qCoU6lfDA==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.22.20", "@eslint-community/eslint-utils": "^4.4.0", - "ci-info": "^3.8.0", + "@eslint/eslintrc": "^2.1.4", + "ci-info": "^4.0.0", "clean-regexp": "^1.0.0", + "core-js-compat": "^3.34.0", "esquery": "^1.5.0", "indent-string": "^4.0.0", "is-builtin-module": "^3.2.1", @@ -7620,6 +7764,12 @@ "formdata-polyfill": "^4.0.10" } }, + "node-releases": { + "version": "2.0.14", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", + "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "dev": true + }, "normalize-package-data": { "version": "2.5.0", "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", @@ -8454,6 +8604,16 @@ "integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ==", "dev": true }, + "update-browserslist-db": { + "version": "1.0.13", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz", + "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==", + "dev": true, + "requires": { + "escalade": "^3.1.1", + "picocolors": "^1.0.0" + } + }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", diff --git a/package.json b/package.json index 3fb26bc649e92..b2c7f60258c0c 100644 --- a/package.json +++ b/package.json @@ -66,7 +66,7 @@ "eslint-plugin-local": "^3.1.0", "eslint-plugin-no-null": "^1.0.2", "eslint-plugin-simple-import-sort": "^10.0.0", - "eslint-plugin-unicorn": "^49.0.0", + "eslint-plugin-unicorn": "^50.0.1", "fast-xml-parser": "^4.3.3", "glob": "^10.3.10", "hereby": "^1.8.9", From 1764b8ef63a0f1b2edd266f0ca5036ebd01634bb Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 19 Jan 2024 21:00:04 -0800 Subject: [PATCH 16/40] Classify --- .eslintrc.json | 64 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index ea858bb6dce5d..c67f8cd027f09 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -13,7 +13,8 @@ "extends": [ "eslint:recommended", "plugin:@typescript-eslint/recommended", - "plugin:@typescript-eslint/stylistic" + "plugin:@typescript-eslint/stylistic", + "plugin:unicorn/recommended" ], "plugins": [ "@typescript-eslint", @@ -128,6 +129,7 @@ "local/jsdoc-format": "error", // eslint-plugin-unicorn + // good "unicorn/prefer-includes": "error", "unicorn/new-for-builtins": "error", "unicorn/prefer-logical-operator-over-ternary": "error", @@ -146,6 +148,66 @@ "unicorn/prefer-set-has": "error", "unicorn/prefer-string-trim-start-end": "error", + // maybe + "unicorn/prefer-node-protocol": "off", + "unicorn/prefer-code-point": "off", + "unicorn/no-negated-condition": "off", + "unicorn/prefer-spread": "off", + "unicorn/no-useless-undefined": "off", + "unicorn/no-null": "off", + "unicorn/no-array-for-each": "off", + "unicorn/prefer-string-slice": "off", + "unicorn/no-typeof-undefined": "off", + "unicorn/explicit-length-check": "off", + "unicorn/no-for-loop": "off", + "unicorn/prefer-math-trunc": "off", + "unicorn/no-lonely-if": "off", + "unicorn/no-zero-fractions": "off", + "unicorn/prefer-switch": "off", + "unicorn/prefer-reflect-apply": "off", + "unicorn/prefer-event-target": "off", + "unicorn/prefer-top-level-await": "off", + "unicorn/error-message": "off", + + // likely not + "unicorn/prefer-at": "off", + "unicorn/prefer-number-properties": "off", + "unicorn/prefer-string-replace-all": "off", + "unicorn/no-array-push-push": "off", + "unicorn/prefer-regexp-test": "off", + "unicorn/better-regex": "off", + "unicorn/no-new-array": "off", + "unicorn/number-literal-case": "off", + "unicorn/prefer-negative-index": "off", + "unicorn/no-array-reduce": "off", + "unicorn/no-useless-switch-case": "off", + "unicorn/prefer-native-coercion-functions": "off", + + // no + "unicorn/filename-case": "off", + "unicorn/prevent-abbreviations": "off", + "unicorn/empty-brace-spaces": "off", + "unicorn/catch-error-name": "off", + "unicorn/prefer-module": "off", + "unicorn/switch-case-braces": "off", + "unicorn/numeric-separators-style": "off", + "unicorn/import-style": "off", + "unicorn/consistent-function-scoping": "off", + "unicorn/text-encoding-identifier-case": "off", + "unicorn/no-process-exit": "off", + "unicorn/prefer-export-from": "off", + "unicorn/prefer-ternary": "off", + "unicorn/template-indent": "off", + "unicorn/no-array-callback-reference": "off", + "unicorn/no-array-method-this-argument": "off", // false positives + "unicorn/no-nested-ternary": "off", + "unicorn/consistent-destructuring": "off", // false positives + "unicorn/no-hex-escape": "off", + "unicorn/no-object-as-default-parameter": "off", + "unicorn/escape-case": "off", + "unicorn/prefer-type-error": "off", + "unicorn/no-await-expression-member": "off", + // eslint-plugin-no-null "no-null/no-null": "error", From 695ed0fab4314fc7330fd460e637cd6cb5e86eb7 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 19 Jan 2024 21:07:10 -0800 Subject: [PATCH 17/40] More triage --- .eslintrc.json | 12 ++++++------ src/server/session.ts | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index c67f8cd027f09..d54b777f853a9 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -147,26 +147,22 @@ "unicorn/no-new-buffer": "error", "unicorn/prefer-set-has": "error", "unicorn/prefer-string-trim-start-end": "error", + "unicorn/no-zero-fractions": "error", // maybe "unicorn/prefer-node-protocol": "off", "unicorn/prefer-code-point": "off", - "unicorn/no-negated-condition": "off", "unicorn/prefer-spread": "off", - "unicorn/no-useless-undefined": "off", - "unicorn/no-null": "off", + "unicorn/no-null": "off", // if we remove the other plugin "unicorn/no-array-for-each": "off", "unicorn/prefer-string-slice": "off", "unicorn/no-typeof-undefined": "off", "unicorn/explicit-length-check": "off", "unicorn/no-for-loop": "off", "unicorn/prefer-math-trunc": "off", - "unicorn/no-lonely-if": "off", - "unicorn/no-zero-fractions": "off", "unicorn/prefer-switch": "off", "unicorn/prefer-reflect-apply": "off", "unicorn/prefer-event-target": "off", - "unicorn/prefer-top-level-await": "off", "unicorn/error-message": "off", // likely not @@ -182,6 +178,7 @@ "unicorn/no-array-reduce": "off", "unicorn/no-useless-switch-case": "off", "unicorn/prefer-native-coercion-functions": "off", + "unicorn/prefer-top-level-await": "off", // no "unicorn/filename-case": "off", @@ -207,6 +204,9 @@ "unicorn/escape-case": "off", "unicorn/prefer-type-error": "off", "unicorn/no-await-expression-member": "off", + "unicorn/no-useless-undefined": "off", + "unicorn/no-negated-condition": "off", + "unicorn/no-lonely-if": "off", // eslint-plugin-no-null "no-null/no-null": "error", diff --git a/src/server/session.ts b/src/server/session.ts index 79b8112f49f99..c7a466a7b95f6 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -203,7 +203,7 @@ export const nullCancellationToken: ServerCancellationToken = { function hrTimeToMilliseconds(time: [number, number]): number { const seconds = time[0]; const nanoseconds = time[1]; - return ((1e9 * seconds) + nanoseconds) / 1000000.0; + return ((1e9 * seconds) + nanoseconds) / 1000000; } function isDeclarationFileInJSOnlyNonConfiguredProject(project: Project, file: NormalizedPath) { From 74b65508e8fd5ec5cb9cdfbdbbc006412ee9bdf2 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 19 Jan 2024 21:34:44 -0800 Subject: [PATCH 18/40] More triage --- .eslintrc.json | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index d54b777f853a9..ee09dd980092a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -149,24 +149,17 @@ "unicorn/prefer-string-trim-start-end": "error", "unicorn/no-zero-fractions": "error", - // maybe - "unicorn/prefer-node-protocol": "off", - "unicorn/prefer-code-point": "off", - "unicorn/prefer-spread": "off", - "unicorn/no-null": "off", // if we remove the other plugin - "unicorn/no-array-for-each": "off", - "unicorn/prefer-string-slice": "off", + // likely yes "unicorn/no-typeof-undefined": "off", - "unicorn/explicit-length-check": "off", - "unicorn/no-for-loop": "off", - "unicorn/prefer-math-trunc": "off", + "unicorn/no-null": "off", // if we remove the other plugin "unicorn/prefer-switch": "off", + + // maybe + "unicorn/prefer-code-point": "off", "unicorn/prefer-reflect-apply": "off", - "unicorn/prefer-event-target": "off", "unicorn/error-message": "off", // likely not - "unicorn/prefer-at": "off", "unicorn/prefer-number-properties": "off", "unicorn/prefer-string-replace-all": "off", "unicorn/no-array-push-push": "off", @@ -179,6 +172,11 @@ "unicorn/no-useless-switch-case": "off", "unicorn/prefer-native-coercion-functions": "off", "unicorn/prefer-top-level-await": "off", + "unicorn/prefer-spread": "off", + "unicorn/prefer-event-target": "off", + "unicorn/prefer-string-slice": "off", + "unicorn/explicit-length-check": "off", // I like it, but it's a lot of changes + "unicorn/prefer-node-protocol": "off", // I like it, but it's pure style // no "unicorn/filename-case": "off", @@ -207,6 +205,10 @@ "unicorn/no-useless-undefined": "off", "unicorn/no-negated-condition": "off", "unicorn/no-lonely-if": "off", + "unicorn/prefer-math-trunc": "off", // Treats `1 << 0` as invalid + "unicorn/no-array-for-each": "off", // false positives + "unicorn/no-for-loop": "off", // quick fix produces slower `.entries()` + "unicorn/prefer-at": "off", // perf // eslint-plugin-no-null "no-null/no-null": "error", From 4681bc09eaa48d209e07f44d3f4893bea3e13e34 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 19 Jan 2024 21:38:12 -0800 Subject: [PATCH 19/40] More triage --- .eslintrc.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index ee09dd980092a..85fe498830f35 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -153,11 +153,11 @@ "unicorn/no-typeof-undefined": "off", "unicorn/no-null": "off", // if we remove the other plugin "unicorn/prefer-switch": "off", + "unicorn/error-message": "off", // good, but a false positive // maybe "unicorn/prefer-code-point": "off", - "unicorn/prefer-reflect-apply": "off", - "unicorn/error-message": "off", + "unicorn/prefer-reflect-apply": "off", // tbh don't understand the difference // likely not "unicorn/prefer-number-properties": "off", From 7771ddf843acd1209db8b4e5db5f8ac4821314ca Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Fri, 19 Jan 2024 21:40:56 -0800 Subject: [PATCH 20/40] More triage --- .eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 85fe498830f35..5562d4ee85d93 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -156,7 +156,6 @@ "unicorn/error-message": "off", // good, but a false positive // maybe - "unicorn/prefer-code-point": "off", "unicorn/prefer-reflect-apply": "off", // tbh don't understand the difference // likely not @@ -177,6 +176,7 @@ "unicorn/prefer-string-slice": "off", "unicorn/explicit-length-check": "off", // I like it, but it's a lot of changes "unicorn/prefer-node-protocol": "off", // I like it, but it's pure style + "unicorn/prefer-code-point": "off", // I suspect this is correct, but it's a lot of changes in fiddly bits of the code // no "unicorn/filename-case": "off", From 844233b93312dcc7cf9125920c5e7b79bc157aa0 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sat, 20 Jan 2024 09:59:42 -0800 Subject: [PATCH 21/40] More triage --- .eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 5562d4ee85d93..5e7bfd33938de 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -153,7 +153,7 @@ "unicorn/no-typeof-undefined": "off", "unicorn/no-null": "off", // if we remove the other plugin "unicorn/prefer-switch": "off", - "unicorn/error-message": "off", // good, but a false positive + "unicorn/error-message": "off", // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2265 // maybe "unicorn/prefer-reflect-apply": "off", // tbh don't understand the difference From 33366b2b578b5cfaae8e8356c2d880534b36f120 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sat, 20 Jan 2024 10:17:54 -0800 Subject: [PATCH 22/40] More triage --- .eslintrc.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 5e7bfd33938de..feba72e132f2a 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -150,9 +150,7 @@ "unicorn/no-zero-fractions": "error", // likely yes - "unicorn/no-typeof-undefined": "off", "unicorn/no-null": "off", // if we remove the other plugin - "unicorn/prefer-switch": "off", "unicorn/error-message": "off", // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2265 // maybe @@ -209,6 +207,8 @@ "unicorn/no-array-for-each": "off", // false positives "unicorn/no-for-loop": "off", // quick fix produces slower `.entries()` "unicorn/prefer-at": "off", // perf + "unicorn/prefer-switch": "off", // quick fix produces non-idiomatic code for this repo + "unicorn/no-typeof-undefined": "off", // False positive when checking for a global without throwing // eslint-plugin-no-null "no-null/no-null": "error", From 200ee8bdbb8f05c86b7a504a0989381d7106febb Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sat, 20 Jan 2024 10:20:36 -0800 Subject: [PATCH 23/40] More triage --- .eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index feba72e132f2a..2ea8de582c61f 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -150,7 +150,6 @@ "unicorn/no-zero-fractions": "error", // likely yes - "unicorn/no-null": "off", // if we remove the other plugin "unicorn/error-message": "off", // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2265 // maybe @@ -209,6 +208,7 @@ "unicorn/prefer-at": "off", // perf "unicorn/prefer-switch": "off", // quick fix produces non-idiomatic code for this repo "unicorn/no-typeof-undefined": "off", // False positive when checking for a global without throwing + "unicorn/no-null": "off", // if we remove the other plugin // eslint-plugin-no-null "no-null/no-null": "error", From 3da23d093bdbfd5c9a989b600bd6d370aad53366 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sat, 20 Jan 2024 10:35:00 -0800 Subject: [PATCH 24/40] More triage --- .eslintrc.json | 8 ++++---- src/compiler/resolutionCache.ts | 4 ++-- src/compiler/sourcemap.ts | 2 +- src/compiler/watch.ts | 6 +++--- src/harness/harnessIO.ts | 6 +++--- src/services/jsDoc.ts | 2 +- src/testRunner/unittests/services/hostNewLineSupport.ts | 2 ++ 7 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 2ea8de582c61f..e0436d392d25d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -148,6 +148,7 @@ "unicorn/prefer-set-has": "error", "unicorn/prefer-string-trim-start-end": "error", "unicorn/no-zero-fractions": "error", + "unicorn/prefer-regexp-test": "error", // likely yes "unicorn/error-message": "off", // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2265 @@ -156,10 +157,6 @@ "unicorn/prefer-reflect-apply": "off", // tbh don't understand the difference // likely not - "unicorn/prefer-number-properties": "off", - "unicorn/prefer-string-replace-all": "off", - "unicorn/no-array-push-push": "off", - "unicorn/prefer-regexp-test": "off", "unicorn/better-regex": "off", "unicorn/no-new-array": "off", "unicorn/number-literal-case": "off", @@ -209,6 +206,9 @@ "unicorn/prefer-switch": "off", // quick fix produces non-idiomatic code for this repo "unicorn/no-typeof-undefined": "off", // False positive when checking for a global without throwing "unicorn/no-null": "off", // if we remove the other plugin + "unicorn/prefer-number-properties": "off", + "unicorn/prefer-string-replace-all": "off", // not available in node 14 + "unicorn/no-array-push-push": "off", // eslint-plugin-no-null "no-null/no-null": "error", diff --git a/src/compiler/resolutionCache.ts b/src/compiler/resolutionCache.ts index 375083077b241..75c2adf440309 100644 --- a/src/compiler/resolutionCache.ts +++ b/src/compiler/resolutionCache.ts @@ -274,13 +274,13 @@ function perceivedOsRootLengthForWatching(pathComponents: Readonly, getCom /** @internal */ export function getSourceFileVersionAsHashFromText(host: Pick, text: string) { // If text can contain the sourceMapUrl ignore sourceMapUrl for calcualting hash - if (text.match(sourceMapCommentRegExpDontCareLineStart)) { + if (sourceMapCommentRegExpDontCareLineStart.test(text)) { let lineEnd = text.length; let lineStart = lineEnd; for (let pos = lineEnd - 1; pos >= 0; pos--) { @@ -798,12 +798,12 @@ export function getSourceFileVersionAsHashFromText(host: Pick { assert(result.outputFiles.length === 1, "a number of files other than 1 was output"); assert(result.outputFiles[0].name === "input.js", `Expected output file name input.js, but got ${result.outputFiles[0].name}`); assert(result.outputFiles[0].text.match(options.newLine === ts.NewLineKind.CarriageReturnLineFeed ? /\r\n/ : /[^\r]\n/), "expected to find appropriate newlines"); + // eslint-disable-next-line unicorn/prefer-regexp-test assert(!result.outputFiles[0].text.match(options.newLine === ts.NewLineKind.CarriageReturnLineFeed ? /[^\r]\n/ : /\r\n/), "expected not to find inappropriate newlines"); } @@ -55,6 +56,7 @@ describe("unittests:: services:: hostNewLineSupport", () => { const span = ls.getOutliningSpans("input.ts")[0]; const textAfterSpanCollapse = content.substring(span.textSpan.start + span.textSpan.length); assert(textAfterSpanCollapse.match(options.newLine === ts.NewLineKind.CarriageReturnLineFeed ? /\r\n/ : /[^\r]\n/), "expected to find appropriate newlines"); + // eslint-disable-next-line unicorn/prefer-regexp-test assert(!textAfterSpanCollapse.match(options.newLine === ts.NewLineKind.CarriageReturnLineFeed ? /[^\r]\n/ : /\r\n/), "expected not to find inappropriate newlines"); } From eb7ba9f2dec8f286b3516ea57202e4bad4ba8785 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sat, 20 Jan 2024 10:38:50 -0800 Subject: [PATCH 25/40] More triage --- .eslintrc.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index e0436d392d25d..9a62b0b537e7d 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -158,7 +158,6 @@ // likely not "unicorn/better-regex": "off", - "unicorn/no-new-array": "off", "unicorn/number-literal-case": "off", "unicorn/prefer-negative-index": "off", "unicorn/no-array-reduce": "off", @@ -168,9 +167,6 @@ "unicorn/prefer-spread": "off", "unicorn/prefer-event-target": "off", "unicorn/prefer-string-slice": "off", - "unicorn/explicit-length-check": "off", // I like it, but it's a lot of changes - "unicorn/prefer-node-protocol": "off", // I like it, but it's pure style - "unicorn/prefer-code-point": "off", // I suspect this is correct, but it's a lot of changes in fiddly bits of the code // no "unicorn/filename-case": "off", @@ -209,6 +205,10 @@ "unicorn/prefer-number-properties": "off", "unicorn/prefer-string-replace-all": "off", // not available in node 14 "unicorn/no-array-push-push": "off", + "unicorn/no-new-array": "off", // I like it, but we have a few canonical use cases + "unicorn/explicit-length-check": "off", // I like it, but it's a lot of changes + "unicorn/prefer-node-protocol": "off", // I like it, but it's pure style + "unicorn/prefer-code-point": "off", // I suspect this is correct, but it's a lot of changes in fiddly bits of the code // eslint-plugin-no-null "no-null/no-null": "error", From c251a2b8b4e73f4db7d9777b479a0dd164fddc7f Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sat, 20 Jan 2024 10:40:39 -0800 Subject: [PATCH 26/40] number literal --- .eslintrc.json | 2 +- src/compiler/checker.ts | 2 +- src/compiler/types.ts | 2 +- src/compiler/utilities.ts | 38 ++++++++++++++++----------------- src/compiler/utilitiesPublic.ts | 2 +- src/harness/util.ts | 8 +++---- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 9a62b0b537e7d..4ec663c65c340 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -149,6 +149,7 @@ "unicorn/prefer-string-trim-start-end": "error", "unicorn/no-zero-fractions": "error", "unicorn/prefer-regexp-test": "error", + "unicorn/number-literal-case": "error", // likely yes "unicorn/error-message": "off", // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2265 @@ -158,7 +159,6 @@ // likely not "unicorn/better-regex": "off", - "unicorn/number-literal-case": "off", "unicorn/prefer-negative-index": "off", "unicorn/no-array-reduce": "off", "unicorn/no-useless-switch-case": "off", diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index b2de9b9666158..872bc74de87f1 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -21754,7 +21754,7 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const sourceSize = sourceUnionOrIntersection.types.length; const targetSize = targetUnionOrIntersection.types.length; - if (sourceSize * targetSize > 1E6) { + if (sourceSize * targetSize > 1e6) { tracing.instant(tracing.Phase.CheckTypes, "traceUnionsOrIntersectionsTooLarge_DepthLimit", { sourceId: source.id, sourceSize, diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 48d8e2d01bb94..cec4f141959a7 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -7618,7 +7618,7 @@ export const enum CharacterCodes { W = 0x57, X = 0x58, Y = 0x59, - Z = 0x5a, + Z = 0x5A, ampersand = 0x26, // & asterisk = 0x2A, // * diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index b7ff7cf4989bf..66d0e78d2ed11 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -7337,19 +7337,19 @@ function getExpandedCharCodes(input: string): number[] { output.push(charCode); } else if (charCode < 0x800) { - output.push((charCode >> 6) | 0B11000000); - output.push((charCode & 0B00111111) | 0B10000000); + output.push((charCode >> 6) | 0b11000000); + output.push((charCode & 0b00111111) | 0b10000000); } else if (charCode < 0x10000) { - output.push((charCode >> 12) | 0B11100000); - output.push(((charCode >> 6) & 0B00111111) | 0B10000000); - output.push((charCode & 0B00111111) | 0B10000000); + output.push((charCode >> 12) | 0b11100000); + output.push(((charCode >> 6) & 0b00111111) | 0b10000000); + output.push((charCode & 0b00111111) | 0b10000000); } else if (charCode < 0x20000) { - output.push((charCode >> 18) | 0B11110000); - output.push(((charCode >> 12) & 0B00111111) | 0B10000000); - output.push(((charCode >> 6) & 0B00111111) | 0B10000000); - output.push((charCode & 0B00111111) | 0B10000000); + output.push((charCode >> 18) | 0b11110000); + output.push(((charCode >> 12) & 0b00111111) | 0b10000000); + output.push(((charCode >> 6) & 0b00111111) | 0b10000000); + output.push((charCode & 0b00111111) | 0b10000000); } else { Debug.assert(false, "Unexpected code point"); @@ -7377,9 +7377,9 @@ export function convertToBase64(input: string): string { // Convert every 6-bits in the input 3 character points // into a base64 digit byte1 = charCodes[i] >> 2; - byte2 = (charCodes[i] & 0B00000011) << 4 | charCodes[i + 1] >> 4; - byte3 = (charCodes[i + 1] & 0B00001111) << 2 | charCodes[i + 2] >> 6; - byte4 = charCodes[i + 2] & 0B00111111; + byte2 = (charCodes[i] & 0b00000011) << 4 | charCodes[i + 1] >> 4; + byte3 = (charCodes[i + 1] & 0b00001111) << 2 | charCodes[i + 2] >> 6; + byte4 = charCodes[i + 2] & 0b00111111; // We are out of characters in the input, set the extra // digits to 64 (padding character). @@ -7410,12 +7410,12 @@ function getStringFromExpandedCharCodes(codes: number[]): string { output += String.fromCharCode(charCode); i++; } - else if ((charCode & 0B11000000) === 0B11000000) { - let value = charCode & 0B00111111; + else if ((charCode & 0b11000000) === 0b11000000) { + let value = charCode & 0b00111111; i++; let nextCode: number = codes[i]; - while ((nextCode & 0B11000000) === 0B10000000) { - value = (value << 6) | (nextCode & 0B00111111); + while ((nextCode & 0b11000000) === 0b10000000) { + value = (value << 6) | (nextCode & 0b00111111); i++; nextCode = codes[i]; } @@ -7459,9 +7459,9 @@ export function base64decode(host: { base64decode?(input: string): string; } | u const ch3 = base64Digits.indexOf(input[i + 2]); const ch4 = base64Digits.indexOf(input[i + 3]); - const code1 = ((ch1 & 0B00111111) << 2) | ((ch2 >> 4) & 0B00000011); - const code2 = ((ch2 & 0B00001111) << 4) | ((ch3 >> 2) & 0B00001111); - const code3 = ((ch3 & 0B00000011) << 6) | (ch4 & 0B00111111); + const code1 = ((ch1 & 0b00111111) << 2) | ((ch2 >> 4) & 0b00000011); + const code2 = ((ch2 & 0b00001111) << 4) | ((ch3 >> 2) & 0b00001111); + const code3 = ((ch3 & 0b00000011) << 6) | (ch4 & 0b00111111); if (code2 === 0 && ch3 !== 0) { // code2 decoded to zero, but ch3 was padding - elide code2 and code3 expandedCharCodes.push(code1); diff --git a/src/compiler/utilitiesPublic.ts b/src/compiler/utilitiesPublic.ts index 99e45dfdd26cd..73b50f0c2fe49 100644 --- a/src/compiler/utilitiesPublic.ts +++ b/src/compiler/utilitiesPublic.ts @@ -2575,7 +2575,7 @@ export function isTypeReferenceType(node: Node): node is TypeReferenceType { return node.kind === SyntaxKind.TypeReference || node.kind === SyntaxKind.ExpressionWithTypeArguments; } -const MAX_SMI_X86 = 0x3fff_ffff; +const MAX_SMI_X86 = 0x3FFF_FFFF; /** @internal */ export function guessIndentation(lines: string[]) { let indentation = MAX_SMI_X86; diff --git a/src/harness/util.ts b/src/harness/util.ts index 3a4a78f724009..7ad19f2878f59 100644 --- a/src/harness/util.ts +++ b/src/harness/util.ts @@ -84,10 +84,10 @@ function guessIndentation(lines: string[]) { export function getByteOrderMarkLength(text: string): number { if (text.length >= 1) { const ch0 = text.charCodeAt(0); - if (ch0 === 0xfeff) return 1; - if (ch0 === 0xfe) return text.length >= 2 && text.charCodeAt(1) === 0xff ? 2 : 0; - if (ch0 === 0xff) return text.length >= 2 && text.charCodeAt(1) === 0xfe ? 2 : 0; - if (ch0 === 0xef) return text.length >= 3 && text.charCodeAt(1) === 0xbb && text.charCodeAt(2) === 0xbf ? 3 : 0; + if (ch0 === 0xFEFF) return 1; + if (ch0 === 0xFE) return text.length >= 2 && text.charCodeAt(1) === 0xFF ? 2 : 0; + if (ch0 === 0xFF) return text.length >= 2 && text.charCodeAt(1) === 0xFE ? 2 : 0; + if (ch0 === 0xEF) return text.length >= 3 && text.charCodeAt(1) === 0xBB && text.charCodeAt(2) === 0xBF ? 3 : 0; } return 0; } From 12ad1923d4e3eb79a93829d628298cb99d3979ff Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sat, 20 Jan 2024 10:52:46 -0800 Subject: [PATCH 27/40] More triage --- .eslintrc.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 4ec663c65c340..ef7ba5b0e23e7 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -156,16 +156,11 @@ // maybe "unicorn/prefer-reflect-apply": "off", // tbh don't understand the difference + "unicorn/prefer-top-level-await": "off", // likely not "unicorn/better-regex": "off", "unicorn/prefer-negative-index": "off", - "unicorn/no-array-reduce": "off", - "unicorn/no-useless-switch-case": "off", - "unicorn/prefer-native-coercion-functions": "off", - "unicorn/prefer-top-level-await": "off", - "unicorn/prefer-spread": "off", - "unicorn/prefer-event-target": "off", "unicorn/prefer-string-slice": "off", // no @@ -209,6 +204,11 @@ "unicorn/explicit-length-check": "off", // I like it, but it's a lot of changes "unicorn/prefer-node-protocol": "off", // I like it, but it's pure style "unicorn/prefer-code-point": "off", // I suspect this is correct, but it's a lot of changes in fiddly bits of the code + "unicorn/no-array-reduce": "off", + "unicorn/no-useless-switch-case": "off", + "unicorn/prefer-native-coercion-functions": "off", + "unicorn/prefer-spread": "off", + "unicorn/prefer-event-target": "off", // eslint-plugin-no-null "no-null/no-null": "error", From ee0f53505d89f91c726bf99b43d8438d3049affd Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sat, 20 Jan 2024 10:58:29 -0800 Subject: [PATCH 28/40] More triage --- .eslintrc.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index ef7ba5b0e23e7..b2a48e04c6403 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -159,9 +159,7 @@ "unicorn/prefer-top-level-await": "off", // likely not - "unicorn/better-regex": "off", "unicorn/prefer-negative-index": "off", - "unicorn/prefer-string-slice": "off", // no "unicorn/filename-case": "off", @@ -209,6 +207,8 @@ "unicorn/prefer-native-coercion-functions": "off", "unicorn/prefer-spread": "off", "unicorn/prefer-event-target": "off", + "unicorn/better-regex": "off", // crashes + "unicorn/prefer-string-slice": "off", // Probably good, but most are not fixed // eslint-plugin-no-null "no-null/no-null": "error", From a079fd6c3572c04f44d5fd427e56bca0ed3bed1e Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sat, 20 Jan 2024 16:09:04 -0800 Subject: [PATCH 29/40] More triage --- .eslintrc.json | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index b2a48e04c6403..bd6be8b2eac33 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -154,13 +154,6 @@ // likely yes "unicorn/error-message": "off", // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2265 - // maybe - "unicorn/prefer-reflect-apply": "off", // tbh don't understand the difference - "unicorn/prefer-top-level-await": "off", - - // likely not - "unicorn/prefer-negative-index": "off", - // no "unicorn/filename-case": "off", "unicorn/prevent-abbreviations": "off", @@ -209,6 +202,9 @@ "unicorn/prefer-event-target": "off", "unicorn/better-regex": "off", // crashes "unicorn/prefer-string-slice": "off", // Probably good, but most are not fixed + "unicorn/prefer-reflect-apply": "off", // tbh don't understand the difference + "unicorn/prefer-top-level-await": "off", + "unicorn/prefer-negative-index": "off", // eslint-plugin-no-null "no-null/no-null": "error", From 5ac2b6518dc7991d709b93a7fea0abe9e7ffc55e Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Tue, 19 Mar 2024 10:15:10 -0700 Subject: [PATCH 30/40] disable --- .eslintrc.json | 1 + 1 file changed, 1 insertion(+) diff --git a/.eslintrc.json b/.eslintrc.json index f6e8e987da502..f9062757c5f63 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -214,6 +214,7 @@ "unicorn/prefer-reflect-apply": "off", // tbh don't understand the difference "unicorn/prefer-top-level-await": "off", "unicorn/prefer-negative-index": "off", + "unicorn/no-unreadable-array-destructuring": "off", // eslint-plugin-no-null "no-null/no-null": "error", From 10fafc0f7e079890e0ae608cac7a8e93a206162b Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Tue, 19 Mar 2024 10:16:31 -0700 Subject: [PATCH 31/40] new --- package-lock.json | 14 +++++++------- package.json | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1e16474e1c437..08363c7fac1f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,7 +39,7 @@ "eslint-plugin-local": "^4.2.1", "eslint-plugin-no-null": "^1.0.2", "eslint-plugin-simple-import-sort": "^12.0.0", - "eslint-plugin-unicorn": "^50.0.1", + "eslint-plugin-unicorn": "^51.0.1", "fast-xml-parser": "^4.3.5", "glob": "^10.3.10", "hereby": "^1.8.9", @@ -2353,9 +2353,9 @@ } }, "node_modules/eslint-plugin-unicorn": { - "version": "50.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-50.0.1.tgz", - "integrity": "sha512-KxenCZxqSYW0GWHH18okDlOQcpezcitm5aOSz6EnobyJ6BIByiPDviQRjJIUAjG/tMN11958MxaQ+qCoU6lfDA==", + "version": "51.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-51.0.1.tgz", + "integrity": "sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw==", "dev": true, "dependencies": { "@babel/helper-validator-identifier": "^7.22.20", @@ -6753,9 +6753,9 @@ "requires": {} }, "eslint-plugin-unicorn": { - "version": "50.0.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-50.0.1.tgz", - "integrity": "sha512-KxenCZxqSYW0GWHH18okDlOQcpezcitm5aOSz6EnobyJ6BIByiPDviQRjJIUAjG/tMN11958MxaQ+qCoU6lfDA==", + "version": "51.0.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-51.0.1.tgz", + "integrity": "sha512-MuR/+9VuB0fydoI0nIn2RDA5WISRn4AsJyNSaNKLVwie9/ONvQhxOBbkfSICBPnzKrB77Fh6CZZXjgTt/4Latw==", "dev": true, "requires": { "@babel/helper-validator-identifier": "^7.22.20", diff --git a/package.json b/package.json index 8e69087532c9c..810d1d5e88704 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "eslint-plugin-local": "^4.2.1", "eslint-plugin-no-null": "^1.0.2", "eslint-plugin-simple-import-sort": "^12.0.0", - "eslint-plugin-unicorn": "^50.0.1", + "eslint-plugin-unicorn": "^51.0.1", "fast-xml-parser": "^4.3.5", "glob": "^10.3.10", "hereby": "^1.8.9", From ce92c95c90e64234479085c204e8eafd870d8062 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Tue, 19 Mar 2024 10:17:55 -0700 Subject: [PATCH 32/40] fmt --- scripts/errorCheck.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/errorCheck.mjs b/scripts/errorCheck.mjs index 4d5700a7d73c4..12366787bb70c 100644 --- a/scripts/errorCheck.mjs +++ b/scripts/errorCheck.mjs @@ -27,7 +27,7 @@ async function checkErrorBaselines() { while (g = errRegex.exec(baseline)) { const errCode = +g[1]; const msg = keys.find(k => messages[k].code === errCode); - assert(msg); + assert(msg); messages[msg].seen = true; } } From e0ae3ff292c43784a0a94c35917b04982b29d3e5 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 22 Apr 2024 09:06:30 -0700 Subject: [PATCH 33/40] fix lints --- src/compiler/scanner.ts | 2 +- src/services/codefixes/importFixes.ts | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 01dc3b1b31494..27e33c2273083 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -2797,7 +2797,7 @@ export function createScanner(languageVersion: ScriptTarget, skipTrivia: boolean ch = text.charCodeAt(pos); if (isASCIILetter(ch)) { pos++; - return String.fromCharCode(ch & 0x1f); + return String.fromCharCode(ch & 0x1F); } if (unicodeMode) { error(Diagnostics.c_must_be_followed_by_an_ASCII_letter, pos - 2, 2); diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts index 6a1232abfcbd8..cebb10953375d 100644 --- a/src/services/codefixes/importFixes.ts +++ b/src/services/codefixes/importFixes.ts @@ -507,7 +507,7 @@ function createImportAdderWorker(sourceFile: SourceFile | FutureSourceFile, prog // has named bindings d.importClause?.namedBindings && // is not being fully removed - emptyImportDeclarations.indexOf(d) === -1 && + !emptyImportDeclarations.includes(d) && // is not gaining named imports !addToExisting.get(d.importClause)?.namedImports && // all named imports are being removed @@ -532,8 +532,8 @@ function createImportAdderWorker(sourceFile: SourceFile | FutureSourceFile, prog const importDeclaration = findAncestor(declaration, isImportDeclaration); if ( importDeclaration && - emptyImportDeclarations.indexOf(importDeclaration) === -1 && - namedBindingsToDelete.indexOf(importDeclaration) === -1 + !emptyImportDeclarations.includes(importDeclaration) && + !namedBindingsToDelete.includes(importDeclaration) ) { if (declaration.kind === SyntaxKind.ImportClause) { changeTracker.delete(sourceFile, declaration.name!); From f2853a1d937ed7795c1b5a810dcd6fa8782885ba Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Mon, 22 Apr 2024 09:33:30 -0700 Subject: [PATCH 34/40] update now that it doesn't crash --- .eslintrc.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.eslintrc.json b/.eslintrc.json index 0e536d245e1fc..dedc531dd51d3 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -219,7 +219,7 @@ "unicorn/prefer-native-coercion-functions": "off", "unicorn/prefer-spread": "off", "unicorn/prefer-event-target": "off", - "unicorn/better-regex": "off", // crashes + "unicorn/better-regex": "off", // doesn't always produce a good alternative "unicorn/prefer-string-slice": "off", // Probably good, but most are not fixed "unicorn/prefer-reflect-apply": "off", // tbh don't understand the difference "unicorn/prefer-top-level-await": "off", From e0e8eaa8498fe419f85c5cdef198230e223279d3 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 27 Jun 2024 16:58:28 -0700 Subject: [PATCH 35/40] Drop raw --- eslint.config.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/eslint.config.mjs b/eslint.config.mjs index c70d640cfee9b..924f35d950eca 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -191,6 +191,9 @@ export default tseslint.config( // likely yes "unicorn/error-message": "off", // https://github.com/sindresorhus/eslint-plugin-unicorn/issues/2265 + // likely no + "unicorn/prefer-string-raw": "off", + // no "unicorn/filename-case": "off", "unicorn/prevent-abbreviations": "off", From 571bd7466f72e2db50954a7e5ba9544775094368 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 27 Jun 2024 17:04:13 -0700 Subject: [PATCH 36/40] Fix some --- eslint.config.mjs | 1 + scripts/build/tests.mjs | 2 +- src/compiler/checker.ts | 4 ++++ src/harness/evaluatorImpl.ts | 8 ++++++++ src/services/utilities.ts | 2 ++ src/testRunner/unittests/helpers/tsc.ts | 6 +++--- 6 files changed, 19 insertions(+), 4 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 924f35d950eca..cda73102356e9 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -246,6 +246,7 @@ export default tseslint.config( "unicorn/prefer-top-level-await": "off", "unicorn/prefer-negative-index": "off", "unicorn/no-unreadable-array-destructuring": "off", + "unicorn/no-negation-in-equality-check": "off", // inaccurate }, }, { diff --git a/scripts/build/tests.mjs b/scripts/build/tests.mjs index d5a273aa41d37..9aad7f6dc961a 100644 --- a/scripts/build/tests.mjs +++ b/scripts/build/tests.mjs @@ -195,7 +195,7 @@ export async function cleanTestDirs() { export function writeTestConfigFile(tests, skipSysTests, runners, light, taskConfigsFolder, workerCount, stackTraceLimit, timeout, keepFailed, shards, shardId) { const testConfigContents = JSON.stringify({ test: tests ? [tests] : undefined, - skipSysTests: skipSysTests ? skipSysTests : undefined, + skipSysTests: skipSysTests ? true : undefined, runners: runners ? runners.split(",") : undefined, light, workerCount, diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 5e39ce4348a96..98ad0f58e5d31 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -42326,6 +42326,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { // For a union, get a union of the awaited types of each constituent. if (type.flags & TypeFlags.Union) { + // We want to indicate that the search should go backwards for perf. + // eslint-disable-next-line unicorn/prefer-includes if (awaitedTypeStack.lastIndexOf(type.id) >= 0) { if (errorNode) { error(errorNode, Diagnostics.Type_is_referenced_directly_or_indirectly_in_the_fulfillment_callback_of_its_own_then_method); @@ -42350,6 +42352,8 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker { const thisTypeForErrorOut: { value: Type | undefined; } = { value: undefined }; const promisedType = getPromisedTypeOfPromise(type, /*errorNode*/ undefined, thisTypeForErrorOut); if (promisedType) { + // We want to indicate that the search should go backwards for perf. + // eslint-disable-next-line unicorn/prefer-includes if (type.id === promisedType.id || awaitedTypeStack.lastIndexOf(promisedType.id) >= 0) { // Verify that we don't have a bad actor in the form of a promise whose // promised type is the same as the promise type, or a mutually recursive diff --git a/src/harness/evaluatorImpl.ts b/src/harness/evaluatorImpl.ts index 9fdeed5b6cdc7..1aa2e56246be8 100644 --- a/src/harness/evaluatorImpl.ts +++ b/src/harness/evaluatorImpl.ts @@ -444,6 +444,8 @@ class SystemLoader extends Loader { } private resetDependers(module: SystemModule, stack: SystemModule[]) { + // We want to indicate that the search should go backwards for perf. + // eslint-disable-next-line unicorn/prefer-includes if (stack.lastIndexOf(module) !== -1) { return; } @@ -460,6 +462,8 @@ class SystemLoader extends Loader { if (module.state < SystemModuleState.Linked) throw new Error("Invalid state for evaluation."); if (module.state !== SystemModuleState.Linked) return; + // We want to indicate that the search should go backwards for perf. + // eslint-disable-next-line unicorn/prefer-includes if (stack.lastIndexOf(module) !== -1) { // we are already evaluating this module return; @@ -703,6 +707,8 @@ class AmdLoader extends Loader { } private resetDependers(module: AmdModule, stack: AmdModule[]) { + // We want to indicate that the search should go backwards for perf. + // eslint-disable-next-line unicorn/prefer-includes if (stack.lastIndexOf(module) !== -1) { return; } @@ -721,6 +727,8 @@ class AmdLoader extends Loader { if (module.state < AmdModuleState.Linked) throw new Error("Invalid state for evaluation."); if (module.state !== AmdModuleState.Linked) return; + // We want to indicate that the search should go backwards for perf. + // eslint-disable-next-line unicorn/prefer-includes if (stack.lastIndexOf(module) !== -1) { // we are already evaluating this module return; diff --git a/src/services/utilities.ts b/src/services/utilities.ts index a34b936d7a240..5b4c6470c67b1 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -2045,6 +2045,8 @@ export function getPossibleTypeArgumentsInfo(tokenIn: Node | undefined, sourceFi // This is a rare case, but one that saves on a _lot_ of work if true - if the source file has _no_ `<` character, // then there obviously can't be any type arguments - no expensive brace-matching backwards scanning required + // We want to indicate that the search should go backwards for perf. + // eslint-disable-next-line unicorn/prefer-includes if (sourceFile.text.lastIndexOf("<", tokenIn ? tokenIn.pos : sourceFile.text.length) === -1) { return undefined; } diff --git a/src/testRunner/unittests/helpers/tsc.ts b/src/testRunner/unittests/helpers/tsc.ts index 92ae893bb50db..39089d31194e0 100644 --- a/src/testRunner/unittests/helpers/tsc.ts +++ b/src/testRunner/unittests/helpers/tsc.ts @@ -381,7 +381,7 @@ function verifyTscEditDiscrepancies({ // if there are errors in the file !ts.isString(cleanFileDiagnostics?.[1]) && // and its not already verified, its issue with the error caching - !ts.find( + !ts.some( readableIncrementalBuildInfo?.semanticDiagnosticsPerFile, ([actualFile]) => actualFile === expectedFile, ) @@ -396,12 +396,12 @@ function verifyTscEditDiscrepancies({ readableIncrementalBuildInfo?.emitDiagnosticsPerFile?.forEach(([actualFile]) => { if ( // Does not have emit diagnostics in clean buildInfo - !ts.find( + !ts.some( readableCleanBuildInfo!.emitDiagnosticsPerFile, ([expectedFile]) => actualFile === expectedFile, ) && // Is not marked as affectedFilesPendingEmit in clean buildInfo - (!ts.find( + (!ts.some( (readableCleanBuildInfo as ReadableIncrementalMultiFileEmitBuildInfo).affectedFilesPendingEmit, ([expectedFileOrArray]) => actualFile === (ts.isString(expectedFileOrArray) ? expectedFileOrArray : expectedFileOrArray[0]), )) && From 59985797c7440c093e693329cc5c19042b1f0d20 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Thu, 27 Jun 2024 17:05:53 -0700 Subject: [PATCH 37/40] structuredClone --- eslint.config.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/eslint.config.mjs b/eslint.config.mjs index cda73102356e9..24b4e204f3a62 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -247,6 +247,7 @@ export default tseslint.config( "unicorn/prefer-negative-index": "off", "unicorn/no-unreadable-array-destructuring": "off", "unicorn/no-negation-in-equality-check": "off", // inaccurate + "unicorn/prefer-structured-clone": "off", // Unavailable until Node 17 }, }, { From 37c2dcaee3382fdb4f4aee6850dad186dc14807c Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sat, 3 Aug 2024 22:13:19 -0700 Subject: [PATCH 38/40] Remove cast --- eslint.config.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index c22541347d890..465d4ff756d15 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -37,7 +37,7 @@ export default tseslint.config( eslint.configs.recommended, ...tseslint.configs.recommended, ...tseslint.configs.stylistic, - /** @type {any} */ (eslintPluginUnicorn.configs["flat/recommended"]), + eslintPluginUnicorn.configs["flat/recommended"], { plugins: { local: { From 10fc6faaf66299b72da0480d16a17af62685ba74 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Sat, 3 Aug 2024 22:15:13 -0700 Subject: [PATCH 39/40] Fix more --- src/harness/fourslashImpl.ts | 2 +- src/testRunner/unittests/helpers/noEmit.ts | 4 ++-- src/testRunner/unittests/helpers/tsc.ts | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts index b7b698a6feb8c..c2513664a014d 100644 --- a/src/harness/fourslashImpl.ts +++ b/src/harness/fourslashImpl.ts @@ -5208,7 +5208,7 @@ function highlightDifferenceBetweenStrings(source: string, target: string) { range.start + 1 + additionalOffset, range.start + range.length + 1 + additionalOffset, ); - const after = emTarget.slice(range.start + range.length + 1 + additionalOffset, emTarget.length); + const after = emTarget.slice(range.start + range.length + 1 + additionalOffset); emTarget = before + lhs + between + rhs + after; }); return emTarget; diff --git a/src/testRunner/unittests/helpers/noEmit.ts b/src/testRunner/unittests/helpers/noEmit.ts index b097144ec9f0e..32e0422ec2d0d 100644 --- a/src/testRunner/unittests/helpers/noEmit.ts +++ b/src/testRunner/unittests/helpers/noEmit.ts @@ -373,7 +373,7 @@ export function forEachNoEmitTsc(commandType: string[]) { { caption: "Introduce error", edit: fs => fs.writeFileSync("/home/src/projects/project/a.ts", aTsContent), - discrepancyExplanation: compilerOptions.incremental && subScenario.indexOf("multiFile/syntax") !== -1 ? () => [ + discrepancyExplanation: compilerOptions.incremental && subScenario.includes("multiFile/syntax") ? () => [ "DtsSignature of ts files: Incremental build have dts signature for ts files from emit so its not d.ts or same as file version", ] : undefined, }, @@ -382,7 +382,7 @@ export function forEachNoEmitTsc(commandType: string[]) { edit: noop, commandLineArgs: [...commandType, "/home/src/projects/project"], }, - compilerOptions.incremental && subScenario.indexOf("multiFile/syntax") !== -1 ? { + compilerOptions.incremental && subScenario.includes("multiFile/syntax") ? { ...noChangeRun, discrepancyExplanation: () => [ "DtsSignature of files: Incremental build have dts signature for ts files from emit so its not d.ts or same as file version", diff --git a/src/testRunner/unittests/helpers/tsc.ts b/src/testRunner/unittests/helpers/tsc.ts index 710dbcfc369f1..f60b2362b8f5b 100644 --- a/src/testRunner/unittests/helpers/tsc.ts +++ b/src/testRunner/unittests/helpers/tsc.ts @@ -321,7 +321,7 @@ function verifyTscEditDiscrepancies({ incrementalReadableBuildInfo.affectedFilesPendingEmit?.forEach(([actualFileOrArray]) => { const actualFile = ts.isString(actualFileOrArray) ? actualFileOrArray : actualFileOrArray[0]; if ( - !ts.find( + !ts.some( (cleanReadableBuildInfo as ReadableIncrementalMultiFileEmitBuildInfo)?.affectedFilesPendingEmit, ([expectedFileOrArray]) => actualFile === (ts.isString(expectedFileOrArray) ? expectedFileOrArray : expectedFileOrArray[0]), ) @@ -351,7 +351,7 @@ function verifyTscEditDiscrepancies({ const readableCleanBuildInfo = cleanReadableBuildInfo as ReadableIncrementalBuildInfo | undefined; readableIncrementalBuildInfo?.changeFileSet?.forEach(actualFile => { if ( - !ts.find( + !ts.some( readableCleanBuildInfo?.changeFileSet, expectedFile => actualFile === expectedFile, ) From 9bcfd34619308f983a6368213187c1345f46a006 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Tue, 13 Aug 2024 15:44:55 -0700 Subject: [PATCH 40/40] Fix lock --- package-lock.json | 1157 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 1154 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index eb0db3e839ac6..5567514b1d099 100644 --- a/package-lock.json +++ b/package-lock.json @@ -39,6 +39,7 @@ "eslint": "^9.9.0", "eslint-formatter-autolinkable-stylish": "^1.4.0", "eslint-plugin-regexp": "^2.6.0", + "eslint-plugin-unicorn": "^55.0.0", "fast-xml-parser": "^4.4.1", "glob": "^10.4.5", "globals": "^15.9.0", @@ -62,6 +63,114 @@ "node": ">=14.17" } }, + "node_modules/@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "dev": true, + "dependencies": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "dev": true, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/highlight/node_modules/ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "dependencies": { + "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "dependencies": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "dependencies": { + "color-name": "1.1.3" + } + }, + "node_modules/@babel/highlight/node_modules/color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "node_modules/@babel/highlight/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, + "node_modules/@babel/highlight/node_modules/has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/@babel/highlight/node_modules/supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "dependencies": { + "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" + } + }, "node_modules/@bcoe/v8-coverage": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", @@ -1049,6 +1158,12 @@ "undici-types": "~6.13.0" } }, + "node_modules/@types/normalize-package-data": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", + "dev": true + }, "node_modules/@types/source-map-support": { "version": "0.5.10", "resolved": "https://registry.npmjs.org/@types/source-map-support/-/source-map-support-0.5.10.tgz", @@ -1513,12 +1628,56 @@ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, + "node_modules/browserslist": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", + "integrity": "sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "caniuse-lite": "^1.0.30001646", + "electron-to-chromium": "^1.5.4", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.0" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, "node_modules/buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, + "node_modules/builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "dev": true, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/c8": { "version": "10.1.2", "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.2.tgz", @@ -1592,6 +1751,26 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/caniuse-lite": { + "version": "1.0.30001651", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz", + "integrity": "sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ] + }, "node_modules/chai": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", @@ -1662,6 +1841,42 @@ "fsevents": "~2.3.2" } }, + "node_modules/ci-info": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.0.0.tgz", + "integrity": "sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/sibiraj-s" + } + ], + "engines": { + "node": ">=8" + } + }, + "node_modules/clean-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", + "integrity": "sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==", + "dev": true, + "dependencies": { + "escape-string-regexp": "^1.0.5" + }, + "engines": { + "node": ">=4" + } + }, + "node_modules/clean-regexp/node_modules/escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -1872,6 +2087,19 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, + "node_modules/core-js-compat": { + "version": "3.38.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.38.0.tgz", + "integrity": "sha512-75LAicdLa4OJVwFxFbQR3NdnZjNgX6ILpVcVzcC4T2smerB5lELMrJQQQoWV6TiuC/vlaFqgU2tKQx9w5s0e0A==", + "dev": true, + "dependencies": { + "browserslist": "^4.23.3" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, "node_modules/cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -2077,6 +2305,12 @@ "integrity": "sha512-hVoK898cR71ADj7L1LZWaECLaSkzzPtqGXIaKv4K6Pzb72QgjLVsQaNI+ELDQQshzFvgp5xTPkaYkPGqw3YR+g==", "dev": true }, + "node_modules/electron-to-chromium": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.6.tgz", + "integrity": "sha512-jwXWsM5RPf6j9dPYzaorcBSUg6AiqocPEyMpkchkvntaH9HGfOOMZwxMJjDY/XEs3T5dM7uyH1VhRMkqUU9qVw==", + "dev": true + }, "node_modules/emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", @@ -2096,6 +2330,15 @@ "node": ">=10.13.0" } }, + "node_modules/error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "dependencies": { + "is-arrayish": "^0.2.1" + } + }, "node_modules/es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -2270,6 +2513,39 @@ "eslint": ">=8.44.0" } }, + "node_modules/eslint-plugin-unicorn": { + "version": "55.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-55.0.0.tgz", + "integrity": "sha512-n3AKiVpY2/uDcGrS3+QsYDkjPfaOrNrsfQxU9nt5nitd9KuvVXrfAvgCO9DYPSfap+Gqjw9EOrXIsBp5tlHZjA==", + "dev": true, + "dependencies": { + "@babel/helper-validator-identifier": "^7.24.5", + "@eslint-community/eslint-utils": "^4.4.0", + "ci-info": "^4.0.0", + "clean-regexp": "^1.0.0", + "core-js-compat": "^3.37.0", + "esquery": "^1.5.0", + "globals": "^15.7.0", + "indent-string": "^4.0.0", + "is-builtin-module": "^3.2.1", + "jsesc": "^3.0.2", + "pluralize": "^8.0.0", + "read-pkg-up": "^7.0.1", + "regexp-tree": "^0.1.27", + "regjsparser": "^0.10.0", + "semver": "^7.6.1", + "strip-indent": "^3.0.0" + }, + "engines": { + "node": ">=18.18" + }, + "funding": { + "url": "https://github.com/sindresorhus/eslint-plugin-unicorn?sponsor=1" + }, + "peerDependencies": { + "eslint": ">=8.56.0" + } + }, "node_modules/eslint-scope": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.2.tgz", @@ -2849,6 +3125,12 @@ "node": ">= 12.20" } }, + "node_modules/hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, "node_modules/html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -2924,6 +3206,12 @@ "node": ">=8" } }, + "node_modules/is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -2936,6 +3224,36 @@ "node": ">=8" } }, + "node_modules/is-builtin-module": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", + "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", + "dev": true, + "dependencies": { + "builtin-modules": "^3.3.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/is-core-module": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", + "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", + "dev": true, + "dependencies": { + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -3077,6 +3395,12 @@ "integrity": "sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==", "dev": true }, + "node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, "node_modules/js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -3098,12 +3422,30 @@ "node": ">=12.0.0" } }, + "node_modules/jsesc": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/json-buffer": { "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 }, + "node_modules/json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, "node_modules/json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -3244,6 +3586,12 @@ "node": ">= 0.8.0" } }, + "node_modules/lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, "node_modules/locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -3339,6 +3687,15 @@ "node": ">=8.6" } }, + "node_modules/min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -3636,6 +3993,33 @@ "url": "https://opencollective.com/node-fetch" } }, + "node_modules/node-releases": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "dev": true + }, + "node_modules/normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "dependencies": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + } + }, + "node_modules/normalize-package-data/node_modules/semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true, + "bin": { + "semver": "bin/semver" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -3728,6 +4112,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/package-json-from-dist": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", @@ -3746,6 +4139,24 @@ "node": ">=6" } }, + "node_modules/parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "dependencies": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/parse-ms": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-3.0.0.tgz", @@ -3776,6 +4187,12 @@ "node": ">=8" } }, + "node_modules/path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, "node_modules/path-scurry": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", @@ -3887,9 +4304,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/prelude-ls": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", + "node_modules/pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, + "node_modules/prelude-ls": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true, "engines": { @@ -3964,6 +4390,99 @@ "safe-buffer": "^5.1.0" } }, + "node_modules/read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "dependencies": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "dependencies": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "dependencies": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "dependencies": { + "p-locate": "^4.1.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg-up/node_modules/p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "dependencies": { + "p-try": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/read-pkg-up/node_modules/p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "dependencies": { + "p-limit": "^2.2.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/read-pkg/node_modules/type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -4010,6 +4529,36 @@ "node": "^12.0.0 || ^14.0.0 || >=16.0.0" } }, + "node_modules/regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "dev": true, + "bin": { + "regexp-tree": "bin/regexp-tree" + } + }, + "node_modules/regjsparser": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.10.0.tgz", + "integrity": "sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==", + "dev": true, + "dependencies": { + "jsesc": "~0.5.0" + }, + "bin": { + "regjsparser": "bin/parser" + } + }, + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } + }, "node_modules/require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", @@ -4019,6 +4568,23 @@ "node": ">=0.10.0" } }, + "node_modules/resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "dependencies": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + }, + "bin": { + "resolve": "bin/resolve" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -4224,6 +4790,38 @@ "source-map": "^0.6.0" } }, + "node_modules/spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "dependencies": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true + }, + "node_modules/spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "dependencies": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "node_modules/spdx-license-ids": { + "version": "3.0.18", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", + "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==", + "dev": true + }, "node_modules/string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", @@ -4314,6 +4912,18 @@ "node": ">=8" } }, + "node_modules/strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "dependencies": { + "min-indent": "^1.0.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -4350,6 +4960,18 @@ "node": ">=8" } }, + "node_modules/supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/table-layout": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", @@ -4478,6 +5100,15 @@ "node": ">=4" } }, + "node_modules/type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/typed-rest-client": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-2.0.2.tgz", @@ -4557,6 +5188,36 @@ "integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==", "dev": true }, + "node_modules/update-browserslist-db": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", + "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "escalade": "^3.1.2", + "picocolors": "^1.0.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, "node_modules/uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -4580,6 +5241,16 @@ "node": ">=10.12.0" } }, + "node_modules/validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "dependencies": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -4848,6 +5519,92 @@ } }, "dependencies": { + "@babel/code-frame": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", + "integrity": "sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==", + "dev": true, + "requires": { + "@babel/highlight": "^7.24.7", + "picocolors": "^1.0.0" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.24.7.tgz", + "integrity": "sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==", + "dev": true + }, + "@babel/highlight": { + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.24.7.tgz", + "integrity": "sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.24.7", + "chalk": "^2.4.2", + "js-tokens": "^4.0.0", + "picocolors": "^1.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", + "dev": true + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, "@bcoe/v8-coverage": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz", @@ -5454,6 +6211,12 @@ "undici-types": "~6.13.0" } }, + "@types/normalize-package-data": { + "version": "2.4.4", + "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", + "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==", + "dev": true + }, "@types/source-map-support": { "version": "0.5.10", "resolved": "https://registry.npmjs.org/@types/source-map-support/-/source-map-support-0.5.10.tgz", @@ -5760,12 +6523,30 @@ "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", "dev": true }, + "browserslist": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.3.tgz", + "integrity": "sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==", + "dev": true, + "requires": { + "caniuse-lite": "^1.0.30001646", + "electron-to-chromium": "^1.5.4", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.0" + } + }, "buffer-from": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", "dev": true }, + "builtin-modules": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-3.3.0.tgz", + "integrity": "sha512-zhaCDicdLuWN5UbN5IMnFqNMhNfo919sH85y2/ea+5Yg9TsTkeZxpL+JLbp6cgYFS4sRLp3YV4S6yDuqVWHYOw==", + "dev": true + }, "c8": { "version": "10.1.2", "resolved": "https://registry.npmjs.org/c8/-/c8-10.1.2.tgz", @@ -5810,6 +6591,12 @@ "integrity": "sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==", "dev": true }, + "caniuse-lite": { + "version": "1.0.30001651", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001651.tgz", + "integrity": "sha512-9Cf+Xv1jJNe1xPZLGuUXLNkE1BoDkqRqYyFJ9TDYSqhduqA4hu4oR9HluGoWYQC/aj8WHjsGVV+bwkh0+tegRg==", + "dev": true + }, "chai": { "version": "4.5.0", "resolved": "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz", @@ -5860,6 +6647,29 @@ "readdirp": "~3.6.0" } }, + "ci-info": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-4.0.0.tgz", + "integrity": "sha512-TdHqgGf9odd8SXNuxtUBVx8Nv+qZOejE6qyqiy5NtbYYQOeFa6zmHkxlPzmaLxWWHsU6nJmB7AETdVPi+2NBUg==", + "dev": true + }, + "clean-regexp": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clean-regexp/-/clean-regexp-1.0.0.tgz", + "integrity": "sha512-GfisEZEJvzKrmGWkvfhgzcz/BllN1USeqD2V6tg14OAOgaCD2Z/PUEuxnAZ/nPvmaHRG7a8y77p1T/IRQ4D1Hw==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + }, + "dependencies": { + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", + "dev": true + } + } + }, "clean-stack": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", @@ -6029,6 +6839,15 @@ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", "dev": true }, + "core-js-compat": { + "version": "3.38.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.38.0.tgz", + "integrity": "sha512-75LAicdLa4OJVwFxFbQR3NdnZjNgX6ILpVcVzcC4T2smerB5lELMrJQQQoWV6TiuC/vlaFqgU2tKQx9w5s0e0A==", + "dev": true, + "requires": { + "browserslist": "^4.23.3" + } + }, "cross-spawn": { "version": "7.0.3", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz", @@ -6185,6 +7004,12 @@ "integrity": "sha512-hVoK898cR71ADj7L1LZWaECLaSkzzPtqGXIaKv4K6Pzb72QgjLVsQaNI+ELDQQshzFvgp5xTPkaYkPGqw3YR+g==", "dev": true }, + "electron-to-chromium": { + "version": "1.5.6", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.6.tgz", + "integrity": "sha512-jwXWsM5RPf6j9dPYzaorcBSUg6AiqocPEyMpkchkvntaH9HGfOOMZwxMJjDY/XEs3T5dM7uyH1VhRMkqUU9qVw==", + "dev": true + }, "emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", @@ -6201,6 +7026,15 @@ "tapable": "^2.2.0" } }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, "es-define-property": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", @@ -6344,6 +7178,30 @@ "scslre": "^0.3.0" } }, + "eslint-plugin-unicorn": { + "version": "55.0.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-unicorn/-/eslint-plugin-unicorn-55.0.0.tgz", + "integrity": "sha512-n3AKiVpY2/uDcGrS3+QsYDkjPfaOrNrsfQxU9nt5nitd9KuvVXrfAvgCO9DYPSfap+Gqjw9EOrXIsBp5tlHZjA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.24.5", + "@eslint-community/eslint-utils": "^4.4.0", + "ci-info": "^4.0.0", + "clean-regexp": "^1.0.0", + "core-js-compat": "^3.37.0", + "esquery": "^1.5.0", + "globals": "^15.7.0", + "indent-string": "^4.0.0", + "is-builtin-module": "^3.2.1", + "jsesc": "^3.0.2", + "pluralize": "^8.0.0", + "read-pkg-up": "^7.0.1", + "regexp-tree": "^0.1.27", + "regjsparser": "^0.10.0", + "semver": "^7.6.1", + "strip-indent": "^3.0.0" + } + }, "eslint-scope": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.0.2.tgz", @@ -6726,6 +7584,12 @@ "pretty-ms": "^8.0.0" } }, + "hosted-git-info": { + "version": "2.8.9", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", + "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", + "dev": true + }, "html-escaper": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz", @@ -6782,6 +7646,12 @@ "integrity": "sha512-1ANGLZ+Nkv1ptFb2pa8oG8Lem4krflKuX/gINiHJHjJUKaJHk/SXk5x6K3J+39/p0h1RQ2saROclJJ+QLvETCQ==", "dev": true }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", + "dev": true + }, "is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", @@ -6791,6 +7661,24 @@ "binary-extensions": "^2.0.0" } }, + "is-builtin-module": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/is-builtin-module/-/is-builtin-module-3.2.1.tgz", + "integrity": "sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A==", + "dev": true, + "requires": { + "builtin-modules": "^3.3.0" + } + }, + "is-core-module": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.0.tgz", + "integrity": "sha512-Dd+Lb2/zvk9SKy1TGCt1wFJFo/MWBPMX5x7KcvLajWTGuomczdQX61PvY5yK6SVACwpoexWo81IfFyoKY2QnTA==", + "dev": true, + "requires": { + "hasown": "^2.0.2" + } + }, "is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", @@ -6891,6 +7779,12 @@ "integrity": "sha512-/GDnfQYsltsjRswQhN9fhv3EMw2sCpUdrdxyWDOUK7eyD++r3gRhzgiQgc/x4MAv2i1iuQ4lxO5mvqM3vj4bwA==", "dev": true }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, "js-yaml": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", @@ -6906,12 +7800,24 @@ "integrity": "sha512-Hicd6JK5Njt2QB6XYFS7ok9e37O8AYk3jTcppG4YVQnYjOemymvTcmc7OWsmq/Qqj5TdRFO5/x/tIPmBeRtGHg==", "dev": true }, + "jsesc": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.0.2.tgz", + "integrity": "sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g==", + "dev": true + }, "json-buffer": { "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 }, + "json-parse-even-better-errors": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz", + "integrity": "sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w==", + "dev": true + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -7002,6 +7908,12 @@ "type-check": "~0.4.0" } }, + "lines-and-columns": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz", + "integrity": "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==", + "dev": true + }, "locate-path": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", @@ -7073,6 +7985,12 @@ "picomatch": "^2.3.1" } }, + "min-indent": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz", + "integrity": "sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==", + "dev": true + }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -7301,6 +8219,32 @@ "formdata-polyfill": "^4.0.10" } }, + "node-releases": { + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", + "dev": true + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "semver": { + "version": "5.7.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz", + "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==", + "dev": true + } + } + }, "normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -7363,6 +8307,12 @@ "aggregate-error": "^3.0.0" } }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, "package-json-from-dist": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/package-json-from-dist/-/package-json-from-dist-1.0.0.tgz", @@ -7378,6 +8328,18 @@ "callsites": "^3.0.0" } }, + "parse-json": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-5.2.0.tgz", + "integrity": "sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "error-ex": "^1.3.1", + "json-parse-even-better-errors": "^2.3.0", + "lines-and-columns": "^1.1.6" + } + }, "parse-ms": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-3.0.0.tgz", @@ -7396,6 +8358,12 @@ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==", "dev": true }, + "path-parse": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", + "dev": true + }, "path-scurry": { "version": "1.11.1", "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.11.1.tgz", @@ -7464,6 +8432,12 @@ "irregular-plurals": "^3.2.0" } }, + "pluralize": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/pluralize/-/pluralize-8.0.0.tgz", + "integrity": "sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==", + "dev": true + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -7509,6 +8483,76 @@ "safe-buffer": "^5.1.0" } }, + "read-pkg": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-5.2.0.tgz", + "integrity": "sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==", + "dev": true, + "requires": { + "@types/normalize-package-data": "^2.4.0", + "normalize-package-data": "^2.5.0", + "parse-json": "^5.0.0", + "type-fest": "^0.6.0" + }, + "dependencies": { + "type-fest": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.6.0.tgz", + "integrity": "sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==", + "dev": true + } + } + }, + "read-pkg-up": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz", + "integrity": "sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==", + "dev": true, + "requires": { + "find-up": "^4.1.0", + "read-pkg": "^5.2.0", + "type-fest": "^0.8.1" + }, + "dependencies": { + "find-up": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-4.1.0.tgz", + "integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==", + "dev": true, + "requires": { + "locate-path": "^5.0.0", + "path-exists": "^4.0.0" + } + }, + "locate-path": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz", + "integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==", + "dev": true, + "requires": { + "p-locate": "^4.1.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-4.1.0.tgz", + "integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==", + "dev": true, + "requires": { + "p-limit": "^2.2.0" + } + } + } + }, "readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -7543,12 +8587,46 @@ "refa": "^0.12.1" } }, + "regexp-tree": { + "version": "0.1.27", + "resolved": "https://registry.npmjs.org/regexp-tree/-/regexp-tree-0.1.27.tgz", + "integrity": "sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA==", + "dev": true + }, + "regjsparser": { + "version": "0.10.0", + "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.10.0.tgz", + "integrity": "sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA==", + "dev": true, + "requires": { + "jsesc": "~0.5.0" + }, + "dependencies": { + "jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==", + "dev": true + } + } + }, "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", "dev": true }, + "resolve": { + "version": "1.22.8", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz", + "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==", + "dev": true, + "requires": { + "is-core-module": "^2.13.0", + "path-parse": "^1.0.7", + "supports-preserve-symlinks-flag": "^1.0.0" + } + }, "resolve-from": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", @@ -7677,6 +8755,38 @@ "source-map": "^0.6.0" } }, + "spdx-correct": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz", + "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.5.0.tgz", + "integrity": "sha512-PiU42r+xO4UbUS1buo3LPJkjlO7430Xn5SVAhdpzzsPHsjbYVflnnFdATgabnLude+Cqu25p6N+g2lw/PFsa4w==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.18", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.18.tgz", + "integrity": "sha512-xxRs31BqRYHwiMzudOrpSiHtZ8i/GeionCBDSilhYRj+9gIcI8wCZTlXZKu9vZIVqViP3dcp9qE5G6AlIaD+TQ==", + "dev": true + }, "string-width": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", @@ -7742,6 +8852,15 @@ "ansi-regex": "^5.0.1" } }, + "strip-indent": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-3.0.0.tgz", + "integrity": "sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==", + "dev": true, + "requires": { + "min-indent": "^1.0.0" + } + }, "strip-json-comments": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", @@ -7769,6 +8888,12 @@ "has-flag": "^4.0.0" } }, + "supports-preserve-symlinks-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", + "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", + "dev": true + }, "table-layout": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/table-layout/-/table-layout-1.0.2.tgz", @@ -7867,6 +8992,12 @@ "integrity": "sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==", "dev": true }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + }, "typed-rest-client": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-2.0.2.tgz", @@ -7921,6 +9052,16 @@ "integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q==", "dev": true }, + "update-browserslist-db": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.0.tgz", + "integrity": "sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==", + "dev": true, + "requires": { + "escalade": "^3.1.2", + "picocolors": "^1.0.1" + } + }, "uri-js": { "version": "4.4.1", "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", @@ -7941,6 +9082,16 @@ "convert-source-map": "^2.0.0" } }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, "wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz",