-
-
Notifications
You must be signed in to change notification settings - Fork 10
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
Package Resolution #223
Comments
So as Charles suggested, I think we should go ahead and switch to incremental versioning. The incremental versioning makes no difference if we hard-set the package version to just use the tag in our I've expressed concerns of relying on incremental versions and how it might disrupt development for someone who is working with a preview package and hasn't had a chance to rebase. For instance:
We discussed the option to publish prerelease versions using the base branch as a point of reference. So say I'm developing on One possible workaround would be to have a preinstall (or postinstall) script |
✨ TL;DR: See conclusion section at the bottom.
Covector currently offers
date
andsha
as options for preview package version templating:And we're trying to re-visit the idea of using incremental versions:
🟦 yarn 1.22.11 because 2 is 🗑
yarn add package@tag
will resolve to the caret version of the last tag that was publishedso in this ☝️ example where we publish
.0
after.1
, runningyarn add package@tag
will update yourpackage.json
toand this will actually install
.0
and not.1
despite the caret. at yarn version 1.22.11, runningyarn --force
will not fetch.1
either. in order for the caret to "work", you would need to delete your lockfile and run install again at which point it will finally evaluate.1
.if
1.0.1
exists, runningyarn add package@tag
will still install1.0.0-feature.0
until you remove the lockfile and run install at which point you'll finally get1.0.1
.🟥 npm 6.14.9
the tag mechanism seems to work the same way in npm. running
npm install package@tag
will grab the last tagged version regardless of its number. but unlikeyarn --force
,npm update
will actually fetch the latest package versions without having to delete the lockfile:hard set with tag
alternatively, instead of running
yarn add package@tag
ornpm install package@tag
, you can update yourpackage.json
manually to use the tag (and not have it resolve to a careted version of the tag):this will always resolve to the most recent tag regardless of if you're using
npm
oryarn
. so in our example, it will always install1.0.0-feature.0
no matter what. even if1.0.1
is available and even if the current lockfile has the package locked at1.0.1
, if you set the version of your package to the tag, it will resolve to last tag published (.0
in our example).Conclusion?
☝️ Will both grab the last published tag version (
1.0.0-feature.0
) and not the "highest" (1.0.0-feature.1
). Both will set the package version to^1.0.0-feature.0
in yourpackage.json
. Withnpm
you can runnpm update
, withyarn
it seems you must delete the lockfile and runyarn install
again.☝️ Will always resolve to the last version that was published using the tag.
The text was updated successfully, but these errors were encountered: