Skip to content

No ".dev" should appear in package.json version number #317

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

Merged
merged 1 commit into from
May 27, 2021

Conversation

xuhdev
Copy link
Contributor

@xuhdev xuhdev commented May 18, 2021

This is the error message I got when I ran inv assets:

npm WARN Invalid version: "0.4.1.dev"
npm WARN flask-restx No description
npm WARN flask-restx No repository field.
npm WARN flask-restx No README data
npm WARN flask-restx No license field.

@xuhdev
Copy link
Contributor Author

xuhdev commented May 18, 2021

The ill-formed version number makes development annoying (always have to manually remove .dev if inv assets is to be invoked).
package.json doesn't allow an easy way to add comment. I'm happy to add a test for inv assets if you prefer this.

@j5awry
Copy link
Contributor

j5awry commented May 19, 2021

Thank you for the PR. However, this doesn't fix the issue, it only fixes immediate installs. Furthermore, it will incorrectly set this to be version 0.4.1, when it needs to be a pre-release version. we use bumpr (https://github.com/noirbizarre/bumpr) for our automation right now. The file that will need to be updated to correct things is: https://github.com/python-restx/flask-restx/blob/master/bumpr.rc

any change proposal here will need to work in our release workflow: https://github.com/python-restx/flask-restx/blob/master/CONTRIBUTING.rst#release-process

@xuhdev
Copy link
Contributor Author

xuhdev commented May 19, 2021

Thanks for the explanation. I checked out bumpr's documentation, it doesn't seem like it can use - to connect the suffix. I also tried to manually add the dash, but seems like bumpr would mess it up. Its regex option also doesn't seem to support 2 different format.

The easiest solution seems to put a warning message or a hack in the version string in the assets task. How does it sound for you?

@j5awry
Copy link
Contributor

j5awry commented May 20, 2021

There's also an open bug against bumpr : noirbizarre/bumpr#39

I'm assuming that noirbizarre isn't making updates. I've suggested moving off bumpr in the past, and I think this may be the breaking point. Do you have suggestions of other similar projects? I've used versoineer in the past with success. or we could fork bumpr and bring in the fixes (or offer to take over some contribution there as well, as we originally did with flask-restplus)

@xuhdev
Copy link
Contributor Author

xuhdev commented May 20, 2021

I mostly use setuptools_scm. It generates versions automatically based on the current git tag (for release versions) or how far it is from the last git tag (for dev versions). So, there shouldn't be any need to run any specific command to bump version number, just do git tag. It is maintained by PYPA so the probability of getting abandoned without transition guide is low. But I don't know whether it is possible to get it to work with npm's version string format.

@xuhdev xuhdev requested a review from j5awry May 22, 2021 19:23
This is the error message I got when I ran `inv assets`:

    npm WARN Invalid version: "0.4.1.dev"
    npm WARN flask-restx No description
    npm WARN flask-restx No repository field.
    npm WARN flask-restx No README data
    npm WARN flask-restx No license field.
@xuhdev xuhdev changed the title No "dev" should appear in package.json version number No ".dev" should appear in package.json version number May 24, 2021
@xuhdev xuhdev requested a review from j5awry May 24, 2021 20:01
@codecov
Copy link

codecov bot commented May 26, 2021

Codecov Report

Merging #317 (a5c502f) into master (a39e06f) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #317   +/-   ##
=======================================
  Coverage   96.81%   96.81%           
=======================================
  Files          20       20           
  Lines        2730     2730           
=======================================
  Hits         2643     2643           
  Misses         87       87           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a39e06f...a5c502f. Read the comment docs.

@j5awry j5awry merged commit 25126c4 into python-restx:master May 27, 2021
@xuhdev xuhdev deleted the no-dev branch June 10, 2021 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants