
npmの段階的公開が新規パッケージの作成に対応npm staged publishing now supports creating new packages
匿名の公開いいねです。記事の保存・お気に入りではなく、Featured、Top 3、重要度、掲載順位には影響しません。仕組みとプライバシーAnonymous public likes are reactions, not saved articles or bookmarks. They do not affect Featured, Top 3, importance, or listing order.How it works and privacy
- npmのstaged publishingは、公開のスコープ付き・非スコープ付きと非公開のスコープ付きパッケージを新規作成可能にした。
- 初版は保守担当者の昇格後に配布され、自動化で手動の初回公開を省ける。
- npm staged publishing now creates public scoped or unscoped and private scoped packages using granular tokens.
- First releases need maintainer promotion, enabling automated releases.
本ページの本文と要約は AI による自動生成です。日本語版と英語版は言語ごとに独立して生成されるため、表現や詳しさが異なる場合があります。正確性は元記事 (github.blog) をご確認ください。The body and summaries are AI-generated independently for each language, so wording and detail may differ. Verify accuracy at the original source (github.blog).
要約と収集メタデータに基づく AI 解説。元記事全文の転載・翻訳ではありません。AI explainer based on the summaries and collected metadata, not a copy or translation of the full source article.
npm段階的公開
npmの段階的公開が、新規パッケージの作成に対応した。自動化されたワークフローからパッケージを作成でき、これまで必要だった手動での初回公開を省ける点が重要な変更となる。
npm stage publishを使うことで、既存パッケージのバージョンを段階的に公開するだけでなく、新しいnpmパッケージの作成から初版の投入まで進められる。
利用できる認証
新規作成時の認証には、ローカルセッションまたは細かな権限を設定したアクセストークンを利用できる。段階的公開だけに使用するstage-only tokenにも対応するため、自動化された処理から新規パッケージを作成する構成が可能になる。
対象は、公開のスコープ付きパッケージと非スコープ付きパッケージ、さらに非公開のスコープ付きパッケージとなっている。
初版の昇格
作成されたパッケージの最初のバージョンは、すぐにインストール可能になるのではなく、段階的公開のキューへ入る。その後、保守担当者が当該バージョンを昇格させることで、初めてインストール可能になる。
これにより、パッケージの作成と初版の準備は自動化しつつ、実際に利用可能な状態へ移す段階では保守担当者による操作が必要となる。
公開後の設定
パッケージの作成後は、その設定を管理できるほか、trusted publishingも構成できる。新規作成を自動化されたワークフローに組み込み、初版を段階的公開のキューで管理したうえで、保守担当者の昇格を経て配布する流れになる。
Create a new npm package
npm staged publishing can now create a new npm package through npm stage publish. The change matters for automated workflows because they no longer need a manual first publish before they can create a package.
Package creation can use either a local session or a granular access token. The supported token options include a stage-only token, allowing the package-creation step to be performed through staged publishing.
Public and private packages
The capability works across several package types. It supports public scoped packages, public unscoped packages, and private scoped packages.
This means staged publishing can be used to create a package in each of those supported forms, rather than requiring the package to exist before the staged process begins. An automated workflow can therefore create the new package and submit its first version through npm stage publish.
First version enters staged queue
Creating the package does not immediately make its first version available to install. Instead, the first version enters the staged queue.
A maintainer must promote that version before it becomes installable. The initial creation and submission can be automated, while promotion by a maintainer remains required for the first release to become available.
The staged queue therefore applies from the package’s first version. The workflow removes the need for a separate manual first publish, but it does not remove the maintainer promotion step.
After package creation
Once the package has been created, its settings can be managed and trusted publishing can be configured. These actions take place after the staged publishing process has established the package.
Feedback and discussion about what comes next are being directed to the npm roadmap discussion in GitHub Community. Additional tips, technical guides, and best practices are also available through a biweekly newsletter for developers.
ポコとTECHガイドPoko & TECH Guide
ポコと当サイトのTECHガイドが、記事の要約と収集した情報から読みどころを語るAI生成の対話です。Poko and TECH Dashboard's own TECH Guide discuss the article's highlights in an AI-generated conversation based on its summary and collected source details.
- ポコPoko新しいnpmパッケージまで段階的公開で作れるようになったんだ。これって大きい変化?Staged publishing can create brand-new npm packages now. Is that a big change?
- TECHガイドTECH Guide自動化した流れの中で、手動の初回公開を省ける変化だよ。公開・非公開など、対応する種類も示されているよ。It means automated workflows can skip the manual first publish. The change covers the supported public and private package types described here.
- ポコPoko「staged queue」って、公開前の待ち列みたいなもの?Is the “staged queue” basically a waiting line before release?
- TECHガイドTECH Guideうん、初版をいったん待機させる場所だね。保守担当者が昇格させると、インストールできるようになるよ。Yes, it holds the first version temporarily. A maintainer must promote it before anyone can install that release.
- ポコPokoぼくなら、stage-onlyトークンを使って自動リリースを組んでみたいな。初回も全部自動になるのかな?I’d try building an automated release with a stage-only token. Would the whole first release be automatic too?
- TECHガイドTECH Guide作成と待ち列への追加は自動化できるけど、初版の配布には保守担当者の昇格が必要だよ。そこは人の確認が残るね。Creation and staging can be automated, but the first release still needs maintainer promotion. That human approval step remains.





