xile611/Read package version package.json
Output the version specified in [path]/package.json
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Stale
- License
- None
- Runtime
- Deprecated runtime
Inputs
| name | description | required | default |
|---|---|---|---|
| path | The directory path of target json file | no | ./ |
| filename | The file name you want to read, default value is package.json | no | package.json |
| field | The field which specify the version you want to read | no | version |
| use_current_version | parse current version when semver_string not defined | no | true |
| semver_string | The semver string that want to be parsed | no | — |
| semver_pattern | The pattern to parse the semver string | no | — |
Outputs
| name | description |
|---|---|
| current_version | the current version |
| pre_release_type | the pre-release type parsed from semver_string or current version |
| pre_release_name | the pre-release name parsed from semver_string or current version |
| full | the full version parsed from semver_string or current version |
| main | the main version parsed from semver_string or current version |
| major | the major version parsed from semver_string or current version |
| minor | the minor version parsed from semver_string or current version |
| patch | the patch version parsed from semver_string or current version |
| prerelease | the prerelease string parsed from semver_string or current version |
| build | the build string parsed from semver_string or current version |