@anolilab/semantic-release-pnpm 8.1.16 → 8.1.18
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 +9 -0
- package/dist/index.js +28 -20
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
## @anolilab/semantic-release-pnpm [8.1.18](https://github.com/anolilab/semantic-release/compare/%40anolilab%2Fsemantic-release-pnpm%408.1.17...%40anolilab%2Fsemantic-release-pnpm%408.1.18) (2026-08-10)
|
|
2
|
+
|
|
3
|
+
## @anolilab/semantic-release-pnpm [8.1.17](https://github.com/anolilab/semantic-release/compare/%40anolilab%2Fsemantic-release-pnpm%408.1.16...%40anolilab%2Fsemantic-release-pnpm%408.1.17) (2026-07-23)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Dependencies
|
|
7
|
+
|
|
8
|
+
* **@anolilab/rc:** upgraded to 4.0.5
|
|
9
|
+
|
|
1
10
|
## @anolilab/semantic-release-pnpm [8.1.16](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-pnpm@8.1.15...@anolilab/semantic-release-pnpm@8.1.16) (2026-06-20)
|
|
2
11
|
|
|
3
12
|
### Bug Fixes
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
import { createRequire as __cjs_createRequire } from "node:module";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
let __cjs_cachedRequire;
|
|
4
|
+
const __cjs_require = (id) => {
|
|
5
|
+
return (__cjs_cachedRequire ??= __cjs_createRequire(import.meta.url))(id);
|
|
6
|
+
};
|
|
4
7
|
|
|
5
8
|
const __cjs_getProcess = typeof globalThis !== "undefined" && typeof globalThis.process !== "undefined" ? globalThis.process : process;
|
|
6
9
|
|
|
@@ -45,10 +48,10 @@ const getChannel = (channel) => {
|
|
|
45
48
|
};
|
|
46
49
|
|
|
47
50
|
const getNpmrcPath = (cwd, environment) => {
|
|
48
|
-
const npmrcPath = resolve(cwd, ".npmrc");
|
|
49
51
|
if (environment.NPM_CONFIG_USERCONFIG && isAccessibleSync(environment.NPM_CONFIG_USERCONFIG)) {
|
|
50
52
|
return environment.NPM_CONFIG_USERCONFIG;
|
|
51
53
|
}
|
|
54
|
+
const npmrcPath = resolve(cwd, ".npmrc");
|
|
52
55
|
if (isAccessibleSync(npmrcPath)) {
|
|
53
56
|
return npmrcPath;
|
|
54
57
|
}
|
|
@@ -73,7 +76,7 @@ const getRegistryUrl = (scope, npmrc) => {
|
|
|
73
76
|
const getRegistry = ({ name, publishConfig = {} }, { cwd, env }) => {
|
|
74
77
|
let resolvedRegistry;
|
|
75
78
|
let source;
|
|
76
|
-
const scope = name.split("/")[0];
|
|
79
|
+
const scope = name.split("/", 1)[0];
|
|
77
80
|
const publishRegistry = publishConfig[`${scope}:registry`] ?? publishConfig.registry;
|
|
78
81
|
if (publishRegistry) {
|
|
79
82
|
resolvedRegistry = publishRegistry;
|
|
@@ -89,8 +92,10 @@ const getRegistry = ({ name, publishConfig = {} }, { cwd, env }) => {
|
|
|
89
92
|
});
|
|
90
93
|
const npmrc = npmrcConfig.config;
|
|
91
94
|
resolvedRegistry = getRegistryUrl(scope, npmrc);
|
|
92
|
-
if (npmrc && (npmrc
|
|
93
|
-
source = `.npmrc file (
|
|
95
|
+
if (npmrc && Object.hasOwn(npmrc, `${scope}:registry`)) {
|
|
96
|
+
source = `.npmrc file (scoped registry for ${scope})`;
|
|
97
|
+
} else if (npmrc && Object.hasOwn(npmrc, "registry")) {
|
|
98
|
+
source = `.npmrc file (default registry)`;
|
|
94
99
|
} else {
|
|
95
100
|
source = "default registry (OFFICIAL_REGISTRY)";
|
|
96
101
|
}
|
|
@@ -205,7 +210,10 @@ const isAlreadyPublishedError = (error) => {
|
|
|
205
210
|
return haystacks.some((value) => value.includes(ALREADY_PUBLISHED_PHRASE));
|
|
206
211
|
};
|
|
207
212
|
const handlePublishError = (error, packageJson, context, distributionTag, registry) => {
|
|
208
|
-
const {
|
|
213
|
+
const {
|
|
214
|
+
logger,
|
|
215
|
+
nextRelease: { version }
|
|
216
|
+
} = context;
|
|
209
217
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
210
218
|
if (error instanceof ExecaError && isAlreadyPublishedError(error)) {
|
|
211
219
|
logger.log(`Package ${packageJson.name ?? ""}@${version} is already published at dist-tag @${distributionTag} on ${registry}, skipping`);
|
|
@@ -665,7 +673,7 @@ const verifyConfig = (config) => (
|
|
|
665
673
|
if (isNil(value)) {
|
|
666
674
|
return errors;
|
|
667
675
|
}
|
|
668
|
-
if (!(option
|
|
676
|
+
if (!Object.hasOwn(VALIDATORS, option)) {
|
|
669
677
|
return errors;
|
|
670
678
|
}
|
|
671
679
|
if (VALIDATORS[option]?.(value)) {
|
|
@@ -720,40 +728,40 @@ const verify = async (pluginConfig, context) => {
|
|
|
720
728
|
|
|
721
729
|
const debug = dbg("semantic-release-pnpm:index");
|
|
722
730
|
const PLUGIN_NAME = "semantic-release-pnpm";
|
|
723
|
-
let
|
|
724
|
-
let
|
|
731
|
+
let isVerified;
|
|
732
|
+
let isPrepared;
|
|
725
733
|
const verifyConditions = async (pluginConfig, context) => {
|
|
726
734
|
if (context.options.publish) {
|
|
727
735
|
const publish2 = Array.isArray(context.options.publish) ? context.options.publish : [context.options.publish];
|
|
728
736
|
const publishPlugin = publish2.find((config) => config.path && config.path === PLUGIN_NAME) ?? {};
|
|
729
|
-
pluginConfig.npmPublish
|
|
730
|
-
pluginConfig.tarballDir
|
|
731
|
-
pluginConfig.pkgRoot
|
|
732
|
-
pluginConfig.disableScripts
|
|
733
|
-
pluginConfig.branches
|
|
737
|
+
pluginConfig.npmPublish ??= publishPlugin.npmPublish;
|
|
738
|
+
pluginConfig.tarballDir ??= publishPlugin.tarballDir;
|
|
739
|
+
pluginConfig.pkgRoot ??= publishPlugin.pkgRoot;
|
|
740
|
+
pluginConfig.disableScripts ??= publishPlugin.disableScripts;
|
|
741
|
+
pluginConfig.branches ??= publishPlugin.branches;
|
|
734
742
|
}
|
|
735
743
|
await verify(pluginConfig, context);
|
|
736
|
-
|
|
744
|
+
isVerified = true;
|
|
737
745
|
};
|
|
738
746
|
const prepare = async (pluginConfig, context) => {
|
|
739
|
-
if (
|
|
747
|
+
if (isVerified) {
|
|
740
748
|
debug("Skipping verifyConditions (already verified)");
|
|
741
749
|
} else {
|
|
742
750
|
debug("Verification not cached, running verifyConditions");
|
|
743
751
|
await verify(pluginConfig, context);
|
|
744
752
|
}
|
|
745
753
|
await prepare$1(pluginConfig, context);
|
|
746
|
-
|
|
754
|
+
isPrepared = true;
|
|
747
755
|
};
|
|
748
756
|
const publish = async (pluginConfig, context) => {
|
|
749
757
|
const packageJson = await getPackage(pluginConfig, context);
|
|
750
|
-
if (
|
|
758
|
+
if (isVerified) {
|
|
751
759
|
debug("Skipping verifyConditions (already verified)");
|
|
752
760
|
} else {
|
|
753
761
|
debug("Verification not cached, running verifyConditions");
|
|
754
762
|
await verify(pluginConfig, context);
|
|
755
763
|
}
|
|
756
|
-
if (
|
|
764
|
+
if (isPrepared) {
|
|
757
765
|
debug("Skipping prepare (already prepared)");
|
|
758
766
|
} else {
|
|
759
767
|
debug("Preparation not cached, running prepare");
|
|
@@ -762,7 +770,7 @@ const publish = async (pluginConfig, context) => {
|
|
|
762
770
|
return await publish$1(pluginConfig, packageJson, context);
|
|
763
771
|
};
|
|
764
772
|
const addChannel = async (pluginConfig, context) => {
|
|
765
|
-
if (
|
|
773
|
+
if (isVerified) {
|
|
766
774
|
debug("Skipping verifyConditions (already verified)");
|
|
767
775
|
} else {
|
|
768
776
|
debug("Verification not cached, running verifyConditions");
|
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.18",
|
|
4
4
|
"description": "Semantic-release plugin to publish a npm package with pnpm.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"anolilab",
|
|
@@ -61,18 +61,18 @@
|
|
|
61
61
|
],
|
|
62
62
|
"dependencies": {
|
|
63
63
|
"@actions/core": "3.0.1",
|
|
64
|
-
"@anolilab/rc": "4.0.
|
|
64
|
+
"@anolilab/rc": "4.0.5",
|
|
65
65
|
"@semantic-release/error": "^4.0.0",
|
|
66
|
-
"@visulima/fs": "^
|
|
67
|
-
"@visulima/package": "
|
|
68
|
-
"@visulima/path": "^
|
|
66
|
+
"@visulima/fs": "^5.1.0",
|
|
67
|
+
"@visulima/package": "5.0.11",
|
|
68
|
+
"@visulima/path": "^3.0.0",
|
|
69
69
|
"debug": "^4.4.3",
|
|
70
70
|
"env-ci": "^11.2.0",
|
|
71
|
-
"execa": "^
|
|
72
|
-
"ini": "^
|
|
71
|
+
"execa": "^10.0.1",
|
|
72
|
+
"ini": "^7.0.0",
|
|
73
73
|
"normalize-url": "9.0.1",
|
|
74
74
|
"registry-auth-token": "5.1.1",
|
|
75
|
-
"semver": "7.8.
|
|
75
|
+
"semver": "7.8.5"
|
|
76
76
|
},
|
|
77
77
|
"engines": {
|
|
78
78
|
"node": "^22.14.0 || >=24.10.0"
|