From cc0da5496a6a3feb0a14ea3ebb587eb36106ef65 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 07:17:34 +0000 Subject: [PATCH 01/11] chore(deps): update dependency eslint to v9 --- src/lib/application/files/ts/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/application/files/ts/package.json b/src/lib/application/files/ts/package.json index fdec6d7ec..0d469c99f 100644 --- a/src/lib/application/files/ts/package.json +++ b/src/lib/application/files/ts/package.json @@ -36,7 +36,7 @@ "@types/supertest": "^6.0.0", "@typescript-eslint/eslint-plugin": "^8.0.0", "@typescript-eslint/parser": "^8.0.0", - "eslint": "^8.0.0", + "eslint": "^9.0.0", "eslint-config-prettier": "^9.0.0", "eslint-plugin-prettier": "^5.0.0", "jest": "^29.5.0", From 0ebd32f0c4ea7b8f1f73c051b3e000ba44539437 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 21 Nov 2024 21:58:53 +0000 Subject: [PATCH 02/11] fix(deps): update angular-cli monorepo to v19 --- package-lock.json | 1013 ++++++++++++--------------------------------- package.json | 4 +- 2 files changed, 265 insertions(+), 752 deletions(-) diff --git a/package-lock.json b/package-lock.json index 86befee57..4d45bed17 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,8 +9,8 @@ "version": "10.2.3", "license": "MIT", "dependencies": { - "@angular-devkit/core": "17.3.11", - "@angular-devkit/schematics": "17.3.11", + "@angular-devkit/core": "19.0.1", + "@angular-devkit/schematics": "19.0.1", "comment-json": "4.2.5", "jsonc-parser": "3.3.1", "pluralize": "8.0.0" @@ -73,24 +73,24 @@ } }, "node_modules/@angular-devkit/core": { - "version": "17.3.11", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-17.3.11.tgz", - "integrity": "sha512-vTNDYNsLIWpYk2I969LMQFH29GTsLzxNk/0cLw5q56ARF0v5sIWfHYwGTS88jdDqIpuuettcSczbxeA7EuAmqQ==", - "dependencies": { - "ajv": "8.12.0", - "ajv-formats": "2.1.1", - "jsonc-parser": "3.2.1", - "picomatch": "4.0.1", + "version": "19.0.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-19.0.1.tgz", + "integrity": "sha512-oXIAV3hXqUW3Pmm95pvEmb+24n1cKQG62FzhQSjOIrMeHiCbGLNuc8zHosIi2oMrcCJJxR6KzWjThvbuzDwWlw==", + "dependencies": { + "ajv": "8.17.1", + "ajv-formats": "3.0.1", + "jsonc-parser": "3.3.1", + "picomatch": "4.0.2", "rxjs": "7.8.1", "source-map": "0.7.4" }, "engines": { - "node": "^18.13.0 || >=20.9.0", + "node": "^18.19.1 || ^20.11.1 || >=22.0.0", "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", "yarn": ">= 1.13.0" }, "peerDependencies": { - "chokidar": "^3.5.2" + "chokidar": "^4.0.0" }, "peerDependenciesMeta": { "chokidar": { @@ -99,14 +99,14 @@ } }, "node_modules/@angular-devkit/core/node_modules/ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "dependencies": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "require-from-string": "^2.0.2" }, "funding": { "type": "github", @@ -118,15 +118,10 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, - "node_modules/@angular-devkit/core/node_modules/jsonc-parser": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", - "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==" - }, "node_modules/@angular-devkit/core/node_modules/picomatch": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.1.tgz", - "integrity": "sha512-xUXwsxNjwTQ8K3GnT4pCJm+xq3RUPQbmkYJTP5aFIfNIvbcc/4MUxgBaaRSZJ6yGJZiGSyYlM6MzwTsRk8SYCg==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==", "engines": { "node": ">=12" }, @@ -135,27 +130,22 @@ } }, "node_modules/@angular-devkit/schematics": { - "version": "17.3.11", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-17.3.11.tgz", - "integrity": "sha512-I5wviiIqiFwar9Pdk30Lujk8FczEEc18i22A5c6Z9lbmhPQdTroDnEQdsfXjy404wPe8H62s0I15o4pmMGfTYQ==", + "version": "19.0.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-19.0.1.tgz", + "integrity": "sha512-N9dV8WpNRULykNj8fSxQrta85gPKxb315J3xugLS2uwiFWhz7wo5EY1YeYhoVKoVcNB2ng9imJgC5aO52AHZwg==", "dependencies": { - "@angular-devkit/core": "17.3.11", - "jsonc-parser": "3.2.1", - "magic-string": "0.30.8", + "@angular-devkit/core": "19.0.1", + "jsonc-parser": "3.3.1", + "magic-string": "0.30.12", "ora": "5.4.1", "rxjs": "7.8.1" }, "engines": { - "node": "^18.13.0 || >=20.9.0", + "node": "^18.19.1 || ^20.11.1 || >=22.0.0", "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", "yarn": ">= 1.13.0" } }, - "node_modules/@angular-devkit/schematics/node_modules/jsonc-parser": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", - "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==" - }, "node_modules/@babel/code-frame": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.24.7.tgz", @@ -1570,36 +1560,6 @@ } } }, - "node_modules/@jest/core/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/core/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/core/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/@jest/core/node_modules/micromatch": { "version": "4.0.5", "dev": true, @@ -1612,17 +1572,6 @@ "node": ">=8.6" } }, - "node_modules/@jest/core/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/@jest/environment": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/@jest/environment/-/environment-29.7.0.tgz", @@ -1850,41 +1799,11 @@ "@jridgewell/sourcemap-codec": "1.4.14" } }, - "node_modules/@jest/transform/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, "node_modules/@jest/transform/node_modules/convert-source-map": { "version": "2.0.0", "dev": true, "license": "MIT" }, - "node_modules/@jest/transform/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/@jest/transform/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/@jest/transform/node_modules/micromatch": { "version": "4.0.5", "dev": true, @@ -1897,17 +1816,6 @@ "node": ">=8.6" } }, - "node_modules/@jest/transform/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/@jest/transform/node_modules/write-file-atomic": { "version": "4.0.2", "dev": true, @@ -2712,8 +2620,9 @@ } }, "node_modules/ajv-formats": { - "version": "2.1.1", - "license": "MIT", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", "dependencies": { "ajv": "^8.0.0" }, @@ -2846,7 +2755,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "devOptional": true, + "dev": true, "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -3287,7 +3196,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "devOptional": true, + "dev": true, "engines": { "node": ">=8" }, @@ -3462,6 +3371,18 @@ "concat-map": "0.0.1" } }, + "node_modules/braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "dependencies": { + "fill-range": "^7.1.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/browserslist": { "version": "4.23.1", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", @@ -3655,72 +3576,19 @@ "dev": true }, "node_modules/chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "devOptional": true, + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", + "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", + "optional": true, + "peer": true, "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" + "readdirp": "^4.0.1" }, "engines": { - "node": ">= 8.10.0" + "node": ">= 14.16.0" }, "funding": { "url": "https://paulmillr.com/funding/" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/chokidar/node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "devOptional": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/chokidar/node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "devOptional": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/chokidar/node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "devOptional": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/chokidar/node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "devOptional": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" } }, "node_modules/ci-info": { @@ -5481,39 +5349,6 @@ "node": ">=8.6.0" } }, - "node_modules/fast-glob/node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fast-glob/node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fast-glob/node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/fast-glob/node_modules/micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -5527,18 +5362,6 @@ "node": ">=8.6" } }, - "node_modules/fast-glob/node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/fast-json-stable-stringify": { "version": "2.1.0", "dev": true, @@ -5552,8 +5375,7 @@ "node_modules/fast-uri": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", - "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==", - "dev": true + "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==" }, "node_modules/fastest-levenshtein": { "version": "1.0.16", @@ -5624,6 +5446,18 @@ "node": ">=10" } }, + "node_modules/fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "dependencies": { + "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/find-cache-dir": { "version": "3.3.1", "dev": true, @@ -5672,39 +5506,6 @@ "node": ">= 10.13.0" } }, - "node_modules/findup-sync/node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/findup-sync/node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/findup-sync/node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/findup-sync/node_modules/micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -5718,18 +5519,6 @@ "node": ">=8.6" } }, - "node_modules/findup-sync/node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/fined": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/fined/-/fined-2.0.0.tgz", @@ -6068,7 +5857,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "devOptional": true, + "dev": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -6121,6 +5910,42 @@ "node": ">= 10.13.0" } }, + "node_modules/glob-watcher/node_modules/chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "dependencies": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + } + }, + "node_modules/glob-watcher/node_modules/readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "dependencies": { + "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" + } + }, "node_modules/glob2base": { "version": "0.0.12", "dev": true, @@ -6788,7 +6613,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "devOptional": true, + "dev": true, "dependencies": { "binary-extensions": "^2.0.0" }, @@ -6883,7 +6708,7 @@ }, "node_modules/is-extglob": { "version": "2.1.1", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -6908,7 +6733,7 @@ }, "node_modules/is-glob": { "version": "4.0.3", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" @@ -7017,6 +6842,15 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true, + "engines": { + "node": ">=0.12.0" + } + }, "node_modules/is-number-object": { "version": "1.0.7", "dev": true, @@ -7613,39 +7447,6 @@ } } }, - "node_modules/jest-config/node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-config/node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-config/node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/jest-config/node_modules/micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -7677,18 +7478,6 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/jest-config/node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/jest-diff": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-diff/-/jest-diff-29.7.0.tgz", @@ -7783,39 +7572,6 @@ "fsevents": "^2.3.2" } }, - "node_modules/jest-haste-map/node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-haste-map/node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-haste-map/node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, "node_modules/jest-haste-map/node_modules/micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -7829,18 +7585,6 @@ "node": ">=8.6" } }, - "node_modules/jest-haste-map/node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/jest-leak-detector": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-leak-detector/-/jest-leak-detector-29.7.0.tgz", @@ -7881,42 +7625,12 @@ "chalk": "^4.0.0", "graceful-fs": "^4.2.9", "micromatch": "^4.0.4", - "pretty-format": "^29.7.0", - "slash": "^3.0.0", - "stack-utils": "^2.0.3" - }, - "engines": { - "node": "^14.15.0 || ^16.10.0 || >=18.0.0" - } - }, - "node_modules/jest-message-util/node_modules/braces": { - "version": "3.0.2", - "dev": true, - "license": "MIT", - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-message-util/node_modules/fill-range": { - "version": "7.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/jest-message-util/node_modules/is-number": { - "version": "7.0.0", - "dev": true, - "license": "MIT", + "pretty-format": "^29.7.0", + "slash": "^3.0.0", + "stack-utils": "^2.0.3" + }, "engines": { - "node": ">=0.12.0" + "node": "^14.15.0 || ^16.10.0 || >=18.0.0" } }, "node_modules/jest-message-util/node_modules/micromatch": { @@ -7931,17 +7645,6 @@ "node": ">=8.6" } }, - "node_modules/jest-message-util/node_modules/to-regex-range": { - "version": "5.0.1", - "dev": true, - "license": "MIT", - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, "node_modules/jest-mock": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/jest-mock/-/jest-mock-29.7.0.tgz", @@ -8595,20 +8298,17 @@ } }, "node_modules/magic-string": { - "version": "0.30.8", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.8.tgz", - "integrity": "sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==", + "version": "0.30.12", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", + "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", "dependencies": { - "@jridgewell/sourcemap-codec": "^1.4.15" - }, - "engines": { - "node": ">=12" + "@jridgewell/sourcemap-codec": "^1.5.0" } }, "node_modules/magic-string/node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" }, "node_modules/make-dir": { "version": "3.0.2", @@ -8837,7 +8537,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.10.0" } @@ -9425,7 +9125,7 @@ }, "node_modules/picomatch": { "version": "2.3.1", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=8.6" @@ -9745,15 +9445,17 @@ } }, "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "devOptional": true, - "dependencies": { - "picomatch": "^2.2.1" - }, + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz", + "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==", + "optional": true, + "peer": true, "engines": { - "node": ">=8.10.0" + "node": ">= 14.16.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" } }, "node_modules/rechoir": { @@ -11085,6 +10787,18 @@ "node": ">=4" } }, + "node_modules/to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "dependencies": { + "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" + } + }, "node_modules/to-through": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/to-through/-/to-through-3.0.0.tgz", @@ -12178,27 +11892,27 @@ } }, "@angular-devkit/core": { - "version": "17.3.11", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-17.3.11.tgz", - "integrity": "sha512-vTNDYNsLIWpYk2I969LMQFH29GTsLzxNk/0cLw5q56ARF0v5sIWfHYwGTS88jdDqIpuuettcSczbxeA7EuAmqQ==", - "requires": { - "ajv": "8.12.0", - "ajv-formats": "2.1.1", - "jsonc-parser": "3.2.1", - "picomatch": "4.0.1", + "version": "19.0.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-19.0.1.tgz", + "integrity": "sha512-oXIAV3hXqUW3Pmm95pvEmb+24n1cKQG62FzhQSjOIrMeHiCbGLNuc8zHosIi2oMrcCJJxR6KzWjThvbuzDwWlw==", + "requires": { + "ajv": "8.17.1", + "ajv-formats": "3.0.1", + "jsonc-parser": "3.3.1", + "picomatch": "4.0.2", "rxjs": "7.8.1", "source-map": "0.7.4" }, "dependencies": { "ajv": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz", - "integrity": "sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==", + "version": "8.17.1", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-8.17.1.tgz", + "integrity": "sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==", "requires": { - "fast-deep-equal": "^3.1.1", + "fast-deep-equal": "^3.1.3", + "fast-uri": "^3.0.1", "json-schema-traverse": "^1.0.0", - "require-from-string": "^2.0.2", - "uri-js": "^4.2.2" + "require-from-string": "^2.0.2" } }, "json-schema-traverse": { @@ -12206,35 +11920,23 @@ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==" }, - "jsonc-parser": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", - "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==" - }, "picomatch": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.1.tgz", - "integrity": "sha512-xUXwsxNjwTQ8K3GnT4pCJm+xq3RUPQbmkYJTP5aFIfNIvbcc/4MUxgBaaRSZJ6yGJZiGSyYlM6MzwTsRk8SYCg==" + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.2.tgz", + "integrity": "sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==" } } }, "@angular-devkit/schematics": { - "version": "17.3.11", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-17.3.11.tgz", - "integrity": "sha512-I5wviiIqiFwar9Pdk30Lujk8FczEEc18i22A5c6Z9lbmhPQdTroDnEQdsfXjy404wPe8H62s0I15o4pmMGfTYQ==", + "version": "19.0.1", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-19.0.1.tgz", + "integrity": "sha512-N9dV8WpNRULykNj8fSxQrta85gPKxb315J3xugLS2uwiFWhz7wo5EY1YeYhoVKoVcNB2ng9imJgC5aO52AHZwg==", "requires": { - "@angular-devkit/core": "17.3.11", - "jsonc-parser": "3.2.1", - "magic-string": "0.30.8", + "@angular-devkit/core": "19.0.1", + "jsonc-parser": "3.3.1", + "magic-string": "0.30.12", "ora": "5.4.1", "rxjs": "7.8.1" - }, - "dependencies": { - "jsonc-parser": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", - "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==" - } } }, "@babel/code-frame": { @@ -13266,24 +12968,6 @@ "strip-ansi": "^6.0.0" }, "dependencies": { - "braces": { - "version": "3.0.2", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "fill-range": { - "version": "7.0.1", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "is-number": { - "version": "7.0.0", - "dev": true - }, "micromatch": { "version": "4.0.5", "dev": true, @@ -13291,13 +12975,6 @@ "braces": "^3.0.2", "picomatch": "^2.3.1" } - }, - "to-regex-range": { - "version": "5.0.1", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } } } }, @@ -13491,28 +13168,10 @@ "@jridgewell/sourcemap-codec": "1.4.14" } }, - "braces": { - "version": "3.0.2", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, "convert-source-map": { "version": "2.0.0", "dev": true }, - "fill-range": { - "version": "7.0.1", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "is-number": { - "version": "7.0.0", - "dev": true - }, "micromatch": { "version": "4.0.5", "dev": true, @@ -13521,13 +13180,6 @@ "picomatch": "^2.3.1" } }, - "to-regex-range": { - "version": "5.0.1", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, "write-file-atomic": { "version": "4.0.2", "dev": true, @@ -14116,7 +13768,9 @@ } }, "ajv-formats": { - "version": "2.1.1", + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/ajv-formats/-/ajv-formats-3.0.1.tgz", + "integrity": "sha512-8iUql50EUR+uUcdRQ3HDqa6EVyo3docL8g5WJ3FNcWmu62IbkGUue/pEyLBW8VGKKucTPgqeks4fIU1DA4yowQ==", "requires": { "ajv": "^8.0.0" }, @@ -14201,7 +13855,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "devOptional": true, + "dev": true, "requires": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -14519,7 +14173,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "devOptional": true + "dev": true }, "bl": { "version": "4.1.0", @@ -14632,6 +14286,15 @@ "concat-map": "0.0.1" } }, + "braces": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.3.tgz", + "integrity": "sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==", + "dev": true, + "requires": { + "fill-range": "^7.1.1" + } + }, "browserslist": { "version": "4.23.1", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", @@ -14737,54 +14400,13 @@ "dev": true }, "chokidar": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", - "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "devOptional": true, + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.1.tgz", + "integrity": "sha512-n8enUVCED/KVRQlab1hr3MVpcVMvxtZjmEa956u+4YijlmQED223XMSYj2tLuKvr4jcCTzNNMpQDUer72MMmzA==", + "optional": true, + "peer": true, "requires": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "fsevents": "~2.3.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "dependencies": { - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "devOptional": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "devOptional": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "devOptional": true - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "devOptional": true, - "requires": { - "is-number": "^7.0.0" - } - } + "readdirp": "^4.0.1" } }, "ci-info": { @@ -16003,30 +15625,6 @@ "micromatch": "^4.0.4" }, "dependencies": { - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, "micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -16036,15 +15634,6 @@ "braces": "^3.0.2", "picomatch": "^2.3.1" } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } } } }, @@ -16059,8 +15648,7 @@ "fast-uri": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/fast-uri/-/fast-uri-3.0.1.tgz", - "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==", - "dev": true + "integrity": "sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==" }, "fastest-levenshtein": { "version": "1.0.16", @@ -16124,6 +15712,15 @@ } } }, + "fill-range": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.1.1.tgz", + "integrity": "sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, "find-cache-dir": { "version": "3.3.1", "dev": true, @@ -16157,30 +15754,6 @@ "resolve-dir": "^1.0.1" }, "dependencies": { - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, "micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -16190,15 +15763,6 @@ "braces": "^3.0.2", "picomatch": "^2.3.1" } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } } } }, @@ -16439,7 +16003,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "devOptional": true, + "dev": true, "requires": { "is-glob": "^4.0.1" } @@ -16480,6 +16044,33 @@ "requires": { "async-done": "^2.0.0", "chokidar": "^3.5.3" + }, + "dependencies": { + "chokidar": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", + "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", + "dev": true, + "requires": { + "anymatch": "~3.1.2", + "braces": "~3.0.2", + "fsevents": "~2.3.2", + "glob-parent": "~5.1.2", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.6.0" + } + }, + "readdirp": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", + "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + } } }, "glob2base": { @@ -16936,7 +16527,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "devOptional": true, + "dev": true, "requires": { "binary-extensions": "^2.0.0" } @@ -16986,7 +16577,7 @@ }, "is-extglob": { "version": "2.1.1", - "devOptional": true + "dev": true }, "is-fullwidth-code-point": { "version": "3.0.0", @@ -17000,7 +16591,7 @@ }, "is-glob": { "version": "4.0.3", - "devOptional": true, + "dev": true, "requires": { "is-extglob": "^2.1.1" } @@ -17057,6 +16648,12 @@ "version": "6.0.0", "dev": true }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, "is-number-object": { "version": "1.0.7", "dev": true, @@ -17448,30 +17045,6 @@ "strip-json-comments": "^3.1.1" }, "dependencies": { - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, "micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -17493,15 +17066,6 @@ "json-parse-even-better-errors": "^2.3.0", "lines-and-columns": "^1.1.6" } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } } } }, @@ -17579,30 +17143,6 @@ "walker": "^1.0.8" }, "dependencies": { - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, "micromatch": { "version": "4.0.5", "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", @@ -17612,15 +17152,6 @@ "braces": "^3.0.2", "picomatch": "^2.3.1" } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } } } }, @@ -17663,24 +17194,6 @@ "stack-utils": "^2.0.3" }, "dependencies": { - "braces": { - "version": "3.0.2", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "fill-range": { - "version": "7.0.1", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "is-number": { - "version": "7.0.0", - "dev": true - }, "micromatch": { "version": "4.0.5", "dev": true, @@ -17688,13 +17201,6 @@ "braces": "^3.0.2", "picomatch": "^2.3.1" } - }, - "to-regex-range": { - "version": "5.0.1", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } } } }, @@ -18204,17 +17710,17 @@ "dev": true }, "magic-string": { - "version": "0.30.8", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.8.tgz", - "integrity": "sha512-ISQTe55T2ao7XtlAStud6qwYPZjE4GK1S/BeVPus4jrq6JuOnQ00YKQC581RWhR122W7msZV263KzVeLoqidyQ==", + "version": "0.30.12", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.12.tgz", + "integrity": "sha512-Ea8I3sQMVXr8JhN4z+H/d8zwo+tYDgHE9+5G4Wnrwhs0gaK9fXTKx0Tw5Xwsd/bCPTTZNRAdpyzvoeORe9LYpw==", "requires": { - "@jridgewell/sourcemap-codec": "^1.4.15" + "@jridgewell/sourcemap-codec": "^1.5.0" }, "dependencies": { "@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==" + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==" } } }, @@ -18367,7 +17873,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "devOptional": true + "dev": true }, "now-and-later": { "version": "3.0.0", @@ -18774,7 +18280,7 @@ }, "picomatch": { "version": "2.3.1", - "devOptional": true + "dev": true }, "pirates": { "version": "4.0.4", @@ -18984,13 +18490,11 @@ } }, "readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "devOptional": true, - "requires": { - "picomatch": "^2.2.1" - } + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.0.2.tgz", + "integrity": "sha512-yDMz9g+VaZkqBYS/ozoBJwaBhTbZo3UNYQHNRw1D3UFQB8oHB4uS/tAODO+ZLjGWmUbKnIlOWO+aaIiAxrUWHA==", + "optional": true, + "peer": true }, "rechoir": { "version": "0.6.2", @@ -19876,6 +19380,15 @@ "version": "2.0.0", "dev": true }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, "to-through": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/to-through/-/to-through-3.0.0.tgz", diff --git a/package.json b/package.json index a7d954de3..e9fdffb2b 100644 --- a/package.json +++ b/package.json @@ -41,8 +41,8 @@ }, "homepage": "https://github.com/nestjs/schematics#readme", "dependencies": { - "@angular-devkit/core": "17.3.11", - "@angular-devkit/schematics": "17.3.11", + "@angular-devkit/core": "19.0.1", + "@angular-devkit/schematics": "19.0.1", "comment-json": "4.2.5", "jsonc-parser": "3.3.1", "pluralize": "8.0.0" From 7b205f5f2c5ca5b0cee34205422825f562f724e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20My=C5=9Bliwiec?= Date: Mon, 25 Nov 2024 09:29:36 +0100 Subject: [PATCH 03/11] chore: upgrade to eslint v9 --- .eslintignore | 3 - .eslintrc.js | 25 -- eslint.config.mjs | 40 ++ package-lock.json | 342 +++++++++++++++--- package.json | 9 +- src/lib/application/application.factory.ts | 26 +- src/lib/client-app/angular/angular.factory.ts | 18 +- src/lib/controller/controller.factory.ts | 8 +- src/lib/filter/filter.factory.ts | 8 +- src/lib/gateway/gateway.factory.ts | 8 +- src/lib/guard/guard.factory.ts | 8 +- src/lib/interceptor/interceptor.factory.ts | 8 +- src/lib/library/library.factory.ts | 24 +- src/lib/middleware/middleware.factory.ts | 10 +- src/lib/pipe/pipe.factory.ts | 8 +- src/lib/provider/provider.factory.ts | 8 +- src/lib/readers/file-system.reader.ts | 14 +- src/lib/resolver/resolver.factory.ts | 8 +- src/lib/resource/resource.factory.ts | 17 +- src/lib/service/service.factory.ts | 4 +- src/lib/sub-app/sub-app.factory.ts | 25 +- src/utils/json-file.util.ts | 5 +- src/utils/metadata.manager.ts | 13 +- src/utils/module-import.declarator.ts | 2 +- src/utils/module.finder.ts | 2 +- src/utils/path.solver.ts | 5 +- src/utils/source-root.helpers.ts | 4 +- 27 files changed, 456 insertions(+), 196 deletions(-) delete mode 100644 .eslintignore delete mode 100644 .eslintrc.js create mode 100644 eslint.config.mjs diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index 6dcc40407..000000000 --- a/.eslintignore +++ /dev/null @@ -1,3 +0,0 @@ -src/**/*.test.ts -src/**/files/** -test/** \ No newline at end of file diff --git a/.eslintrc.js b/.eslintrc.js deleted file mode 100644 index c0de4b34f..000000000 --- a/.eslintrc.js +++ /dev/null @@ -1,25 +0,0 @@ -module.exports = { - parser: '@typescript-eslint/parser', - parserOptions: { - project: 'tsconfig.json', - sourceType: 'module', - }, - plugins: ['@typescript-eslint/eslint-plugin'], - extends: [ - 'plugin:@typescript-eslint/eslint-recommended', - 'plugin:@typescript-eslint/recommended', - 'prettier', - ], - root: true, - env: { - node: true, - jest: true, - }, - rules: { - '@typescript-eslint/interface-name-prefix': 'off', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-use-before-define': 'off', - }, -}; diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 000000000..1bb057725 --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,40 @@ +// @ts-check +import eslint from '@eslint/js'; +import tseslint from 'typescript-eslint'; +import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; +import globals from 'globals'; + +export default tseslint.config( + { + ignores: ['eslint.config.mjs', 'src/**/*.test.ts', 'src/**/files/**', 'test/**'], + }, + eslint.configs.recommended, + ...tseslint.configs.recommendedTypeChecked, + eslintPluginPrettierRecommended, + { + languageOptions: { + globals: { + ...globals.node, + ...globals.jest, + }, + ecmaVersion: 5, + sourceType: 'module', + parserOptions: { + projectService: true, + tsconfigRootDir: import.meta.dirname, + }, + }, + }, + { + rules: { + '@typescript-eslint/interface-name-prefix': 'off', + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-require-imports': 'off', + '@typescript-eslint/no-unsafe-call': 'off', + '@typescript-eslint/no-unsafe-member-access': 'off', + }, + }, +); \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index df4cdef73..fda32aad2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,9 @@ "devDependencies": { "@commitlint/cli": "19.6.0", "@commitlint/config-angular": "19.6.0", + "@eslint/eslintrc": "3.2.0", + "@eslint/js": "9.15.0", + "@types/eslint__js": "8.42.3", "@types/jest": "29.5.14", "@types/node": "22.9.3", "@typescript-eslint/eslint-plugin": "8.15.0", @@ -26,15 +29,19 @@ "eslint": "9.15.0", "eslint-config-prettier": "9.1.0", "eslint-plugin-import": "2.31.0", + "eslint-plugin-prettier": "^5.2.1", + "globals": "15.12.0", "gulp": "5.0.0", "gulp-clean": "0.4.0", "husky": "9.1.7", "jest": "29.7.0", "nyc": "17.1.0", + "prettier": "3.3.3", "release-it": "17.10.0", "ts-jest": "29.2.5", "ts-node": "10.9.2", - "typescript": "5.7.2" + "typescript": "5.7.2", + "typescript-eslint": "^8.15.0" }, "peerDependencies": { "typescript": ">=4.8.2" @@ -705,6 +712,15 @@ "node": ">=6.9.0" } }, + "node_modules/@babel/traverse/node_modules/globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/@babel/types": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", @@ -2179,6 +2195,18 @@ "@octokit/openapi-types": "^22.2.0" } }, + "node_modules/@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "dev": true, + "engines": { + "node": "^12.20.0 || ^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/@pnpm/config.env-replace": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz", @@ -2332,6 +2360,25 @@ "@types/node": "*" } }, + "node_modules/@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "dependencies": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "node_modules/@types/eslint__js": { + "version": "8.42.3", + "resolved": "https://registry.npmjs.org/@types/eslint__js/-/eslint__js-8.42.3.tgz", + "integrity": "sha512-alfG737uhmPdnvkrLdZLcEKJ/B8s9Y4hrZ+YAdzUeoArBlSUERA2E87ROfOaS4jd/C45fzOoZzidLc1IPwLqOw==", + "dev": true, + "dependencies": { + "@types/eslint": "*" + } + }, "node_modules/@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -2846,7 +2893,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "devOptional": true, + "dev": true, "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -3287,7 +3334,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "devOptional": true, + "dev": true, "engines": { "node": ">=8" }, @@ -3658,7 +3705,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "devOptional": true, + "dev": true, "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -3682,7 +3729,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "devOptional": true, + "dev": true, "dependencies": { "fill-range": "^7.0.1" }, @@ -3694,7 +3741,7 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "devOptional": true, + "dev": true, "dependencies": { "to-regex-range": "^5.0.1" }, @@ -3706,7 +3753,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.12.0" } @@ -3715,7 +3762,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "devOptional": true, + "dev": true, "dependencies": { "is-number": "^7.0.0" }, @@ -5126,6 +5173,36 @@ "semver": "bin/semver.js" } }, + "node_modules/eslint-plugin-prettier": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz", + "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==", + "dev": true, + "dependencies": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.9.1" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/eslint-plugin-prettier" + }, + "peerDependencies": { + "@types/eslint": ">=8.0.0", + "eslint": ">=8.0.0", + "eslint-config-prettier": "*", + "prettier": ">=3.0.0" + }, + "peerDependenciesMeta": { + "@types/eslint": { + "optional": true + }, + "eslint-config-prettier": { + "optional": true + } + } + }, "node_modules/eslint-scope": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", @@ -5459,6 +5536,12 @@ "version": "3.1.3", "license": "MIT" }, + "node_modules/fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true + }, "node_modules/fast-fifo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", @@ -6068,7 +6151,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "devOptional": true, + "dev": true, "dependencies": { "is-glob": "^4.0.1" }, @@ -6184,12 +6267,15 @@ } }, "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "version": "15.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.12.0.tgz", + "integrity": "sha512-1+gLErljJFhbOVyaetcwJiJ4+eLe45S2E7P5UiZ9xGfeq3ATQf5DOv9G7MH3gGbKQLkzmNh2DxfZwLdw+j6oTQ==", "dev": true, "engines": { - "node": ">=4" + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" } }, "node_modules/globalthis": { @@ -6788,7 +6874,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "devOptional": true, + "dev": true, "dependencies": { "binary-extensions": "^2.0.0" }, @@ -6883,7 +6969,7 @@ }, "node_modules/is-extglob": { "version": "2.1.1", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=0.10.0" @@ -6908,7 +6994,7 @@ }, "node_modules/is-glob": { "version": "4.0.3", - "devOptional": true, + "dev": true, "license": "MIT", "dependencies": { "is-extglob": "^2.1.1" @@ -8837,7 +8923,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "devOptional": true, + "dev": true, "engines": { "node": ">=0.10.0" } @@ -9425,7 +9511,7 @@ }, "node_modules/picomatch": { "version": "2.3.1", - "devOptional": true, + "dev": true, "license": "MIT", "engines": { "node": ">=8.6" @@ -9540,6 +9626,33 @@ "node": ">= 0.8.0" } }, + "node_modules/prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true, + "bin": { + "prettier": "bin/prettier.cjs" + }, + "engines": { + "node": ">=14" + }, + "funding": { + "url": "https://github.com/prettier/prettier?sponsor=1" + } + }, + "node_modules/prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "dependencies": { + "fast-diff": "^1.1.2" + }, + "engines": { + "node": ">=6.0.0" + } + }, "node_modules/pretty-format": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", @@ -9748,7 +9861,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "devOptional": true, + "dev": true, "dependencies": { "picomatch": "^2.2.1" }, @@ -10996,6 +11109,22 @@ "semver": "bin/semver.js" } }, + "node_modules/synckit": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz", + "integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==", + "dev": true, + "dependencies": { + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": "^14.18.0 || >=16.0.0" + }, + "funding": { + "url": "https://opencollective.com/unts" + } + }, "node_modules/teex": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/teex/-/teex-1.0.1.tgz", @@ -11241,9 +11370,9 @@ } }, "node_modules/tslib": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", - "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, "node_modules/type-check": { "version": "0.4.0", @@ -11368,6 +11497,32 @@ "node": ">=14.17" } }, + "node_modules/typescript-eslint": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.15.0.tgz", + "integrity": "sha512-wY4FRGl0ZI+ZU4Jo/yjdBu0lVTSML58pu6PgGtJmCufvzfV565pUF6iACQt092uFOd49iLOTX/sEVmHtbSrS+w==", + "dev": true, + "dependencies": { + "@typescript-eslint/eslint-plugin": "8.15.0", + "@typescript-eslint/parser": "8.15.0", + "@typescript-eslint/utils": "8.15.0" + }, + "engines": { + "node": "^18.18.0 || ^20.9.0 || >=21.1.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/typescript-eslint" + }, + "peerDependencies": { + "eslint": "^8.57.0 || ^9.0.0" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } + } + }, "node_modules/unbox-primitive": { "version": "1.0.2", "dev": true, @@ -12638,6 +12793,14 @@ "@babel/types": "^7.24.7", "debug": "^4.3.1", "globals": "^11.1.0" + }, + "dependencies": { + "globals": { + "version": "11.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", + "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "dev": true + } } }, "@babel/types": { @@ -13678,8 +13841,7 @@ "version": "4.0.0", "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-4.0.0.tgz", "integrity": "sha512-2uJI1COtYCq8Z4yNSnM231TgH50bRkheQ9+aH8TnZanB6QilOnx8RMD2qsnamSOXtDj0ilxvevf5fGsBhBBzKA==", - "dev": true, - "requires": {} + "dev": true }, "@octokit/plugin-rest-endpoint-methods": { "version": "13.2.2", @@ -13734,6 +13896,12 @@ "@octokit/openapi-types": "^22.2.0" } }, + "@pkgr/core": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz", + "integrity": "sha512-cq8o4cWH0ibXh9VGi5P20Tu9XF/0fFXl9EUinr9QfTM7a7p0oTA4iJRCQWppXR1Pg8dSM0UCItCkPwsk9qWWYA==", + "dev": true + }, "@pnpm/config.env-replace": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/@pnpm/config.env-replace/-/config.env-replace-1.1.0.tgz", @@ -13868,6 +14036,25 @@ "@types/node": "*" } }, + "@types/eslint": { + "version": "9.6.1", + "resolved": "https://registry.npmjs.org/@types/eslint/-/eslint-9.6.1.tgz", + "integrity": "sha512-FXx2pKgId/WyYo2jXw63kk7/+TY7u7AziEJxJAnSFzHlqTAS3Ync6SvgYAN/k4/PQpnnVuzoMuVnByKK2qp0ag==", + "dev": true, + "requires": { + "@types/estree": "*", + "@types/json-schema": "*" + } + }, + "@types/eslint__js": { + "version": "8.42.3", + "resolved": "https://registry.npmjs.org/@types/eslint__js/-/eslint__js-8.42.3.tgz", + "integrity": "sha512-alfG737uhmPdnvkrLdZLcEKJ/B8s9Y4hrZ+YAdzUeoArBlSUERA2E87ROfOaS4jd/C45fzOoZzidLc1IPwLqOw==", + "dev": true, + "requires": { + "@types/eslint": "*" + } + }, "@types/estree": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.6.tgz", @@ -14079,8 +14266,7 @@ "version": "5.3.2", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz", "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==", - "dev": true, - "requires": {} + "dev": true }, "acorn-walk": { "version": "8.2.0", @@ -14201,7 +14387,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz", "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==", - "devOptional": true, + "dev": true, "requires": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" @@ -14519,7 +14705,7 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.3.0.tgz", "integrity": "sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==", - "devOptional": true + "dev": true }, "bl": { "version": "4.1.0", @@ -14740,7 +14926,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.6.0.tgz", "integrity": "sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==", - "devOptional": true, + "dev": true, "requires": { "anymatch": "~3.1.2", "braces": "~3.0.2", @@ -14756,7 +14942,7 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "devOptional": true, + "dev": true, "requires": { "fill-range": "^7.0.1" } @@ -14765,7 +14951,7 @@ "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "devOptional": true, + "dev": true, "requires": { "to-regex-range": "^5.0.1" } @@ -14774,13 +14960,13 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "devOptional": true + "dev": true }, "to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "devOptional": true, + "dev": true, "requires": { "is-number": "^7.0.0" } @@ -15274,8 +15460,7 @@ "version": "1.5.1", "resolved": "https://registry.npmjs.org/dedent/-/dedent-1.5.1.tgz", "integrity": "sha512-+LxW+KLWxu3HW3M2w2ympwtqPrqYRzU8fqi6Fhd18fBALe15blJPI/I4+UHveMVG6lJqB4JNd4UG0S5cnVHwIg==", - "dev": true, - "requires": {} + "dev": true }, "deep-extend": { "version": "0.6.0", @@ -15736,8 +15921,7 @@ "version": "9.1.0", "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", - "dev": true, - "requires": {} + "dev": true }, "eslint-import-resolver-node": { "version": "0.3.9", @@ -15838,6 +16022,16 @@ } } }, + "eslint-plugin-prettier": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz", + "integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==", + "dev": true, + "requires": { + "prettier-linter-helpers": "^1.0.0", + "synckit": "^0.9.1" + } + }, "eslint-scope": { "version": "8.2.0", "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", @@ -15984,6 +16178,12 @@ "fast-deep-equal": { "version": "3.1.3" }, + "fast-diff": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.3.0.tgz", + "integrity": "sha512-VxPP4NqbUjj6MaAOafWeUn2cXWLcCtljklUtZf0Ind4XQ+QPtmA0b18zZy0jIQx+ExRVCR/ZQpBmik5lXshNsw==", + "dev": true + }, "fast-fifo": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/fast-fifo/-/fast-fifo-1.3.2.tgz", @@ -16439,7 +16639,7 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "devOptional": true, + "dev": true, "requires": { "is-glob": "^4.0.1" } @@ -16527,9 +16727,9 @@ } }, "globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", + "version": "15.12.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-15.12.0.tgz", + "integrity": "sha512-1+gLErljJFhbOVyaetcwJiJ4+eLe45S2E7P5UiZ9xGfeq3ATQf5DOv9G7MH3gGbKQLkzmNh2DxfZwLdw+j6oTQ==", "dev": true }, "globalthis": { @@ -16936,7 +17136,7 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "devOptional": true, + "dev": true, "requires": { "binary-extensions": "^2.0.0" } @@ -16986,7 +17186,7 @@ }, "is-extglob": { "version": "2.1.1", - "devOptional": true + "dev": true }, "is-fullwidth-code-point": { "version": "3.0.0", @@ -17000,7 +17200,7 @@ }, "is-glob": { "version": "4.0.3", - "devOptional": true, + "dev": true, "requires": { "is-extglob": "^2.1.1" } @@ -17713,8 +17913,7 @@ "version": "1.2.3", "resolved": "https://registry.npmjs.org/jest-pnp-resolver/-/jest-pnp-resolver-1.2.3.tgz", "integrity": "sha512-+3NpwQEnRoIBtx4fyhblQDPgJI0H1IEIkX7ShLUjPGA7TtUTvI1oiKi3SR4oBR0hQhQR80l4WAe5RrXBwWMA8w==", - "dev": true, - "requires": {} + "dev": true }, "jest-regex-util": { "version": "29.6.3", @@ -18367,7 +18566,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "devOptional": true + "dev": true }, "now-and-later": { "version": "3.0.0", @@ -18774,7 +18973,7 @@ }, "picomatch": { "version": "2.3.1", - "devOptional": true + "dev": true }, "pirates": { "version": "4.0.4", @@ -18842,6 +19041,21 @@ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==", "dev": true }, + "prettier": { + "version": "3.3.3", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz", + "integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==", + "dev": true + }, + "prettier-linter-helpers": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz", + "integrity": "sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==", + "dev": true, + "requires": { + "fast-diff": "^1.1.2" + } + }, "pretty-format": { "version": "29.7.0", "resolved": "https://registry.npmjs.org/pretty-format/-/pretty-format-29.7.0.tgz", @@ -18987,7 +19201,7 @@ "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "devOptional": true, + "dev": true, "requires": { "picomatch": "^2.2.1" } @@ -19809,6 +20023,16 @@ } } }, + "synckit": { + "version": "0.9.2", + "resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz", + "integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==", + "dev": true, + "requires": { + "@pkgr/core": "^0.1.0", + "tslib": "^2.6.2" + } + }, "teex": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/teex/-/teex-1.0.1.tgz", @@ -19889,8 +20113,7 @@ "version": "1.3.0", "resolved": "https://registry.npmjs.org/ts-api-utils/-/ts-api-utils-1.3.0.tgz", "integrity": "sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==", - "dev": true, - "requires": {} + "dev": true }, "ts-jest": { "version": "29.2.5", @@ -19964,9 +20187,9 @@ } }, "tslib": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.0.tgz", - "integrity": "sha512-7At1WUettjcSRHXCyYtTselblcHl9PJFFVKiCAy/bY97+BPZXSQ2wbq0P9s8tK2G7dFQfNnlJnPAiArVBVBsfA==" + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==" }, "type-check": { "version": "0.4.0", @@ -20052,6 +20275,17 @@ "integrity": "sha512-i5t66RHxDvVN40HfDd1PsEThGNnlMCMT3jMUuoh9/0TaqWevNontacunWyN02LA9/fIbEWlcHZcgTKb9QoaLfg==", "dev": true }, + "typescript-eslint": { + "version": "8.15.0", + "resolved": "https://registry.npmjs.org/typescript-eslint/-/typescript-eslint-8.15.0.tgz", + "integrity": "sha512-wY4FRGl0ZI+ZU4Jo/yjdBu0lVTSML58pu6PgGtJmCufvzfV565pUF6iACQt092uFOd49iLOTX/sEVmHtbSrS+w==", + "dev": true, + "requires": { + "@typescript-eslint/eslint-plugin": "8.15.0", + "@typescript-eslint/parser": "8.15.0", + "@typescript-eslint/utils": "8.15.0" + } + }, "unbox-primitive": { "version": "1.0.2", "dev": true, diff --git a/package.json b/package.json index 48da07da0..7d63b5b46 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,9 @@ "devDependencies": { "@commitlint/cli": "19.6.0", "@commitlint/config-angular": "19.6.0", + "@eslint/eslintrc": "3.2.0", + "@eslint/js": "9.15.0", + "@types/eslint__js": "8.42.3", "@types/jest": "29.5.14", "@types/node": "22.9.3", "@typescript-eslint/eslint-plugin": "8.15.0", @@ -58,15 +61,19 @@ "eslint": "9.15.0", "eslint-config-prettier": "9.1.0", "eslint-plugin-import": "2.31.0", + "eslint-plugin-prettier": "^5.2.1", + "globals": "15.12.0", "gulp": "5.0.0", "gulp-clean": "0.4.0", "husky": "9.1.7", "jest": "29.7.0", "nyc": "17.1.0", + "prettier": "3.3.3", "release-it": "17.10.0", "ts-jest": "29.2.5", "ts-node": "10.9.2", - "typescript": "5.7.2" + "typescript": "5.7.2", + "typescript-eslint": "^8.15.0" }, "peerDependencies": { "typescript": ">=4.8.2" diff --git a/src/lib/application/application.factory.ts b/src/lib/application/application.factory.ts index 2b57ffb40..7b1116387 100644 --- a/src/lib/application/application.factory.ts +++ b/src/lib/application/application.factory.ts @@ -35,13 +35,13 @@ export function main(options: ApplicationOptions): Rule { function transform(options: ApplicationOptions): ApplicationOptions { const target: ApplicationOptions = Object.assign({}, options); - target.author = !!target.author ? target.author : DEFAULT_AUTHOR; - target.description = !!target.description + target.author = target.author ? target.author : DEFAULT_AUTHOR; + target.description = target.description ? target.description : DEFAULT_DESCRIPTION; - target.language = !!target.language ? target.language : DEFAULT_LANGUAGE; + target.language = target.language ? target.language : DEFAULT_LANGUAGE; target.name = resolvePackageName(target.name.toString()); - target.version = !!target.version ? target.version : DEFAULT_VERSION; + target.version = target.version ? target.version : DEFAULT_VERSION; target.specFileSuffix = normalizeToKebabOrSnakeCase( options.specFileSuffix || 'spec', ); @@ -50,10 +50,8 @@ function transform(options: ApplicationOptions): ApplicationOptions { !target.packageManager || target.packageManager === 'undefined' ? 'npm' : target.packageManager; - target.dependencies = !!target.dependencies ? target.dependencies : ''; - target.devDependencies = !!target.devDependencies - ? target.devDependencies - : ''; + target.dependencies = target.dependencies ? target.dependencies : ''; + target.devDependencies = target.devDependencies ? target.devDependencies : ''; return target; } @@ -81,14 +79,16 @@ function resolvePackageName(path: string) { function generate(options: ApplicationOptions, path: string): Source { return apply(url(join('./files' as Path, options.language)), [ - options.spec ? noop() : filter((path) => !path.endsWith('__specFileSuffix__.ts')), + options.spec + ? noop() + : filter((path) => !path.endsWith('__specFileSuffix__.ts')), options.spec ? noop() : filter((path) => { - const languageExtension = options.language || 'ts'; - const suffix = `__specFileSuffix__.${languageExtension}`; - return !path.endsWith(suffix); - }), + const languageExtension = options.language || 'ts'; + const suffix = `__specFileSuffix__.${languageExtension}`; + return !path.endsWith(suffix); + }), template({ ...strings, ...options, diff --git a/src/lib/client-app/angular/angular.factory.ts b/src/lib/client-app/angular/angular.factory.ts index 959f5aa39..a65dac380 100644 --- a/src/lib/client-app/angular/angular.factory.ts +++ b/src/lib/client-app/angular/angular.factory.ts @@ -93,10 +93,10 @@ function addDeclarationToModule(options: AngularOptions): Rule { rootPath, }, }; - const declarationOptions = ({ + const declarationOptions = { ...options, staticOptions, - } as unknown) as DeclarationOptions; + } as unknown as DeclarationOptions; tree.overwrite( options.module, declarator.declare(content, declarationOptions), @@ -112,7 +112,7 @@ function addGlobalPrefix(): Rule { if (!fileRef) { return tree; } - // eslint-disable-next-line @typescript-eslint/no-var-requires + const ts = require('ts-morph'); const tsProject = new ts.Project({ manipulationSettings: { @@ -121,11 +121,13 @@ function addGlobalPrefix(): Rule { }); const tsFile = tsProject.addSourceFileAtPath(mainFilePath); const bootstrapFunction = tsFile.getFunction('bootstrap'); - const listenStatement = bootstrapFunction.getStatement(node => - node.getText().includes('listen'), + const listenStatement = bootstrapFunction.getStatement( + (node: { getText: () => string | string[] }) => + node.getText().includes('listen'), ); - const setPrefixStatement = bootstrapFunction.getStatement(node => - node.getText().includes('setGlobalPrefix'), + const setPrefixStatement = bootstrapFunction.getStatement( + (node: { getText: () => string | string[] }) => + node.getText().includes('setGlobalPrefix'), ); if (!listenStatement || setPrefixStatement) { return tree; @@ -135,7 +137,7 @@ function addGlobalPrefix(): Rule { listenExprIndex, `app.setGlobalPrefix('api');`, ); - tree.overwrite(mainFilePath, tsFile.getFullText()); + tree.overwrite(mainFilePath, tsFile.getFullText() as string); return tree; }; } diff --git a/src/lib/controller/controller.factory.ts b/src/lib/controller/controller.factory.ts index 5c4295b06..04f41dbf7 100644 --- a/src/lib/controller/controller.factory.ts +++ b/src/lib/controller/controller.factory.ts @@ -64,13 +64,13 @@ function transform(source: ControllerOptions): ControllerOptions { function generate(options: ControllerOptions) { return (context: SchematicContext) => apply(url(join('./files' as Path, options.language)), [ - options.spec - ? noop() + options.spec + ? noop() : filter((path) => { const languageExtension = options.language || 'ts'; const suffix = `.__specFileSuffix__.${languageExtension}`; - return !path.endsWith(suffix) - }), + return !path.endsWith(suffix); + }), template({ ...strings, ...options, diff --git a/src/lib/filter/filter.factory.ts b/src/lib/filter/filter.factory.ts index 56f10b9a0..f39546e80 100644 --- a/src/lib/filter/filter.factory.ts +++ b/src/lib/filter/filter.factory.ts @@ -45,13 +45,13 @@ function transform(options: FilterOptions): FilterOptions { function generate(options: FilterOptions): Source { return (context: SchematicContext) => apply(url(join('./files' as Path, options.language)), [ - options.spec - ? noop() + options.spec + ? noop() : filter((path) => { const languageExtension = options.language || 'ts'; const suffix = `.__specFileSuffix__.${languageExtension}`; - return !path.endsWith(suffix) - }), + return !path.endsWith(suffix); + }), template({ ...strings, ...options, diff --git a/src/lib/gateway/gateway.factory.ts b/src/lib/gateway/gateway.factory.ts index 1512d6f09..027f92e32 100644 --- a/src/lib/gateway/gateway.factory.ts +++ b/src/lib/gateway/gateway.factory.ts @@ -65,13 +65,13 @@ function generate(options: GatewayOptions): Source { return (context: SchematicContext) => apply(url(join('./files' as Path, options.language)), [ options.spec ? noop() : filter((path) => !path.endsWith('.spec.ts')), - options.spec - ? noop() + options.spec + ? noop() : filter((path) => { const languageExtension = options.language || 'ts'; const suffix = `.__specFileSuffix__.${languageExtension}`; - return !path.endsWith(suffix) - }), + return !path.endsWith(suffix); + }), template({ ...strings, ...options, diff --git a/src/lib/guard/guard.factory.ts b/src/lib/guard/guard.factory.ts index c0f3f2863..137bc7961 100644 --- a/src/lib/guard/guard.factory.ts +++ b/src/lib/guard/guard.factory.ts @@ -45,13 +45,13 @@ function transform(options: GuardOptions): GuardOptions { function generate(options: GuardOptions): Source { return (context: SchematicContext) => apply(url(join('./files' as Path, options.language)), [ - options.spec - ? noop() + options.spec + ? noop() : filter((path) => { const languageExtension = options.language || 'ts'; const suffix = `.__specFileSuffix__.${languageExtension}`; - return !path.endsWith(suffix) - }), + return !path.endsWith(suffix); + }), template({ ...strings, ...options, diff --git a/src/lib/interceptor/interceptor.factory.ts b/src/lib/interceptor/interceptor.factory.ts index b003f899d..79eb9075a 100644 --- a/src/lib/interceptor/interceptor.factory.ts +++ b/src/lib/interceptor/interceptor.factory.ts @@ -46,13 +46,13 @@ function generate(options: InterceptorOptions): Source { return (context: SchematicContext) => apply(url(join('./files' as Path, options.language)), [ options.spec ? noop() : filter((path) => !path.endsWith('.spec.ts')), - options.spec - ? noop() + options.spec + ? noop() : filter((path) => { const languageExtension = options.language || 'ts'; const suffix = `.__specFileSuffix__.${languageExtension}`; - return !path.endsWith(suffix) - }), + return !path.endsWith(suffix); + }), template({ ...strings, ...options, diff --git a/src/lib/library/library.factory.ts b/src/lib/library/library.factory.ts index b95f822ea..a78ae4e53 100644 --- a/src/lib/library/library.factory.ts +++ b/src/lib/library/library.factory.ts @@ -45,22 +45,25 @@ export function main(options: LibraryOptions): Rule { } function getDefaultLibraryPrefix(defaultLibraryPrefix = '@app') { - const fileSystemReader = new FileSystemReader(process.cwd()) + const fileSystemReader = new FileSystemReader(process.cwd()); const content: string | undefined = fileSystemReader.readSyncAnyOf([ 'nest-cli.json', '.nestcli.json', '.nest-cli.json', 'nest.json', ]); - + try { const nestJson = JSON.parse(content || '{}'); - if (nestJson.hasOwnProperty('defaultLibraryPrefix')) { - return nestJson['defaultLibraryPrefix']; + if ( + Object.prototype.hasOwnProperty.call(nestJson, 'defaultLibraryPrefix') + ) { + return nestJson['defaultLibraryPrefix'] as string; } - } catch (e) { + } catch { + return defaultLibraryPrefix; } - + return defaultLibraryPrefix; } @@ -72,7 +75,7 @@ function transform(options: LibraryOptions): LibraryOptions { if (!target.name) { throw new SchematicsException('Option (name) is required.'); } - target.language = !!target.language ? target.language : DEFAULT_LANGUAGE; + target.language = target.language ? target.language : DEFAULT_LANGUAGE; target.name = normalizeToKebabOrSnakeCase(target.name); target.path = target.path !== undefined @@ -96,7 +99,7 @@ function updatePackageJson(options: LibraryOptions) { return updateJsonFile( host, 'package.json', - (packageJson: Record) => { + (packageJson: Record>) => { updateNpmScripts(packageJson.scripts, options); updateJestConfig(packageJson.jest, options, packageKey, distRoot); }, @@ -153,9 +156,8 @@ function updateNpmScripts( ) { const defaultSourceRoot = options.rootDir !== undefined ? options.rootDir : DEFAULT_LIB_PATH; - scripts[ - defaultFormatScriptName - ] = `prettier --write "src/**/*.ts" "test/**/*.ts" "${defaultSourceRoot}/**/*.ts"`; + scripts[defaultFormatScriptName] = + `prettier --write "src/**/*.ts" "test/**/*.ts" "${defaultSourceRoot}/**/*.ts"`; } } diff --git a/src/lib/middleware/middleware.factory.ts b/src/lib/middleware/middleware.factory.ts index ec66a8804..0d0730edf 100644 --- a/src/lib/middleware/middleware.factory.ts +++ b/src/lib/middleware/middleware.factory.ts @@ -32,7 +32,7 @@ function transform(options: MiddlewareOptions): MiddlewareOptions { target.name = normalizeToKebabOrSnakeCase(location.name); target.path = normalizeToKebabOrSnakeCase(location.path); target.language = target.language !== undefined ? target.language : 'ts'; - target.specFileSuffix = normalizeToKebabOrSnakeCase( + target.specFileSuffix = normalizeToKebabOrSnakeCase( options.specFileSuffix || 'spec', ); @@ -45,13 +45,13 @@ function transform(options: MiddlewareOptions): MiddlewareOptions { function generate(options: MiddlewareOptions): Source { return (context: SchematicContext) => apply(url(join('./files' as Path, options.language)), [ - options.spec - ? noop() + options.spec + ? noop() : filter((path) => { const languageExtension = options.language || 'ts'; const suffix = `.__specFileSuffix__.${languageExtension}`; - return !path.endsWith(suffix) - }), + return !path.endsWith(suffix); + }), template({ ...strings, ...options, diff --git a/src/lib/pipe/pipe.factory.ts b/src/lib/pipe/pipe.factory.ts index 69e7d700a..a15550850 100644 --- a/src/lib/pipe/pipe.factory.ts +++ b/src/lib/pipe/pipe.factory.ts @@ -46,13 +46,13 @@ function generate(options: PipeOptions): Source { return (context: SchematicContext) => apply(url(join('./files' as Path, options.language)), [ options.spec ? noop() : filter((path) => !path.endsWith('.spec.ts')), - options.spec - ? noop() + options.spec + ? noop() : filter((path) => { const languageExtension = options.language || 'ts'; const suffix = `.__specFileSuffix__.${languageExtension}`; - return !path.endsWith(suffix) - }), + return !path.endsWith(suffix); + }), template({ ...strings, ...options, diff --git a/src/lib/provider/provider.factory.ts b/src/lib/provider/provider.factory.ts index 0113f20ae..a81bfac5a 100644 --- a/src/lib/provider/provider.factory.ts +++ b/src/lib/provider/provider.factory.ts @@ -67,13 +67,13 @@ function transform(options: ProviderOptions): ProviderOptions { function generate(options: ProviderOptions) { return (context: SchematicContext) => apply(url(join('./files' as Path, options.language)), [ - options.spec - ? noop() + options.spec + ? noop() : filter((path) => { const languageExtension = options.language || 'ts'; const suffix = `.__specFileSuffix__.${languageExtension}`; - return !path.endsWith(suffix) - }), + return !path.endsWith(suffix); + }), template({ ...strings, ...options, diff --git a/src/lib/readers/file-system.reader.ts b/src/lib/readers/file-system.reader.ts index e8b9f3f59..0f48f85ee 100644 --- a/src/lib/readers/file-system.reader.ts +++ b/src/lib/readers/file-system.reader.ts @@ -4,37 +4,37 @@ import { Reader } from './reader'; export class FileSystemReader implements Reader { constructor(private readonly directory: string) {} - + public list(): Promise { return fs.promises.readdir(this.directory); } - + public read(name: string): Promise { return fs.promises.readFile(path.join(this.directory, name), 'utf8'); } - + public readSync(name: string): string { return fs.readFileSync(path.join(this.directory, name), 'utf8'); } - + public async readAnyOf(filenames: string[]): Promise { try { for (const file of filenames) { return await this.read(file); } - } catch (err) { + } catch { return filenames.length > 0 ? await this.readAnyOf(filenames.slice(1, filenames.length)) : undefined; } } - + public readSyncAnyOf(filenames: string[]): string | undefined { try { for (const file of filenames) { return this.readSync(file); } - } catch (err) { + } catch { return filenames.length > 0 ? this.readSyncAnyOf(filenames.slice(1, filenames.length)) : undefined; diff --git a/src/lib/resolver/resolver.factory.ts b/src/lib/resolver/resolver.factory.ts index de0d02b27..d8a3537db 100644 --- a/src/lib/resolver/resolver.factory.ts +++ b/src/lib/resolver/resolver.factory.ts @@ -64,13 +64,13 @@ function transform(options: ResolverOptions): ResolverOptions { function generate(options: ResolverOptions): Source { return (context: SchematicContext) => apply(url(join('./files' as Path, options.language)), [ - options.spec - ? noop() + options.spec + ? noop() : filter((path) => { const languageExtension = options.language || 'ts'; const suffix = `.__specFileSuffix__.${languageExtension}`; - return !path.endsWith(suffix) - }), + return !path.endsWith(suffix); + }), template({ ...strings, ...options, diff --git a/src/lib/resource/resource.factory.ts b/src/lib/resource/resource.factory.ts index 237f0761c..dd4a4e986 100644 --- a/src/lib/resource/resource.factory.ts +++ b/src/lib/resource/resource.factory.ts @@ -108,7 +108,10 @@ function generate(options: ResourceOptions): Source { ) { return options.type === 'microservice' || options.type === 'rest'; } - if (path.endsWith('.gateway.ts') || path.endsWith('.gateway.__specFileSuffix__.ts')) { + if ( + path.endsWith('.gateway.ts') || + path.endsWith('.gateway.__specFileSuffix__.ts') + ) { return options.type === 'ws'; } if (path.includes('@ent')) { @@ -119,12 +122,12 @@ function generate(options: ResourceOptions): Source { } return true; }), - options.spec - ? noop() + options.spec + ? noop() : filter((path) => { const suffix = `.__specFileSuffix__.ts`; - return !path.endsWith(suffix) - }), + return !path.endsWith(suffix); + }), template({ ...strings, ...options, @@ -134,7 +137,7 @@ function generate(options: ResourceOptions): Source { classifiedName.charAt(0).toLowerCase() + classifiedName.slice(1) ); }, - singular: (name: string) => pluralize.singular(name), + singular: (name: string) => pluralize.singular(name) as string, ent: (name: string) => name + '.entity', }), move(options.path), @@ -194,7 +197,7 @@ function addMappedTypesDependencyIfApplies(options: ResourceOptions): Rule { }); context.addTask(new NodePackageInstallTask()); } - } catch (err) { + } catch { // ignore if "package.json" not found } }; diff --git a/src/lib/service/service.factory.ts b/src/lib/service/service.factory.ts index 8b997c8b7..935f8a4f2 100644 --- a/src/lib/service/service.factory.ts +++ b/src/lib/service/service.factory.ts @@ -71,8 +71,8 @@ function generate(options: ServiceOptions) { : filter((path) => { const languageExtension = options.language || 'ts'; const suffix = `.__specFileSuffix__.${languageExtension}`; - return !path.endsWith(suffix) - }), + return !path.endsWith(suffix); + }), template({ ...strings, ...options, diff --git a/src/lib/sub-app/sub-app.factory.ts b/src/lib/sub-app/sub-app.factory.ts index 124a2b25c..a9fe283f3 100644 --- a/src/lib/sub-app/sub-app.factory.ts +++ b/src/lib/sub-app/sub-app.factory.ts @@ -68,8 +68,8 @@ function getAppNameFromPackageJson(): string { if (!packageJson.name) { return DEFAULT_DIR_ENTRY_APP; } - let name = packageJson.name; - name = name.replace(/[^\w.]+/g, '-').replace(/\-+/g, '-'); + let name = packageJson.name as string; + name = name.replace(/[^\w.]+/g, '-').replace(/-+/g, '-'); return name[0] === '-' ? name.substr(1) : name; } catch { return DEFAULT_DIR_ENTRY_APP; @@ -91,7 +91,7 @@ function transform(options: SubAppOptions): SubAppOptions { if (!target.name) { target.name = DEFAULT_APP_NAME; } - target.language = !!target.language ? target.language : DEFAULT_LANGUAGE; + target.language = target.language ? target.language : DEFAULT_LANGUAGE; target.name = normalizeToKebabOrSnakeCase(target.name); target.path = target.path !== undefined @@ -163,7 +163,7 @@ function updatePackageJson(options: SubAppOptions, defaultAppName: string) { return updateJsonFile( host, 'package.json', - (packageJson: Record) => { + (packageJson: Record>) => { updateNpmScripts(packageJson.scripts, options, defaultAppName); updateJestOptions(packageJson.jest, options); }, @@ -209,9 +209,8 @@ function updateNpmScripts( ) { const defaultSourceRoot = options.rootDir !== undefined ? options.rootDir : DEFAULT_APPS_PATH; - scripts[ - defaultFormatScriptName - ] = `prettier --write "${defaultSourceRoot}/**/*.ts" "${DEFAULT_LIB_PATH}/**/*.ts"`; + scripts[defaultFormatScriptName] = + `prettier --write "${defaultSourceRoot}/**/*.ts" "${DEFAULT_LIB_PATH}/**/*.ts"`; } if ( scripts[defaultStartScriptName] && @@ -219,9 +218,8 @@ function updateNpmScripts( ) { const defaultSourceRoot = options.rootDir !== undefined ? options.rootDir : DEFAULT_APPS_PATH; - scripts[ - defaultStartScriptName - ] = `node dist/${defaultSourceRoot}/${defaultAppName}/main`; + scripts[defaultStartScriptName] = + `node dist/${defaultSourceRoot}/${defaultAppName}/main`; } } @@ -245,8 +243,9 @@ function updateJestOptions( jestOptions.roots.push(jestSourceRoot); const originalSourceRoot = `/src/`; - const originalSourceRootIndex = - jestOptions.roots.indexOf(originalSourceRoot); + const originalSourceRootIndex = jestOptions.roots.indexOf( + originalSourceRoot, + ) as number; if (originalSourceRootIndex >= 0) { (jestOptions.roots as string[]).splice(originalSourceRootIndex, 1); } @@ -345,7 +344,7 @@ function updateMainAppOptions( optionsFile.sourceRoot = join( projectRoot as Path, appName, - optionsFile.sourceRoot || DEFAULT_PATH_NAME, + (optionsFile.sourceRoot as string) || DEFAULT_PATH_NAME, ); if (!optionsFile.compilerOptions) { optionsFile.compilerOptions = {}; diff --git a/src/utils/json-file.util.ts b/src/utils/json-file.util.ts index 9ed6ff620..79286e331 100644 --- a/src/utils/json-file.util.ts +++ b/src/utils/json-file.util.ts @@ -27,7 +27,10 @@ export type JSONPath = (string | number)[]; export class JSONFile { content: string; - constructor(private readonly host: Tree, private readonly path: string) { + constructor( + private readonly host: Tree, + private readonly path: string, + ) { const buffer = this.host.read(this.path); if (buffer) { this.content = buffer.toString(); diff --git a/src/utils/metadata.manager.ts b/src/utils/metadata.manager.ts index a86d45fea..f1fedfe70 100644 --- a/src/utils/metadata.manager.ts +++ b/src/utils/metadata.manager.ts @@ -12,7 +12,6 @@ import { PropertyAssignment, ScriptTarget, SourceFile, - StringLiteral, SyntaxKind, } from 'typescript'; import { DeclarationOptions } from './module.declarator'; @@ -45,9 +44,9 @@ export class MetadataManager { const name = prop.name; switch (name.kind) { case SyntaxKind.Identifier: - return (name as Identifier).getText(source) === metadata; + return name.getText(source) === metadata; case SyntaxKind.StringLiteral: - return (name as StringLiteral).text === metadata; + return name.text === metadata; default: return false; } @@ -58,7 +57,7 @@ export class MetadataManager { symbol = staticOptions ? this.addBlankLines(symbol) : symbol; }; if (matchingProperties.length === 0) { - const expr = moduleDecoratorNode as ObjectLiteralExpression; + const expr = moduleDecoratorNode; if (expr.properties.length === 0) { addBlankLinesIfDynamic(); return this.insertMetadataToEmptyModuleDecorator( @@ -115,7 +114,7 @@ export class MetadataManager { private getSourceNodes(sourceFile: SourceFile): Node[] { const nodes: Node[] = [sourceFile]; - const result = []; + const result: Node[] = []; while (nodes.length > 0) { const node = nodes.shift(); if (node) { @@ -228,8 +227,8 @@ export class MetadataManager { } const spacing = 6; let options = JSON.stringify(staticOptions.value, null, spacing); - options = options.replace(/\"([^(\")"]+)\":/g, '$1:'); - options = options.replace(/\"/g, `'`); + options = options.replace(/"([^(")"]+)":/g, '$1:'); + options = options.replace(/"/g, `'`); options = options.slice(0, options.length - 1) + ' }'; symbol += `.${staticOptions.name}(${options})`; return symbol; diff --git a/src/utils/module-import.declarator.ts b/src/utils/module-import.declarator.ts index f46f33ed0..fe8c3a174 100644 --- a/src/utils/module-import.declarator.ts +++ b/src/utils/module-import.declarator.ts @@ -15,7 +15,7 @@ export class ModuleImportDeclarator { private findImportsEndpoint(contentLines: string[]): number { const reversedContent = Array.from(contentLines).reverse(); - const reverseImports = reversedContent.filter(line => + const reverseImports = reversedContent.filter((line) => line.match(/\} from ('|")/), ); if (reverseImports.length <= 0) { diff --git a/src/utils/module.finder.ts b/src/utils/module.finder.ts index 4de9b67fa..a2db58659 100644 --- a/src/utils/module.finder.ts +++ b/src/utils/module.finder.ts @@ -22,7 +22,7 @@ export class ModuleFinder { if (!directory) { return null; } - const moduleFilename: PathFragment = directory.subfiles.find(filename => + const moduleFilename: PathFragment = directory.subfiles.find((filename) => /\.module\.(t|j)s$/.test(filename), ); return moduleFilename !== undefined diff --git a/src/utils/path.solver.ts b/src/utils/path.solver.ts index 1ee49c704..262d331da 100644 --- a/src/utils/path.solver.ts +++ b/src/utils/path.solver.ts @@ -7,9 +7,8 @@ export class PathSolver { dirname((placeholder + from) as Path), dirname((placeholder + to) as Path), ); - return (relativeDir.startsWith('.') - ? relativeDir - : './' + relativeDir + return ( + relativeDir.startsWith('.') ? relativeDir : './' + relativeDir ).concat(relativeDir.length === 0 ? basename(to) : '/' + basename(to)); } } diff --git a/src/utils/source-root.helpers.ts b/src/utils/source-root.helpers.ts index 6ac5ffaf5..d08d957d5 100644 --- a/src/utils/source-root.helpers.ts +++ b/src/utils/source-root.helpers.ts @@ -7,11 +7,11 @@ export function isInRootDirectory( extraFiles: string[] = [], ): boolean { const files = ['nest-cli.json', 'nest.json'].concat(extraFiles || []); - return files.map(file => host.exists(file)).some(isPresent => isPresent); + return files.map((file) => host.exists(file)).some((isPresent) => isPresent); } export function mergeSourceRoot< - T extends { sourceRoot?: string; path?: string } = any + T extends { sourceRoot?: string; path?: string } = any, >(options: T): Rule { return (host: Tree) => { const isInRoot = isInRootDirectory(host, ['tsconfig.json', 'package.json']); From b80d913da1245b0de0d191bc3cba199e10bda396 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20My=C5=9Bliwiec?= Date: Mon, 25 Nov 2024 09:32:08 +0100 Subject: [PATCH 04/11] feat: make application schematic use eslint v9 --- .husky/commit-msg | 3 -- src/lib/application/files/ts/.eslintrc.js | 25 ------------- .../application/files/ts/eslint.config.mjs | 36 +++++++++++++++++++ src/lib/application/files/ts/package.json | 16 +++++---- 4 files changed, 45 insertions(+), 35 deletions(-) delete mode 100644 src/lib/application/files/ts/.eslintrc.js create mode 100644 src/lib/application/files/ts/eslint.config.mjs diff --git a/.husky/commit-msg b/.husky/commit-msg index e8511eaea..fd2bf708e 100755 --- a/.husky/commit-msg +++ b/.husky/commit-msg @@ -1,4 +1 @@ -#!/bin/sh -. "$(dirname "$0")/_/husky.sh" - npx --no-install commitlint --edit $1 diff --git a/src/lib/application/files/ts/.eslintrc.js b/src/lib/application/files/ts/.eslintrc.js deleted file mode 100644 index 259de13c7..000000000 --- a/src/lib/application/files/ts/.eslintrc.js +++ /dev/null @@ -1,25 +0,0 @@ -module.exports = { - parser: '@typescript-eslint/parser', - parserOptions: { - project: 'tsconfig.json', - tsconfigRootDir: __dirname, - sourceType: 'module', - }, - plugins: ['@typescript-eslint/eslint-plugin'], - extends: [ - 'plugin:@typescript-eslint/recommended', - 'plugin:prettier/recommended', - ], - root: true, - env: { - node: true, - jest: true, - }, - ignorePatterns: ['.eslintrc.js'], - rules: { - '@typescript-eslint/interface-name-prefix': 'off', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', - '@typescript-eslint/no-explicit-any': 'off', - }, -}; diff --git a/src/lib/application/files/ts/eslint.config.mjs b/src/lib/application/files/ts/eslint.config.mjs new file mode 100644 index 000000000..99a7f94d5 --- /dev/null +++ b/src/lib/application/files/ts/eslint.config.mjs @@ -0,0 +1,36 @@ +// @ts-check +import eslint from '@eslint/js'; +import tseslint from 'typescript-eslint'; +import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended'; +import globals from 'globals'; + +export default tseslint.config( + { + ignores: ['eslint.config.mjs'], + }, + eslint.configs.recommended, + ...tseslint.configs.recommendedTypeChecked, + eslintPluginPrettierRecommended, + { + languageOptions: { + globals: { + ...globals.node, + ...globals.jest, + }, + ecmaVersion: 5, + sourceType: 'module', + parserOptions: { + projectService: true, + tsconfigRootDir: import.meta.dirname, + }, + }, + }, + { + rules: { + '@typescript-eslint/interface-name-prefix': 'off', + '@typescript-eslint/explicit-function-return-type': 'off', + '@typescript-eslint/explicit-module-boundary-types': 'off', + '@typescript-eslint/no-explicit-any': 'off', + }, + }, +); \ No newline at end of file diff --git a/src/lib/application/files/ts/package.json b/src/lib/application/files/ts/package.json index bd5b3963b..817a7dc8f 100644 --- a/src/lib/application/files/ts/package.json +++ b/src/lib/application/files/ts/package.json @@ -27,27 +27,29 @@ "rxjs": "^7.8.1" }, "devDependencies": { + "@eslint/eslintrc": "^3.1.0", + "@eslint/js": "^9.12.0", "@nestjs/cli": "^10.0.0", "@nestjs/schematics": "^10.0.0", "@nestjs/testing": "^10.0.0", + "@types/eslint__js": "^8.42.3", "@types/express": "^5.0.0", "@types/jest": "^29.5.2", "@types/node": "^22.0.0", "@types/supertest": "^6.0.0", - "@typescript-eslint/eslint-plugin": "^8.0.0", - "@typescript-eslint/parser": "^8.0.0", - "eslint": "^8.0.0", - "eslint-config-prettier": "^9.0.0", - "eslint-plugin-prettier": "^5.0.0", + "eslint": "^9.12.0", + "eslint-plugin-prettier": "^5.2.1", + "globals": "^15.11.0", "jest": "^29.5.0", - "prettier": "^3.0.0", + "prettier": "^3.3.3", "source-map-support": "^0.5.21", "supertest": "^7.0.0", "ts-jest": "^29.1.0", "ts-loader": "^9.4.3", "ts-node": "^10.9.1", "tsconfig-paths": "^4.2.0", - "typescript": "^5.1.3" + "typescript": "^5.3.3", + "typescript-eslint": "^8.8.1" }, "jest": { "moduleFileExtensions": [ From e400829e669b9b21ae8c33f0f832f9150518aecc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20My=C5=9Bliwiec?= Date: Mon, 25 Nov 2024 09:41:08 +0100 Subject: [PATCH 05/11] chore: update husky cmd --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 220f2b0da..96b7789c7 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "test:dev": "NODE_ENV=test npm run -s test -- --watchAll", "prerelease": "npm run build", "release": "release-it", - "prepare": "husky install" + "prepare": "husky" }, "repository": { "type": "git", From 320755c266266b0be669beb104dde8917aa0e981 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20My=C5=9Bliwiec?= Date: Mon, 25 Nov 2024 09:45:04 +0100 Subject: [PATCH 06/11] ci: run npm i instead of ci (caching issues) --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index c9aef752f..4c9636d76 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,7 @@ jobs: key: dependency-cache-{{ checksum "package.json" }} - run: name: Install dependencies - command: npm ci --ignore-scripts + command: npm install --ignore-scripts - save_cache: key: dependency-cache-{{ checksum "package.json" }} paths: From 73ed6b1dea9ee3d0711eacd43751791fb57fe586 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20My=C5=9Bliwiec?= Date: Mon, 25 Nov 2024 09:47:15 +0100 Subject: [PATCH 07/11] ci: run npm i instead of ci (caching issues) --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4c9636d76..9ddb4a8e3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ aliases: - &install-deps run: name: Install dependencies - command: npm ci --ignore-scripts + command: npm install --ignore-scripts - &build-packages run: name: Build From 071e55dc20aa3b38343b835ca9b3ce0b0b8133e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20My=C5=9Bliwiec?= Date: Mon, 25 Nov 2024 09:49:19 +0100 Subject: [PATCH 08/11] test: update unit tests --- .../application/application.factory.test.ts | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/lib/application/application.factory.test.ts b/src/lib/application/application.factory.test.ts index 8ba98eced..8bad4a594 100644 --- a/src/lib/application/application.factory.test.ts +++ b/src/lib/application/application.factory.test.ts @@ -23,7 +23,7 @@ describe('Application Factory', () => { const files: string[] = tree.files; expect(files.sort()).toEqual( [ - '/project/.eslintrc.js', + '/project/eslint.config.mjs', '/project/.gitignore', '/project/.prettierrc', '/project/README.md', @@ -58,7 +58,7 @@ describe('Application Factory', () => { const files: string[] = tree.files; expect(files.sort()).toEqual( [ - `/project.foo.bar/.eslintrc.js`, + `/project.foo.bar/eslint.config.mjs`, `/project.foo.bar/.gitignore`, `/project.foo.bar/.prettierrc`, `/project.foo.bar/README.md`, @@ -93,7 +93,7 @@ describe('Application Factory', () => { const files: string[] = tree.files; expect(files.sort()).toEqual( [ - '/awesome-project/.eslintrc.js', + '/awesome-project/eslint.config.mjs', '/awesome-project/.gitignore', '/awesome-project/.prettierrc', '/awesome-project/README.md', @@ -128,7 +128,7 @@ describe('Application Factory', () => { const files: string[] = tree.files; expect(files.sort()).toEqual( [ - '/_awesome-project/.eslintrc.js', + '/_awesome-project/eslint.config.mjs', '/_awesome-project/.gitignore', '/_awesome-project/.prettierrc', '/_awesome-project/README.md', @@ -163,7 +163,7 @@ describe('Application Factory', () => { const files: string[] = tree.files; expect(files.sort()).toEqual( [ - '/@/package/.eslintrc.js', + '/@/package/eslint.config.mjs', '/@/package/.gitignore', '/@/package/.prettierrc', '/@/package/README.md', @@ -198,7 +198,7 @@ describe('Application Factory', () => { const files: string[] = tree.files; expect(files.sort()).toEqual( [ - '/.eslintrc.js', + '/eslint.config.mjs', '/.gitignore', '/.prettierrc', '/README.md', @@ -233,7 +233,7 @@ describe('Application Factory', () => { const files: string[] = tree.files; expect(files.sort()).toEqual( [ - '/@scope/package/.eslintrc.js', + '/@scope/package/eslint.config.mjs', '/@scope/package/.gitignore', '/@scope/package/.prettierrc', '/@scope/package/README.md', @@ -268,7 +268,7 @@ describe('Application Factory', () => { const files: string[] = tree.files; expect(files.sort()).toEqual( [ - '/@-/package/.eslintrc.js', + '/@-/package/eslint.config.mjs', '/@-/package/.gitignore', '/@-/package/.prettierrc', '/@-/package/README.md', @@ -307,7 +307,7 @@ describe('Application Factory', () => { const files: string[] = tree.files; expect(files.sort()).toEqual( [ - '/123/.eslintrc.js', + '/123/eslint.config.mjs', '/123/.gitignore', '/123/.prettierrc', '/123/README.md', @@ -380,7 +380,7 @@ describe('Application Factory', () => { const files: string[] = tree.files; expect(files.sort()).toEqual( [ - '/app/.eslintrc.js', + '/app/eslint.config.mjs', '/app/.gitignore', '/app/.prettierrc', '/app/README.md', @@ -480,7 +480,7 @@ describe('Application Factory', () => { const files: string[] = tree.files; expect(files.sort()).toEqual( [ - '/project/.eslintrc.js', + '/project/eslint.config.mjs', '/project/.gitignore', '/project/.prettierrc', '/project/README.md', From 6d5568981d7a8687a2bda5b6123aac924a563529 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20My=C5=9Bliwiec?= Date: Mon, 25 Nov 2024 10:02:11 +0100 Subject: [PATCH 09/11] docs: add tsdoc to utils --- src/utils/dependencies.utils.ts | 15 ++++++ src/utils/formatting.ts | 3 +- src/utils/metadata.manager.ts | 63 +++++++++++++++++++++++++ src/utils/module-import.declarator.ts | 30 ++++++++++++ src/utils/module-metadata.declarator.ts | 12 +++++ src/utils/module.declarator.ts | 19 ++++++++ src/utils/module.finder.ts | 12 +++++ src/utils/name.parser.ts | 6 +++ src/utils/path.solver.ts | 7 +++ src/utils/source-root.helpers.ts | 12 +++++ 10 files changed, 177 insertions(+), 2 deletions(-) diff --git a/src/utils/dependencies.utils.ts b/src/utils/dependencies.utils.ts index af904bd2e..d7810cabc 100644 --- a/src/utils/dependencies.utils.ts +++ b/src/utils/dependencies.utils.ts @@ -32,6 +32,13 @@ const ALL_DEPENDENCY_TYPE = [ NodeDependencyType.Peer, ]; +/** + * Adds a dependency to the package.json file. + * + * @param tree - The file tree representing the project. + * @param dependency - The dependency to add, including type, name, and version. + * @param pkgJsonPath - The path to the package.json file. Defaults to PKG_JSON_PATH. + */ export function addPackageJsonDependency( tree: Tree, dependency: NodeDependency, @@ -46,6 +53,14 @@ export function addPackageJsonDependency( } } +/** + * Retrieves the dependency information from the package.json file. + * + * @param tree - The file tree to read from. + * @param name - The name of the dependency to find. + * @param pkgJsonPath - The path to the package.json file (optional, defaults to PKG_JSON_PATH). + * @returns The dependency information if found, otherwise null. + */ export function getPackageJsonDependency( tree: Tree, name: string, diff --git a/src/utils/formatting.ts b/src/utils/formatting.ts index c80202c9f..6939cbdaf 100644 --- a/src/utils/formatting.ts +++ b/src/utils/formatting.ts @@ -1,9 +1,8 @@ /** - * + * Changes camelCase strings to kebab-case, replaces spaces with dash and keeps underscores. * @param str * @returns formated string * @description normalizes input to supported path and file name format. - * Changes camelCase strings to kebab-case, replaces spaces with dash and keeps underscores. */ export function normalizeToKebabOrSnakeCase(str: string) { const STRING_DASHERIZE_REGEXP = /\s/g; diff --git a/src/utils/metadata.manager.ts b/src/utils/metadata.manager.ts index f1fedfe70..694e649be 100644 --- a/src/utils/metadata.manager.ts +++ b/src/utils/metadata.manager.ts @@ -16,9 +16,24 @@ import { } from 'typescript'; import { DeclarationOptions } from './module.declarator'; +/** + * The `MetadataManager` class provides utilities for managing metadata entries + * within a `@Module` decorator in a TypeScript source file. It allows for the + * insertion of new metadata entries, merging symbols with static options, and + * handling various scenarios such as empty module decorators or existing metadata + * properties. + */ export class MetadataManager { constructor(private content: string) {} + /** + * Inserts a new metadata entry into the `@Module` decorator. + * + * @param metadata - The metadata key to insert. + * @param symbol - The symbol to insert. + * @param staticOptions - The static options to insert. + * @returns The new content string. + */ public insert( metadata: string, symbol: string, @@ -84,6 +99,13 @@ export class MetadataManager { } } + /** + * Finds the first `@Module` decorator metadata in the source file. + * + * @param source - The source file to search. + * @param identifier - The identifier to match. + * @returns The first matching `ObjectLiteralExpression` or undefined. + */ private findFirstDecoratorMetadata( source: SourceFile, identifier: string, @@ -112,6 +134,9 @@ export class MetadataManager { } } + /** + * Returns an array of all nodes in the source file. + */ private getSourceNodes(sourceFile: SourceFile): Node[] { const nodes: Node[] = [sourceFile]; const result: Node[] = []; @@ -127,6 +152,15 @@ export class MetadataManager { return result; } + /** + * Inserts a new metadata entry into an empty `@Module` decorator. + * This method is called when the `@Module` decorator has no properties. + * It inserts the metadata and symbol into the decorator. + * @param expr - The `@Module` decorator node. + * @param metadata - The metadata key to insert. + * @param symbol - The symbol to insert. + * @returns The new content string. + */ private insertMetadataToEmptyModuleDecorator( expr: ObjectLiteralExpression, metadata: string, @@ -143,6 +177,16 @@ export class MetadataManager { }, ''); } + /** + * Inserts a new symbol into an existing metadata property in the `@Module` decorator. + * This method is called when the metadata property already exists in the decorator. + * It inserts the symbol into the existing metadata property. + * @param source - The source file. + * @param matchingProperties - The matching metadata properties. + * @param symbol - The symbol to insert. + * @param staticOptions - The static options to insert. + * @returns The new content string. + */ private insertNewMetadataToDecorator( expr: ObjectLiteralExpression, source: SourceFile, @@ -168,6 +212,16 @@ export class MetadataManager { }, ''); } + /** + * Inserts a new symbol into an existing metadata property in the `@Module` decorator. + * This method is called when the metadata property already exists in the decorator. + * It inserts the symbol into the existing metadata property. + * @param source - The source file. + * @param matchingProperties - The matching metadata properties. + * @param symbol - The symbol to insert. + * @param staticOptions - The static options to insert. + * @returns The new content string. + */ private insertSymbolToMetadata( source: SourceFile, matchingProperties: ObjectLiteralElement[], @@ -218,6 +272,12 @@ export class MetadataManager { }, ''); } + /** + * Merges a symbol with static options into a single string. + * @param symbol - The symbol to merge. + * @param staticOptions - The static options to merge. + * @returns The merged string. + */ private mergeSymbolAndExpr( symbol: string, staticOptions?: DeclarationOptions['staticOptions'], @@ -234,6 +294,9 @@ export class MetadataManager { return symbol; } + /** + * Adds blank lines around an expression. + */ private addBlankLines(expr: string): string { return `\n ${expr}\n `; } diff --git a/src/utils/module-import.declarator.ts b/src/utils/module-import.declarator.ts index fe8c3a174..73cc91e75 100644 --- a/src/utils/module-import.declarator.ts +++ b/src/utils/module-import.declarator.ts @@ -2,9 +2,21 @@ import { normalize, Path } from '@angular-devkit/core'; import { DeclarationOptions } from './module.declarator'; import { PathSolver } from './path.solver'; +/** + * The `ModuleImportDeclarator` class is responsible for declaring module imports + * in a TypeScript file. It provides methods to insert import statements into the + * file content based on the provided declaration options. + */ export class ModuleImportDeclarator { constructor(private solver: PathSolver = new PathSolver()) {} + /** + * Declares a module import in the given content string. + * + * @param content - The content of the file where the import will be declared. + * @param options - The options for the declaration, including the symbol and path. + * @returns The updated content string with the import statement inserted. + */ public declare(content: string, options: DeclarationOptions): string { const toInsert = this.buildLineToInsert(options); const contentLines = content.split('\n'); @@ -13,6 +25,12 @@ export class ModuleImportDeclarator { return contentLines.join('\n'); } + /** + * Finds the endpoint of the existing import statements in the content. + * + * @param contentLines - The lines of the content. + * @returns The index of the last import statement. + */ private findImportsEndpoint(contentLines: string[]): number { const reversedContent = Array.from(contentLines).reverse(); const reverseImports = reversedContent.filter((line) => @@ -24,12 +42,24 @@ export class ModuleImportDeclarator { return contentLines.indexOf(reverseImports[0]); } + /** + * Builds the import line to insert based on the declaration options. + * + * @param options - The options for the declaration, including the symbol and path. + * @returns The import line to insert. + */ private buildLineToInsert(options: DeclarationOptions): string { return `import { ${options.symbol} } from '${this.computeRelativePath( options, )}';`; } + /** + * Computes the relative path for the import statement. + * + * @param options - The options for the declaration, including the symbol and path. + * @returns The relative path for the import statement. + */ private computeRelativePath(options: DeclarationOptions): string { let importModulePath: Path; if (options.type !== undefined) { diff --git a/src/utils/module-metadata.declarator.ts b/src/utils/module-metadata.declarator.ts index aeac06d90..6f5ebca9f 100644 --- a/src/utils/module-metadata.declarator.ts +++ b/src/utils/module-metadata.declarator.ts @@ -1,7 +1,19 @@ import { MetadataManager } from './metadata.manager'; import { DeclarationOptions } from './module.declarator'; +/** + * The `ModuleMetadataDeclarator` class is responsible for declaring metadata + * in a TypeScript file. It provides methods to insert metadata entries into the + * file content based on the provided declaration options. + */ export class ModuleMetadataDeclarator { + /** + * Declares metadata in the given content string. + * + * @param content - The content of the file where the metadata will be declared. + * @param options - The options for the declaration, including the metadata, symbol, and static options. + * @returns The updated content string with the metadata entry inserted. + */ public declare(content: string, options: DeclarationOptions): string { const manager = new MetadataManager(content); const inserted = manager.insert( diff --git a/src/utils/module.declarator.ts b/src/utils/module.declarator.ts index 7ab1c2d14..539081352 100644 --- a/src/utils/module.declarator.ts +++ b/src/utils/module.declarator.ts @@ -18,11 +18,24 @@ export interface DeclarationOptions { } export class ModuleDeclarator { + /** + * Constructs a new `ModuleDeclarator` instance. + * + * @param imports - The `ModuleImportDeclarator` instance for handling import declarations. + * @param metadata - The `ModuleMetadataDeclarator` instance for handling metadata declarations. + */ constructor( private imports: ModuleImportDeclarator = new ModuleImportDeclarator(), private metadata: ModuleMetadataDeclarator = new ModuleMetadataDeclarator(), ) {} + /** + * Declares module imports and metadata in the given content string. + * + * @param content - The content of the file where the declarations will be made. + * @param options - The options for the declaration, including the symbol and static options. + * @returns The updated content string with the declarations inserted. + */ public declare(content: string, options: DeclarationOptions): string { options = this.computeSymbol(options); content = this.imports.declare(content, options); @@ -30,6 +43,12 @@ export class ModuleDeclarator { return content; } + /** + * Computes the symbol for the declaration options if not provided. + * + * @param options - The options for the declaration. + * @returns The updated declaration options with the computed symbol. + */ private computeSymbol(options: DeclarationOptions): DeclarationOptions { const target = Object.assign({}, options); if (options.className) { diff --git a/src/utils/module.finder.ts b/src/utils/module.finder.ts index a2db58659..dedf5c78c 100644 --- a/src/utils/module.finder.ts +++ b/src/utils/module.finder.ts @@ -10,6 +10,12 @@ export interface FindOptions { export class ModuleFinder { constructor(private tree: Tree) {} + /** + * Finds the module file in the given path. + * + * @param options - The options for finding the module, including the path. + * @returns The path to the module file, or null if not found. + */ public find(options: FindOptions): Path | null { const generatedDirectoryPath: Path = options.path; const generatedDirectory: DirEntry = this.tree.getDir( @@ -18,6 +24,12 @@ export class ModuleFinder { return this.findIn(generatedDirectory); } + /** + * Recursively searches for the module file in the given directory. + * + * @param directory - The directory to search in. + * @returns The path to the module file, or null if not found. + */ private findIn(directory: DirEntry): Path | null { if (!directory) { return null; diff --git a/src/utils/name.parser.ts b/src/utils/name.parser.ts index 99b7103f9..2f360a5f1 100644 --- a/src/utils/name.parser.ts +++ b/src/utils/name.parser.ts @@ -11,6 +11,12 @@ export interface Location { } export class NameParser { + /** + * Parses the provided options to extract the name and path. + * + * @param options - The options containing the name and path. + * @returns An object containing the parsed name and normalized path. + */ public parse(options: ParseOptions): Location { const nameWithoutPath: string = basename(options.name as Path); const namePath: string = dirname( diff --git a/src/utils/path.solver.ts b/src/utils/path.solver.ts index 262d331da..4392cc34e 100644 --- a/src/utils/path.solver.ts +++ b/src/utils/path.solver.ts @@ -1,6 +1,13 @@ import { basename, dirname, Path, relative } from '@angular-devkit/core'; export class PathSolver { + /** + * Computes the relative path between two paths. + * + * @param from - The source path. + * @param to - The target path. + * @returns The relative path between the two paths. + */ public relative(from: Path, to: Path): string { const placeholder = '/placeholder'; const relativeDir = relative( diff --git a/src/utils/source-root.helpers.ts b/src/utils/source-root.helpers.ts index d08d957d5..befa9a805 100644 --- a/src/utils/source-root.helpers.ts +++ b/src/utils/source-root.helpers.ts @@ -2,6 +2,13 @@ import { join, normalize } from '@angular-devkit/core'; import { Rule, Tree } from '@angular-devkit/schematics'; import { DEFAULT_PATH_NAME } from '../lib/defaults'; +/** + * Checks if the current directory is the root directory. + * + * @param host - The file tree representing the project. + * @param extraFiles - Additional files to check for in the root directory. + * @returns True if the current directory is the root directory, otherwise false. + */ export function isInRootDirectory( host: Tree, extraFiles: string[] = [], @@ -10,6 +17,11 @@ export function isInRootDirectory( return files.map((file) => host.exists(file)).some((isPresent) => isPresent); } +/** + * Merges the source root with the provided options. + * @param options - The options to merge with the source root. + * @returns A rule to merge the source root with the provided options. + */ export function mergeSourceRoot< T extends { sourceRoot?: string; path?: string } = any, >(options: T): Rule { From 90dfba9f042d3326cc93ffdb16c45da23aa13b4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20My=C5=9Bliwiec?= Date: Mon, 25 Nov 2024 10:20:10 +0100 Subject: [PATCH 10/11] chore: update eslint configuration --- eslint.config.mjs | 3 --- package.json | 2 +- src/lib/application/files/ts/eslint.config.mjs | 5 ++--- .../application/files/ts/test/app.e2e-__specFileSuffix__.ts | 3 ++- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/eslint.config.mjs b/eslint.config.mjs index 1bb057725..abd0c6ec0 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -27,9 +27,6 @@ export default tseslint.config( }, { rules: { - '@typescript-eslint/interface-name-prefix': 'off', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/no-explicit-any': 'off', '@typescript-eslint/no-unsafe-assignment': 'off', '@typescript-eslint/no-require-imports': 'off', diff --git a/package.json b/package.json index 96b7789c7..ffdb416db 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nestjs/schematics", - "version": "10.2.3", + "version": "11.0.0-next.1", "description": "Nest - modern, fast, powerful node.js web framework (@schematics)", "main": "dist/index.js", "files": [ diff --git a/src/lib/application/files/ts/eslint.config.mjs b/src/lib/application/files/ts/eslint.config.mjs index 99a7f94d5..07b948bd2 100644 --- a/src/lib/application/files/ts/eslint.config.mjs +++ b/src/lib/application/files/ts/eslint.config.mjs @@ -27,10 +27,9 @@ export default tseslint.config( }, { rules: { - '@typescript-eslint/interface-name-prefix': 'off', - '@typescript-eslint/explicit-function-return-type': 'off', - '@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/no-explicit-any': 'off', + '@typescript-eslint/no-floating-promises': 'off', + '@typescript-eslint/no-unsafe-argument': 'warn' }, }, ); \ No newline at end of file diff --git a/src/lib/application/files/ts/test/app.e2e-__specFileSuffix__.ts b/src/lib/application/files/ts/test/app.e2e-__specFileSuffix__.ts index 50cda6233..4df6580c7 100644 --- a/src/lib/application/files/ts/test/app.e2e-__specFileSuffix__.ts +++ b/src/lib/application/files/ts/test/app.e2e-__specFileSuffix__.ts @@ -1,10 +1,11 @@ import { Test, TestingModule } from '@nestjs/testing'; import { INestApplication } from '@nestjs/common'; import * as request from 'supertest'; +import { App } from 'supertest/types'; import { AppModule } from './../src/app.module'; describe('AppController (e2e)', () => { - let app: INestApplication; + let app: INestApplication; beforeEach(async () => { const moduleFixture: TestingModule = await Test.createTestingModule({ From a4cb2355a5951d860474bd99b45dad8a74415334 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kamil=20My=C5=9Bliwiec?= Date: Mon, 25 Nov 2024 10:21:12 +0100 Subject: [PATCH 11/11] feat: enable strict null checks and consistent casing --- src/lib/application/files/ts/tsconfig.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/application/files/ts/tsconfig.json b/src/lib/application/files/ts/tsconfig.json index d1524d2b4..e4f8d7972 100644 --- a/src/lib/application/files/ts/tsconfig.json +++ b/src/lib/application/files/ts/tsconfig.json @@ -12,10 +12,10 @@ "baseUrl": "./", "incremental": true, "skipLibCheck": true, - "strictNullChecks": <%= strict %>, + "strictNullChecks": true, + "forceConsistentCasingInFileNames": true, "noImplicitAny": <%= strict %>, "strictBindCallApply": <%= strict %>, - "forceConsistentCasingInFileNames": <%= strict %>, "noFallthroughCasesInSwitch": <%= strict %> } }