Skip to content

Commit ef86dde

Browse files
committed
docs: update readme
1 parent 4928e21 commit ef86dde

File tree

1 file changed

+28
-26
lines changed

1 file changed

+28
-26
lines changed

README.md

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,11 @@
77
-----
88
This provides a [version source plugin](https://hatch.pypa.io/latest/plugins/version-source/) for Hatch that reads/writes the package version from the `version` field of the NodeJS `package.json` file.
99

10-
The semver specification defines the following version sections:
11-
- `major`
12-
- `minor`
13-
- `patch`
14-
- `pre-release`
15-
- `build`
16-
17-
Meanwhile, [PEP 440](https://peps.python.org/pep-0440/#version-scheme) defines:
18-
- `epoch`
19-
- `major`
20-
- `minor`
21-
- `patch`
22-
- `pre-release`
23-
- `post-release`
24-
- `dev-release`
25-
26-
In order to ensure round-trip support, and ensure semantic consistency between NodeJS and Python, this plugin only accepts the common version parts:
27-
- `major`
28-
- `minor`
29-
- `patch`
30-
- `pre-release`
31-
32-
e.g. `1.2.3-rc0`.
33-
3410

3511
**Table of Contents**
3612

3713
- [Installation](#installation)
38-
- [Global dependency](#global-dependency)
14+
- [Global dependency](#global-dependency)]
3915
- [Version source](#version-source)
4016
- [Metadata hook](#metadata-hook)
4117
- [License](#license)
@@ -67,6 +43,32 @@ The [version source plugin](https://hatch.pypa.io/latest/plugins/version-source/
6743
[version]
6844
source = "nodejs"
6945
```
46+
47+
### Semver
48+
49+
The semver specification defines the following version sections:
50+
- `major`
51+
- `minor`
52+
- `patch`
53+
- `pre-release`
54+
- `build`
55+
56+
Meanwhile, [PEP 440](https://peps.python.org/pep-0440/#version-scheme) defines:
57+
- `epoch`
58+
- `major`
59+
- `minor`
60+
- `patch`
61+
- `pre-release`
62+
- `post-release`
63+
- `dev-release`
64+
65+
In order to ensure round-trip support, and ensure semantic consistency between NodeJS and Python, this plugin only accepts the common version parts:
66+
- `major`
67+
- `minor`
68+
- `patch`
69+
- `pre-release`
70+
71+
e.g. `1.2.3-rc0`.
7072

7173
### Version source options
7274

@@ -91,7 +93,7 @@ The [metadata hook plugin](https://hatch.pypa.io/dev/plugins/metadata-hook/refer
9193
[metadata.hooks.nodejs]
9294
```
9395

94-
### Version source options
96+
### Metadata hook options
9597

9698
| Option | Type | Default | Description |
9799
|----------|-----------------|---------|---------------------------------------------------------------------|

0 commit comments

Comments
 (0)