Skip to content

Commit fbc10cd

Browse files
authored
Update README.md
1 parent 6bdb77e commit fbc10cd

File tree

1 file changed

+25
-2
lines changed

1 file changed

+25
-2
lines changed

README.md

Lines changed: 25 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,32 @@
44
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hatch-nodejs-version.svg)](https://pypi.org/project/hatch-nodejs-version)
55

66
-----
7-
This provides a plugin for Hatch that uses a `package.json` file to determine (and update) project versions.
7+
This provides a [version source plugin](https://hatch.pypa.io/latest/plugins/version-source/) for Hatch that uses a `package.json` file to determine (and update) project versions.
8+
9+
The semver specification defines the following version sections:
10+
- `major`
11+
- `minor`
12+
- `patch`
13+
- `pre-release`
14+
- `build`
15+
16+
Meanwhile, [PEP 440](https://peps.python.org/pep-0440/#version-scheme) defines:
17+
- `epoch`
18+
- `major`
19+
- `minor`
20+
- `patch`
21+
- `pre-release`
22+
- `post-release`
23+
- `dev-release`
24+
25+
In order to ensure round-trip support, and ensure semantic consistency between NodeJS and Python, this plugin only accepts the common version parts:
26+
- `major`
27+
- `minor`
28+
- `patch`
29+
- `pre-release`
30+
31+
e.g. `1.2.3-rc0`.
832

9-
As the semver specification only specifies an addition prerelease segment (and build segment) to the release segment, this plugin restricts versions to these segments, i.e. `major.minor.patch-(pre)0`.
1033

1134
**Table of Contents**
1235

0 commit comments

Comments
 (0)