@amanda-mitchell/semantic-release-npm-multiple

中文文档
3.17.0发布于 2025/10/15MITES Module近 30 天下载 6387

A semantic release plugin to publish an NPM package to multiple registries.

原始使用文档
文档目录3 节
  1. Installation
  2. Usage
  3. Configuration

@amanda-mitchell/semantic-release-npm-multiple

This is a thin wrapper around the @semantic-release/npm plugin for Semantic Release that allows it to be called multiple times, which can be useful if you need to publish to multiple NPM registries simultaneously.

Installation

yarn add --dev @amanda-mitchell/semantic-release-npm-multiple

Usage

The plugin can be configured in the semantic-release configuration file:

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    [
      "@amanda-mitchell/semantic-release-npm-multiple",
      {
        "registries": {
          "registryName1": {
            "npmPublish": true
          },
          "registryName2": {
            "npmPublish": true
          }
        }
      }
    ]
  ]
}

Configuration

Each of the keys in registries refers to a specific registry that should be used and may be any value that is meaningful to you. The object associated with that key is a set of options that should be passed to the @semantic-release/npm plugin when calling it.

@amanda-mitchell/semantic-release-npm-multiple also looks at a number of environment variables for its configuration:

  • NPM_TOKEN
  • NPM_USERNAME
  • NPM_PASSWORD
  • NPM_EMAIL
  • NPM_CONFIG_REGISTRY
  • NPM_CONFIG_USERCONFIG

For any of these variables, if you define a {UPPER_CASE_REGISTRY_NAME}_{VARIABLE} environment variable, it will be used instead.

For example, if you wanted to publish a package to both a GitHub private registry and the public NPM registry, you would first create a configuration file like this:

{
  "plugins": [
    "@semantic-release/commit-analyzer",
    "@semantic-release/release-notes-generator",
    [
      "@amanda-mitchell/semantic-release-npm-multiple",
      {
        "registries": {
          "github": {},
          "public": {}
        }
      }
    ]
  ]
}

And then, when running semantic-release, set these environment variables:

  • GITHUB_NPM_CONFIG_REGISTRY=https://npm.pkg.github.com/
  • GITHUB_NPM_TOKEN=XXXXX
  • PUBLIC_NPM_CONFIG_REGISTRY=https://registry.npmjs.org
  • PUBLIC_NPM_TOKEN=XXXXX

版本与发布记录

@amanda-mitchell/semantic-release-npm-multiple 共发布 41 个版本,首次发布于 2020/11/12;过去 12 个月发布了 0 个版本。

版本发布日期距今
3.17.0latest2025/10/151.1 年前
3.16.02025/06/271.4 年前
3.15.02025/02/161.7 年前
3.14.02025/02/151.7 年前
3.13.02025/02/151.7 年前
3.12.02025/02/151.7 年前

关于 @amanda-mitchell/semantic-release-npm-multiple 的常见问题

@amanda-mitchell/semantic-release-npm-multiple 是什么?

A semantic release plugin to publish an NPM package to multiple registries.

如何安装 @amanda-mitchell/semantic-release-npm-multiple?

在项目目录运行 npm install @amanda-mitchell/semantic-release-npm-multiple,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:semantic-release(^19.x)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。

@amanda-mitchell/semantic-release-npm-multiple 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/amanda-mitchell__semantic-release-npm-multiple 是否存在。

@amanda-mitchell/semantic-release-npm-multiple 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@amanda-mitchell/semantic-release-npm-multiple 可以商用吗?

@amanda-mitchell/semantic-release-npm-multiple 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@amanda-mitchell/semantic-release-npm-multiple 的下载量有多少?

根据 npm 官方下载统计,@amanda-mitchell/semantic-release-npm-multiple 在 2026/10/06 – 2026/11/04 这 30 天内被下载 6,387 次,日均约 213 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@amanda-mitchell/semantic-release-npm-multiple 还在维护吗?

最新版本 3.17.0 发布于 2025/10/15(1.1 年前);至今共发布 41 个版本,其中过去 12 个月发布了 0 个;首次发布于 2020/11/12。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。