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.

npm plugin does not bump the version in package.json

See original GitHub issue

Describe the bug

The package.json is not updated, when running (yarn/npx) auto shipit on a pre-release branch. (yarn/npx) auto shipit --dry-run --quiet is not reporting the correct version number in that case. This causes issues downstream as the version number is used to tag docker images and other artifacts.

To Reproduce

  1. Commit on next
  2. auto shipit runs in Github Action
  3. auto released correctly to github
  4. Package json did not update

Expected behavior

Either package.json updates, or auto shipit --dry-run calculates based on tags for prereleases.

Environment information: “Current version” is wrong here already, the current tag is v0.2.0-next.11

yarn run v1.22.10
$ /home/rwa/Project/####/node_modules/.bin/auto info

Environment Information:

"auto" version: v9.59.1
"git"  version: v2.29.0
"node" version: v14.14.0

Project Information:

✔ Repository:      #####
✔ Author Name:     Robert Wawrzyniak
✔ Author Email:    robert.wawrzyniak@###.de
✔ Current Version: v0.2.0-next.10
✔ Latest Release:  v0.1.0 (​https://github.com/####/releases/tag/v0.1.0​)

✔ Labels configured on GitHub project

GitHub Token Information:

✔ Token:            [Token starting with 62de]
✔ Repo Permission:  admin
✔ User:             thuringia
✔ API:              undefined (​undefined​)
✔ Enabled Scopes:   repo
✔ Rate Limit:       4772/5000

Done in 3.39s.
Time: 0h:00m:04s

Additional context This might be related to #1490 ?

This appears to be by design: https://github.com/intuit/auto/blob/2f03089f43cc098ac2687c7ab3ca5fd8d2502a1c/plugins/npm/src/index.ts#L869 The bump is only run for base branches here, but there is no config flag to change this.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14

github_iconTop GitHub Comments

2reactions
hipstersmoothiecommented, Oct 22, 2020

Ah, another vote for me fixing dry-run behavior sooner rather than later. Will take a look at fixing all of that next weekend. Thanks for the feedback and using auto!

1reaction
hipstersmoothiecommented, Oct 27, 2020

@thuringia @smithki Could you test and see if v10 solves your issues?

Read more comments on GitHub >

github_iconTop Results From Across the Web

version-bump-updated - npm
Version bump package.json (or a file with a version property) via various version bump plugins/strategies. What it offers. Can update package.
Read more >
How to automatically bump NPM package version with ...
I have an NPM package that up until now, I have been manually bumping the version in package.json and then my GitHub actions...
Read more >
Version Bump Prompt - JavaScript Dev Tools
Automate your release process with a single command that can: Prompt for the type of version bump. Bump the version number any file,...
Read more >
Frequently Asked Questions - semantic-release
The package.json 's version will be updated by the semantic-release command just before publishing to npm, therefore it won't be available for scripts...
Read more >
How to Use Semantic Versioning in NPM | heynode.com
If a version of a package is tagged in package.json to ^2.0.0 , and the latest version is 2.88.0 , version 2.88.0 will...
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