hatch-nodejs-version
This provides a version source plugin for Hatch that reads/writes the package version from the version field of the NodeJS package.json file.
Table of Contents
Global dependency
Ensure hatch-nodejs-version is defined within the build-system.requires field in your pyproject.toml file.
[build-system]
requires = ["hatchling", "hatch-nodejs-version"]
build-backend = "hatchling.build"
Version source
The version source plugin name is nodejs.
-
pyproject.toml
[tool.hatch.version] source = "nodejs"
-
hatch.toml
[version] source = "nodejs"
Semver
The semver specification defines the following version sections:
majorminorpatchpre-releasebuild
Meanwhile, PEP 440 defines:
epochmajorminorpatchpre-releasepost-releasedev-release
In order to ensure round-trip support, and ensure semantic consistency between NodeJS and Python, this plugin only accepts the common version parts:
majorminorpatchpre-release
e.g. 1.2.3-rc0.
Version source options
| Option | Type | Default | Description |
|---|---|---|---|
path |
str |
package.json |
Relative path to the package.json file. |
Metadata hook
The metadata hook plugin name is nodejs.
-
pyproject.toml
[tool.hatch.metadata.hooks.nodejs] -
hatch.toml
[metadata.hooks.nodejs]
Metadata hook options
| Option | Type | Default | Description |
|---|---|---|---|
fields |
list of str |
None | Optional list of fields to take from the generated metadata object. |
License
hatch-nodejs-version is distributed under the terms of the MIT license.
Metadata
Release files for hatch-nodejs-version 0.2.1.post1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| hatch_nodejs_version-0.2.1.post1.tar.gz | 12.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hatch_nodejs_version-0.2.1.post1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.3 kB
Release files / hatch_nodejs_version-0.2.1.post1.tar.gz
| Download URL | hatch_nodejs_version-0.2.1.post1.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
de8a548ac13a9283d5b8beaf82a5273c884c865b5d77e91f6452b2c918b3fa58
|
|
BLAKE2b-256 checksum How to use checksums |
3e487d129d0e62e0a9442c77157e9991ded6f3b694ef5a494038135253ecdca6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Release files / hatch_nodejs_version-0.2.1.post1-py3-none-any.whl
| Download URL | hatch_nodejs_version-0.2.1.post1-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ff4b6f9e664594115ce0b82177a409c84d90edfdf1766720021428a6e1f8388e
|
|
BLAKE2b-256 checksum How to use checksums |
b3f484bdc0771a722e61573e490f69e9dcb139b1b994fc7ca50b93b18c41c312
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|