This release is a pre-release and may not be stable for production use.
hatch-nodejs-version
This package provides two Hatch plugins:
- version source plugin that reads/writes the package version
from the
versionfield of the NodeJSpackage.jsonfile. - metadata hook plugin that reads PEP 621 metadata from the
NodeJS
package.jsonfile.
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 pyproject.toml fields to take from their counterparts in package.json. |
contributors-as-maintainers |
bool |
True |
Whether contributors in package.json should be considered maintainers (otherwise, treat them as authors). |
bugs-label |
str |
"Bug Tracker" |
The key in the URLs table of pyproject.toml that is populated by the bugs field in package.json |
homepage-label |
str |
"Homepage" |
The key in the URLs table of pyproject.toml that is populated by the homepage field in package.json |
repository-label |
str |
"Repository" |
The key in the URLs table of pyproject.toml that is populated by the repository field in package.json |
License
hatch-nodejs-version is distributed under the terms of the MIT license.
Metadata
Release files for hatch-nodejs-version 0.3.0a0
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.3.0a0.tar.gz | 13.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| hatch_nodejs_version-0.3.0a0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.8 kB
Release files / hatch_nodejs_version-0.3.0a0.tar.gz
| Download URL | hatch_nodejs_version-0.3.0a0.tar.gz |
|---|---|
| Size | 13.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bec072635c582fc6842fd99429393134421be78d102e09793a511cf2e04f872d
|
|
BLAKE2b-256 checksum How to use checksums |
788818c288c3bf25b556e5abd5cf8f6faf42aeda7c9122ff877fac5871ee2c58
|
| 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.3.0a0-py3-none-any.whl
| Download URL | hatch_nodejs_version-0.3.0a0-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
cc1887837890c7ffd248110bf8ead554a4935f97e88661c08609c64065c541ea
|
|
BLAKE2b-256 checksum How to use checksums |
6f0d57b983bf11ce5e85f7bd016149f0fdd9da2f7eec040ff7ccc514200ce2bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|