Closed badlydrawnrob closed 11 months ago
It's better to do this manually through GitHub Desktop and just add the version number directly to the
package.json
.
Bumping the version with npm, and then pushing the changes with Github Desktop do not seem to push the new version tag at all. You'd have to do it in the terminal and git push -origin
or some such bollocks.
Besides that, I think I prefer Semvers 2.1.2
format over Github's preference to add a V in their tags (like v2.1.2
) although I think it's a matter of preference and I honestly don't give a shit.
Another developer problem to worry about.
Also see this article about using ~
or ^
in front of the dependancies. Perhaps using the updated tag version will work, I have no flippin' idea:
github:badlydrawnrob/print-first-css#a287d7a
~github:badlydrawnrob/print-first-css#a287d7a
^github:badlydrawnrob/print-first-css#a287d7a
github:badlydrawnrob/print-first-css#2.1.3
Anyhow, I think npm update <package name>
forces the package to be updated.
Damn. I think the V in the minor.major.patch
tag number might be important. Tried:
github:badlydrawnrob/print-first-css#2.1.3
npm ERR! code 1 npm ERR! The git reference could not be found npm ERR! command git --no-replace-objects checkout 2.1.3 npm ERR! error: pathspec '2.1.3' did not match any file(s) known to git
Just reading all the above gives me a headache, so I'm gonna say just npm update print-first-css
and stick to using the commit number, i.e: github:badlydrawnrob/print-first-css#a287d7a
for now!
I'm closing this before my head explodes 🤯
Some problems with Github tags and
npm
NPM is downloading an old version of print-first-css for some reason (version
2.2.10
on thepackage.json
), so a quick look here seems to point to adding the proper commit link.My commit tags (v3.1.1) and release files (3.0.0) are a bit out of whack —
package.json
is3.0.0
also. Github doesn't automatically add a tag whenpackage.json
is updated, so this must be done manually.Perhaps I made a few minor changes but kept the release number the same?What I must have done is add tags via GitHub Desktop, but kept the same Release number at3.0.0
— there is a way to updatepackage.json
ANDmajor.minor.patch
version number, but I don't think it's possible with the desktop app.I think it's something like
npm version patch -m 'message'
which in this thread says it adds a Git tag at the same time. See also the official NPM docs.Important note: This might not play nicely with the GitHub Desktop app.