hatch-nodejs-version
This package provides two Hatch plugins:
version source plugin that reads/writes the package version
from the version field of the Node.js package.json file.
metadata hook plugin that reads PEP 621 metadata from the
Node.js package.json file.
Table of Contents
Installation
Global dependency
Version source
Metadata hook
License
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:
major
minor
patch
pre-release
build
Meanwhile, PEP 440 defines:
epoch
major
minor
patch
pre-release
post-release
dev-release
In order to ensure round-trip support, and ensure semantic
|