Skip to content

pnpm up -r --latest overrides alpha versions that are not yet tagged as latest #7436

@cpojer

Description

@cpojer

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

8.12.1

Which area(s) of pnpm are affected? (leave empty if unsure)

Dependencies resolver, CLI

Link to the code that reproduces this issue or a replay of the bug

No response

Reproduction steps

I'm currently using Prettier's experimental v4 version via:

"devDependencies": {
	"prettier": "4.0.0-alpha.7"
}

When I run pnpm up -r --latest to upgrade all packages, it will revert prettier to the latest stable version of 3.11.

Describe the Bug

The existing behavior is technically correct as I'm asking pnpm to upgrade to latest, but it's unlikely that it matches the user intent as they likely want to update everything else to latest except such experimental packages unless there is a newer version of the experimental package or the latest version of the package has moved on to be "above" (semver) the current experimental package.

Expected Behavior

I expect prettier to stay upgraded to major version 4 even if the latest version is 3.

Which Node.js version are you using?

21.4.0

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions