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 |
|---|---|---|---|
path |
str |
package.json |
Relative path to the package.json file. |
fields |
list of str |
None |
Optional list of fields to take from the generated metadata object. |
contributors-as-maintainers |
bool |
True |
Whether contributors in package.json should be considered maintainers (otherwise, treat them as authors) |
License
hatch-nodejs-version is distributed under the terms of the MIT license.
Metadata
Release files for hatch-nodejs-version 0.2.1.post2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| hatch_nodejs_version-0.2.1.post2.tar.gz | 12.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hatch_nodejs_version-0.2.1.post2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 20.5 kB
Release files / hatch_nodejs_version-0.2.1.post2.tar.gz
| Download URL | hatch_nodejs_version-0.2.1.post2.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5fa60740bc0318368aa365ed6cb44754cc310ef7c679b410b788664360aa15eb
|
|
BLAKE2b-256 checksum How to use checksums |
467a6134e200730b7c0a2ad27607e184ed8e77b5232c0a99289eccbf764d4443
|
| 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.post2-py3-none-any.whl
| Download URL | hatch_nodejs_version-0.2.1.post2-py3-none-any.whl |
|---|---|
| Size | 7.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d91d714f28dbdd577e8d9be382352e64baf0149692d63bf8da0d37faa4b61373
|
|
BLAKE2b-256 checksum How to use checksums |
d1106a11a6063e0a454c751ca68c98422d98500b6cf2bcfe5296266d8f667150
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Security for hatch-nodejs-version 0.2.1.post2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.