@anolilab/semantic-release-pnpm 2.0.4 → 3.0.0-alpha.1

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/dist/index.js +102 -113
  3. package/package.json +6 -6
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ## @anolilab/semantic-release-pnpm [3.0.0-alpha.1](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-pnpm@2.0.4...@anolilab/semantic-release-pnpm@3.0.0-alpha.1) (2025-10-14)
2
+
3
+ ### ⚠ BREAKING CHANGES
4
+
5
+ * - node-versions: the minimum node version for the v24 range is now v24.10.0
6
+ - deps: a minimum of node v22.14 is now required
7
+
8
+ ### Bug Fixes
9
+
10
+ * update dependencies and configurations across multiple packages ([62c36cd](https://github.com/anolilab/semantic-release/commit/62c36cd7eb77324e2e60ba6d0f9137e4b9b2c86d))
11
+ * update dependencies and node version across multiple packages ([3cea078](https://github.com/anolilab/semantic-release/commit/3cea078f8aa27d0873e082bc54c4c5117e5105bf))
12
+
13
+
14
+ ### Dependencies
15
+
16
+ * **@anolilab/rc:** upgraded to 3.0.0-alpha.1
17
+
1
18
  ## @anolilab/semantic-release-pnpm [2.0.4](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-pnpm@2.0.3...@anolilab/semantic-release-pnpm@2.0.4) (2025-09-22)
2
19
 
3
20
  ### Bug Fixes
package/dist/index.js CHANGED
@@ -1,18 +1,41 @@
1
+ import { createRequire as __cjs_createRequire } from "node:module";
2
+ const __cjs_require = __cjs_createRequire(import.meta.url);
3
+
4
+ // Runtime capability helpers
5
+ const __cjs_getBuiltinModule = (module) => {
6
+ // Check if we're in Node.js and version supports getBuiltinModule
7
+ if ("object" !== "undefined" && process.versions?.node) {
8
+ const [major, minor] = process.versions.node.split(".").map(Number);
9
+ // Node.js 20.16.0+ and 22.3.0+
10
+ if (major > 22 || (major === 22 && minor >= 3) || (major === 20 && minor >= 16)) {
11
+ return process.getBuiltinModule(module);
12
+ }
13
+ }
14
+ // Fallback to createRequire
15
+ return __cjs_require(module);
16
+ };
17
+
18
+ const __cjs_getProcess = typeof globalThis !== "undefined" && typeof globalThis.process !== "undefined" ? globalThis.process : process;
1
19
  import { execa } from 'execa';
2
- import { validRange, gte } from 'semver';
20
+ const {
21
+ validRange,
22
+ gte
23
+ } = __cjs_require("semver");
3
24
  import { isAccessibleSync, ensureFileSync, move, writeFile } from '@visulima/fs';
4
25
  import { resolve } from '@visulima/path';
5
26
  import { rc } from '@anolilab/rc';
6
27
  import normalizeUrl from 'normalize-url';
7
28
  import { findPackageJson, getPackageManagerVersion } from '@visulima/package';
8
29
  import SemanticReleaseError from '@semantic-release/error';
9
- import { stringify } from 'ini';
10
- import getAuthToken from 'registry-auth-token';
11
- import { URL } from 'node:url';
30
+ const {
31
+ stringify
32
+ } = __cjs_require("ini");
33
+ const getAuthToken = __cjs_require("registry-auth-token");
34
+ const {
35
+ URL
36
+ } = __cjs_getBuiltinModule("node:url");
12
37
 
13
- var __defProp$h = Object.defineProperty;
14
- var __name$h = (target, value) => __defProp$h(target, "name", { value, configurable: true });
15
- const getChannel = /* @__PURE__ */ __name$h((channel) => {
38
+ const getChannel = (channel) => {
16
39
  if (!channel) {
17
40
  return "latest";
18
41
  }
@@ -20,11 +43,9 @@ const getChannel = /* @__PURE__ */ __name$h((channel) => {
20
43
  return `release-${channel}`;
21
44
  }
22
45
  return channel;
23
- }, "getChannel");
46
+ };
24
47
 
25
- var __defProp$g = Object.defineProperty;
26
- var __name$g = (target, value) => __defProp$g(target, "name", { value, configurable: true });
27
- const getNpmrcPath = /* @__PURE__ */ __name$g((cwd, environment) => {
48
+ const getNpmrcPath = (cwd, environment) => {
28
49
  const npmrcPath = resolve(cwd, ".npmrc");
29
50
  if (environment.NPM_CONFIG_USERCONFIG && isAccessibleSync(environment.NPM_CONFIG_USERCONFIG)) {
30
51
  return environment.NPM_CONFIG_USERCONFIG;
@@ -34,13 +55,11 @@ const getNpmrcPath = /* @__PURE__ */ __name$g((cwd, environment) => {
34
55
  }
35
56
  ensureFileSync(npmrcPath);
36
57
  return npmrcPath;
37
- }, "getNpmrcPath");
58
+ };
38
59
 
39
60
  const DEFAULT_NPM_REGISTRY = "https://registry.npmjs.org/";
40
61
 
41
- var __defProp$f = Object.defineProperty;
42
- var __name$f = (target, value) => __defProp$f(target, "name", { value, configurable: true });
43
- const getRegistryUrl = /* @__PURE__ */ __name$f((scope, npmrc) => {
62
+ const getRegistryUrl = (scope, npmrc) => {
44
63
  let url = DEFAULT_NPM_REGISTRY;
45
64
  if (npmrc) {
46
65
  const registryUrl = npmrc[`${scope}:registry`] ?? npmrc.registry;
@@ -49,29 +68,25 @@ const getRegistryUrl = /* @__PURE__ */ __name$f((scope, npmrc) => {
49
68
  }
50
69
  }
51
70
  return url.endsWith("/") ? url : `${url}/`;
52
- }, "getRegistryUrl");
53
- const getRegistry = /* @__PURE__ */ __name$f(({ name, publishConfig: { registry } = {} }, { cwd, env }) => registry ?? env.NPM_CONFIG_REGISTRY ?? getRegistryUrl(
71
+ };
72
+ const getRegistry = ({ name, publishConfig: { registry } = {} }, { cwd, env }) => registry ?? env.NPM_CONFIG_REGISTRY ?? getRegistryUrl(
54
73
  name.split("/")[0],
55
74
  rc("npm", {
56
75
  config: env.NPM_CONFIG_USERCONFIG ?? resolve(cwd, ".npmrc"),
57
76
  cwd,
58
77
  defaults: { registry: "https://registry.npmjs.org/" }
59
78
  }).config
60
- ), "getRegistry");
79
+ );
61
80
 
62
- var __defProp$e = Object.defineProperty;
63
- var __name$e = (target, value) => __defProp$e(target, "name", { value, configurable: true });
64
- const getReleaseInfo = /* @__PURE__ */ __name$e(({ name }, { env: { DEFAULT_NPM_REGISTRY = "https://registry.npmjs.org/" }, nextRelease: { version } }, distributionTag, registry) => {
81
+ const getReleaseInfo = ({ name }, { env: { DEFAULT_NPM_REGISTRY = "https://registry.npmjs.org/" }, nextRelease: { version } }, distributionTag, registry) => {
65
82
  return {
66
83
  channel: distributionTag,
67
84
  name: `pnpm package (@${distributionTag} dist-tag)`,
68
85
  url: normalizeUrl(registry) === normalizeUrl(DEFAULT_NPM_REGISTRY) ? `https://www.npmjs.com/package/${name}/v/${version}` : void 0
69
86
  };
70
- }, "getReleaseInfo");
87
+ };
71
88
 
72
- var __defProp$d = Object.defineProperty;
73
- var __name$d = (target, value) => __defProp$d(target, "name", { value, configurable: true });
74
- const reasonToNotPublish = /* @__PURE__ */ __name$d((pluginConfig, package_) => {
89
+ const reasonToNotPublish = (pluginConfig, package_) => {
75
90
  if (pluginConfig.npmPublish === false) {
76
91
  return "npmPublish plugin option is false";
77
92
  }
@@ -79,12 +94,10 @@ const reasonToNotPublish = /* @__PURE__ */ __name$d((pluginConfig, package_) =>
79
94
  return "package is private and has no workspaces";
80
95
  }
81
96
  return null;
82
- }, "reasonToNotPublish");
83
- const shouldPublish = /* @__PURE__ */ __name$d((pluginConfig, package_) => reasonToNotPublish(pluginConfig, package_) === null, "shouldPublish");
97
+ };
98
+ const shouldPublish = (pluginConfig, package_) => reasonToNotPublish(pluginConfig, package_) === null;
84
99
 
85
- var __defProp$c = Object.defineProperty;
86
- var __name$c = (target, value) => __defProp$c(target, "name", { value, configurable: true });
87
- const addChannel$1 = /* @__PURE__ */ __name$c(async (pluginConfig, packageJson, context) => {
100
+ const addChannel$1 = async (pluginConfig, packageJson, context) => {
88
101
  const {
89
102
  cwd,
90
103
  env,
@@ -111,11 +124,9 @@ const addChannel$1 = /* @__PURE__ */ __name$c(async (pluginConfig, packageJson,
111
124
  }
112
125
  logger.log(`Skip adding to npm channel as ${reasonToNotPublish(pluginConfig, packageJson)}`);
113
126
  return false;
114
- }, "addChannel");
127
+ };
115
128
 
116
- var __defProp$b = Object.defineProperty;
117
- var __name$b = (target, value) => __defProp$b(target, "name", { value, configurable: true });
118
- const prepare$1 = /* @__PURE__ */ __name$b(async ({ pkgRoot, tarballDir }, { cwd, env, logger, nextRelease: { version }, stderr, stdout }) => {
129
+ const prepare$1 = async ({ pkgRoot, tarballDir }, { cwd, env, logger, nextRelease: { version }, stderr, stdout }) => {
119
130
  const basePath = pkgRoot ? resolve(cwd, pkgRoot) : cwd;
120
131
  logger.log("Write version %s to package.json in %s", version, basePath);
121
132
  const versionResult = execa("pnpm", ["version", version, "--no-git-tag-version", "--allow-same-version"], {
@@ -138,11 +149,9 @@ const prepare$1 = /* @__PURE__ */ __name$b(async ({ pkgRoot, tarballDir }, { cwd
138
149
  await move(tarballSource, tarballDestination);
139
150
  }
140
151
  }
141
- }, "prepare");
152
+ };
142
153
 
143
- var __defProp$a = Object.defineProperty;
144
- var __name$a = (target, value) => __defProp$a(target, "name", { value, configurable: true });
145
- const publish$1 = /* @__PURE__ */ __name$a(async (pluginConfig, packageJson, context) => {
154
+ const publish$1 = async (pluginConfig, packageJson, context) => {
146
155
  const {
147
156
  cwd,
148
157
  env,
@@ -187,31 +196,29 @@ const publish$1 = /* @__PURE__ */ __name$a(async (pluginConfig, packageJson, con
187
196
  }
188
197
  logger.log(`Skip publishing to npm registry as ${reasonToNotPublish(pluginConfig, packageJson)}`);
189
198
  return false;
190
- }, "publish");
199
+ };
191
200
 
192
201
  const homepage = "https://github.com/anolilab/semantic-release/tree/main/packages/semantic-release-pnpm";
193
202
  const packageJson = {
194
203
  homepage: homepage};
195
204
 
196
- var __defProp$9 = Object.defineProperty;
197
- var __name$9 = (target, value) => __defProp$9(target, "name", { value, configurable: true });
198
- const linkify = /* @__PURE__ */ __name$9((file) => `${packageJson.homepage}/blob/main/${file}`, "linkify");
205
+ const linkify = (file) => `${packageJson.homepage}/blob/main/${file}`;
199
206
  const errors = {
200
- EINVALIDBRANCHES: /* @__PURE__ */ __name$9((branches) => {
207
+ EINVALIDBRANCHES: (branches) => {
201
208
  return {
202
209
  details: `The [branches option](${linkify("README.md#branches")}) option, if defined, must be an array of \`String\`.
203
210
  Your configuration for the \`branches\` option is \`${branches.join(",")}\`.`,
204
211
  message: "Invalid `branches` option."
205
212
  };
206
- }, "EINVALIDBRANCHES"),
207
- EINVALIDNPMPUBLISH: /* @__PURE__ */ __name$9(({ npmPublish }) => {
213
+ },
214
+ EINVALIDNPMPUBLISH: ({ npmPublish }) => {
208
215
  return {
209
216
  details: `The [npmPublish option](${linkify("README.md#npmpublish")}) option, if defined, must be a \`Boolean\`.
210
217
  Your configuration for the \`npmPublish\` option is \`${String(npmPublish)}\`.`,
211
218
  message: "Invalid `npmPublish` option."
212
219
  };
213
- }, "EINVALIDNPMPUBLISH"),
214
- EINVALIDNPMTOKEN: /* @__PURE__ */ __name$9(({ registry }) => {
220
+ },
221
+ EINVALIDNPMTOKEN: ({ registry }) => {
215
222
  return {
216
223
  details: `The [npm token](${linkify(
217
224
  "README.md#npm-registry-authentication"
@@ -220,15 +227,15 @@ If you are using Two Factor Authentication for your account, set its level to ["
220
227
  Please make sure to set the \`NPM_TOKEN\` environment variable in your CI with the exact value of the npm token.`,
221
228
  message: "Invalid npm token."
222
229
  };
223
- }, "EINVALIDNPMTOKEN"),
224
- EINVALIDPKGROOT: /* @__PURE__ */ __name$9(({ pkgRoot }) => {
230
+ },
231
+ EINVALIDPKGROOT: ({ pkgRoot }) => {
225
232
  return {
226
233
  details: `The [pkgRoot option](${linkify("README.md#pkgroot")}) option, if defined, must be a \`String\`.
227
234
  Your configuration for the \`pkgRoot\` option is \`${String(pkgRoot)}\`.`,
228
235
  message: "Invalid `pkgRoot` option."
229
236
  };
230
- }, "EINVALIDPKGROOT"),
231
- EINVALIDPNPM: /* @__PURE__ */ __name$9(({ version }) => {
237
+ },
238
+ EINVALIDPNPM: ({ version }) => {
232
239
  return {
233
240
  details: `The version of Pnpm that you are using is not compatible. Please refer to [the README](${linkify(
234
241
  "README.md#install"
@@ -237,22 +244,22 @@ Your configuration for the \`pkgRoot\` option is \`${String(pkgRoot)}\`.`,
237
244
  Your version of Pnpm is "${String(version)}".`,
238
245
  message: "Incompatible Pnpm version detected."
239
246
  };
240
- }, "EINVALIDPNPM"),
241
- EINVALIDPUBLISHBRANCH: /* @__PURE__ */ __name$9(({ publishBranch }) => {
247
+ },
248
+ EINVALIDPUBLISHBRANCH: ({ publishBranch }) => {
242
249
  return {
243
250
  details: `The [publishBranch option](${linkify("README.md#publishBranch")}) option, if defined, must be a \`String\`.
244
251
  Your configuration for the \`publishBranch\` option is \`${String(publishBranch)}\`.`,
245
252
  message: "Invalid `publishBranch` option."
246
253
  };
247
- }, "EINVALIDPUBLISHBRANCH"),
248
- EINVALIDTARBALLDIR: /* @__PURE__ */ __name$9(({ tarballDir }) => {
254
+ },
255
+ EINVALIDTARBALLDIR: ({ tarballDir }) => {
249
256
  return {
250
257
  details: `The [tarballDir option](${linkify("README.md#tarballdir")}) option, if defined, must be a \`String\`.
251
258
  Your configuration for the \`tarballDir\` option is \`${String(tarballDir)}\`.`,
252
259
  message: "Invalid `tarballDir` option."
253
260
  };
254
- }, "EINVALIDTARBALLDIR"),
255
- ENONPMTOKEN: /* @__PURE__ */ __name$9(({ registry }) => {
261
+ },
262
+ ENONPMTOKEN: ({ registry }) => {
256
263
  return {
257
264
  details: `An [npm token](${linkify(
258
265
  "README.md#npm-registry-authentication"
@@ -260,45 +267,41 @@ Your configuration for the \`tarballDir\` option is \`${String(tarballDir)}\`.`,
260
267
  Please make sure to create an [npm token](https://docs.npmjs.com/getting-started/working_with_tokens#how-to-create-new-tokens) and to set it in the \`NPM_TOKEN\` environment variable on your CI environment. The token must allow to publish to the registry \`${String(registry)}\`.`,
261
268
  message: "No npm token specified."
262
269
  };
263
- }, "ENONPMTOKEN"),
264
- ENOPKG: /* @__PURE__ */ __name$9(() => {
270
+ },
271
+ ENOPKG: () => {
265
272
  return {
266
273
  details: `A [package.json file](https://docs.npmjs.com/files/package.json) at the root of your project is required to release on npm.
267
274
  Please follow the [npm guideline](https://docs.npmjs.com/getting-started/creating-node-modules) to create a valid \`package.json\` file.`,
268
275
  message: "Missing `package.json` file."
269
276
  };
270
- }, "ENOPKG"),
271
- ENOPKGNAME: /* @__PURE__ */ __name$9(() => {
277
+ },
278
+ ENOPKGNAME: () => {
272
279
  return {
273
280
  details: `The \`package.json\`'s [name](https://docs.npmjs.com/files/package.json#name) property is required in order to publish a package to the npm registry.
274
281
  Please make sure to add a valid \`name\` for your package in your \`package.json\`.`,
275
282
  message: "Missing `name` property in `package.json`."
276
283
  };
277
- }, "ENOPKGNAME"),
278
- ENOPNPM: /* @__PURE__ */ __name$9(() => {
284
+ },
285
+ ENOPNPM: () => {
279
286
  return {
280
287
  details: `The Pnpm CLI could not be found in your PATH. Make sure Pnpm is installed and try again.`,
281
288
  message: "Pnpm not found."
282
289
  };
283
- }, "ENOPNPM"),
284
- ENOPNPMRC: /* @__PURE__ */ __name$9(() => {
290
+ },
291
+ ENOPNPMRC: () => {
285
292
  return {
286
293
  details: `Didnt find a \`.npmrc\` file or it was not possible to create , in the root of your project.`,
287
294
  message: "Missing `.npmrc` file."
288
295
  };
289
- }, "ENOPNPMRC")
296
+ }
290
297
  };
291
298
 
292
- var __defProp$8 = Object.defineProperty;
293
- var __name$8 = (target, value) => __defProp$8(target, "name", { value, configurable: true });
294
- const getError = /* @__PURE__ */ __name$8((code, context = {}) => {
299
+ const getError = (code, context = {}) => {
295
300
  const { details, message } = errors[code](context);
296
301
  return new SemanticReleaseError(message, code, details);
297
- }, "getError");
302
+ };
298
303
 
299
- var __defProp$7 = Object.defineProperty;
300
- var __name$7 = (target, value) => __defProp$7(target, "name", { value, configurable: true });
301
- const getPackage = /* @__PURE__ */ __name$7(async ({ pkgRoot }, { cwd }) => {
304
+ const getPackage = async ({ pkgRoot }, { cwd }) => {
302
305
  try {
303
306
  const { packageJson } = await findPackageJson(pkgRoot ? resolve(cwd, pkgRoot) : cwd);
304
307
  if (!packageJson.name) {
@@ -313,20 +316,16 @@ const getPackage = /* @__PURE__ */ __name$7(async ({ pkgRoot }, { cwd }) => {
313
316
  }
314
317
  throw error;
315
318
  }
316
- }, "getPackage");
319
+ };
317
320
 
318
- var __defProp$6 = Object.defineProperty;
319
- var __name$6 = (target, value) => __defProp$6(target, "name", { value, configurable: true });
320
- const nerfDart = /* @__PURE__ */ __name$6((url) => {
321
+ const nerfDart = (url) => {
321
322
  const parsed = new URL(url);
322
323
  const from = `${parsed.protocol}//${parsed.host}${parsed.pathname}`;
323
324
  const real = new URL(".", from);
324
325
  return `//${real.host}${real.pathname}`;
325
- }, "nerfDart");
326
+ };
326
327
 
327
- var __defProp$5 = Object.defineProperty;
328
- var __name$5 = (target, value) => __defProp$5(target, "name", { value, configurable: true });
329
- const setNpmrcAuth = /* @__PURE__ */ __name$5(async (npmrc, registry, { cwd, env: { NPM_CONFIG_USERCONFIG, NPM_EMAIL, NPM_PASSWORD, NPM_TOKEN, NPM_USERNAME }, logger }) => {
328
+ const setNpmrcAuth = async (npmrc, registry, { cwd, env: { NPM_CONFIG_USERCONFIG, NPM_EMAIL, NPM_PASSWORD, NPM_TOKEN, NPM_USERNAME }, logger }) => {
330
329
  logger.log("Verify authentication for registry %s", registry);
331
330
  const { config, files } = rc("npm", {
332
331
  config: NPM_CONFIG_USERCONFIG ?? resolve(cwd, ".npmrc"),
@@ -353,11 +352,9 @@ email = \${NPM_EMAIL}`);
353
352
  const semanticError = getError("ENONPMTOKEN", { registry });
354
353
  throw new AggregateError([semanticError], semanticError.message);
355
354
  }
356
- }, "setNpmrcAuth");
355
+ };
357
356
 
358
- var __defProp$4 = Object.defineProperty;
359
- var __name$4 = (target, value) => __defProp$4(target, "name", { value, configurable: true });
360
- const verifyAuth = /* @__PURE__ */ __name$4(async (npmrc, package_, context) => {
357
+ const verifyAuth = async (npmrc, package_, context) => {
361
358
  const {
362
359
  cwd,
363
360
  env: { DEFAULT_NPM_REGISTRY = "https://registry.npmjs.org/", ...environment },
@@ -385,27 +382,25 @@ const verifyAuth = /* @__PURE__ */ __name$4(async (npmrc, package_, context) =>
385
382
  } else {
386
383
  logger.log(`Skipping authentication verification for non-default registry "${registry}"`);
387
384
  }
388
- }, "verifyAuth");
385
+ };
389
386
 
390
- var __defProp$3 = Object.defineProperty;
391
- var __name$3 = (target, value) => __defProp$3(target, "name", { value, configurable: true });
392
- const isString = /* @__PURE__ */ __name$3((value) => typeof value === "string", "isString");
393
- const isNil = /* @__PURE__ */ __name$3((value) => value === null || value === void 0, "isNil");
394
- const isNonEmptyString = /* @__PURE__ */ __name$3((value) => {
387
+ const isString = (value) => typeof value === "string";
388
+ const isNil = (value) => value === null || value === void 0;
389
+ const isNonEmptyString = (value) => {
395
390
  if (!isString(value)) {
396
391
  return false;
397
392
  }
398
393
  return value.trim() !== "";
399
- }, "isNonEmptyString");
394
+ };
400
395
  const VALIDATORS = {
401
396
  branches: Array.isArray,
402
397
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
403
- npmPublish: /* @__PURE__ */ __name$3((value) => typeof value === "boolean", "npmPublish"),
398
+ npmPublish: (value) => typeof value === "boolean",
404
399
  pkgRoot: isNonEmptyString,
405
400
  publishBranch: isNonEmptyString,
406
401
  tarballDir: isNonEmptyString
407
402
  };
408
- const verifyConfig = /* @__PURE__ */ __name$3((config) => (
403
+ const verifyConfig = (config) => (
409
404
  // eslint-disable-next-line unicorn/no-array-reduce
410
405
  Object.entries(config).reduce((errors, [option, value]) => {
411
406
  if (isNil(value)) {
@@ -419,23 +414,19 @@ const verifyConfig = /* @__PURE__ */ __name$3((config) => (
419
414
  }
420
415
  return [...errors, getError(`EINVALID${option.toUpperCase()}`, { [option]: value })];
421
416
  }, [])
422
- ), "verifyConfig");
417
+ );
423
418
 
424
- var __defProp$2 = Object.defineProperty;
425
- var __name$2 = (target, value) => __defProp$2(target, "name", { value, configurable: true });
426
419
  const MIN_PNPM_VERSION = "8.0.0";
427
- const verifyPnpm = /* @__PURE__ */ __name$2(async ({ logger }) => {
420
+ const verifyPnpm = async ({ logger }) => {
428
421
  logger.log(`Verify pnpm version is >= ${MIN_PNPM_VERSION}`);
429
422
  const version = getPackageManagerVersion("pnpm");
430
423
  if (gte(MIN_PNPM_VERSION, version)) {
431
424
  const semanticError = getError("EINVALIDPNPM", { version: String(version) });
432
425
  throw new AggregateError([semanticError], semanticError.message);
433
426
  }
434
- }, "verifyPnpm");
427
+ };
435
428
 
436
- var __defProp$1 = Object.defineProperty;
437
- var __name$1 = (target, value) => __defProp$1(target, "name", { value, configurable: true });
438
- const verify = /* @__PURE__ */ __name$1(async (pluginConfig, context) => {
429
+ const verify = async (pluginConfig, context) => {
439
430
  let errors = verifyConfig(pluginConfig);
440
431
  let errorsMessage = "";
441
432
  try {
@@ -459,14 +450,12 @@ const verify = /* @__PURE__ */ __name$1(async (pluginConfig, context) => {
459
450
  if (errors.length > 0) {
460
451
  throw new AggregateError(errors, errorsMessage);
461
452
  }
462
- }, "verify");
453
+ };
463
454
 
464
- var __defProp = Object.defineProperty;
465
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
466
455
  const PLUGIN_NAME = "semantic-release-pnpm";
467
456
  let verified;
468
457
  let prepared;
469
- const verifyConditions = /* @__PURE__ */ __name(async (pluginConfig, context) => {
458
+ const verifyConditions = async (pluginConfig, context) => {
470
459
  if (context.options.publish) {
471
460
  const publish2 = Array.isArray(context.options.publish) ? context.options.publish : [context.options.publish];
472
461
  const publishPlugin = publish2.find((config) => config.path && config.path === PLUGIN_NAME) || {};
@@ -478,15 +467,15 @@ const verifyConditions = /* @__PURE__ */ __name(async (pluginConfig, context) =>
478
467
  }
479
468
  await verify(pluginConfig, context);
480
469
  verified = true;
481
- }, "verifyConditions");
482
- const prepare = /* @__PURE__ */ __name(async (pluginConfig, context) => {
470
+ };
471
+ const prepare = async (pluginConfig, context) => {
483
472
  if (!verified) {
484
473
  await verify(pluginConfig, context);
485
474
  }
486
475
  await prepare$1(pluginConfig, context);
487
476
  prepared = true;
488
- }, "prepare");
489
- const publish = /* @__PURE__ */ __name(async (pluginConfig, context) => {
477
+ };
478
+ const publish = async (pluginConfig, context) => {
490
479
  const packageJson = await getPackage(pluginConfig, context);
491
480
  if (!verified) {
492
481
  await verify(pluginConfig, context);
@@ -495,13 +484,13 @@ const publish = /* @__PURE__ */ __name(async (pluginConfig, context) => {
495
484
  await prepare$1(pluginConfig, context);
496
485
  }
497
486
  return await publish$1(pluginConfig, packageJson, context);
498
- }, "publish");
499
- const addChannel = /* @__PURE__ */ __name(async (pluginConfig, context) => {
487
+ };
488
+ const addChannel = async (pluginConfig, context) => {
500
489
  if (!verified) {
501
490
  await verify(pluginConfig, context);
502
491
  }
503
492
  const packageJson = await getPackage(pluginConfig, context);
504
493
  return await addChannel$1(pluginConfig, packageJson, context);
505
- }, "addChannel");
494
+ };
506
495
 
507
496
  export { addChannel, prepare, publish, verifyConditions };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anolilab/semantic-release-pnpm",
3
- "version": "2.0.4",
3
+ "version": "3.0.0-alpha.1",
4
4
  "description": "Semantic-release plugin to publish a npm package with pnpm.",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -46,19 +46,19 @@
46
46
  "dist"
47
47
  ],
48
48
  "dependencies": {
49
- "@anolilab/rc": "2.0.4",
49
+ "@anolilab/rc": "3.0.0-alpha.1",
50
50
  "@semantic-release/error": "^4.0.0",
51
- "@visulima/fs": "^3.1.8",
52
- "@visulima/package": "^3.5.11",
51
+ "@visulima/fs": "^3.1.9",
52
+ "@visulima/package": "^4.0.2",
53
53
  "@visulima/path": "^1.4.0",
54
54
  "execa": "^9.6.0",
55
55
  "ini": "^5.0.0",
56
56
  "normalize-url": "^8.1.0",
57
57
  "registry-auth-token": "^5.1.0",
58
- "semver": "^7.7.2"
58
+ "semver": "^7.7.3"
59
59
  },
60
60
  "engines": {
61
- "node": ">=20.8.1"
61
+ "node": "^22.14.0 || >=24.10.0"
62
62
  },
63
63
  "publishConfig": {
64
64
  "access": "public",