@anolilab/semantic-release-pnpm 8.1.16 → 8.1.17
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 +7 -0
- package/dist/index.js +24 -19
- package/package.json +8 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## @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)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Dependencies
|
|
5
|
+
|
|
6
|
+
* **@anolilab/rc:** upgraded to 4.0.5
|
|
7
|
+
|
|
1
8
|
## @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
9
|
|
|
3
10
|
### Bug Fixes
|
package/dist/index.js
CHANGED
|
@@ -45,10 +45,10 @@ const getChannel = (channel) => {
|
|
|
45
45
|
};
|
|
46
46
|
|
|
47
47
|
const getNpmrcPath = (cwd, environment) => {
|
|
48
|
-
const npmrcPath = resolve(cwd, ".npmrc");
|
|
49
48
|
if (environment.NPM_CONFIG_USERCONFIG && isAccessibleSync(environment.NPM_CONFIG_USERCONFIG)) {
|
|
50
49
|
return environment.NPM_CONFIG_USERCONFIG;
|
|
51
50
|
}
|
|
51
|
+
const npmrcPath = resolve(cwd, ".npmrc");
|
|
52
52
|
if (isAccessibleSync(npmrcPath)) {
|
|
53
53
|
return npmrcPath;
|
|
54
54
|
}
|
|
@@ -73,7 +73,7 @@ const getRegistryUrl = (scope, npmrc) => {
|
|
|
73
73
|
const getRegistry = ({ name, publishConfig = {} }, { cwd, env }) => {
|
|
74
74
|
let resolvedRegistry;
|
|
75
75
|
let source;
|
|
76
|
-
const scope = name.split("/")[0];
|
|
76
|
+
const scope = name.split("/", 1)[0];
|
|
77
77
|
const publishRegistry = publishConfig[`${scope}:registry`] ?? publishConfig.registry;
|
|
78
78
|
if (publishRegistry) {
|
|
79
79
|
resolvedRegistry = publishRegistry;
|
|
@@ -89,8 +89,10 @@ const getRegistry = ({ name, publishConfig = {} }, { cwd, env }) => {
|
|
|
89
89
|
});
|
|
90
90
|
const npmrc = npmrcConfig.config;
|
|
91
91
|
resolvedRegistry = getRegistryUrl(scope, npmrc);
|
|
92
|
-
if (npmrc && (npmrc
|
|
93
|
-
source = `.npmrc file (
|
|
92
|
+
if (npmrc && Object.hasOwn(npmrc, `${scope}:registry`)) {
|
|
93
|
+
source = `.npmrc file (scoped registry for ${scope})`;
|
|
94
|
+
} else if (npmrc && Object.hasOwn(npmrc, "registry")) {
|
|
95
|
+
source = `.npmrc file (default registry)`;
|
|
94
96
|
} else {
|
|
95
97
|
source = "default registry (OFFICIAL_REGISTRY)";
|
|
96
98
|
}
|
|
@@ -205,7 +207,10 @@ const isAlreadyPublishedError = (error) => {
|
|
|
205
207
|
return haystacks.some((value) => value.includes(ALREADY_PUBLISHED_PHRASE));
|
|
206
208
|
};
|
|
207
209
|
const handlePublishError = (error, packageJson, context, distributionTag, registry) => {
|
|
208
|
-
const {
|
|
210
|
+
const {
|
|
211
|
+
logger,
|
|
212
|
+
nextRelease: { version }
|
|
213
|
+
} = context;
|
|
209
214
|
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
210
215
|
if (error instanceof ExecaError && isAlreadyPublishedError(error)) {
|
|
211
216
|
logger.log(`Package ${packageJson.name ?? ""}@${version} is already published at dist-tag @${distributionTag} on ${registry}, skipping`);
|
|
@@ -665,7 +670,7 @@ const verifyConfig = (config) => (
|
|
|
665
670
|
if (isNil(value)) {
|
|
666
671
|
return errors;
|
|
667
672
|
}
|
|
668
|
-
if (!(option
|
|
673
|
+
if (!Object.hasOwn(VALIDATORS, option)) {
|
|
669
674
|
return errors;
|
|
670
675
|
}
|
|
671
676
|
if (VALIDATORS[option]?.(value)) {
|
|
@@ -720,40 +725,40 @@ const verify = async (pluginConfig, context) => {
|
|
|
720
725
|
|
|
721
726
|
const debug = dbg("semantic-release-pnpm:index");
|
|
722
727
|
const PLUGIN_NAME = "semantic-release-pnpm";
|
|
723
|
-
let
|
|
724
|
-
let
|
|
728
|
+
let isVerified;
|
|
729
|
+
let isPrepared;
|
|
725
730
|
const verifyConditions = async (pluginConfig, context) => {
|
|
726
731
|
if (context.options.publish) {
|
|
727
732
|
const publish2 = Array.isArray(context.options.publish) ? context.options.publish : [context.options.publish];
|
|
728
733
|
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
|
|
734
|
+
pluginConfig.npmPublish ??= publishPlugin.npmPublish;
|
|
735
|
+
pluginConfig.tarballDir ??= publishPlugin.tarballDir;
|
|
736
|
+
pluginConfig.pkgRoot ??= publishPlugin.pkgRoot;
|
|
737
|
+
pluginConfig.disableScripts ??= publishPlugin.disableScripts;
|
|
738
|
+
pluginConfig.branches ??= publishPlugin.branches;
|
|
734
739
|
}
|
|
735
740
|
await verify(pluginConfig, context);
|
|
736
|
-
|
|
741
|
+
isVerified = true;
|
|
737
742
|
};
|
|
738
743
|
const prepare = async (pluginConfig, context) => {
|
|
739
|
-
if (
|
|
744
|
+
if (isVerified) {
|
|
740
745
|
debug("Skipping verifyConditions (already verified)");
|
|
741
746
|
} else {
|
|
742
747
|
debug("Verification not cached, running verifyConditions");
|
|
743
748
|
await verify(pluginConfig, context);
|
|
744
749
|
}
|
|
745
750
|
await prepare$1(pluginConfig, context);
|
|
746
|
-
|
|
751
|
+
isPrepared = true;
|
|
747
752
|
};
|
|
748
753
|
const publish = async (pluginConfig, context) => {
|
|
749
754
|
const packageJson = await getPackage(pluginConfig, context);
|
|
750
|
-
if (
|
|
755
|
+
if (isVerified) {
|
|
751
756
|
debug("Skipping verifyConditions (already verified)");
|
|
752
757
|
} else {
|
|
753
758
|
debug("Verification not cached, running verifyConditions");
|
|
754
759
|
await verify(pluginConfig, context);
|
|
755
760
|
}
|
|
756
|
-
if (
|
|
761
|
+
if (isPrepared) {
|
|
757
762
|
debug("Skipping prepare (already prepared)");
|
|
758
763
|
} else {
|
|
759
764
|
debug("Preparation not cached, running prepare");
|
|
@@ -762,7 +767,7 @@ const publish = async (pluginConfig, context) => {
|
|
|
762
767
|
return await publish$1(pluginConfig, packageJson, context);
|
|
763
768
|
};
|
|
764
769
|
const addChannel = async (pluginConfig, context) => {
|
|
765
|
-
if (
|
|
770
|
+
if (isVerified) {
|
|
766
771
|
debug("Skipping verifyConditions (already verified)");
|
|
767
772
|
} else {
|
|
768
773
|
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.17",
|
|
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.0.5",
|
|
67
|
+
"@visulima/package": "^5.0.5",
|
|
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.0",
|
|
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"
|