Comments (21)
Everything works, thanks for your time @edbzn! And no worries about the delay ;)
from semver.
Creating a Git tag with the name v13.0.0 (current version in package.json) fixed this issue for me.
from semver.
Hi, could you tell me what is the version in your package.json file and also what is the name of the last git tag?
from semver.
Hi, thanks for reaching out so quickly!
Package.json version: 1.10.12
Last git tag: v1.10.12
from semver.
Actually, the error is now Error: fatal: bad revision 'v1.10.12..HEAD'
because I tried manually bumping versions to see if it changed anything.
from semver.
Same here.
@jscutlery/[email protected]
[email protected]
> nx run workspace:version
Error: fatal: bad revision 'v13.0.0..HEAD'
at Transform._transform (/Users/crash/git/iko-travel-spa/node_modules/git-raw-commits/index.js:83:30)
at Transform._read (/Users/crash/git/iko-travel-spa/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:177:10)
at Transform._write (/Users/crash/git/iko-travel-spa/node_modules/through2/node_modules/readable-stream/lib/_stream_transform.js:164:83)
at doWrite (/Users/crash/git/iko-travel-spa/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:409:139)
at writeOrBuffer (/Users/crash/git/iko-travel-spa/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:398:5)
at Transform.Writable.write (/Users/crash/git/iko-travel-spa/node_modules/through2/node_modules/readable-stream/lib/_stream_writable.js:307:11)
at Socket.ondata (_stream_readable.js:718:22)
at Socket.emit (events.js:326:22)
at addChunk (_stream_readable.js:297:12)
at readableAddChunk (_stream_readable.js:268:11)
from semver.
FYI It works with v1.3.1
from semver.
v1.3.2 was basically a fix to log this kind of error in the terminal, instead of silently failing, I'm not sure the issue comes from this release, by any chance is your repo accessible? It would help me a lot, meanwhile, I will try to reproduce this locally.
from semver.
v1.3.2 was basically a fix to log this kind of error in the terminal, instead of silently failing
Just tried with v1.3.1 and v1.3.0 and they both fail silently, so the issue is not with this version itself.
If it's of any help, I switched from WSL back to Windows few days ago and the issue only started happening after that.
I'm afraid I can't share the repo since it's for internal use only. :/
from semver.
Interesting! it means it's possibly a compatibilty issue with windows, how will I debug this since I'm on Linux. 😄
from semver.
Does tagging the commit as a simple tag or an annotated tag make any difference in how the library handles the following tags?
from semver.
I don't think so, both should be a valid pointer in the git history.
Could you run git describe --tags --abbrev=0
and tell me what it returns? If it returns v1.10.10
, the last tag in the history, then v1.10.10..HEAD
is a valid comparison. You can try by running git diff v1.10.10..HEAD
for example, let me know what you get from both.
To make it clear, the version in package.json should refer to a valid git tag, for example, if you have "version": "1.10.10"
in your package.json, but no tag v1.10.10
exist in your git history, then it will throw this bad revision error because v1.10.10
is not a valid git reference.
This behavior was recently changed (#117 and #102), but it's not yet released, now on master we just pull the last semver tag, the version in the package.json is not used as an input anymore.
from semver.
I am on Mac OS Big Sur and have the same issue
from semver.
Running the command:
git describe --tags --abbrev=0
Produces:
fatal: No names found, cannot describe anything.
My package.json is at 13.0.0. It was a version I recently added arbitrarily because of previous failures with the semver plugin.
FYI I never develop in a tag that contains the version number. Is that a requirement of your plugin? I am confused.
We use gitflow and work in "develop" branch. We just migrated our existing code to a new Git repo that contains no tags.
FYI This error also occurs in a clean new project when using v1.3.2 of your plugin.
Sorry. Also cannot share the company codebase.
from semver.
This is the reason why it's failing, semver relies on git tags, to compute the next version it tries to retrieve all commits since last git tag, if no tag found then it couldn't know from which point in the history it should compute the next version, to fix it you have to create a tag wherever it has a sense in your history, and sync it with the version in your package.json.
from semver.
Just found where the issue was: running nx run workspace:version
from v1.10.9 produced a v1.1.10 tag instead of v1.10.10. I went back and manually deleted and recreated the tag, works fine now. Might be a bug in the library? In the meantime, thanks a lot for your time @edbzn!
from semver.
Well, apparently it's not fully solved. It worked until doing a dry run, but at the moment of actually running the command I get this error: fatal: Unable to create 'C:/src/projects/csl/.git/index.lock': File exists.
from semver.
from v1.10.9 produced a v1.1.10 tag instead of v1.10.10
I can't help you more without seeing your git history. To produce the next version we depend on a module used by almost 10 million projects on GitHub, I'm quite confident it's not a bug from the library, but in case you can reproduce it, feel free to open another issue.
Well, apparently it's not fully solved. It worked until doing a dry run, but at the moment of actually running the command I get this error: fatal: Unable to create 'C:/src/projects/csl/.git/index.lock': File exists.
This one was also solved previously (#108), but not yet released. I will see today if I can release a new version.
from semver.
I will see today if I can release a new version.
Awesome, thank you very much!
from semver.
Hey there @edbzn! Any news on the update? Sorry to bother you and thanks in advance, but I was wondering when it will be available :)
from semver.
Sorry for the delay I just released a new version 1.4.0 with all the fixes, let me know if any problems persist.
from semver.
Related Issues (20)
- projectName is interpolated by NX now HOT 2
- Drop Angular CLI compatibility HOT 1
- targetDependencies is removed in Nx 16+ HOT 2
- Question: How to proceed if NPM publish fails HOT 1
- Custom headerPattern doesn't get picked up by changelog conventional-commit-parser HOT 1
- Preset Schema doesn't match the DOCs HOT 2
- Support pnpm in install generator (husky) HOT 2
- Drop old `${var}` interpolation syntax
- Bug: Changelog template not included in npm package HOT 2
- Publish new version for nx 17
- Version task never returns with nx 17 and version 4.0.0 HOT 4
- Does the announcement of a `nx release version` and `nx release changelog` affect the development of the plugin? HOT 2
- All projects are failing with unspecific error message HOT 5
- Drop deprecated post-targets "<project>:<target>" syntax
- nx run core-types:version --push=true --baseBranch=feature/SAD : failed Error: fatal: Unable to create '/bp2/src/.git/index.lock': File exists. HOT 1
- Could not find 'nx' module in this workspace. Error: [readCachedProjectGraph] ERROR: No cached ProjectGraph is available. HOT 2
- Question about `post-targets` and n`gx-deploy-npm:deploy` HOT 2
- Calculating wrong version number HOT 2
- Document differences with `nx release` and migration options HOT 1
- no tag found when nx workspace isn't at project root then the version calculation fails HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from semver.