@anolilab/semantic-release-pnpm 8.1.13 → 8.1.15
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.
- package/CHANGELOG.md +18 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +29 -10
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## @anolilab/semantic-release-pnpm [8.1.15](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-pnpm@8.1.14...@anolilab/semantic-release-pnpm@8.1.15) (2026-05-26)
|
|
2
|
+
|
|
3
|
+
### Bug Fixes
|
|
4
|
+
|
|
5
|
+
* **semantic-release-pnpm:** handle non-AggregateError in verify and skip re-publish ([#309](https://github.com/anolilab/semantic-release/issues/309)) ([6acb075](https://github.com/anolilab/semantic-release/commit/6acb075cbd3e7abf1f8c0d5417ffb661fd331646))
|
|
6
|
+
* **semantic-release-pnpm:** soft-fail whoami for non-official registries ([#310](https://github.com/anolilab/semantic-release/issues/310)) ([b041d88](https://github.com/anolilab/semantic-release/commit/b041d88374957b254cc4f4561a44467a422918a9))
|
|
7
|
+
|
|
8
|
+
### Miscellaneous Chores
|
|
9
|
+
|
|
10
|
+
* **deps:** bump deps and upgrade to pnpm 11 ([#312](https://github.com/anolilab/semantic-release/issues/312)) ([100be77](https://github.com/anolilab/semantic-release/commit/100be77953d6c51f595b01fd092a2a83c011ed0b))
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
### Dependencies
|
|
14
|
+
|
|
15
|
+
* **@anolilab/rc:** upgraded to 4.0.3
|
|
16
|
+
|
|
17
|
+
## @anolilab/semantic-release-pnpm [8.1.14](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-pnpm@8.1.13...@anolilab/semantic-release-pnpm@8.1.14) (2026-05-23)
|
|
18
|
+
|
|
1
19
|
## @anolilab/semantic-release-pnpm [8.1.13](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-pnpm@8.1.12...@anolilab/semantic-release-pnpm@8.1.13) (2026-05-23)
|
|
2
20
|
|
|
3
21
|
## @anolilab/semantic-release-pnpm [8.1.12](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-pnpm@8.1.11...@anolilab/semantic-release-pnpm@8.1.12) (2026-05-23)
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -18,7 +18,7 @@ const __cjs_getBuiltinModule = (module) => {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
import dbg from 'debug';
|
|
21
|
-
import { execa } from 'execa';
|
|
21
|
+
import { execa, ExecaError } from 'execa';
|
|
22
22
|
import { validRange, major, gte } from 'semver';
|
|
23
23
|
import { isAccessibleSync, ensureFileSync, isAccessible, readJson, writeJson, move, writeFile } from '@visulima/fs';
|
|
24
24
|
import { resolve } from '@visulima/path';
|
|
@@ -199,6 +199,21 @@ const prepare$1 = async ({ pkgRoot, tarballDir }, { cwd, env, logger, nextReleas
|
|
|
199
199
|
};
|
|
200
200
|
|
|
201
201
|
const debug$6 = dbg("semantic-release-pnpm:publish");
|
|
202
|
+
const ALREADY_PUBLISHED_PHRASE = "cannot publish over the previously published versions";
|
|
203
|
+
const isAlreadyPublishedError = (error) => {
|
|
204
|
+
const haystacks = [error.stderr, error.shortMessage, error.message].filter((value) => typeof value === "string");
|
|
205
|
+
return haystacks.some((value) => value.includes(ALREADY_PUBLISHED_PHRASE));
|
|
206
|
+
};
|
|
207
|
+
const handlePublishError = (error, packageJson, context, distributionTag, registry) => {
|
|
208
|
+
const { logger, nextRelease: { version } } = context;
|
|
209
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
210
|
+
if (error instanceof ExecaError && isAlreadyPublishedError(error)) {
|
|
211
|
+
logger.log(`Package ${packageJson.name ?? ""}@${version} is already published at dist-tag @${distributionTag} on ${registry}, skipping`);
|
|
212
|
+
return getReleaseInfo(packageJson, context, distributionTag, registry);
|
|
213
|
+
}
|
|
214
|
+
logger.log(`Failed to publish ${packageJson.name ?? ""}@${version} to dist-tag @${distributionTag} on ${registry}: ${errorMessage}`);
|
|
215
|
+
throw new AggregateError([error], errorMessage, { cause: error });
|
|
216
|
+
};
|
|
202
217
|
const publish$1 = async (pluginConfig, packageJson, context) => {
|
|
203
218
|
const {
|
|
204
219
|
cwd,
|
|
@@ -237,9 +252,7 @@ const publish$1 = async (pluginConfig, packageJson, context) => {
|
|
|
237
252
|
try {
|
|
238
253
|
await result;
|
|
239
254
|
} catch (error) {
|
|
240
|
-
|
|
241
|
-
logger.log(`Failed to publish ${packageJson.name ?? ""}@${version} to dist-tag @${distributionTag} on ${registry}: ${errorMessage}`);
|
|
242
|
-
throw new AggregateError([error], errorMessage, { cause: error });
|
|
255
|
+
return handlePublishError(error, packageJson, context, distributionTag, registry);
|
|
243
256
|
}
|
|
244
257
|
logger.log(`Published ${packageJson.name ?? ""}@${version} to dist-tag @${distributionTag} on ${registry}`);
|
|
245
258
|
return getReleaseInfo(packageJson, context, distributionTag, registry);
|
|
@@ -576,11 +589,17 @@ const verifyAuthContextAgainstRegistry = async (npmrc, registry, context) => {
|
|
|
576
589
|
}
|
|
577
590
|
} catch (error) {
|
|
578
591
|
if (isConnectionError(error)) {
|
|
579
|
-
const
|
|
580
|
-
throw new AggregateError([
|
|
592
|
+
const semanticError = getError("EINVALIDNPMAUTH", { registry });
|
|
593
|
+
throw new AggregateError([semanticError], semanticError.message, { cause: error });
|
|
581
594
|
}
|
|
582
|
-
|
|
583
|
-
|
|
595
|
+
if (normalizeUrl(registry) === normalizeUrl(OFFICIAL_REGISTRY)) {
|
|
596
|
+
const semanticError = getError("EINVALIDNPMTOKEN", { registry });
|
|
597
|
+
throw new AggregateError([semanticError], semanticError.message, { cause: error });
|
|
598
|
+
}
|
|
599
|
+
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
600
|
+
context.logger.warn(
|
|
601
|
+
`Could not verify auth via "pnpm whoami" on custom registry "${registry}" (${errorMessage}). This registry may not support /-/whoami for the configured token type (e.g. GitLab Package Registry with deploy tokens). The publish step will surface any real credential errors.`
|
|
602
|
+
);
|
|
584
603
|
}
|
|
585
604
|
})();
|
|
586
605
|
whoamiCache.set(cacheKey, verificationPromise);
|
|
@@ -678,7 +697,7 @@ const verify = async (pluginConfig, context) => {
|
|
|
678
697
|
} catch (error) {
|
|
679
698
|
const typedError = error;
|
|
680
699
|
errorsMessage += typedError.message;
|
|
681
|
-
errors = [...errors, ...typedError.errors];
|
|
700
|
+
errors = [...errors, ...Array.isArray(typedError.errors) ? typedError.errors : [typedError]];
|
|
682
701
|
}
|
|
683
702
|
try {
|
|
684
703
|
const packageJson = await getPackage(pluginConfig, context);
|
|
@@ -692,7 +711,7 @@ const verify = async (pluginConfig, context) => {
|
|
|
692
711
|
} catch (error) {
|
|
693
712
|
const typedError = error;
|
|
694
713
|
errorsMessage += typedError.message;
|
|
695
|
-
errors = [...errors, ...typedError.errors];
|
|
714
|
+
errors = [...errors, ...Array.isArray(typedError.errors) ? typedError.errors : [typedError]];
|
|
696
715
|
}
|
|
697
716
|
if (errors.length > 0) {
|
|
698
717
|
throw new AggregateError(errors, errorsMessage);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@anolilab/semantic-release-pnpm",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.15",
|
|
4
4
|
"description": "Semantic-release plugin to publish a npm package with pnpm.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
],
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@actions/core": "3.0.1",
|
|
64
|
-
"@anolilab/rc": "4.0.
|
|
64
|
+
"@anolilab/rc": "4.0.3",
|
|
65
65
|
"@semantic-release/error": "^4.0.0",
|
|
66
66
|
"@visulima/fs": "^4.1.0",
|
|
67
67
|
"@visulima/package": "^4.1.7",
|
|
@@ -69,10 +69,10 @@
|
|
|
69
69
|
"debug": "^4.4.3",
|
|
70
70
|
"env-ci": "^11.2.0",
|
|
71
71
|
"execa": "^9.6.1",
|
|
72
|
-
"ini": "^
|
|
73
|
-
"normalize-url": "9.0.
|
|
72
|
+
"ini": "^7.0.0",
|
|
73
|
+
"normalize-url": "9.0.1",
|
|
74
74
|
"registry-auth-token": "5.1.1",
|
|
75
|
-
"semver": "7.8.
|
|
75
|
+
"semver": "7.8.1"
|
|
76
76
|
},
|
|
77
77
|
"engines": {
|
|
78
78
|
"node": "^22.14.0 || >=24.10.0"
|