@pnpm/releasing.commands 1100.2.6 → 1100.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -28,7 +28,10 @@ export async function publishPackedPkg(packResult, opts) {
28
28
  throw await createFailedToPublishError(packResult, response);
29
29
  }
30
30
  async function createPublishOptions(manifest, options) {
31
- const { registry, config } = findRegistryInfo(manifest, options);
31
+ const publishConfigRegistry = typeof manifest.publishConfig?.registry === 'string'
32
+ ? manifest.publishConfig.registry
33
+ : undefined;
34
+ const { registry, config } = findRegistryInfo(manifest, options, publishConfigRegistry);
32
35
  const { creds, tls } = config ?? {};
33
36
  const { access, ci: isFromCI, fetchRetries, fetchRetryFactor, fetchRetryMaxtimeout, fetchRetryMintimeout, fetchTimeout: timeout, otp, provenance, provenanceFile, tag: defaultTag, userAgent, } = options;
34
37
  const headers = {
@@ -75,12 +78,14 @@ async function createPublishOptions(manifest, options) {
75
78
  /**
76
79
  * Find credentials and SSL info for a package's registry.
77
80
  * Follows {@link https://docs.npmjs.com/cli/v10/configuring-npm/npmrc#auth-related-configuration}.
81
+ *
82
+ * The manifest's `publishConfig.registry`, when set, takes precedence over `registries`.
78
83
  */
79
- function findRegistryInfo({ name }, { configByUri, registries }) {
84
+ function findRegistryInfo({ name }, { configByUri, registries }, publishConfigRegistry) {
80
85
  // eslint-disable-next-line regexp/no-unused-capturing-group
81
86
  const scopedMatches = /@(?<scope>[^/]+)\/(?<slug>[^/]+)/.exec(name);
82
87
  const registryName = scopedMatches?.groups ? `@${scopedMatches.groups.scope}` : 'default';
83
- const nonNormalizedRegistry = registries[registryName] ?? registries.default;
88
+ const nonNormalizedRegistry = publishConfigRegistry ?? registries[registryName] ?? registries.default;
84
89
  const supportedRegistryInfo = parseSupportedRegistryUrl(nonNormalizedRegistry);
85
90
  if (!supportedRegistryInfo) {
86
91
  throw new PublishUnsupportedRegistryProtocolError(nonNormalizedRegistry);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pnpm/releasing.commands",
3
- "version": "1100.2.6",
3
+ "version": "1100.2.7",
4
4
  "description": "Commands for deploy, pack, and publish",
5
5
  "keywords": [
6
6
  "pnpm",
@@ -47,35 +47,35 @@
47
47
  "validate-npm-package-name": "7.0.2",
48
48
  "write-json-file": "^7.0.0",
49
49
  "write-yaml-file": "^6.0.0",
50
- "@pnpm/bins.resolver": "1100.0.2",
50
+ "@pnpm/catalogs.types": "1100.0.0",
51
51
  "@pnpm/cli.common-cli-options-help": "1100.0.1",
52
52
  "@pnpm/cli.utils": "1101.0.2",
53
- "@pnpm/config.pick-registry-for-package": "1100.0.2",
54
53
  "@pnpm/config.reader": "1101.1.4",
55
- "@pnpm/deps.path": "1100.0.2",
56
- "@pnpm/engine.runtime.commands": "1100.0.9",
54
+ "@pnpm/bins.resolver": "1100.0.2",
57
55
  "@pnpm/constants": "1100.0.0",
58
- "@pnpm/error": "1100.0.0",
56
+ "@pnpm/config.pick-registry-for-package": "1100.0.2",
57
+ "@pnpm/engine.runtime.commands": "1100.0.9",
59
58
  "@pnpm/engine.runtime.node-resolver": "1101.0.3",
59
+ "@pnpm/deps.path": "1100.0.2",
60
60
  "@pnpm/exec.lifecycle": "1100.0.5",
61
- "@pnpm/fetching.directory-fetcher": "1100.0.5",
62
61
  "@pnpm/exec.pnpm-cli-runner": "1100.0.0",
63
- "@pnpm/fs.is-empty-dir-or-nothing": "1100.0.0",
64
62
  "@pnpm/fs.indexed-pkg-importer": "1100.0.4",
65
- "@pnpm/fs.packlist": "1100.0.0",
63
+ "@pnpm/fs.is-empty-dir-or-nothing": "1100.0.0",
64
+ "@pnpm/error": "1100.0.0",
65
+ "@pnpm/fetching.directory-fetcher": "1100.0.5",
66
66
  "@pnpm/installing.client": "1100.0.8",
67
- "@pnpm/lockfile.fs": "1100.0.4",
68
- "@pnpm/lockfile.types": "1100.0.3",
69
- "@pnpm/installing.commands": "1100.1.7",
70
- "@pnpm/network.git-utils": "1100.0.1",
67
+ "@pnpm/installing.commands": "1100.1.8",
68
+ "@pnpm/network.fetch": "1100.0.2",
71
69
  "@pnpm/network.web-auth": "1101.0.0",
70
+ "@pnpm/lockfile.types": "1100.0.3",
72
71
  "@pnpm/releasing.exportable-manifest": "1100.0.3",
73
- "@pnpm/network.fetch": "1100.0.2",
72
+ "@pnpm/network.git-utils": "1100.0.1",
74
73
  "@pnpm/types": "1101.0.0",
75
- "@pnpm/resolving.resolver-base": "1100.1.1",
74
+ "@pnpm/lockfile.fs": "1100.0.4",
76
75
  "@pnpm/workspace.projects-sorter": "1100.0.1",
77
- "@pnpm/workspace.projects-filter": "1100.0.7",
78
- "@pnpm/catalogs.types": "1100.0.0"
76
+ "@pnpm/resolving.resolver-base": "1100.1.1",
77
+ "@pnpm/fs.packlist": "1100.0.0",
78
+ "@pnpm/workspace.projects-filter": "1100.0.7"
79
79
  },
80
80
  "peerDependencies": {
81
81
  "@pnpm/logger": ">=1001.0.0 <1002.0.0"
@@ -98,15 +98,15 @@
98
98
  "load-json-file": "^7.0.1",
99
99
  "tar": "^7.5.10",
100
100
  "write-yaml-file": "^6.0.0",
101
- "@pnpm/catalogs.config": "1100.0.0",
102
101
  "@pnpm/assert-project": "1100.0.4",
103
- "@pnpm/logger": "1100.0.0",
104
102
  "@pnpm/hooks.pnpmfile": "1100.0.4",
105
- "@pnpm/releasing.commands": "1100.2.6",
103
+ "@pnpm/catalogs.config": "1100.0.0",
106
104
  "@pnpm/prepare": "1100.0.4",
105
+ "@pnpm/logger": "1100.0.0",
106
+ "@pnpm/releasing.commands": "1100.2.7",
107
107
  "@pnpm/test-ipc-server": "1100.0.0",
108
- "@pnpm/testing.command-defaults": "1100.0.1",
109
- "@pnpm/test-fixtures": "1100.0.0"
108
+ "@pnpm/test-fixtures": "1100.0.0",
109
+ "@pnpm/testing.command-defaults": "1100.0.1"
110
110
  },
111
111
  "engines": {
112
112
  "node": ">=22.13"