Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Packages added with the OpenUPM CLI always install the latest version, even if it is a preview #64

Closed
1 task done
SimonDarksideJ opened this issue Aug 11, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@SimonDarksideJ
Copy link

Bug report

Bug category

  • Registry: issues related to the registry server.

Steps to reproduce

  • Create a new Unity solution
  • Add a package using the CLI, e.g. openupm add com.realitycollective.service-framework

What is expected?

The latest RELEASE version should be installed.

What is actually happening?

The latest release, which is a preview is installed

Other relevant information

@favoyang
Copy link
Member

When you publish a package, the latest tag is automatically set to the published version, unless you use the --tag option. For example, you can use npm publish --tag=beta to set a specific tag.

By default, if you use npm install (without adding @ or @), it installs the latest tag.

When you handle the publishing process manually, you can choose whether to mark a pre-release as the latest "dist-tag" or assign a particular tag. OpenUPM automates the process, so it designates the new release as the latest.

One solution could be adding the --stable flag to the openupm-cli install command, which would disregard pre-release versions.

Another option is to link the Git tag to the npm dist-tag. For instance, mapping 1.0.3-pre.2 to the pre dist-tag. This way, the "stable" version is installed by default, unless you specify --tag pre. However, this approach requires testing to determine how Unity handles different dist-tags or whether it simply ignores them. Keep in mind that our decisions usually aim to find a balance that aligns with Unity's behavior.

@favoyang favoyang transferred this issue from openupm/openupm Dec 12, 2023
@favoyang favoyang added the enhancement New feature or request label Jan 17, 2024
@ComradeVanti
Copy link
Collaborator

I'm closing this issue in favor of #395. @SimonDarksideJ please take a look there for updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants