Versions Canary
Docusaurus a un système de versions canary.
Il vous permet de tester les nouvelles fonctionnalités non publiées dès que les pull requests sont fusionnées.
C'est un bon moyen de donner un feedback aux mainteneurs, en s'assurant que la fonctionnalité nouvellement implémentée fonctionne comme prévu.
remarque
Utiliser une version canary en production peut sembler risqué, mais en pratique, ce n'est pas le cas.
Une version canary passe tous les tests automatisés et est utilisée en production par le site Docusaurus lui-même.
attention
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 dist tag
For any code-related commit on main
, the continuous integration will publish a canary release under the @canary
npm dist tag. It generally takes up to 10 minutes.
You can see on npm the current dist tags:
latest
: stable releases (Current: 2.0.0-beta.19)canary
: canary releases (Example: 0.0.0-4922)
astuce
Make sure to use the latest canary release and check the publication date (sometimes the publish process fails).
remarque
Canary versions follow the naming convention 0.0.0-commitNumber
.
Utilisation d'une version canary
Take the latest version published under the canary npm dist tag (Example: 0.0.0-4922).
Use it for all the @docusaurus/*
dependencies in your package.json
:
- "@docusaurus/core": "^2.0.0-beta.19",
- "@docusaurus/preset-classic": "^2.0.0-beta.19",
+ "@docusaurus/core": "0.0.0-4922",
+ "@docusaurus/preset-classic": "0.0.0-4922",
Then, install the dependencies again and start your site:
- npm
- Yarn
npm install
npm start
yarn install
yarn start
# couldn't auto-convert command
You can also upgrade the @docusaurus/*
packages with command line:
- npm
- Yarn
npm install --save-exact @docusaurus/core@canary @docusaurus/preset-classic@canary
yarn add-exact @docusaurus/core@canary @docusaurus/preset-classic@canary
attention
Make sure to include all the @docusaurus/*
packages.
For canary releases, prefer using an exact version instead of a semver range (avoid the ^
prefix).