ITADN

Matching wrong preview version

#256Openitpropro 创建于 2026-04-06
I
itproprocommented
### Describe the bug For packages with preview versions, taze sometimes matches the wrong version. A good current example is drizzle beta: ``` dependencies drizzle-orm ~10d ^1.0.0-beta.20 → ^1.0.0-beta.9-e89174b ~3mo devDependencies drizzle-kit ~10d ^1.0.0-beta.20 → ^1.0.0-beta.9-e89174b ~3mo ``` Here is matches beta.9 instead of beta.20. I would suggest to not fix the matcher to match it as beta.9.e89xxx so as hash, as by semver convention, `beta.9-e89174b` is actually newer than beta.20. I would identify the prerelease tag, beta in this case, and use tags.beta as cap instead of tags.latest. ### Reproduction Use drizzle beta in any project ### System Info ```Shell System: OS: Linux 6.19 cpe:/o:nixos:nixos:26.05 26.05 (Yarara) Shell: 0.111.0 - /nix/store/y8lz9lscwxpsk7gzf9hrxpbsim5b93dp-nushell-0.111.0/bin/nu Binaries: Node: 24.14.0 npm: 11.9.0 pnpm: 10.33.0 bun: 1.3.11 Browsers: Chromium: 146.0.7680.164 Firefox: 149.0 ``` ### Used Package Manager bun ### Validations - [x] Follow our [Code of Conduct](https://github.com/antfu/.github/blob/main/CODE_OF_CONDUCT.md) - [x] Read the [Contributing Guide](https://github.com/antfu/contribute). - [x] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate. - [x] Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead. - [x] The provided reproduction is a [minimal reproducible](https://stackoverflow.com/help/minimal-reproducible-example) of the bug. ### Contributions - [x] I am willing to submit a PR to fix this issue - [x] I am willing to submit a PR with failing tests (actually just go ahead and do it, thanks!)
1 条评论