xile611/Read package version package.json

Output the version specified in [path]/package.json

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Stale
License
None
Runtime
Deprecated runtime
namedescriptionrequireddefault
pathThe directory path of target json fileno./
filenameThe file name you want to read, default value is package.jsonnopackage.json
fieldThe field which specify the version you want to readnoversion
use_current_versionparse current version when semver_string not definednotrue
semver_stringThe semver string that want to be parsedno
semver_patternThe pattern to parse the semver stringno
namedescription
current_versionthe current version
pre_release_typethe pre-release type parsed from semver_string or current version
pre_release_namethe pre-release name parsed from semver_string or current version
fullthe full version parsed from semver_string or current version
mainthe main version parsed from semver_string or current version
majorthe major version parsed from semver_string or current version
minorthe minor version parsed from semver_string or current version
patchthe patch version parsed from semver_string or current version
prereleasethe prerelease string parsed from semver_string or current version
buildthe build string parsed from semver_string or current version