mirror of
https://github.com/pnpm/pnpm.git
synced 2026-05-31 12:10:49 -04:00
* feat(registry-access): extract setDistTag and dogfood from tests
Add `@pnpm/registry-access.commands#setDistTag` — the low-level PUT to
`/-/package/:pkg/dist-tags/:tag`. The CLI `dist-tag add` handler now
calls it instead of issuing the fetch inline.
Tests in this monorepo now use a thin new package
`@pnpm/testing.registry-mock` (REGISTRY_MOCK_PORT + REGISTRY_MOCK_CREDENTIALS
baked in) that delegates to `setDistTag`, replacing `addDistTag` from
`@pnpm/registry-mock`. That dropped helper relied on
`anonymous-npm-registry-client` and a verdaccio-era
fetch-then-DELETE-then-PUT dance that is no longer needed against
pnpm-registry.
39 test files swapped from `@pnpm/registry-mock` to
`@pnpm/testing.registry-mock`.
* fix: move setDistTag to its own package to break tsconfig project-reference cycle
testing/registry-mock → registry-access.commands → releasing/commands
→ installing/commands → installing/deps-installer → testing/registry-mock.
Extract setDistTag into @pnpm/registry-access.set-dist-tag (only depends
on @pnpm/error, @pnpm/network.fetch, @pnpm/npm-package-arg). Both
@pnpm/registry-access.commands and @pnpm/testing.registry-mock import
from it. Cycle gone.
* feat(registry-access): extract addUser helper, dogfood from login + tests
Add @pnpm/registry-access.add-user — a small helper that PUTs to
/-/user/org.couchdb.user:<name> and returns { token }. The CLI's
classicLogin (pnpm login fallback path) now calls it, and tests
use it via @pnpm/testing.registry-mock instead of the legacy
addUser from @pnpm/registry-mock.
Swapped 3 call sites: globalSetup.js, installing/deps-installer's
auth.ts, and pnpm/test/dlx.ts. AddUserHttpError exposes status +
text + parsed-json-if-applicable + headers so the CLI can still
do its OTP detection. One webauth-OTP login test mock had to be
adjusted to provide its body via `text` (JSON-stringified) rather
than `json` only, since the helper consumes the body via `text()`.
* refactor: consolidate set-dist-tag + add-user helpers into one @pnpm/registry-access.client package
One shared package is better than splitting per endpoint. Future endpoints
(publish, deprecate, etc.) can land here without another wrapper.
No behavioral change — same setDistTag and addUser exports as before,
just under one roof. Callers updated: registry-access.commands,
auth.commands, testing.registry-mock.
* fix(registry-access): sort imports
167 lines
2.9 KiB
JSON
167 lines
2.9 KiB
JSON
{
|
|
"extends": "@pnpm/tsconfig",
|
|
"compilerOptions": {
|
|
"outDir": "lib",
|
|
"rootDir": "src"
|
|
},
|
|
"include": [
|
|
"src/**/*.ts",
|
|
"../../__typings__/**/*.d.ts"
|
|
],
|
|
"references": [
|
|
{
|
|
"path": "../../__utils__/assert-project"
|
|
},
|
|
{
|
|
"path": "../../__utils__/prepare"
|
|
},
|
|
{
|
|
"path": "../../__utils__/test-fixtures"
|
|
},
|
|
{
|
|
"path": "../../__utils__/test-ipc-server"
|
|
},
|
|
{
|
|
"path": "../../building/after-install"
|
|
},
|
|
{
|
|
"path": "../../catalogs/types"
|
|
},
|
|
{
|
|
"path": "../../cli/command"
|
|
},
|
|
{
|
|
"path": "../../cli/common-cli-options-help"
|
|
},
|
|
{
|
|
"path": "../../cli/utils"
|
|
},
|
|
{
|
|
"path": "../../config/matcher"
|
|
},
|
|
{
|
|
"path": "../../config/pick-registry-for-package"
|
|
},
|
|
{
|
|
"path": "../../config/reader"
|
|
},
|
|
{
|
|
"path": "../../config/writer"
|
|
},
|
|
{
|
|
"path": "../../core/constants"
|
|
},
|
|
{
|
|
"path": "../../core/error"
|
|
},
|
|
{
|
|
"path": "../../core/logger"
|
|
},
|
|
{
|
|
"path": "../../core/types"
|
|
},
|
|
{
|
|
"path": "../../deps/inspection/outdated"
|
|
},
|
|
{
|
|
"path": "../../deps/path"
|
|
},
|
|
{
|
|
"path": "../../deps/status"
|
|
},
|
|
{
|
|
"path": "../../fs/graceful-fs"
|
|
},
|
|
{
|
|
"path": "../../fs/read-modules-dir"
|
|
},
|
|
{
|
|
"path": "../../global/commands"
|
|
},
|
|
{
|
|
"path": "../../hooks/pnpmfile"
|
|
},
|
|
{
|
|
"path": "../../lockfile/types"
|
|
},
|
|
{
|
|
"path": "../../pkg-manifest/reader"
|
|
},
|
|
{
|
|
"path": "../../pkg-manifest/utils"
|
|
},
|
|
{
|
|
"path": "../../resolving/npm-resolver"
|
|
},
|
|
{
|
|
"path": "../../resolving/parse-wanted-dependency"
|
|
},
|
|
{
|
|
"path": "../../resolving/resolver-base"
|
|
},
|
|
{
|
|
"path": "../../store/connection-manager"
|
|
},
|
|
{
|
|
"path": "../../store/controller"
|
|
},
|
|
{
|
|
"path": "../../store/index"
|
|
},
|
|
{
|
|
"path": "../../testing/command-defaults"
|
|
},
|
|
{
|
|
"path": "../../testing/mock-agent"
|
|
},
|
|
{
|
|
"path": "../../testing/registry-mock"
|
|
},
|
|
{
|
|
"path": "../../worker"
|
|
},
|
|
{
|
|
"path": "../../workspace/project-manifest-reader"
|
|
},
|
|
{
|
|
"path": "../../workspace/project-manifest-writer"
|
|
},
|
|
{
|
|
"path": "../../workspace/projects-filter"
|
|
},
|
|
{
|
|
"path": "../../workspace/projects-graph"
|
|
},
|
|
{
|
|
"path": "../../workspace/projects-reader"
|
|
},
|
|
{
|
|
"path": "../../workspace/projects-sorter"
|
|
},
|
|
{
|
|
"path": "../../workspace/root-finder"
|
|
},
|
|
{
|
|
"path": "../../workspace/state"
|
|
},
|
|
{
|
|
"path": "../../workspace/workspace-manifest-writer"
|
|
},
|
|
{
|
|
"path": "../context"
|
|
},
|
|
{
|
|
"path": "../dedupe/check"
|
|
},
|
|
{
|
|
"path": "../deps-installer"
|
|
},
|
|
{
|
|
"path": "../env-installer"
|
|
},
|
|
{
|
|
"path": "../modules-yaml"
|
|
}
|
|
]
|
|
}
|