Remove the version
field from the package.json
file
#13664
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
According to https://docs.npmjs.com/cli/v7/configuring-npm/package-json#version, the "version" field is not required[1]:
Hence it shouldn't be necessary to have a "dummy"
version
field in thepackage.json
file, and it seems quite unfortunate to have an essentially meaningless entry in that file.[2]Furthermore, I'd even go as far as suggesting that it's actually doing more harm than good in practice, since it's not uncommon for people to open issues where they simply quote the
package.json
-entry when filling out the ISSUE_TEMPLATE thus causing confusion as to which exact version is actually used.Unless I'm misremembering, I believe that the only reason for adding the
version
field was that is was necessary in order for things to work back when testing was run on Travis.Now we're using GitHub Actions instead, where things seem to work just find even without a
version
field; hence why I think it makes sense to remove this.[1] Please note that this patch doesn't affect the
pdfjs-dist
package, since thepackage.json
file used there is created ingulpfile.js
during building.[2] Trying to, automatically, update the
version
field on every commit really doesn't seem worth it to me.