From c92f4bf28201f57206412f8a1a5f243e47a17b96 Mon Sep 17 00:00:00 2001 From: Zoltan Kochan Date: Sun, 28 Jul 2024 01:42:38 +0200 Subject: [PATCH] refactor: rename lockfile-walker to lockfile.walker --- .changeset/loud-grapes-draw.md | 5 ++ exec/plugin-commands-rebuild/package.json | 2 +- .../src/implementation/index.ts | 2 +- exec/plugin-commands-rebuild/tsconfig.json | 6 +- lockfile/audit/package.json | 2 +- lockfile/audit/src/lockfileToAuditTree.ts | 2 +- lockfile/audit/tsconfig.json | 6 +- lockfile/filtering/package.json | 2 +- .../src/filterLockfileByImporters.ts | 2 +- lockfile/filtering/tsconfig.json | 6 +- .../{lockfile-walker => walker}/CHANGELOG.md | 0 .../{lockfile-walker => walker}/README.md | 0 .../{lockfile-walker => walker}/package.json | 10 +-- .../{lockfile-walker => walker}/src/index.ts | 0 .../{lockfile-walker => walker}/tsconfig.json | 0 .../tsconfig.lint.json | 0 pkg-manager/core/package.json | 2 +- pkg-manager/core/tsconfig.json | 6 +- pkg-manager/hoist/package.json | 2 +- pkg-manager/hoist/src/index.ts | 2 +- pkg-manager/hoist/tsconfig.json | 6 +- pnpm-lock.yaml | 74 +++++++++---------- reviewing/license-scanner/package.json | 2 +- .../src/lockfileToLicenseNodeTree.ts | 2 +- reviewing/license-scanner/tsconfig.json | 6 +- 25 files changed, 76 insertions(+), 71 deletions(-) create mode 100644 .changeset/loud-grapes-draw.md rename lockfile/{lockfile-walker => walker}/CHANGELOG.md (100%) rename lockfile/{lockfile-walker => walker}/README.md (100%) rename lockfile/{lockfile-walker => walker}/package.json (81%) rename lockfile/{lockfile-walker => walker}/src/index.ts (100%) rename lockfile/{lockfile-walker => walker}/tsconfig.json (100%) rename lockfile/{lockfile-walker => walker}/tsconfig.lint.json (100%) diff --git a/.changeset/loud-grapes-draw.md b/.changeset/loud-grapes-draw.md new file mode 100644 index 0000000000..c58bdf2a2d --- /dev/null +++ b/.changeset/loud-grapes-draw.md @@ -0,0 +1,5 @@ +--- +"@pnpm/lockfile.walker": major +--- + +Renamed package from `@pnpm/lockfile-walker`. diff --git a/exec/plugin-commands-rebuild/package.json b/exec/plugin-commands-rebuild/package.json index 651d02b3c9..cd8c57333e 100644 --- a/exec/plugin-commands-rebuild/package.json +++ b/exec/plugin-commands-rebuild/package.json @@ -61,7 +61,7 @@ "@pnpm/link-bins": "workspace:*", "@pnpm/lockfile.types": "workspace:*", "@pnpm/lockfile.utils": "workspace:*", - "@pnpm/lockfile-walker": "workspace:*", + "@pnpm/lockfile.walker": "workspace:*", "@pnpm/modules-yaml": "workspace:*", "@pnpm/normalize-registries": "workspace:*", "@pnpm/npm-package-arg": "catalog:", diff --git a/exec/plugin-commands-rebuild/src/implementation/index.ts b/exec/plugin-commands-rebuild/src/implementation/index.ts index e40677257d..7cacf73033 100644 --- a/exec/plugin-commands-rebuild/src/implementation/index.ts +++ b/exec/plugin-commands-rebuild/src/implementation/index.ts @@ -22,7 +22,7 @@ import { packageIsIndependent, type PackageSnapshots, } from '@pnpm/lockfile.utils' -import { lockfileWalker, type LockfileWalkerStep } from '@pnpm/lockfile-walker' +import { lockfileWalker, type LockfileWalkerStep } from '@pnpm/lockfile.walker' import { logger, streamParser } from '@pnpm/logger' import { writeModulesManifest } from '@pnpm/modules-yaml' import { createOrConnectStoreController } from '@pnpm/store-connection-manager' diff --git a/exec/plugin-commands-rebuild/tsconfig.json b/exec/plugin-commands-rebuild/tsconfig.json index 436c73edae..746a8d727e 100644 --- a/exec/plugin-commands-rebuild/tsconfig.json +++ b/exec/plugin-commands-rebuild/tsconfig.json @@ -39,15 +39,15 @@ { "path": "../../deps/graph-sequencer" }, - { - "path": "../../lockfile/lockfile-walker" - }, { "path": "../../lockfile/types" }, { "path": "../../lockfile/utils" }, + { + "path": "../../lockfile/walker" + }, { "path": "../../packages/calc-dep-state" }, diff --git a/lockfile/audit/package.json b/lockfile/audit/package.json index 7b7bde56ca..8b4f4a8276 100644 --- a/lockfile/audit/package.json +++ b/lockfile/audit/package.json @@ -47,7 +47,7 @@ "@pnpm/list": "workspace:*", "@pnpm/lockfile.types": "workspace:*", "@pnpm/lockfile.utils": "workspace:*", - "@pnpm/lockfile-walker": "workspace:*", + "@pnpm/lockfile.walker": "workspace:*", "@pnpm/lockfile.detect-dep-types": "workspace:*", "@pnpm/read-project-manifest": "workspace:*", "@pnpm/types": "workspace:*", diff --git a/lockfile/audit/src/lockfileToAuditTree.ts b/lockfile/audit/src/lockfileToAuditTree.ts index 467cd93ae3..7d884797b1 100644 --- a/lockfile/audit/src/lockfileToAuditTree.ts +++ b/lockfile/audit/src/lockfileToAuditTree.ts @@ -1,7 +1,7 @@ import path from 'path' import { type Lockfile, type TarballResolution } from '@pnpm/lockfile.types' import { nameVerFromPkgSnapshot } from '@pnpm/lockfile.utils' -import { lockfileWalkerGroupImporterSteps, type LockfileWalkerStep } from '@pnpm/lockfile-walker' +import { lockfileWalkerGroupImporterSteps, type LockfileWalkerStep } from '@pnpm/lockfile.walker' import { detectDepTypes, type DepTypes, DepType } from '@pnpm/lockfile.detect-dep-types' import { type DependenciesField, type ProjectId } from '@pnpm/types' import { safeReadProjectManifestOnly } from '@pnpm/read-project-manifest' diff --git a/lockfile/audit/tsconfig.json b/lockfile/audit/tsconfig.json index 64fff3bb95..4792d0e9fa 100644 --- a/lockfile/audit/tsconfig.json +++ b/lockfile/audit/tsconfig.json @@ -39,14 +39,14 @@ { "path": "../fs" }, - { - "path": "../lockfile-walker" - }, { "path": "../types" }, { "path": "../utils" + }, + { + "path": "../walker" } ] } diff --git a/lockfile/filtering/package.json b/lockfile/filtering/package.json index 2886b22eb0..7bd9676f8b 100644 --- a/lockfile/filtering/package.json +++ b/lockfile/filtering/package.json @@ -47,7 +47,7 @@ "@pnpm/error": "workspace:*", "@pnpm/lockfile.types": "workspace:*", "@pnpm/lockfile.utils": "workspace:*", - "@pnpm/lockfile-walker": "workspace:*", + "@pnpm/lockfile.walker": "workspace:*", "@pnpm/package-is-installable": "workspace:*", "@pnpm/types": "workspace:*", "ramda": "catalog:" diff --git a/lockfile/filtering/src/filterLockfileByImporters.ts b/lockfile/filtering/src/filterLockfileByImporters.ts index 2e59f54933..fbe4e0391a 100644 --- a/lockfile/filtering/src/filterLockfileByImporters.ts +++ b/lockfile/filtering/src/filterLockfileByImporters.ts @@ -4,7 +4,7 @@ import { type Lockfile, type PackageSnapshots, } from '@pnpm/lockfile.types' -import { lockfileWalker, type LockfileWalkerStep } from '@pnpm/lockfile-walker' +import { lockfileWalker, type LockfileWalkerStep } from '@pnpm/lockfile.walker' import { logger } from '@pnpm/logger' import { type DependenciesField, type DepPath, type ProjectId } from '@pnpm/types' import { filterImporter } from './filterImporter' diff --git a/lockfile/filtering/tsconfig.json b/lockfile/filtering/tsconfig.json index 394616c5e0..c87f7e45f0 100644 --- a/lockfile/filtering/tsconfig.json +++ b/lockfile/filtering/tsconfig.json @@ -24,14 +24,14 @@ { "path": "../../packages/types" }, - { - "path": "../lockfile-walker" - }, { "path": "../types" }, { "path": "../utils" + }, + { + "path": "../walker" } ] } diff --git a/lockfile/lockfile-walker/CHANGELOG.md b/lockfile/walker/CHANGELOG.md similarity index 100% rename from lockfile/lockfile-walker/CHANGELOG.md rename to lockfile/walker/CHANGELOG.md diff --git a/lockfile/lockfile-walker/README.md b/lockfile/walker/README.md similarity index 100% rename from lockfile/lockfile-walker/README.md rename to lockfile/walker/README.md diff --git a/lockfile/lockfile-walker/package.json b/lockfile/walker/package.json similarity index 81% rename from lockfile/lockfile-walker/package.json rename to lockfile/walker/package.json index d67e254708..f1c260234d 100644 --- a/lockfile/lockfile-walker/package.json +++ b/lockfile/walker/package.json @@ -1,6 +1,6 @@ { - "name": "@pnpm/lockfile-walker", - "version": "9.0.4", + "name": "@pnpm/lockfile.walker", + "version": "0.0.0", "description": "Walk over all the dependencies in a lockfile", "main": "lib/index.js", "types": "lib/index.d.ts", @@ -17,7 +17,7 @@ "prepublishOnly": "pnpm run compile", "compile": "tsc --build && pnpm run lint --fix" }, - "repository": "https://github.com/pnpm/pnpm/blob/main/lockfile/lockfile-walker", + "repository": "https://github.com/pnpm/pnpm/blob/main/lockfile/walker", "keywords": [ "pnpm9", "pnpm", @@ -28,9 +28,9 @@ "bugs": { "url": "https://github.com/pnpm/pnpm/issues" }, - "homepage": "https://github.com/pnpm/pnpm/blob/main/lockfile/lockfile-walker#readme", + "homepage": "https://github.com/pnpm/pnpm/blob/main/lockfile/walker#readme", "devDependencies": { - "@pnpm/lockfile-walker": "workspace:*", + "@pnpm/lockfile.walker": "workspace:*", "tempy": "catalog:" }, "dependencies": { diff --git a/lockfile/lockfile-walker/src/index.ts b/lockfile/walker/src/index.ts similarity index 100% rename from lockfile/lockfile-walker/src/index.ts rename to lockfile/walker/src/index.ts diff --git a/lockfile/lockfile-walker/tsconfig.json b/lockfile/walker/tsconfig.json similarity index 100% rename from lockfile/lockfile-walker/tsconfig.json rename to lockfile/walker/tsconfig.json diff --git a/lockfile/lockfile-walker/tsconfig.lint.json b/lockfile/walker/tsconfig.lint.json similarity index 100% rename from lockfile/lockfile-walker/tsconfig.lint.json rename to lockfile/walker/tsconfig.lint.json diff --git a/pkg-manager/core/package.json b/pkg-manager/core/package.json index 64e562afa9..786ba815fe 100644 --- a/pkg-manager/core/package.json +++ b/pkg-manager/core/package.json @@ -39,7 +39,7 @@ "@pnpm/lockfile.fs": "workspace:*", "@pnpm/lockfile-to-pnp": "workspace:*", "@pnpm/lockfile.utils": "workspace:*", - "@pnpm/lockfile-walker": "workspace:*", + "@pnpm/lockfile.walker": "workspace:*", "@pnpm/lockfile.preferred-versions": "workspace:*", "@pnpm/manifest-utils": "workspace:*", "@pnpm/matcher": "workspace:*", diff --git a/pkg-manager/core/tsconfig.json b/pkg-manager/core/tsconfig.json index 252d609c4b..ae43939ba8 100644 --- a/pkg-manager/core/tsconfig.json +++ b/pkg-manager/core/tsconfig.json @@ -72,9 +72,6 @@ { "path": "../../lockfile/lockfile-to-pnp" }, - { - "path": "../../lockfile/lockfile-walker" - }, { "path": "../../lockfile/preferred-versions" }, @@ -90,6 +87,9 @@ { "path": "../../lockfile/verification" }, + { + "path": "../../lockfile/walker" + }, { "path": "../../packages/calc-dep-state" }, diff --git a/pkg-manager/hoist/package.json b/pkg-manager/hoist/package.json index 614f2ca870..4bac7aff77 100644 --- a/pkg-manager/hoist/package.json +++ b/pkg-manager/hoist/package.json @@ -45,7 +45,7 @@ "@pnpm/link-bins": "workspace:*", "@pnpm/lockfile.types": "workspace:*", "@pnpm/lockfile.utils": "workspace:*", - "@pnpm/lockfile-walker": "workspace:*", + "@pnpm/lockfile.walker": "workspace:*", "@pnpm/matcher": "workspace:*", "@pnpm/types": "workspace:*", "@pnpm/util.lex-comparator": "catalog:", diff --git a/pkg-manager/hoist/src/index.ts b/pkg-manager/hoist/src/index.ts index 1535f15cc7..1155bebb3e 100644 --- a/pkg-manager/hoist/src/index.ts +++ b/pkg-manager/hoist/src/index.ts @@ -7,7 +7,7 @@ import { type Lockfile, nameVerFromPkgSnapshot, } from '@pnpm/lockfile.utils' -import { lockfileWalker, type LockfileWalkerStep } from '@pnpm/lockfile-walker' +import { lockfileWalker, type LockfileWalkerStep } from '@pnpm/lockfile.walker' import { logger } from '@pnpm/logger' import { createMatcher } from '@pnpm/matcher' import { type DepPath, type HoistedDependencies, type ProjectId } from '@pnpm/types' diff --git a/pkg-manager/hoist/tsconfig.json b/pkg-manager/hoist/tsconfig.json index b3978f0507..6a8928d9d6 100644 --- a/pkg-manager/hoist/tsconfig.json +++ b/pkg-manager/hoist/tsconfig.json @@ -12,15 +12,15 @@ { "path": "../../config/matcher" }, - { - "path": "../../lockfile/lockfile-walker" - }, { "path": "../../lockfile/types" }, { "path": "../../lockfile/utils" }, + { + "path": "../../lockfile/walker" + }, { "path": "../../packages/constants" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 92762ca00e..aafe5c0bd7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -1949,15 +1949,15 @@ importers: '@pnpm/link-bins': specifier: workspace:* version: link:../../pkg-manager/link-bins - '@pnpm/lockfile-walker': - specifier: workspace:* - version: link:../../lockfile/lockfile-walker '@pnpm/lockfile.types': specifier: workspace:* version: link:../../lockfile/types '@pnpm/lockfile.utils': specifier: workspace:* version: link:../../lockfile/utils + '@pnpm/lockfile.walker': + specifier: workspace:* + version: link:../../lockfile/walker '@pnpm/logger': specifier: ^5.0.0 version: 5.0.0 @@ -2696,9 +2696,6 @@ importers: '@pnpm/list': specifier: workspace:* version: link:../../reviewing/list - '@pnpm/lockfile-walker': - specifier: workspace:* - version: link:../lockfile-walker '@pnpm/lockfile.detect-dep-types': specifier: workspace:* version: link:../detect-dep-types @@ -2708,6 +2705,9 @@ importers: '@pnpm/lockfile.utils': specifier: workspace:* version: link:../utils + '@pnpm/lockfile.walker': + specifier: workspace:* + version: link:../walker '@pnpm/logger': specifier: ^5.0.0 version: 5.0.0 @@ -2770,15 +2770,15 @@ importers: '@pnpm/error': specifier: workspace:* version: link:../../packages/error - '@pnpm/lockfile-walker': - specifier: workspace:* - version: link:../lockfile-walker '@pnpm/lockfile.types': specifier: workspace:* version: link:../types '@pnpm/lockfile.utils': specifier: workspace:* version: link:../utils + '@pnpm/lockfile.walker': + specifier: workspace:* + version: link:../walker '@pnpm/logger': specifier: ^5.0.0 version: 5.0.0 @@ -2939,25 +2939,6 @@ importers: specifier: 'catalog:' version: 0.29.12 - lockfile/lockfile-walker: - dependencies: - '@pnpm/dependency-path': - specifier: workspace:* - version: link:../../packages/dependency-path - '@pnpm/lockfile.types': - specifier: workspace:* - version: link:../types - '@pnpm/types': - specifier: workspace:* - version: link:../../packages/types - devDependencies: - '@pnpm/lockfile-walker': - specifier: workspace:* - version: 'link:' - tempy: - specifier: 'catalog:' - version: 1.0.1 - lockfile/merge-lockfile-changes: dependencies: '@pnpm/lockfile.types': @@ -3217,6 +3198,25 @@ importers: specifier: 'catalog:' version: 7.5.3 + lockfile/walker: + dependencies: + '@pnpm/dependency-path': + specifier: workspace:* + version: link:../../packages/dependency-path + '@pnpm/lockfile.types': + specifier: workspace:* + version: link:../types + '@pnpm/types': + specifier: workspace:* + version: link:../../packages/types + devDependencies: + '@pnpm/lockfile.walker': + specifier: workspace:* + version: 'link:' + tempy: + specifier: 'catalog:' + version: 1.0.1 + modules-mounter/daemon: dependencies: '@pnpm/config': @@ -3873,9 +3873,6 @@ importers: '@pnpm/lockfile-to-pnp': specifier: workspace:* version: link:../../lockfile/lockfile-to-pnp - '@pnpm/lockfile-walker': - specifier: workspace:* - version: link:../../lockfile/lockfile-walker '@pnpm/lockfile.filtering': specifier: workspace:* version: link:../../lockfile/filtering @@ -3891,6 +3888,9 @@ importers: '@pnpm/lockfile.verification': specifier: workspace:* version: link:../../lockfile/verification + '@pnpm/lockfile.walker': + specifier: workspace:* + version: link:../../lockfile/walker '@pnpm/logger': specifier: ^5.0.0 version: 5.0.0 @@ -4372,15 +4372,15 @@ importers: '@pnpm/link-bins': specifier: workspace:* version: link:../link-bins - '@pnpm/lockfile-walker': - specifier: workspace:* - version: link:../../lockfile/lockfile-walker '@pnpm/lockfile.types': specifier: workspace:* version: link:../../lockfile/types '@pnpm/lockfile.utils': specifier: workspace:* version: link:../../lockfile/utils + '@pnpm/lockfile.walker': + specifier: workspace:* + version: link:../../lockfile/walker '@pnpm/logger': specifier: ^5.0.0 version: 5.0.0 @@ -6188,9 +6188,6 @@ importers: '@pnpm/error': specifier: workspace:* version: link:../../packages/error - '@pnpm/lockfile-walker': - specifier: workspace:* - version: link:../../lockfile/lockfile-walker '@pnpm/lockfile.detect-dep-types': specifier: workspace:* version: link:../../lockfile/detect-dep-types @@ -6203,6 +6200,9 @@ importers: '@pnpm/lockfile.utils': specifier: workspace:* version: link:../../lockfile/utils + '@pnpm/lockfile.walker': + specifier: workspace:* + version: link:../../lockfile/walker '@pnpm/logger': specifier: ^5.0.0 version: 5.0.0 diff --git a/reviewing/license-scanner/package.json b/reviewing/license-scanner/package.json index 18baf9e0ac..ca9ef510a0 100644 --- a/reviewing/license-scanner/package.json +++ b/reviewing/license-scanner/package.json @@ -39,7 +39,7 @@ "@pnpm/lockfile.fs": "workspace:*", "@pnpm/lockfile.types": "workspace:*", "@pnpm/lockfile.utils": "workspace:*", - "@pnpm/lockfile-walker": "workspace:*", + "@pnpm/lockfile.walker": "workspace:*", "@pnpm/lockfile.detect-dep-types": "workspace:*", "@pnpm/package-is-installable": "workspace:*", "@pnpm/read-package-json": "workspace:*", diff --git a/reviewing/license-scanner/src/lockfileToLicenseNodeTree.ts b/reviewing/license-scanner/src/lockfileToLicenseNodeTree.ts index b118c664c4..3e3c89b5c7 100644 --- a/reviewing/license-scanner/src/lockfileToLicenseNodeTree.ts +++ b/reviewing/license-scanner/src/lockfileToLicenseNodeTree.ts @@ -4,7 +4,7 @@ import { packageIsInstallable } from '@pnpm/package-is-installable' import { lockfileWalkerGroupImporterSteps, type LockfileWalkerStep, -} from '@pnpm/lockfile-walker' +} from '@pnpm/lockfile.walker' import { type DepTypes, DepType, detectDepTypes } from '@pnpm/lockfile.detect-dep-types' import { type SupportedArchitectures, type DependenciesField, type ProjectId, type Registries } from '@pnpm/types' import { getPkgInfo } from './getPkgInfo' diff --git a/reviewing/license-scanner/tsconfig.json b/reviewing/license-scanner/tsconfig.json index e51e148b2a..6307b3c4b3 100644 --- a/reviewing/license-scanner/tsconfig.json +++ b/reviewing/license-scanner/tsconfig.json @@ -21,15 +21,15 @@ { "path": "../../lockfile/fs" }, - { - "path": "../../lockfile/lockfile-walker" - }, { "path": "../../lockfile/types" }, { "path": "../../lockfile/utils" }, + { + "path": "../../lockfile/walker" + }, { "path": "../../packages/constants" },