From f9d0c1d2ebbd9dc412d5a3c3605118eb6eb154ad Mon Sep 17 00:00:00 2001 From: SimeonC <1085899+SimeonC@users.noreply.github.com> Date: Thu, 28 Nov 2024 15:30:17 +0900 Subject: [PATCH] feat: upgrade nodeJS support to v22 BREAKING CHANGE: NodeJS v22 is now required --- .github/setup/action.yml | 5 - .github/workflows/release.yml | 2 +- .npmrc | 1 + .nvmrc | 2 +- nx.json | 10 +- package-lock.json | 205 +++++++++++------- package.json | 14 +- packages/audit/package.json | 2 +- packages/audit/src/index.ts | 28 +-- packages/commitlint-config/package.json | 2 +- packages/eslint-config/package.json | 2 +- packages/eslint-plugin/package.json | 2 +- packages/eslint-plugin/src/shortestImport.ts | 2 +- packages/nx/package.json | 4 +- packages/prettier-config/package.json | 2 +- .../vite-import-massager-plugin/src/index.ts | 16 +- 16 files changed, 177 insertions(+), 122 deletions(-) diff --git a/.github/setup/action.yml b/.github/setup/action.yml index c6d3468f..d5e8df25 100644 --- a/.github/setup/action.yml +++ b/.github/setup/action.yml @@ -11,11 +11,6 @@ runs: - name: Set shas uses: nrwl/nx-set-shas@v3 - - name: Unset header - shell: bash - # checkout@v2 adds a header that makes branch protection report errors ): - run: git config --local --unset http.https://github.com/.extraheader - - name: Set git author config shell: bash run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0f4e22fe..ae111a44 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -14,7 +14,7 @@ jobs: - name: Checkout 🛎️ uses: actions/checkout@v2 with: - ref: ${{ github.ref }} + token: ${{ secrets.RELEASE_BOT_TOKEN }} - uses: ./.github/setup diff --git a/.npmrc b/.npmrc index 3787a264..41af43f5 100644 --- a/.npmrc +++ b/.npmrc @@ -1,2 +1,3 @@ +registry=https://registry.npmjs.org/ legacy-peer-deps=true save-exact=true diff --git a/.nvmrc b/.nvmrc index af9754bc..bb8c76c6 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -v20.8.1 +v22.11.0 diff --git a/nx.json b/nx.json index d9d6c191..2bee684c 100644 --- a/nx.json +++ b/nx.json @@ -9,11 +9,16 @@ "docs": { "dependsOn": ["build"], "inputs": ["default", "^default", "baseTypescript"], - "outputs": ["{projectRoot}/docs"] + "outputs": ["{projectRoot}/docs"], + "cache": true }, "test": { "dependsOn": ["^test"], - "inputs": ["default", "^default", "testConfig"] + "inputs": ["default", "^default", "testConfig"], + "cache": true + }, + "quality": { + "cache": true } }, "$schema": "./node_modules/nx/schemas/nx-schema.json", @@ -24,7 +29,6 @@ "baseTypescript": ["{workspaceRoot}/tsconfig.base.json"], "testConfig": ["{projectRoot}/vite.config.ts"] }, - "nxCloudAccessToken": "MDFhZDUwZTMtZDMyMy00Y2YwLWEwY2QtMDQ3ZjJiZGYzMDE3fHJlYWQtd3JpdGU=", "useInferencePlugins": false, "defaultBase": "main" } diff --git a/package-lock.json b/package-lock.json index 62fc7623..37aa179e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,11 +18,11 @@ "tslib": "^2.6.2" }, "devDependencies": { - "@auto-it/all-contributors": "11.1.1", - "@auto-it/first-time-contributor": "11.1.1", - "@auto-it/npm": "11.1.1", - "@auto-it/released": "11.1.1", - "@auto-it/slack": "11.1.1", + "@auto-it/all-contributors": "11.3.0", + "@auto-it/first-time-contributor": "11.3.0", + "@auto-it/npm": "11.3.0", + "@auto-it/released": "11.3.0", + "@auto-it/slack": "11.3.0", "@commitlint/cli": "17.7.2", "@commitlint/config-lerna-scopes": "17.7.0", "@emotion/babel-plugin": "^11.11.0", @@ -42,14 +42,14 @@ "@swc/core": "1.5.7", "@tablecheck/eslint-config": "file:packages/eslint-config", "@tablecheck/eslint-plugin": "file:packages/eslint-plugin", - "@tablecheck/prettier-config": "file:packages/prettier-config", + "@tablecheck/prettier-config": "4.0.1", "@types/fs-extra": "^11.0.2", "@types/node": "18.19.9", "@vitejs/plugin-react": "4.3.1", "@vitest/coverage-v8": "1.6.0", "@vitest/ui": "1.6.0", "auditjs": "4.0.41", - "auto": "11.1.1", + "auto": "11.3.0", "eslint": "8.57.0", "eslint-plugin-eslint-plugin": "5.1.1", "file-loader": "^6.2.0", @@ -61,7 +61,7 @@ "lint-staged": "^14.0.1", "lodash": "^4.17.21", "nx": "19.3.0", - "prettier": "3.0.3", + "prettier": "3.4.1", "storybook": "^6.5.16", "type-fest": "4.4.0", "typescript": "5.4.5", @@ -103,13 +103,14 @@ } }, "node_modules/@auto-it/all-contributors": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@auto-it/all-contributors/-/all-contributors-11.1.1.tgz", - "integrity": "sha512-MSiif/W/cWskqRew1V5xO3Z3VCP3evsaRyl3paTzw1DAI6o7QRGW/M5qSZhCDqPg1v7C43/59yhhBPzlAvf/Sg==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/@auto-it/all-contributors/-/all-contributors-11.3.0.tgz", + "integrity": "sha512-2d9y9P5mZoqrqkvIHfQmZ57sLS6vNhLW3bilqPbWW+hzzeJeGIx5cKLIHG+RfuDCeP9d3A3Ahnj7ilIMMUVENA==", "dev": true, + "license": "MIT", "dependencies": { - "@auto-it/bot-list": "11.1.1", - "@auto-it/core": "11.1.1", + "@auto-it/bot-list": "11.3.0", + "@auto-it/core": "11.3.0", "@octokit/rest": "^18.12.0", "all-contributors-cli": "6.19.0", "anymatch": "^3.1.1", @@ -129,21 +130,23 @@ "dev": true }, "node_modules/@auto-it/bot-list": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@auto-it/bot-list/-/bot-list-11.1.1.tgz", - "integrity": "sha512-uKZ08KC9FUjMBYqiizZ3VlXyEAeRHEAJaeNMqQFPi0jFKRtX/Dm4tAhDXqfQeuOuAsUHNh5Pp+4zOX2RmTPZaA==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/@auto-it/bot-list/-/bot-list-11.3.0.tgz", + "integrity": "sha512-+izoqAyOSiDVt3WcjVkSvLBV9c82VXLSf3oSWWcCeoxW/YDQ2AoInQ3M3EEyuBP+Yw9KQwGTTYHqpR7ZFkZpDQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=10.x" } }, "node_modules/@auto-it/core": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@auto-it/core/-/core-11.1.1.tgz", - "integrity": "sha512-CIQYqJG/pXmWsQjgbjMF6qnwAu7Klrpm5fWHrXpzIEq/3qQfgGmTkauuJRSz9bM5z6pHHCjT1eypVV/EDj9ijg==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/@auto-it/core/-/core-11.3.0.tgz", + "integrity": "sha512-3i7ooAhQJulVDG3gmdOioTXLhpFoS75Z/OsLV8ZkrEaEH/sfxlslqFx20VjWva7gMLl2iO8IjbRnlLhkXy5geg==", "dev": true, + "license": "MIT", "dependencies": { - "@auto-it/bot-list": "11.1.1", + "@auto-it/bot-list": "11.3.0", "@endemolshinegroup/cosmiconfig-typescript-loader": "^3.0.2", "@octokit/core": "^3.5.1", "@octokit/plugin-enterprise-compatibility": "1.3.0", @@ -197,13 +200,15 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz", "integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==", - "dev": true + "dev": true, + "license": "0BSD" }, "node_modules/@auto-it/core/node_modules/type-fest": { "version": "0.21.3", "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz", "integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==", "dev": true, + "license": "(MIT OR CC0-1.0)", "engines": { "node": ">=10" }, @@ -212,13 +217,14 @@ } }, "node_modules/@auto-it/first-time-contributor": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@auto-it/first-time-contributor/-/first-time-contributor-11.1.1.tgz", - "integrity": "sha512-xyKULf7+EoaPUZdYE1jVLMo4GUUxiIU5Q9ENdcTrCsw9Y4jSIdCBZKR+wxbxZNdqsJHnLGfAaW+SbLY8OrN2ng==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/@auto-it/first-time-contributor/-/first-time-contributor-11.3.0.tgz", + "integrity": "sha512-PnpgJeJH3SriwZ0W4rpWjVCU6tJVd/d0v2CQQpK4wtDMPN+Dxie44+INBr4jp9lg6nJ3LEUhygoEfq/FhKlLXw==", "dev": true, + "license": "MIT", "dependencies": { - "@auto-it/bot-list": "11.1.1", - "@auto-it/core": "11.1.1", + "@auto-it/bot-list": "11.3.0", + "@auto-it/core": "11.3.0", "array.prototype.flatmap": "^1.2.2", "endent": "^2.1.0", "tslib": "2.1.0", @@ -232,13 +238,14 @@ "dev": true }, "node_modules/@auto-it/npm": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@auto-it/npm/-/npm-11.1.1.tgz", - "integrity": "sha512-I7qWPdU2goCmqdvAEpa6yGwQmzx5YXEsZywqs6uTQXIDuGbFzNt/7jwJNt8p/MNE8M0ra8FJ05eHavBLFZuEfg==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/@auto-it/npm/-/npm-11.3.0.tgz", + "integrity": "sha512-II7u1trzi2hSd1Vww635DmvHqHlgtVPqr4VPJlq1M7zqPwi9+FcaMW5J/DSqlwJgWRWviWqepIhasUQhj69p0A==", "dev": true, + "license": "MIT", "dependencies": { - "@auto-it/core": "11.1.1", - "@auto-it/package-json-utils": "11.1.1", + "@auto-it/core": "11.3.0", + "@auto-it/package-json-utils": "11.3.0", "await-to-js": "^3.0.0", "endent": "^2.1.0", "env-ci": "^5.0.1", @@ -260,10 +267,11 @@ "dev": true }, "node_modules/@auto-it/package-json-utils": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@auto-it/package-json-utils/-/package-json-utils-11.1.1.tgz", - "integrity": "sha512-hk6wKuP7fPonXnP/blPHYS4iQaKZ6s+dVBRPSW7pjWZv6H/A131mWVSQC59nhe8lqZhbQ2MrDH4xxfhYnq21sA==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/@auto-it/package-json-utils/-/package-json-utils-11.3.0.tgz", + "integrity": "sha512-wZQLfxYCzqNTlqgYhgm1mZaasA35tuOhGl0npWMZlq0HJ4rbNvUYnjb8bXlyfm/dxTYtYp70IhoV5kv1NmPX8Q==", "dev": true, + "license": "MIT", "dependencies": { "parse-author": "^2.0.0", "parse-github-url": "1.0.2" @@ -273,13 +281,14 @@ } }, "node_modules/@auto-it/released": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@auto-it/released/-/released-11.1.1.tgz", - "integrity": "sha512-iRUebl2q5V7hFEgScGVUMUVoOXrFFi5O280hUCpZxmd6kkG2v7Kl+Weii5zKpd7YSqG0HibJCD+LVwPClAfrCA==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/@auto-it/released/-/released-11.3.0.tgz", + "integrity": "sha512-8Aw8WGuTi3giKU9+KEutebLhhX+4eNVa7SmVLaRIFECUxI/+PS20yMbWsYjsyk5qju1MdpEQGPOW/4U5OZ6Bdw==", "dev": true, + "license": "MIT", "dependencies": { - "@auto-it/bot-list": "11.1.1", - "@auto-it/core": "11.1.1", + "@auto-it/bot-list": "11.3.0", + "@auto-it/core": "11.3.0", "deepmerge": "^4.0.0", "fp-ts": "^2.5.3", "io-ts": "^2.1.2", @@ -293,13 +302,14 @@ "dev": true }, "node_modules/@auto-it/slack": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@auto-it/slack/-/slack-11.1.1.tgz", - "integrity": "sha512-GcvadvTkxweOjlnTiM4/nF52KeSyFr7zTd9xquXlPRzgNERmkmfm1ATsP8Glp5Jwcy97plnF22tyD8RKQ6S48A==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/@auto-it/slack/-/slack-11.3.0.tgz", + "integrity": "sha512-aKAzC7fbTNvqlAstLQRF6v5Uvd91niP/mP3Eo+3qDf7Y73EO480CNYTDrNfTmkMMpbfeiS8pNMif1+E+1kaKmw==", "dev": true, + "license": "MIT", "dependencies": { "@atomist/slack-messages": "^1.2.2", - "@auto-it/core": "11.1.1", + "@auto-it/core": "11.3.0", "@octokit/rest": "^18.12.0", "fp-ts": "^2.5.3", "https-proxy-agent": "^5.0.0", @@ -315,12 +325,13 @@ "dev": true }, "node_modules/@auto-it/version-file": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/@auto-it/version-file/-/version-file-11.1.1.tgz", - "integrity": "sha512-KHKunip2nXWKd7zJ0hdALojY+E6sTdmxuq9SXYgTMXUcZw2BtxunVSK1hb2wmS6iUH4CCILk12dHksAO5BFzeQ==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/@auto-it/version-file/-/version-file-11.3.0.tgz", + "integrity": "sha512-+ax5/oXKLc5moXrSJuGm3eC10YFapWFwS5MEVwdspPM2YJn1ImuhagXOq5FJ1XK8aeHILZI+2iA+YB5wI1bcLA==", "dev": true, + "license": "MIT", "dependencies": { - "@auto-it/core": "11.1.1", + "@auto-it/core": "11.3.0", "fp-ts": "^2.5.3", "io-ts": "^2.1.2", "semver": "^7.0.0", @@ -331,7 +342,8 @@ "version": "1.10.0", "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.10.0.tgz", "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==", - "dev": true + "dev": true, + "license": "Apache-2.0" }, "node_modules/@babel/code-frame": { "version": "7.24.7", @@ -2484,6 +2496,7 @@ }, "node_modules/@clack/prompts/node_modules/is-unicode-supported": { "version": "1.3.0", + "extraneous": true, "inBundle": true, "license": "MIT", "engines": { @@ -2932,6 +2945,7 @@ "resolved": "https://registry.npmjs.org/@endemolshinegroup/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-3.0.2.tgz", "integrity": "sha512-QRVtqJuS1mcT56oHpVegkKBlgtWjXw/gHNWO3eL9oyB5Sc7HBoc2OLG/nYpVfT/Jejvo3NUrD0Udk7XgoyDKkA==", "dev": true, + "license": "MIT", "dependencies": { "lodash.get": "^4", "make-error": "^1", @@ -2950,6 +2964,7 @@ "resolved": "https://registry.npmjs.org/ts-node/-/ts-node-9.1.1.tgz", "integrity": "sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg==", "dev": true, + "license": "MIT", "dependencies": { "arg": "^4.1.0", "create-require": "^1.1.0", @@ -5839,6 +5854,7 @@ "resolved": "https://registry.npmjs.org/@octokit/plugin-enterprise-compatibility/-/plugin-enterprise-compatibility-1.3.0.tgz", "integrity": "sha512-h34sMGdEOER/OKrZJ55v26ntdHb9OPfR1fwOx6Q4qYyyhWA104o11h9tFxnS/l41gED6WEI41Vu2G2zHDVC5lQ==", "dev": true, + "license": "MIT", "dependencies": { "@octokit/request-error": "^2.1.0", "@octokit/types": "^6.0.3" @@ -5889,6 +5905,7 @@ "resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-3.0.9.tgz", "integrity": "sha512-r+fArdP5+TG6l1Rv/C9hVoty6tldw6cE2pRHNGmFPdyfrc696R6JjrQ3d7HdVqGwuzfyrcaLAKD7K8TX8aehUQ==", "dev": true, + "license": "MIT", "dependencies": { "@octokit/types": "^6.0.3", "bottleneck": "^2.15.3" @@ -5899,6 +5916,7 @@ "resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-3.7.0.tgz", "integrity": "sha512-qrKT1Yl/KuwGSC6/oHpLBot3ooC9rq0/ryDYBCpkRtoj+R8T47xTMDT6Tk2CxWopFota/8Pi/2SqArqwC0JPow==", "dev": true, + "license": "MIT", "dependencies": { "@octokit/types": "^6.0.1", "bottleneck": "^2.15.3" @@ -12268,15 +12286,16 @@ } }, "node_modules/auto": { - "version": "11.1.1", - "resolved": "https://registry.npmjs.org/auto/-/auto-11.1.1.tgz", - "integrity": "sha512-mOucdDWMjtuBDH8phH9Z0s1dD4uFrFIhYQ/Zh4wCH2uB3eEf8qZbu20DLOWCfj1zEUU2gxqVAuqJD4OyLWvaSQ==", + "version": "11.3.0", + "resolved": "https://registry.npmjs.org/auto/-/auto-11.3.0.tgz", + "integrity": "sha512-7FWjxrfsVKaToAcjxsijdpL8prbffZk5ovPCTVDk6c0Yq3pNKd2AMm5fkPR5lDbnYNeoU7lbm+0wVtJSoTQhpw==", "dev": true, + "license": "MIT", "dependencies": { - "@auto-it/core": "11.1.1", - "@auto-it/npm": "11.1.1", - "@auto-it/released": "11.1.1", - "@auto-it/version-file": "11.1.1", + "@auto-it/core": "11.3.0", + "@auto-it/npm": "11.3.0", + "@auto-it/released": "11.3.0", + "@auto-it/version-file": "11.3.0", "await-to-js": "^3.0.0", "chalk": "^4.0.0", "command-line-application": "^0.10.1", @@ -13202,7 +13221,8 @@ "version": "2.19.5", "resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz", "integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/boxen": { "version": "5.1.2", @@ -17139,6 +17159,7 @@ "resolved": "https://registry.npmjs.org/enquirer/-/enquirer-2.4.1.tgz", "integrity": "sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-colors": "^4.1.1", "strip-ansi": "^6.0.1" @@ -17558,9 +17579,10 @@ } }, "node_modules/eslint-config-prettier": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.0.0.tgz", - "integrity": "sha512-IcJsTkJae2S35pRsRAwoCE+925rJJStOdkKnLVgtE+tEpqU0EVVM7OqrwxqgptKdX29NUwC82I5pXsGFIgSevw==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz", + "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==", + "license": "MIT", "bin": { "eslint-config-prettier": "bin/cli.js" }, @@ -20383,6 +20405,7 @@ "resolved": "https://registry.npmjs.org/gitlog/-/gitlog-4.0.8.tgz", "integrity": "sha512-FcTLP7Rc0H1vWXD+J/aj5JS1uiCEBblcYXlcacRAT73N26OMYFFzrBXYmDozmWlV2K7zwK5PrH16/nuRNhqSlQ==", "dev": true, + "license": "BSD-3-Clause", "dependencies": { "debug": "^4.1.1", "tslib": "^2.5.0" @@ -21377,6 +21400,7 @@ "resolved": "https://registry.npmjs.org/import-cwd/-/import-cwd-3.0.0.tgz", "integrity": "sha512-4pnzH16plW+hgvRECbDWpQl3cqtvSofHWh44met7ESfZ8UZOWWddm8hEyDTqREJ9RbYHY8gi8DqmaelApoOGMg==", "dev": true, + "license": "MIT", "dependencies": { "import-from": "^3.0.0" }, @@ -21412,6 +21436,7 @@ "resolved": "https://registry.npmjs.org/import-from/-/import-from-3.0.0.tgz", "integrity": "sha512-CiuXOFFSzkU5x/CR0+z7T91Iht4CXgfCxVOFRhh2Zyhg5wOpWvvDLQUsWl+gcN+QscYBjez8hDCt85O7RLDttQ==", "dev": true, + "license": "MIT", "dependencies": { "resolve-from": "^5.0.0" }, @@ -25367,7 +25392,8 @@ "version": "4.2.0", "resolved": "https://registry.npmjs.org/lodash.chunk/-/lodash.chunk-4.2.0.tgz", "integrity": "sha512-ZzydJKfUHJwHa+hF5X66zLFCBrWn5GeF28OHEr4WVWtNDXlQ/IjWKPBiikqKo2ne0+v6JgCgJ0GzJp8k8bHC7w==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.debounce": { "version": "4.0.8", @@ -25378,7 +25404,8 @@ "version": "4.4.2", "resolved": "https://registry.npmjs.org/lodash.get/-/lodash.get-4.4.2.tgz", "integrity": "sha512-z+Uw/vLuy6gQe8cfaFWD7p0wVv8fJl3mbzXh33RS+0oW2wvUqiRXiQ69gLWSLpgB5/6sU+r6BlQR0MBILadqTQ==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/lodash.isfunction": { "version": "3.0.9", @@ -28799,6 +28826,7 @@ "resolved": "https://registry.npmjs.org/parse-github-url/-/parse-github-url-1.0.2.tgz", "integrity": "sha512-kgBf6avCbO3Cn6+RnzRGLkUsv4ZVqv/VfAYkRsyBcgkshNvVBkRn1FEZcW0Jb+npXQWm2vHPnnOqFteZxRRGNw==", "dev": true, + "license": "MIT", "bin": { "parse-github-url": "cli.js" }, @@ -28833,6 +28861,7 @@ "resolved": "https://registry.npmjs.org/parse-ms/-/parse-ms-2.1.0.tgz", "integrity": "sha512-kHt7kzLoS9VBZfUsiKjv43mr91ea+U05EyKkEtqp7vNbHxmaVuEqN7XxeEVnGrMtYOAxGrDElSi96K7EgO1zCA==", "dev": true, + "license": "MIT", "engines": { "node": ">=6" } @@ -29114,6 +29143,7 @@ "resolved": "https://registry.npmjs.org/pkg-conf/-/pkg-conf-2.1.0.tgz", "integrity": "sha512-C+VUP+8jis7EsQZIhDYmS5qlNtjv2yP4SNtjXK9AP1ZcTRlnSfuumaTnRfYZnYgUUYVIKqL0fRvmUGDV2fmp6g==", "dev": true, + "license": "MIT", "dependencies": { "find-up": "^2.0.0", "load-json-file": "^4.0.0" @@ -29127,6 +29157,7 @@ "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", "integrity": "sha512-NWzkk0jSJtTt08+FBFMvXoeZnOJD+jTtsRmBYbAIzJdX6l7dLgR7CTubCM5/eDdPUBvLCeVasP1brfVR/9/EZQ==", "dev": true, + "license": "MIT", "dependencies": { "locate-path": "^2.0.0" }, @@ -29139,6 +29170,7 @@ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz", "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==", "dev": true, + "license": "MIT", "dependencies": { "graceful-fs": "^4.1.2", "parse-json": "^4.0.0", @@ -29154,6 +29186,7 @@ "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", "integrity": "sha512-NCI2kiDkyR7VeEKm27Kda/iQHyKJe1Bu0FlTbYp3CqJu+9IFe9bLyAjMxf5ZDDbEg+iMPzB5zYyUTSm8wVTKmA==", "dev": true, + "license": "MIT", "dependencies": { "p-locate": "^2.0.0", "path-exists": "^3.0.0" @@ -29167,6 +29200,7 @@ "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", "dev": true, + "license": "MIT", "dependencies": { "p-try": "^1.0.0" }, @@ -29179,6 +29213,7 @@ "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", "integrity": "sha512-nQja7m7gSKuewoVRen45CtVfODR3crN3goVQ0DDZ9N3yHxgpkuBhZqsaiotSQRrADUrne346peY7kT3TSACykg==", "dev": true, + "license": "MIT", "dependencies": { "p-limit": "^1.1.0" }, @@ -29191,6 +29226,7 @@ "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", "integrity": "sha512-U1etNYuMJoIz3ZXSrrySFjsXQTWOx2/jdi86L+2pRvph/qMKL6sbcCYdH23fqsbm8TH2Gn0OybpT4eSFlCVHww==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -29200,6 +29236,7 @@ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz", "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==", "dev": true, + "license": "MIT", "dependencies": { "error-ex": "^1.3.1", "json-parse-better-errors": "^1.0.1" @@ -29213,6 +29250,7 @@ "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", "integrity": "sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -29222,6 +29260,7 @@ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz", "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -29231,6 +29270,7 @@ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -29525,9 +29565,10 @@ } }, "node_modules/prettier": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.0.3.tgz", - "integrity": "sha512-L/4pUDMxcNa8R/EthV08Zt42WBO4h1rarVtK0K+QJG0X187OLo7l699jWw0GKuwzkPQ//jMFA/8Xm6Fh3J/DAg==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.4.1.tgz", + "integrity": "sha512-G+YdqtITVZmOJje6QkXQWzl3fSfMxFwm1tjTyo9exhkmWSqC4Yhd1+lug++IlR2mvRVAxEDDWYkQdeSztajqgg==", + "license": "MIT", "bin": { "prettier": "bin/prettier.cjs" }, @@ -29656,6 +29697,7 @@ "resolved": "https://registry.npmjs.org/pretty-ms/-/pretty-ms-7.0.1.tgz", "integrity": "sha512-973driJZvxiGOQ5ONsFhOF/DtzPMOMtgC11kCpUrPGMTgqp2q/1gwzCquocrN33is0VZ5GFHXZYMM9l6h67v2Q==", "dev": true, + "license": "MIT", "dependencies": { "parse-ms": "^2.1.0" }, @@ -31465,13 +31507,15 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/nested-error-stacks/-/nested-error-stacks-2.0.1.tgz", "integrity": "sha512-SrQrok4CATudVzBS7coSz26QRSmlK9TzzoFbeKfcPBUFPjcQM9Rqvr/DlJkOrwI/0KcgvMub1n1g5Jt9EgRn4A==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/requireg/node_modules/resolve": { "version": "1.7.1", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.7.1.tgz", "integrity": "sha512-c7rwLofp8g1U+h1KNyHL/jicrKg1Ek4q+Lr33AL65uZTinUZHe30D5HlyN5V9NW0JX1D5dXQ4jqW5l7Sy/kGfw==", "dev": true, + "license": "MIT", "dependencies": { "path-parse": "^1.0.5" } @@ -32590,6 +32634,7 @@ "resolved": "https://registry.npmjs.org/signale/-/signale-1.4.0.tgz", "integrity": "sha512-iuh+gPf28RkltuJC7W5MRi6XAjTDCAPC/prJUpQoG4vIP3MJZ+GTydVnodXA7pwvTKb2cA0m9OFZW/cdWy/I/w==", "dev": true, + "license": "MIT", "dependencies": { "chalk": "^2.3.2", "figures": "^2.0.0", @@ -32604,6 +32649,7 @@ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, + "license": "MIT", "dependencies": { "color-convert": "^1.9.0" }, @@ -32616,6 +32662,7 @@ "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", @@ -32630,6 +32677,7 @@ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, + "license": "MIT", "dependencies": { "color-name": "1.1.3" } @@ -32638,13 +32686,15 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/signale/node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", "dev": true, + "license": "MIT", "engines": { "node": ">=0.8.0" } @@ -32654,6 +32704,7 @@ "resolved": "https://registry.npmjs.org/figures/-/figures-2.0.0.tgz", "integrity": "sha512-Oa2M9atig69ZkfwiApY8F2Yy+tzMbazyvqv21R0NsSC8floSOC09BbT1ITWAdoMGQvJ/aZnR1KMwdx9tvHnTNA==", "dev": true, + "license": "MIT", "dependencies": { "escape-string-regexp": "^1.0.5" }, @@ -32666,6 +32717,7 @@ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", "dev": true, + "license": "MIT", "engines": { "node": ">=4" } @@ -32675,6 +32727,7 @@ "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, + "license": "MIT", "dependencies": { "has-flag": "^3.0.0" }, @@ -34242,6 +34295,7 @@ "resolved": "https://registry.npmjs.org/terminal-link/-/terminal-link-2.1.1.tgz", "integrity": "sha512-un0FmiRUQNr5PJqy9kP7c40F5BOfpGlYTrxonDChEZB7pzZxRNp/bt+ymiy9/npwXya9KH99nJ/GXFIiUkYGFQ==", "dev": true, + "license": "MIT", "dependencies": { "ansi-escapes": "^4.2.1", "supports-hyperlinks": "^2.0.0" @@ -34721,7 +34775,8 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.6.0.tgz", "integrity": "sha512-XPaBkWQJdsf3pLKJV9p4qN/S+fm2Oj8AIPo1BTUhg5oxkvm9+SVEGFdhyOz7tTdUTfvxMiAs4sp6/eZO2Ew+pw==", - "dev": true + "dev": true, + "license": "MIT" }, "node_modules/tinypool": { "version": "0.8.4", @@ -38459,7 +38514,7 @@ "@types/treeify": "1.0.0" }, "engines": { - "node": ">= 16.16.0" + "node": ">= 22.0.0" } }, "packages/audit/node_modules/execa": { @@ -38573,7 +38628,7 @@ "junit-report-builder": "3.2.1" }, "engines": { - "node": ">= 16.16.0" + "node": ">= 22.0.0" }, "peerDependencies": { "@commitlint/cli": "^17" @@ -38608,7 +38663,7 @@ "@typescript-eslint/parser": "7.13.1", "eslint-config-airbnb": "^19.0.4", "eslint-config-airbnb-typescript": "^17.1.0", - "eslint-config-prettier": "^9.0.0", + "eslint-config-prettier": "^9.1.0", "eslint-formatter-pretty": "^5.0.0", "eslint-import-resolver-babel-module": "^5.3.2", "eslint-import-resolver-typescript": "^3.6.1", @@ -38630,7 +38685,7 @@ "vite-tsconfig-paths": "4.3.2" }, "engines": { - "node": ">= 16.16.0" + "node": ">= 22.0.0" }, "peerDependencies": { "eslint": "^8", @@ -38652,7 +38707,7 @@ "@typescript-eslint/utils": "7.13.1", "eslint-doc-generator": "1.5.3", "fs-extra": "11.1.1", - "prettier": "3.0.3", + "prettier": "3.4.1", "type-fest": "4.4.0", "typescript": "5.1.6", "vite": "5.3.5", @@ -38822,7 +38877,7 @@ "glob": "^10.3.3", "lodash": "4.17.21", "minimist": "^1.2.8", - "prettier": "^3.0.0", + "prettier": "^3.4.1", "prettier-package-json": "2.8.0", "publint": "0.2.0", "semver": "7.5.4", @@ -38839,7 +38894,7 @@ "typescript": "5.1.6" }, "engines": { - "node": ">= 16.16.0" + "node": ">= 22.0.0" }, "peerDependencies": { "@tablecheck/eslint-config": ">=8.2.0" @@ -38937,7 +38992,7 @@ "version": "4.0.1", "license": "MIT", "engines": { - "node": ">= 16.16.0" + "node": ">= 22.0.0" }, "peerDependencies": { "prettier": "^3" diff --git a/package.json b/package.json index 0a8efc79..52d17530 100644 --- a/package.json +++ b/package.json @@ -24,11 +24,11 @@ }, "workspaces": ["packages/*"], "devDependencies": { - "@auto-it/all-contributors": "11.1.1", - "@auto-it/first-time-contributor": "11.1.1", - "@auto-it/npm": "11.1.1", - "@auto-it/released": "11.1.1", - "@auto-it/slack": "11.1.1", + "@auto-it/all-contributors": "11.3.0", + "@auto-it/first-time-contributor": "11.3.0", + "@auto-it/npm": "11.3.0", + "@auto-it/released": "11.3.0", + "@auto-it/slack": "11.3.0", "@commitlint/cli": "17.7.2", "@commitlint/config-lerna-scopes": "17.7.0", "@emotion/babel-plugin": "^11.11.0", @@ -55,7 +55,7 @@ "@vitest/coverage-v8": "1.6.0", "@vitest/ui": "1.6.0", "auditjs": "4.0.41", - "auto": "11.1.1", + "auto": "11.3.0", "eslint": "8.57.0", "eslint-plugin-eslint-plugin": "5.1.1", "file-loader": "^6.2.0", @@ -67,7 +67,7 @@ "lint-staged": "^14.0.1", "lodash": "^4.17.21", "nx": "19.3.0", - "prettier": "3.0.3", + "prettier": "3.4.1", "storybook": "^6.5.16", "type-fest": "4.4.0", "typescript": "5.4.5", diff --git a/packages/audit/package.json b/packages/audit/package.json index 24c2ff5a..5fb5a0a1 100644 --- a/packages/audit/package.json +++ b/packages/audit/package.json @@ -36,7 +36,7 @@ "@types/treeify": "1.0.0" }, "engines": { - "node": ">= 16.16.0" + "node": ">= 22.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/audit/src/index.ts b/packages/audit/src/index.ts index 3ab70522..60f2b0e7 100644 --- a/packages/audit/src/index.ts +++ b/packages/audit/src/index.ts @@ -5,7 +5,7 @@ import CVSS, { type DetailedVectorObject, type VectorMetric, } from '@turingpointde/cvss.js'; -import definitions from '@turingpointde/cvss.js/lib/cvss_3_0.json' assert { type: 'json' }; +import definitions from '@turingpointde/cvss.js/lib/cvss_3_0.json' with { type: 'json' }; import chalk from 'chalk'; import { execa } from 'execa'; import fs from 'fs-extra'; @@ -126,7 +126,7 @@ async function updateWhitelist(rootPath: string) { this.dep = dep; } - async chooseAction() { + public async chooseAction() { prompts.note(this.getHeader()); const spinner = prompts.spinner(); spinner.start(`Finding npm usages`); @@ -135,7 +135,7 @@ async function updateWhitelist(rootPath: string) { await this.promptWhitelist(); } - getHeader() { + private getHeader() { return [ this.getScoreKey(), '', @@ -144,7 +144,7 @@ async function updateWhitelist(rootPath: string) { ].join('\n'); } - getScoreKey() { + private getScoreKey() { return `${chalk.bold('CVSS Score Reference: ')} ${[ '0.0 None', @@ -160,7 +160,7 @@ async function updateWhitelist(rootPath: string) { .join(', ')}`; } - getDescription() { + private getDescription() { return [ `${chalk.bold('Vulnerable package:')} ${this.dep.coordinates}`, `${chalk.bold('Package description:')} ${this.dep.description}`, @@ -168,7 +168,7 @@ async function updateWhitelist(rootPath: string) { ].join('\n'); } - getVulnerabilities() { + private getVulnerabilities() { return this.dep.vulnerabilities.map( ({ title, description, cvssScore, cvssVector }) => ` ${chalk.bold( title, @@ -181,7 +181,7 @@ async function updateWhitelist(rootPath: string) { ); } - getCvssVector(cvssVector: string | undefined) { + private getCvssVector(cvssVector: string | undefined) { if (!cvssVector) return ''; try { const vector = CVSS(cvssVector).getDetailedVectorObject(); @@ -194,7 +194,7 @@ ${this.getVectorMetrics(vector) } } - getVectorMetrics(vector: DetailedVectorObject): string[] { + private getVectorMetrics(vector: DetailedVectorObject): string[] { let scopeKey: 'changed' | 'unchanged' = 'changed'; if (vector.metrics.S?.value) { scopeKey = vector.metrics.S.value.toLowerCase() as typeof scopeKey; @@ -206,7 +206,7 @@ ${this.getVectorMetrics(vector) ); } - getVectorMetricScore( + private getVectorMetricScore( scopeKey: 'changed' | 'unchanged', { fullName, value, abbr, valueAbbr }: VectorMetric, ): string { @@ -234,7 +234,7 @@ ${this.getVectorMetrics(vector) return colouredByScore(score, `${chalk.bold(`${fullName}:`)} ${value}`); } - async loadDependencyDetails() { + private async loadDependencyDetails() { if (!this.dep.coordinates.match(/^pkg:npm\//)) return this.getHeader(); const dependencyVersion = this.getDependencyVersion(); try { @@ -255,13 +255,13 @@ ${this.getVectorMetrics(vector) } } - getDependencyVersion() { + private getDependencyVersion() { return this.dep.coordinates .substring(8) .replace(/%40/g, '@') as `${string}@${string}`; } - async loadNpmPackages(dependencyVersion: string) { + private async loadNpmPackages(dependencyVersion: string) { const npmListExec = await execa('npm', [ 'ls', dependencyVersion, @@ -281,7 +281,7 @@ ${this.getVectorMetrics(vector) return JSON.parse(npmListExec.stdout) as NpmLsOutput; } - buildDependenciesFromUsages( + private buildDependenciesFromUsages( dependencyVersion: string, dependencies: RecursiveDeps, ): treeify.TreeObject { @@ -302,7 +302,7 @@ ${this.getVectorMetrics(vector) }, {} as treeify.TreeObject); } - async promptWhitelist() { + private async promptWhitelist() { const shouldWhitelist = await prompts.confirm({ message: 'Do you want to whitelist this package?', active: 'Whitelist', diff --git a/packages/commitlint-config/package.json b/packages/commitlint-config/package.json index d870a5d1..de6a4f9f 100644 --- a/packages/commitlint-config/package.json +++ b/packages/commitlint-config/package.json @@ -22,7 +22,7 @@ "@commitlint/cli": "^17" }, "engines": { - "node": ">= 16.16.0" + "node": ">= 22.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/eslint-config/package.json b/packages/eslint-config/package.json index ad1d003e..4135b0b5 100644 --- a/packages/eslint-config/package.json +++ b/packages/eslint-config/package.json @@ -88,7 +88,7 @@ "vite-tsconfig-paths": "4.3.2" }, "engines": { - "node": ">= 16.16.0" + "node": ">= 22.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json index 5b445194..8a2f8508 100644 --- a/packages/eslint-plugin/package.json +++ b/packages/eslint-plugin/package.json @@ -33,7 +33,7 @@ "@typescript-eslint/utils": "7.13.1", "eslint-doc-generator": "1.5.3", "fs-extra": "11.1.1", - "prettier": "3.0.3", + "prettier": "3.4.1", "type-fest": "4.4.0", "typescript": "5.1.6", "vite": "5.3.5", diff --git a/packages/eslint-plugin/src/shortestImport.ts b/packages/eslint-plugin/src/shortestImport.ts index 06d6588a..5ba513f0 100644 --- a/packages/eslint-plugin/src/shortestImport.ts +++ b/packages/eslint-plugin/src/shortestImport.ts @@ -27,7 +27,7 @@ class RuleChecker { private allPaths: Record; - get relativeBaseUrl(): string { + private get relativeBaseUrl(): string { return path.relative(this.pathsBasePath as string, this.baseUrl ?? ''); } diff --git a/packages/nx/package.json b/packages/nx/package.json index e9708093..5112567a 100644 --- a/packages/nx/package.json +++ b/packages/nx/package.json @@ -33,7 +33,7 @@ "glob": "^10.3.3", "lodash": "4.17.21", "minimist": "^1.2.8", - "prettier": "^3.0.0", + "prettier": "^3.4.1", "prettier-package-json": "2.8.0", "publint": "0.2.0", "semver": "7.5.4", @@ -53,7 +53,7 @@ "typescript": "5.1.6" }, "engines": { - "node": ">= 16.16.0" + "node": ">= 22.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/prettier-config/package.json b/packages/prettier-config/package.json index 9f5ba092..2dc213f9 100644 --- a/packages/prettier-config/package.json +++ b/packages/prettier-config/package.json @@ -13,7 +13,7 @@ "prettier": "^3" }, "engines": { - "node": ">= 16.16.0" + "node": ">= 22.0.0" }, "publishConfig": { "access": "public" diff --git a/packages/vite-import-massager-plugin/src/index.ts b/packages/vite-import-massager-plugin/src/index.ts index 660eef48..dc370f4a 100644 --- a/packages/vite-import-massager-plugin/src/index.ts +++ b/packages/vite-import-massager-plugin/src/index.ts @@ -29,9 +29,9 @@ interface TransformConfig { // eslint-disable-next-line import/no-default-export export default class ImportMassagingPlugin implements Plugin { - name = 'import-massaging'; + public name = 'import-massaging'; - configs: TransformConfig[]; + public configs: TransformConfig[]; /** * @param configs list of package names or transform configs to transform imports @@ -43,7 +43,7 @@ export default class ImportMassagingPlugin implements Plugin { this.transform = this.transform.bind(this); } - transform(code: string, id: string) { + public transform(code: string, id: string) { if (!this.shouldTransform(code, id)) { return { code, map: null }; } @@ -130,22 +130,22 @@ export default class ImportMassagingPlugin implements Plugin { }; } - shouldTransform(code: string, id: string) { + private shouldTransform(code: string, id: string) { const isNodeModules = id.includes('/node_modules/'); if (!isNodeModules) { return /\.[cm]?[tj]sx?$/.test(id) && this.includesImport(code); } - const isTransformPackage = this.configs.some( - (c) => c.transformPackages?.some((pkg) => id.includes(pkg)), + const isTransformPackage = this.configs.some((c) => + c.transformPackages?.some((pkg) => id.includes(pkg)), ); return isTransformPackage && this.includesImport(code); } - includesImport(code: string) { + private includesImport(code: string) { return this.configs.some((c) => code.includes(c.packageName)); } - buildImport({ + private buildImport({ config, importName, varName,