rspack icon indicating copy to clipboard operation
rspack copied to clipboard

[Feature]: Release `nightly` version with a patch or minor version bump

Open colinaaa opened this issue 1 year ago • 0 comments

What problem does this feature solve?

I'm trying to use Renovate to upgrade @rspack/core to nightly for testing. The renovate.json looks like this:

{
  "packageRules": [
    {
      "matchPackagePrefixes": [
        "@rspack/",
      ],
      "followTag": "nightly",
      "rangeStrategy": "pin",
      "ignoreUnstable": false,
      "respectLatest": false,
      "automerge": false
    }
  ]
}

But it does not work. Renovate bot did not create any updating PR.

On the other hand, the swc is working, and the renovate bot created PR like this:

fix(deps): update dependency @swc/core to ^1.5.3-nightly-20240501.1

The current version of swc@latest is 1.5.2. And the 1.5.3-nightly-20240501.1 is a pre-release version that Renovate would think newer than the latest version.

However, @rspack/core uses the same major, minor, and patch versions as latest for nightly and canary npm dist-tag.

When major, minor, and patch are equal, a pre-release version has lower precedence than a normal version:

Example: 1.0.0-alpha < 1.0.0.

https://semver.org/#spec-item-11

This makes Renovate not updating the @rspack/core to latest(in my case, 0.6.3 to 0.6.3-canary-42527c5-20240504004548)

What does the proposed API of configuration look like?

Release canary and nightly versions with a patch or minor version bump.

E.g.: the latest of @rspack/core is 0.6.3.

Then, the canary version should be 0.7.0-canary-{commit}-{datetime} or 0.6.4-canary-{commit}-{datetime} if only patch changes exist.

This is how typescript and changesets do the versioning.

colinaaa avatar May 04 '24 14:05 colinaaa