Skip to main content

Canary リリース

Docusaurus は Canary リリース を採用しています。

It permits you to test new unreleased features as soon as the pull requests are merged.

It is a good way to give feedback to maintainers, ensuring the newly implemented feature works as intended.

メモ

本番環境で Canary リリースを使うのはリスキーだと感じるかもしれませんが、実はそうでもありません。

Canary リリースはすべての自動化テストを通過しており、さらに Docusaurus のサイトの本番環境でも使用されているのです。

警告

The canary version shown below may not be up-to-date. Please go to the npm page to find the actual version name.

Canary バージョンと npm のタグ

For any code-related commit on main, the continuous integration will publish a canary release under the @canary npm dist tag. 長くて10分程度かかります。

You can see on npm the current dist tags:

  • latest: stable releases (Current: current)
  • canary: canary releases (例: 0.0.0-4922)
ヒント

Make sure to use the latest canary release and check the publication date (sometimes the publish process fails).

メモ

Canary versions follow the naming convention 0.0.0-commitNumber.

Canary リリースを使用する

Take the latest version published under the canary npm dist tag (例: 0.0.0-4922).

Use it for all the @docusaurus/* dependencies in your package.json:

- "@docusaurus/core": "^current",
- "@docusaurus/preset-classic": "^current",
+ "@docusaurus/core": "0.0.0-4922",
+ "@docusaurus/preset-classic": "0.0.0-4922",

次に、依存関係を再度インストールし、サイトを起動します。

npm install
npm start

You can also upgrade the @docusaurus/* packages with command line:

npm install --save-exact @docusaurus/core@canary @docusaurus/preset-classic@canary
警告

Make sure to include all the @docusaurus/* packages.

For canary releases, prefer using an exact version instead of a semver range (avoid the ^ prefix).