question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.versionrc.json is not being loaded

See original GitHub issue

.versionrc.json is not being loaded currently, only .versionrc. This is my .versionrc.json file currently:

$ cat .versionrc.json
{
  "scripts": {
    "precommit": "yo version-file --force --git"
  }
}

When I run, note that there’s no precommit hook executed:

$ npm run release -- --dry-run

> generator-version-file@0.1.0 release /Users/drosenbloom/git/generators/generator-version
> standard-version "--dry-run"

✔ bumping version in package.json from 0.1.0 to 0.1.1
✔ bumping version in package-lock.json from 0.1.0 to 0.1.1
✔ outputting changes to CHANGELOG.md

---
### [0.1.1](https://github.com/flyinbutrs/generator-version-file/compare/v0.1.0...v0.1.1) (2019-05-29)
---

✔ committing package-lock.json and package.json and CHANGELOG.md
✔ tagging release v0.1.1
ℹ Run `git push --follow-tags origin master && npm publish` to publish

But if I move .versionrc.json to .versionrc and retry, it does execute the hook.

$ mv .versionrc.json .versionrc
$ npm run release -- --dry-run

> generator-version-file@0.1.0 release /Users/drosenbloom/git/generators/generator-version
> standard-version "--dry-run"

✔ bumping version in package.json from 0.1.0 to 0.1.1
✔ bumping version in package-lock.json from 0.1.0 to 0.1.1
✔ outputting changes to CHANGELOG.md

---
### [0.1.1](https://github.com/flyinbutrs/generator-version-file/compare/v0.1.0...v0.1.1) (2019-05-29)
---

✔ Running lifecycle script "precommit"
ℹ - execute command: "yo version-file --force --git"
✔ committing package-lock.json and package.json and CHANGELOG.md
✔ tagging release v0.1.1
ℹ Run `git push --follow-tags origin master && npm publish` to publish

Tested on v6.0.1.

$ npm run release -- --version

> generator-version-file@0.1.0 release /Users/drosenbloom/git/generators/generator-version
> standard-version "--version"

6.0.1

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jbottiglierocommented, Jun 8, 2019

Hey! Thanks for the report – this actually isn’t supported in the current release, but I’ve opened a PR that should account for this functionality.

1reaction
jbottiglierocommented, Jun 11, 2019

Ah, I see the problem here… it’s actually resolved in #357 which will land in the next version @bcoe.

I’ve opened #381 if we want to ensure coverage for now…

…I think tests deserve a bit of a clean-up with the new configuration patterns, but we can save that conversation for another day.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can i custom config CHANGELOG.md using standard- ...
yes. according to doc: You can configure standard-version either by: Placing a standard-version stanza in your package.json (assuming your ...
Read more >
Improve your commits and versioning in JavaScript
Using Conventional Commits and Semantic Versioning to improve and simplify your commits and version bumps in Javascript projects.
Read more >
How to use the eslint/package.json.version function in eslint
To help you get started, we've selected a few eslint/package.json.version ... new Error( `eslint-plugin-html error: It seems that eslint is not loaded.
Read more >
Automate your versioning (part 3) - Felipe's Thoughts
Already had NodeJS installed in my machine;; Not all tools worked very ... more than one) is the “.versionrc” itself, and it is...
Read more >
Generating changelog automatically with Standard Version
Since my initial commit was a chore, it does not mention any features. ... our version in the package.json hasn't changed.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found