latest log

酩酊状態で書いたエンジニアポエムです。酩酊状態で読んでください。

Change to npm unpublish policy

ポエムです。

npm unpublish --force kik and unpublished all my packages. いわゆる left-pad 問題の続報です。
npm が unpublish の運用ポリシーを変更するそうです。

The npm Blog

changes to npm’s unpublish policy

New policy

Going forward, if you try to unpublish a given package@version:

  • If the version is less than 24 hours old, you can unpublish it. The package will be completely removed from the registry. No new packages can be published using the same name and version.

  • If the version is older than 24 hours, then the unpublish will fail, with a message to contact support@npmjs.com.

  • If you contact support, they will check to see if removing that version of your package would break any other installs. If so, we will not remove it. You’ll either have to transfer ownership of the package or reach out to the owners of dependent packages to change their dependency.

  • If every version of a package is removed, it will be replaced with a security placeholder package, so that the formerly used name will not be susceptible to malicious squatting.

  • If another member of the community wishes to publish a package with the same name as a security placeholder, they’ll need to contact support@npmjs.com. npm will determine whether to grant this request. (Generally, we will.)

via http://blog.npmjs.org/post/141905368000/changes-to-npms-unpublish-policy

意訳すると

  • 公開から24時間以内であれば unpublish できます。再度同じ package@version で公開はできません(これは version番号を上げるとpublish可能になるという意味です)
  • 24時間経過後は unpublish に失敗します。support@npmjs.com にコンタクトを取ってください
  • サポートはパッケージの削除に伴う悪影響をチェックします
  • あなたは以下のどちらかを選択する事ができます
    1. パッケージの所有権を譲渡する
    2. 依存関係を変更するための手助けをする
  • package の全バージョンが unpublished となった場合は、その package名 は悪意を伴う差し替えが行われないように security placeholder package に置き換えられます
  • security placeholder package と同名の package を公開したい人は support@npmjs.com にコンタクトを取ってください、審査します

この問題についてはこんなことをツイートしてました

自分の過去のツイートを見直すと、今もそのままの部分と、口が悪いなぁ(言い方に気を配ってないなぁ…) という部分がありますね。140文字世界の呪縛。

これについてですが、WebModule では以下のようにして解決しています。

github にアカウントを持つ foo さんが、github にホストした apple.js リポジトリを、npm に publish しようとすると、foo.apple.js という npm名で publish することになります。これは WebModule の命名規則です。

雑感

対処療法的に unpublish にガードを入れる + 人力審査を行うという事のようです。 「npm には global namespace しかないためパッケージ名が衝突する」という課題はそのまま残るため、商標問題はサブマリン・リスクとして残り続ける事になりそうです。

あとこの変更は、何時から適用するんだろうか…