@anolilab/semantic-release-pnpm 3.2.1 → 4.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.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ ## @anolilab/semantic-release-pnpm [4.0.0-alpha.1](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-pnpm@3.2.2...@anolilab/semantic-release-pnpm@4.0.0-alpha.1) (2025-12-09)
2
+
3
+ ### Bug Fixes
4
+
5
+ * add GitHub labeler configuration and update package metadata ([dce9314](https://github.com/anolilab/semantic-release/commit/dce9314ca6aefaf86e75c6d065cdac8ad7a60717))
6
+
7
+
8
+ ### Dependencies
9
+
10
+ * **@anolilab/rc:** upgraded to 3.2.1-alpha.1
11
+
12
+ ## @anolilab/semantic-release-pnpm [3.2.2](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-pnpm@3.2.1...@anolilab/semantic-release-pnpm@3.2.2) (2025-12-05)
13
+
14
+ ### Bug Fixes
15
+
16
+ * enhance OIDC authentication handling in verifyAuth ([0141c07](https://github.com/anolilab/semantic-release/commit/0141c07cc4a0457b4aa01ecade582c40d17ef205))
17
+
1
18
  ## @anolilab/semantic-release-pnpm [3.2.1](https://github.com/anolilab/semantic-release/compare/@anolilab/semantic-release-pnpm@3.2.0...@anolilab/semantic-release-pnpm@3.2.1) (2025-12-05)
2
19
 
3
20
  ### Bug Fixes
package/README.md CHANGED
@@ -1,15 +1,24 @@
1
- <div align="center">
2
- <h3>anolilab semantic-release-pnpm</h3>
3
- <p>
4
- Semantic-release plugin to publish a npm package with pnpm.
5
- </p>
6
- </div>
1
+ <!-- START_PACKAGE_OG_IMAGE_PLACEHOLDER -->
2
+
3
+ <a href="https://github.com/anolilab/semantic-release" align="center">
4
+
5
+ <img src="__assets__/package-og.svg" alt="semantic-release-pnpm" />
6
+
7
+ </a>
8
+
9
+ <h3 align="center">Semantic-release plugin to publish a npm package with pnpm.</h3>
10
+
11
+ <!-- END_PACKAGE_OG_IMAGE_PLACEHOLDER -->
7
12
 
8
13
  <br />
9
14
 
10
15
  <div align="center">
11
16
 
12
- [![typescript-image]][typescript-url] [![npm-image]][npm-url] [![license-image]][license-url]
17
+ [![typescript-image][typescript-badge]][typescript-url]
18
+ [![mit licence][license-badge]][license]
19
+ [![npm downloads][npm-downloads-badge]][npm-downloads]
20
+ [![Chat][chat-badge]][chat]
21
+ [![PRs Welcome][prs-welcome-badge]][prs-welcome]
13
22
 
14
23
  </div>
15
24
 
@@ -53,7 +62,7 @@ The plugin can be configured in the [**semantic-release** configuration file](ht
53
62
 
54
63
  | Step | Description |
55
64
  | ------------------ | -------------------------------------------------------------------------------------------------------------------------------- |
56
- | `verifyConditions` | Verify the presence of the `NPM_TOKEN` environment variable, or an `.npmrc` file, and verify the authentication method is valid. |
65
+ | `verifyConditions` | Verify the presence of the `NPM_TOKEN` environment variable, or an `.npmrc` file, and verify the authentication method is valid. Results are cached per registry/auth combination to prevent throttling in monorepos. |
57
66
  | `prepare` | Update the `package.json` version and [create](https://docs.npmjs.com/cli/pack) the npm package tarball. |
58
67
  | `addChannel` | [Add a release to a dist-tag](https://docs.npmjs.com/cli/dist-tag). |
59
68
  | `publish` | [Publish the npm package](https://docs.npmjs.com/cli/publish) to the registry. |
@@ -82,6 +91,9 @@ When publishing to the [official registry](https://registry.npmjs.org/), it is r
82
91
  >
83
92
  > After the initial package exists, you can configure OIDC trusted publishing at `https://www.npmjs.com/package/<package-name>/access` and then use semantic-release for all future releases.
84
93
 
94
+ > [!TIP]
95
+ > **Monorepo Performance**: The plugin automatically caches authentication verification results per registry/auth token combination. This prevents throttling when verifying multiple packages in monorepos, as `pnpm whoami` is only called once per unique registry/authentication context rather than once per package.
96
+
85
97
  ##### Trusted publishing from GitHub Actions
86
98
 
87
99
  To leverage trusted publishing and publish with provenance from GitHub Actions, the `id-token: write` permission is required to be enabled on the job:
@@ -263,13 +275,24 @@ If you would like to help take a look at the [list of issues](https://github.com
263
275
  - [Daniel Bannert](https://github.com/prisis)
264
276
  - [All Contributors](https://github.com/anolilab/semantic-release/graphs/contributors)
265
277
 
278
+ ## Made with ❤️ at Anolilab
279
+
280
+ This is an open source project and will always remain free to use. If you think it's cool, please star it 🌟. [Anolilab](https://www.anolilab.com/open-source) is a Development and AI Studio. Contact us at [hello@anolilab.com](mailto:hello@anolilab.com) if you need any help with these technologies or just want to say hi!
281
+
266
282
  ## License
267
283
 
268
284
  The anolilab semantic-release-pnpm is open-sourced software licensed under the [MIT][license-url]
269
285
 
270
- [typescript-image]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
271
- [typescript-url]: "typescript"
272
- [license-image]: https://img.shields.io/npm/l/@anolilab/semantic-release-pnpm?color=blueviolet&style=for-the-badge
273
- [license-url]: LICENSE.md "license"
274
- [npm-image]: https://img.shields.io/npm/v/@anolilab/semantic-release-pnpm/latest.svg?style=for-the-badge&logo=npm
275
- [npm-url]: https://www.npmjs.com/package/@anolilab/semantic-release-pnpm/v/latest "npm"
286
+ <!-- badges -->
287
+
288
+ [license-badge]: https://img.shields.io/npm/l/@anolilab/semantic-release-pnpm?style=for-the-badge
289
+ [license]: https://github.com/anolilab/multi-semantic-release/blob/main/LICENSE
290
+ [npm-downloads-badge]: https://img.shields.io/npm/dm/@anolilab/semantic-release-pnpm?style=for-the-badge
291
+ [npm-downloads]: https://www.npmjs.com/package/@anolilab/semantic-release-pnpm
292
+ [prs-welcome-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=for-the-badge
293
+ [prs-welcome]: https://github.com/anolilab/multi-semantic-release/blob/main/.github/CONTRIBUTING.md
294
+ [chat-badge]: https://img.shields.io/discord/902465130518949899.svg?style=for-the-badge
295
+ [chat]: https://discord.gg/TtFJY8xkFK
296
+ [typescript-badge]: https://img.shields.io/badge/Typescript-294E80.svg?style=for-the-badge&logo=typescript
297
+ [typescript-url]: https://www.typescriptlang.org/
298
+ [license-url]: LICENSE.md
package/dist/index.js CHANGED
@@ -26,10 +26,10 @@ import { rc } from '@anolilab/rc';
26
26
  import normalizeUrl from 'normalize-url';
27
27
  import { findPackageJson, getPackageManagerVersion } from '@visulima/package';
28
28
  import SemanticReleaseError from '@semantic-release/error';
29
+ import { stringify } from 'ini';
29
30
  import getAuthToken from 'registry-auth-token';
30
31
  import { getIDToken } from '@actions/core';
31
32
  import envCi from 'env-ci';
32
- import { stringify } from 'ini';
33
33
  const {
34
34
  URL
35
35
  } = __cjs_getBuiltinModule("node:url");
@@ -644,10 +644,24 @@ const verifyAuth = async (npmrc, package_, context, pkgRoot) => {
644
644
  if (package_.name) {
645
645
  debug$2(`Checking OIDC trusted publishing for package "${package_.name}" on registry "${registry}"`);
646
646
  if (await oidcContext(registry, package_, context)) {
647
- debug$2("OIDC trusted publishing verified successfully, skipping NPM_TOKEN check");
648
- return;
647
+ debug$2("OIDC trusted publishing verified successfully, exchanging token for npmrc");
648
+ const oidcToken = await tokenExchange({ name: package_.name }, context);
649
+ if (oidcToken) {
650
+ const { config } = rc("npm", {
651
+ config: context.env.NPM_CONFIG_USERCONFIG ?? resolve(context.cwd, ".npmrc"),
652
+ cwd: context.cwd,
653
+ defaults: { registry: OFFICIAL_REGISTRY }
654
+ });
655
+ await writeFile(npmrc, `${Object.keys(config).length > 0 ? `${stringify(config)}
656
+ ` : ""}${nerfDart(registry)}:_authToken = ${oidcToken}`);
657
+ debug$2(`Wrote OIDC-exchanged token to ${npmrc} for use during publish`);
658
+ context.logger.log(`OIDC trusted publishing configured for package "${package_.name}"`);
659
+ return;
660
+ }
661
+ debug$2("OIDC token exchange failed, falling back to NPM_TOKEN authentication");
662
+ } else {
663
+ debug$2("OIDC trusted publishing not available, falling back to NPM_TOKEN authentication");
649
664
  }
650
- debug$2("OIDC trusted publishing not available, falling back to NPM_TOKEN authentication");
651
665
  } else {
652
666
  debug$2("Package name not found, skipping OIDC check and using NPM_TOKEN authentication");
653
667
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@anolilab/semantic-release-pnpm",
3
- "version": "3.2.1",
3
+ "version": "4.0.0-alpha.1",
4
4
  "description": "Semantic-release plugin to publish a npm package with pnpm.",
5
5
  "keywords": [
6
6
  "anolilab",
@@ -60,8 +60,8 @@
60
60
  "dist"
61
61
  ],
62
62
  "dependencies": {
63
- "@actions/core": "^1.11.1",
64
- "@anolilab/rc": "3.2.0",
63
+ "@actions/core": "^2.0.0",
64
+ "@anolilab/rc": "3.2.1-alpha.1",
65
65
  "@semantic-release/error": "^4.0.0",
66
66
  "@visulima/fs": "^4.1.0",
67
67
  "@visulima/package": "^4.1.7",