`afterPublish` is called before the package is effectively published

オープン
#604 コメント 4 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
javascript
領域
release

調査の方向性

issueで参照されているrunAfterPublishの呼び出しがあるpackages/shipjs/src/flow/release.jsから始めます。その地点までに公開の完了がどのように処理されているかを追跡し、続いてreleaseフローのテストで、npm registryに依存するafterPublishフックがパッケージの公開が実際に完了した後にのみ実行されることを確認します。

索引モデルが issue の本文から書いたものです。

説明

Describe the bug

I'm trying to upgrade my package dependency after it was published with the afterPublish hook. However, Ship.js doesn't wait for the publication to run afterPublish. Therefore, the npm registry isn't updated when the function is called, resulting in an upgrade error.

To Reproduce

Steps to reproduce the behavior:

  1. Add an afterPublish hook that relies on the npm registry
  2. Trigger a release (on CircleCI for instance)
  3. afterPublish errors because it's called before the package is effectively published to the npm registry

Expected behavior

We should somehow await before calling runAfterPublish so that this kind of afterPublish scripts is made possible.

Side note

It'd be nice to have access to a version parameter in the afterPublish function so that we don't need to read it from package.json.

主要言語
JavaScript
スター
775
フォーク
27
PR マージ指標
30日以内にマージされた PR はありません

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

algolia/shipjs のほかの issue

algolia/shipjs の issue をすべて見る

似ている issue

JavaScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。