diff --git a/__utils__/eslint-config/index.js b/__utils__/eslint-config/index.js index 9dfc66a46f..8460ffb3c4 100644 --- a/__utils__/eslint-config/index.js +++ b/__utils__/eslint-config/index.js @@ -1,6 +1,7 @@ import js from '@eslint/js' import { FlatCompat } from '@eslint/eslintrc' import noDupeConditions from './no-dupe-conditions.js' +import noObjectMethodsOnMap from './no-object-methods-on-map.js' import jestPlugin from 'eslint-plugin-jest' const compat = new FlatCompat({ @@ -31,6 +32,7 @@ export default [ "conditions": { rules: { 'no-dupe-conditions': noDupeConditions, + 'no-object-methods-on-map': noObjectMethodsOnMap, } }, "jest": jestPlugin @@ -129,6 +131,7 @@ export default [ 'jest/prefer-to-have-length': 'error', 'jest/valid-describe-callback': 'error', 'jest/valid-title': 'error', + 'conditions/no-object-methods-on-map': 'error', }, }, // Separate configuration for test files diff --git a/__utils__/eslint-config/no-object-methods-on-map.js b/__utils__/eslint-config/no-object-methods-on-map.js new file mode 100644 index 0000000000..d94d3e075a --- /dev/null +++ b/__utils__/eslint-config/no-object-methods-on-map.js @@ -0,0 +1,52 @@ +import { ESLintUtils } from '@typescript-eslint/utils' +import ts from 'typescript' + +const createRule = ESLintUtils.RuleCreator( + (name) => `https://github.com/pnpm/pnpm/blob/main/tools/eslint-config/${name}` +) + +export default createRule({ + name: 'no-object-methods-on-map', + meta: { + type: 'problem', + docs: { + description: 'Disallow Object.entries/keys/values() on Map/Set objects', + }, + messages: { + noObjectMethodsOnMap: 'Object.{{method}}() on a Map/Set always returns empty array. Use Map.prototype.{{method}}() or iterate directly.', + }, + schema: [], + }, + defaultOptions: [], + create(context) { + const services = ESLintUtils.getParserServices(context) + const checker = services.program.getTypeChecker() + + return { + CallExpression(node) { + if ( + node.callee.type !== 'MemberExpression' || + node.callee.object.name !== 'Object' || + !['entries', 'keys', 'values'].includes(node.callee.property.name) || + node.arguments.length === 0 + ) { + return + } + + const method = node.callee.property.name + const arg = node.arguments[0] + const tsNode = services.esTreeNodeToTSNodeMap.get(arg) + const type = checker.getTypeAtLocation(tsNode) + const symbol = type.getSymbol() + + if (symbol && (symbol.name === 'Map' || symbol.name === 'Set')) { + context.report({ + node, + messageId: 'noObjectMethodsOnMap', + data: { method }, + }) + } + }, + } + }, +}) diff --git a/__utils__/eslint-config/package.json b/__utils__/eslint-config/package.json index 522add0830..4d3115f1cc 100644 --- a/__utils__/eslint-config/package.json +++ b/__utils__/eslint-config/package.json @@ -41,6 +41,7 @@ }, "devDependencies": { "@pnpm/eslint-config": "workspace:*", + "@typescript-eslint/utils": "catalog:", "eslint-plugin-jest": "catalog:" } } diff --git a/cli/default-reporter/src/reporterForClient/pkgsDiff.ts b/cli/default-reporter/src/reporterForClient/pkgsDiff.ts index 7bf9c7b6c6..578d73cf7f 100644 --- a/cli/default-reporter/src/reporterForClient/pkgsDiff.ts +++ b/cli/default-reporter/src/reporterForClient/pkgsDiff.ts @@ -14,7 +14,7 @@ export interface PackageDiff { latest?: string } -export interface Map { +export interface RecordByString { [index: string]: T } @@ -27,11 +27,11 @@ export const propertyByDependencyType = { } as const export interface PkgsDiff { - dev: Map - nodeModulesOnly: Map - optional: Map - peer: Map - prod: Map + dev: RecordByString + nodeModulesOnly: RecordByString + optional: RecordByString + peer: RecordByString + prod: RecordByString } export function getPkgsDiff ( diff --git a/pkg-manager/resolve-dependencies/src/wantedDepIsLocallyAvailable.ts b/pkg-manager/resolve-dependencies/src/wantedDepIsLocallyAvailable.ts index 84d986dd73..39e1aece3c 100644 --- a/pkg-manager/resolve-dependencies/src/wantedDepIsLocallyAvailable.ts +++ b/pkg-manager/resolve-dependencies/src/wantedDepIsLocallyAvailable.ts @@ -21,7 +21,7 @@ function pickMatchingLocalVersionOrNull ( versions: WorkspacePackagesByVersion, spec: RegistryPackageSpec ): string | null { - const localVersions = Object.keys(versions) + const localVersions = Array.from(versions.keys()) switch (spec.type) { case 'tag': return semver.maxSatisfying(localVersions, '*') diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aa778534b9..a7e15c21fd 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -234,6 +234,9 @@ catalogs: '@typescript-eslint/parser': specifier: 6.18.1 version: 6.18.1 + '@typescript-eslint/utils': + specifier: 6.18.1 + version: 6.18.1 '@yarnpkg/core': specifier: 4.2.0 version: 4.2.0 @@ -1093,6 +1096,9 @@ importers: '@pnpm/eslint-config': specifier: workspace:* version: 'link:' + '@typescript-eslint/utils': + specifier: 'catalog:' + version: 6.18.1(eslint@8.57.1)(typescript@5.9.2) eslint-plugin-jest: specifier: 'catalog:' version: 29.0.1(@typescript-eslint/eslint-plugin@6.18.1(@typescript-eslint/parser@6.18.1(eslint@8.57.1)(typescript@5.9.2))(eslint@8.57.1)(typescript@5.9.2))(eslint@8.57.1)(jest@30.0.5(@babel/types@7.28.2)(@types/node@22.15.30)(ts-node@10.9.2(@types/node@22.15.30)(typescript@5.9.2)))(typescript@5.9.2) @@ -11139,8 +11145,8 @@ packages: typescript: optional: true - '@typescript-eslint/project-service@8.40.0': - resolution: {integrity: sha512-/A89vz7Wf5DEXsGVvcGdYKbVM9F7DyFXj52lNYUDS1L9yJfqjW/fIp5PgMuEJL/KeqVTe2QSbXAGUZljDUpArw==} + '@typescript-eslint/project-service@8.49.0': + resolution: {integrity: sha512-/wJN0/DKkmRUMXjZUXYZpD1NEQzQAAn9QWfGwo+Ai8gnzqH7tvqS7oNVdTjKqOcPyVIdZdyCMoqN66Ia789e7g==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' @@ -11149,12 +11155,12 @@ packages: resolution: {integrity: sha512-BgdBwXPFmZzaZUuw6wKiHKIovms97a7eTImjkXCZE04TGHysG+0hDQPmygyvgtkoB/aOQwSM/nWv3LzrOIQOBw==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/scope-manager@8.40.0': - resolution: {integrity: sha512-y9ObStCcdCiZKzwqsE8CcpyuVMwRouJbbSrNuThDpv16dFAj429IkM6LNb1dZ2m7hK5fHyzNcErZf7CEeKXR4w==} + '@typescript-eslint/scope-manager@8.49.0': + resolution: {integrity: sha512-npgS3zi+/30KSOkXNs0LQXtsg9ekZ8OISAOLGWA/ZOEn0ZH74Ginfl7foziV8DT+D98WfQ5Kopwqb/PZOaIJGg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/tsconfig-utils@8.40.0': - resolution: {integrity: sha512-jtMytmUaG9d/9kqSl/W3E3xaWESo4hFDxAIHGVW/WKKtQhesnRIJSAJO6XckluuJ6KDB5woD1EiqknriCtAmcw==} + '@typescript-eslint/tsconfig-utils@8.49.0': + resolution: {integrity: sha512-8prixNi1/6nawsRYxet4YOhnbW+W9FK/bQPxsGB1D3ZrDzbJ5FXw5XmzxZv82X3B+ZccuSxo/X8q9nQ+mFecWA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' @@ -11173,8 +11179,8 @@ packages: resolution: {integrity: sha512-4TuMAe+tc5oA7wwfqMtB0Y5OrREPF1GeJBAjqwgZh1lEMH5PJQgWgHGfYufVB51LtjD+peZylmeyxUXPfENLCw==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/types@8.40.0': - resolution: {integrity: sha512-ETdbFlgbAmXHyFPwqUIYrfc12ArvpBhEVgGAxVYSwli26dn8Ko+lIo4Su9vI9ykTZdJn+vJprs/0eZU0YMAEQg==} + '@typescript-eslint/types@8.49.0': + resolution: {integrity: sha512-e9k/fneezorUo6WShlQpMxXh8/8wfyc+biu6tnAqA81oWrEic0k21RHzP9uqqpyBBeBKu4T+Bsjy9/b8u7obXQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@typescript-eslint/typescript-estree@6.18.1': @@ -11186,8 +11192,8 @@ packages: typescript: optional: true - '@typescript-eslint/typescript-estree@8.40.0': - resolution: {integrity: sha512-k1z9+GJReVVOkc1WfVKs1vBrR5MIKKbdAjDTPvIK3L8De6KbFfPFt6BKpdkdk7rZS2GtC/m6yI5MYX+UsuvVYQ==} + '@typescript-eslint/typescript-estree@8.49.0': + resolution: {integrity: sha512-jrLdRuAbPfPIdYNppHJ/D0wN+wwNfJ32YTAm10eJVsFmrVpXQnDWBn8niCSMlWjvml8jsce5E/O+86IQtTbJWA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: typescript: '>=4.8.4 <6.0.0' @@ -11198,8 +11204,8 @@ packages: peerDependencies: eslint: ^7.0.0 || ^8.0.0 - '@typescript-eslint/utils@8.40.0': - resolution: {integrity: sha512-Cgzi2MXSZyAUOY+BFwGs17s7ad/7L+gKt6Y8rAVVWS+7o6wrjeFN4nVfTpbE25MNcxyJ+iYUXflbs2xR9h4UBg==} + '@typescript-eslint/utils@8.49.0': + resolution: {integrity: sha512-N3W7rJw7Rw+z1tRsHZbK395TWSYvufBXumYtEGzypgMUthlg0/hmCImeA8hgO2d2G4pd7ftpxxul2J8OdtdaFA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: eslint: ^8.57.0 || ^9.0.0 @@ -11209,8 +11215,8 @@ packages: resolution: {integrity: sha512-/kvt0C5lRqGoCfsbmm7/CwMqoSkY3zzHLIjdhHZQW3VFrnz7ATecOHR7nb7V+xn4286MBxfnQfQhAmCI0u+bJA==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/visitor-keys@8.40.0': - resolution: {integrity: sha512-8CZ47QwalyRjsypfwnbI3hKy5gJDPmrkLjkgMxhi0+DZZ2QNx2naS6/hWoVYUHU7LU2zleF68V9miaVZvhFfTA==} + '@typescript-eslint/visitor-keys@8.49.0': + resolution: {integrity: sha512-LlKaciDe3GmZFphXIc79THF/YYBugZ7FS1pO581E/edlVVNbZKDy93evqmrfQ9/Y4uN0vVhX4iuchq26mK/iiA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} '@ungap/structured-clone@1.3.0': @@ -12936,6 +12942,15 @@ packages: picomatch: optional: true + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + fetch-blob@2.1.2: resolution: {integrity: sha512-YKqtUDwqLyfyMnmbw8XD6Q8j9i/HggKtPEI+pZ1+8bvheBu78biSmNaXWusx1TauGqtUUGx/cBb1mKdq2rLYow==} engines: {node: ^10.17.0 || >=12.3.0} @@ -16067,6 +16082,10 @@ packages: resolution: {integrity: sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==} engines: {node: '>=12.0.0'} + tinyglobby@0.2.15: + resolution: {integrity: sha512-j2Zq4NyQYG5XMST4cbs02Ak8iJUdxRM0XI5QyxXuZOzKOINmWurp3smXu3y5wDcJrptwpSjgXHzIQxR0omXljQ==} + engines: {node: '>=12.0.0'} + tinylogic@2.0.0: resolution: {integrity: sha512-dljTkiLLITtsjqBvTA1MRZQK/sGP4kI3UJKc3yA9fMzYbMF2RhcN04SeROVqJBIYYOoJMM8u0WDnhFwMSFQotw==} @@ -18372,7 +18391,7 @@ snapshots: '@pnpm/fs.packlist': 2.0.0 '@pnpm/logger': 1001.0.0 '@pnpm/prepare-package': 1000.0.16(@pnpm/logger@1001.0.0)(typanion@3.14.0) - '@pnpm/worker': 1000.1.7(@pnpm/logger@packages+logger)(@types/node@22.15.30) + '@pnpm/worker': 1000.1.7(@pnpm/logger@1001.0.0)(@types/node@22.15.30) '@zkochan/rimraf': 3.0.2 execa: safe-execa@0.1.2 transitivePeerDependencies: @@ -18507,7 +18526,7 @@ snapshots: '@pnpm/find-workspace-dir': 1000.1.0 '@pnpm/logger': 1001.0.0 '@pnpm/types': 1000.6.0 - '@pnpm/worker': 1000.1.7(@pnpm/logger@packages+logger)(@types/node@22.15.30) + '@pnpm/worker': 1000.1.7(@pnpm/logger@1001.0.0)(@types/node@22.15.30) '@pnpm/workspace.find-packages': 1000.0.25(@pnpm/logger@1001.0.0)(@pnpm/worker@1000.1.7(@pnpm/logger@1001.0.0)(@types/node@22.15.30))(typanion@3.14.0) '@pnpm/workspace.read-manifest': 1000.1.5 load-json-file: 7.0.1 @@ -18713,7 +18732,7 @@ snapshots: '@pnpm/store-controller-types': 1003.0.2 '@pnpm/store.cafs': 1000.0.13 '@pnpm/types': 1000.6.0 - '@pnpm/worker': 1000.1.7(@pnpm/logger@packages+logger)(@types/node@22.15.30) + '@pnpm/worker': 1000.1.7(@pnpm/logger@1001.0.0)(@types/node@22.15.30) p-defer: 3.0.0 p-limit: 3.1.0 p-queue: 6.6.2 @@ -18732,7 +18751,7 @@ snapshots: '@pnpm/store-controller-types': 1003.0.2 '@pnpm/store.cafs': 1000.0.13 '@pnpm/types': 1000.6.0 - '@pnpm/worker': 1000.1.7(@pnpm/logger@packages+logger)(@types/node@22.15.30) + '@pnpm/worker': 1000.1.7(@pnpm/logger@1001.0.0)(@types/node@22.15.30) '@zkochan/rimraf': 3.0.2 load-json-file: 6.2.0 ramda: '@pnpm/ramda@0.28.1' @@ -19011,7 +19030,7 @@ snapshots: '@pnpm/graceful-fs': 1000.0.0 '@pnpm/logger': 1001.0.0 '@pnpm/prepare-package': 1000.0.16(@pnpm/logger@1001.0.0)(typanion@3.14.0) - '@pnpm/worker': 1000.1.7(@pnpm/logger@packages+logger)(@types/node@22.15.30) + '@pnpm/worker': 1000.1.7(@pnpm/logger@1001.0.0)(@types/node@22.15.30) '@zkochan/retry': 0.2.0 lodash.throttle: 4.1.1 p-map-values: 1.0.0 @@ -19050,7 +19069,7 @@ snapshots: dependencies: isexe: 2.0.0 - '@pnpm/worker@1000.1.7(@pnpm/logger@packages+logger)(@types/node@22.15.30)': + '@pnpm/worker@1000.1.7(@pnpm/logger@1001.0.0)(@types/node@22.15.30)': dependencies: '@pnpm/cafs-types': 1000.0.0 '@pnpm/create-cafs-store': 1000.0.14(@pnpm/logger@1001.0.0) @@ -19059,7 +19078,7 @@ snapshots: '@pnpm/exec.pkg-requires-build': 1000.0.8 '@pnpm/fs.hard-link-dir': 1000.0.1(@pnpm/logger@1001.0.0) '@pnpm/graceful-fs': 1000.0.0 - '@pnpm/logger': link:packages/logger + '@pnpm/logger': 1001.0.0 '@pnpm/store.cafs': 1000.0.13 '@pnpm/symlink-dependency': 1000.0.9(@pnpm/logger@1001.0.0) '@rushstack/worker-pool': 0.4.9(@types/node@22.15.30) @@ -19487,11 +19506,11 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.40.0(typescript@5.9.2)': + '@typescript-eslint/project-service@8.49.0(typescript@5.9.2)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.40.0(typescript@5.9.2) - '@typescript-eslint/types': 8.40.0 - debug: 4.4.1 + '@typescript-eslint/tsconfig-utils': 8.49.0(typescript@5.9.2) + '@typescript-eslint/types': 8.49.0 + debug: 4.4.3 typescript: 5.9.2 transitivePeerDependencies: - supports-color @@ -19501,12 +19520,12 @@ snapshots: '@typescript-eslint/types': 6.18.1 '@typescript-eslint/visitor-keys': 6.18.1 - '@typescript-eslint/scope-manager@8.40.0': + '@typescript-eslint/scope-manager@8.49.0': dependencies: - '@typescript-eslint/types': 8.40.0 - '@typescript-eslint/visitor-keys': 8.40.0 + '@typescript-eslint/types': 8.49.0 + '@typescript-eslint/visitor-keys': 8.49.0 - '@typescript-eslint/tsconfig-utils@8.40.0(typescript@5.9.2)': + '@typescript-eslint/tsconfig-utils@8.49.0(typescript@5.9.2)': dependencies: typescript: 5.9.2 @@ -19524,13 +19543,13 @@ snapshots: '@typescript-eslint/types@6.18.1': {} - '@typescript-eslint/types@8.40.0': {} + '@typescript-eslint/types@8.49.0': {} '@typescript-eslint/typescript-estree@6.18.1(typescript@5.9.2)': dependencies: '@typescript-eslint/types': 6.18.1 '@typescript-eslint/visitor-keys': 6.18.1 - debug: 4.4.1 + debug: 4.4.3 globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 @@ -19541,17 +19560,16 @@ snapshots: transitivePeerDependencies: - supports-color - '@typescript-eslint/typescript-estree@8.40.0(typescript@5.9.2)': + '@typescript-eslint/typescript-estree@8.49.0(typescript@5.9.2)': dependencies: - '@typescript-eslint/project-service': 8.40.0(typescript@5.9.2) - '@typescript-eslint/tsconfig-utils': 8.40.0(typescript@5.9.2) - '@typescript-eslint/types': 8.40.0 - '@typescript-eslint/visitor-keys': 8.40.0 - debug: 4.4.1 - fast-glob: 3.3.3 - is-glob: 4.0.3 + '@typescript-eslint/project-service': 8.49.0(typescript@5.9.2) + '@typescript-eslint/tsconfig-utils': 8.49.0(typescript@5.9.2) + '@typescript-eslint/types': 8.49.0 + '@typescript-eslint/visitor-keys': 8.49.0 + debug: 4.4.3 minimatch: 9.0.5 semver: 7.7.2 + tinyglobby: 0.2.15 ts-api-utils: 2.1.0(typescript@5.9.2) typescript: 5.9.2 transitivePeerDependencies: @@ -19571,12 +19589,12 @@ snapshots: - supports-color - typescript - '@typescript-eslint/utils@8.40.0(eslint@8.57.1)(typescript@5.9.2)': + '@typescript-eslint/utils@8.49.0(eslint@8.57.1)(typescript@5.9.2)': dependencies: '@eslint-community/eslint-utils': 4.7.0(eslint@8.57.1) - '@typescript-eslint/scope-manager': 8.40.0 - '@typescript-eslint/types': 8.40.0 - '@typescript-eslint/typescript-estree': 8.40.0(typescript@5.9.2) + '@typescript-eslint/scope-manager': 8.49.0 + '@typescript-eslint/types': 8.49.0 + '@typescript-eslint/typescript-estree': 8.49.0(typescript@5.9.2) eslint: 8.57.1 typescript: 5.9.2 transitivePeerDependencies: @@ -19587,9 +19605,9 @@ snapshots: '@typescript-eslint/types': 6.18.1 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.40.0': + '@typescript-eslint/visitor-keys@8.49.0': dependencies: - '@typescript-eslint/types': 8.40.0 + '@typescript-eslint/types': 8.49.0 eslint-visitor-keys: 4.2.1 '@ungap/structured-clone@1.3.0': {} @@ -20037,7 +20055,7 @@ snapshots: agent-base@6.0.2: dependencies: - debug: 4.4.1 + debug: 4.4.3 transitivePeerDependencies: - supports-color @@ -21378,7 +21396,7 @@ snapshots: eslint-plugin-jest@29.0.1(@typescript-eslint/eslint-plugin@6.18.1(@typescript-eslint/parser@6.18.1(eslint@8.57.1)(typescript@5.9.2))(eslint@8.57.1)(typescript@5.9.2))(eslint@8.57.1)(jest@30.0.5(@babel/types@7.28.2)(@types/node@22.15.30)(ts-node@10.9.2(@types/node@22.15.30)(typescript@5.9.2)))(typescript@5.9.2): dependencies: - '@typescript-eslint/utils': 8.40.0(eslint@8.57.1)(typescript@5.9.2) + '@typescript-eslint/utils': 8.49.0(eslint@8.57.1)(typescript@5.9.2) eslint: 8.57.1 optionalDependencies: '@typescript-eslint/eslint-plugin': 6.18.1(@typescript-eslint/parser@6.18.1(eslint@8.57.1)(typescript@5.9.2))(eslint@8.57.1)(typescript@5.9.2) @@ -21650,6 +21668,10 @@ snapshots: optionalDependencies: picomatch: 4.0.3 + fdir@6.5.0(picomatch@4.0.3): + optionalDependencies: + picomatch: 4.0.3 + fetch-blob@2.1.2: {} fetch-blob@3.2.0: @@ -22169,7 +22191,7 @@ snapshots: http-proxy-agent@7.0.2: dependencies: agent-base: 7.1.3 - debug: 4.4.1 + debug: 4.4.3 transitivePeerDependencies: - supports-color @@ -22215,14 +22237,14 @@ snapshots: https-proxy-agent@5.0.1: dependencies: agent-base: 6.0.2 - debug: 4.4.1 + debug: 4.4.3 transitivePeerDependencies: - supports-color https-proxy-agent@7.0.6: dependencies: agent-base: 7.1.3 - debug: 4.4.1 + debug: 4.4.3 transitivePeerDependencies: - supports-color @@ -22590,7 +22612,7 @@ snapshots: istanbul-lib-source-maps@5.0.6: dependencies: '@jridgewell/trace-mapping': 0.3.30 - debug: 4.4.1 + debug: 4.4.3 istanbul-lib-coverage: 3.2.2 transitivePeerDependencies: - supports-color @@ -23360,7 +23382,7 @@ snapshots: micromark@2.11.4: dependencies: - debug: 4.4.1 + debug: 4.4.3 parse-entities: 2.0.0 transitivePeerDependencies: - supports-color @@ -24787,7 +24809,7 @@ snapshots: socks-proxy-agent@8.0.5: dependencies: agent-base: 7.1.3 - debug: 4.4.1 + debug: 4.4.3 socks: 2.8.4 transitivePeerDependencies: - supports-color @@ -25189,6 +25211,11 @@ snapshots: fdir: 6.4.5(picomatch@4.0.3) picomatch: 4.0.3 + tinyglobby@0.2.15: + dependencies: + fdir: 6.5.0(picomatch@4.0.3) + picomatch: 4.0.3 + tinylogic@2.0.0: {} tldts-core@6.1.86: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 8a38bd6f44..d3c555b4ce 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -129,6 +129,7 @@ catalog: '@types/zkochan__table': npm:@types/table@6.0.0 '@typescript-eslint/eslint-plugin': 6.18.1 '@typescript-eslint/parser': 6.18.1 + '@typescript-eslint/utils': 6.18.1 '@yarnpkg/core': 4.2.0 '@yarnpkg/extensions': 2.0.3 '@yarnpkg/lockfile': ^1.1.0 diff --git a/resolving/npm-resolver/src/index.ts b/resolving/npm-resolver/src/index.ts index 2cb3b27be3..2caaaf0e01 100644 --- a/resolving/npm-resolver/src/index.ts +++ b/resolving/npm-resolver/src/index.ts @@ -527,7 +527,7 @@ function tryResolveFromWorkspacePackages ( 'WORKSPACE_PKG_NOT_FOUND', `In ${path.relative(process.cwd(), opts.projectDir)}: "${spec.name}@${opts.wantedDependency.bareSpecifier ?? ''}" is in the dependencies but no package named "${spec.name}" is present in the workspace`, { - hint: 'Packages found in the workspace: ' + Object.keys(workspacePackages).join(', '), + hint: 'Packages found in the workspace: ' + Array.from(workspacePackages.keys()).join(', '), } ) }