Skip to content
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

package-lock.json's version does not match package.json's #799

Closed
pgcalixto opened this issue Oct 4, 2020 · 2 comments
Closed

package-lock.json's version does not match package.json's #799

pgcalixto opened this issue Oct 4, 2020 · 2 comments

Comments

@pgcalixto
Copy link
Contributor

It would be ideal to have the version on package-lock.json matching package.json's.
It seems to be missing as a part of the release creation.

@pgcalixto
Copy link
Contributor Author

pgcalixto commented Oct 4, 2020

I noticed this while working on a different PR: #797 (comment).

Also, @GillesDebunne's comment #794 (comment) made me notice that there is an scripts/ directory containing some scripts I believe are run by the maintainers when creating a new release.

My suggestion is to use npm version command to do it on scripts/tag, since it already generates a new bump commit, creates a git tag and increases the version both on package.json and package-lock.json.

I will be creating a PR now based on this suggestion, for further analysis by the maintainers.

@pgcalixto
Copy link
Contributor Author

I created https://github.com/moment/luxon/pull/800/files to use it as a reference.

There are some problems involved, such as:

  • I believe scripts/release is run after a maintainer pushes a bump commit (such as this: 345b1cd). Since scripts/tag would create the bump commit, its order should be changed and it should be called as the first script.
  • npm version creates tags with the vX.Y.Z format, while Luxon uses X.Y.Z (without the v prefix). It would be best to find a solution that maintains the same way it already is (no v prefix). I haven't found a way to do this using npm version.
    Referece: https://docs.npmjs.com/cli/version

pgcalixto added a commit to pgcalixto/luxon that referenced this issue Oct 8, 2020
For a less bold approach, the exported VERSION variable is now
hardcoded. Meanwhile, the `scripts/tag` script was improved to
ensure that all versions match.

See moment#800 (comment).

Resolves moment#747 and moment#799.
pgcalixto added a commit to pgcalixto/luxon that referenced this issue Oct 8, 2020
For a less bold approach, the exported VERSION variable is now
hardcoded. Meanwhile, the `scripts/tag` script was improved to
ensure that all versions match.

See moment#800 (comment).

Resolves moment#747 and resolves moment#799.
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 a pull request may close this issue.

1 participant