Skip to content

Canary versions are treated as older than the latest stable version #11013

Open
@tats-u

Description

@tats-u

Have you read the Contributing Guidelines on issues?

Prerequisites

  • I'm using the latest version of Docusaurus.
  • I have tried the npm run clear or yarn clear command.
  • I have tried rm -rf node_modules yarn.lock package-lock.json and re-installing packages.
  • I have tried creating a repro with https://new.docusaurus.io.
  • I have read the console error message carefully (if applicable).

Description

In the semver, unstable versions v3.7.0-* is treated as older than v3.7.0.
We must bump the patch version before adding a Canary verssion suffix. e.g. v3.7.1-canary-6264.

Reproducible demo

https://codesandbox.io/p/devbox/angry-antonelli-w9v59m?workspaceId=ws_5geAx947TkSAXN4qahDJMt

Steps to reproduce

  1. Create a project

  2. Upgrade Docusaurus to a Canary version by e.g. the following command:

    yarn upgrade @docusaurus/core@3.7.0-canary-6264 @docusauru/preset-classic@3.7.0-canary-6264 @docusaurus/module-type-aliases@3.7.0-canary-6264 @docusaurus/types@3.7.0-canary-6264
  3. Then run yarn dev

Expected behavior

No upgrade recommendation banner

Actual behavior

------------------------------------------------------------------------------
Update available 3.7.0-canary-6264 → 3.7.0
To upgrade Docusaurus packages with the latest version, run the
following command:
`yarn upgrade @docusaurus/core@latest @docusaurus/preset-classic@latest
@docusaurus/module-type-aliases@latest @docusaurus/types@latest`
------------------------------------------------------------------------------ 

Your environment

  • Public source code:
  • Public site URL:
  • Docusaurus version used: canary version
  • Environment name and version (e.g. Chrome 89, Node.js 16.4): Node.js v20.9.0/22
  • Operating system and version (e.g. Ubuntu 20.04.2 LTS): Windows / CodeSandbox

Self-service

  • I'd be willing to fix this bug myself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugAn error in the Docusaurus core causing instability or issues with its executionstatus: needs triageThis issue has not been triaged by maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions