Core implementation of the tool
This a model which contains all the possible options for the tool with default values.
This method will search all files with the name .npmversionrc
in the hierarchy to load the possible configuration
It will apply the versioning logic. It allows two parameters:
- options (
VersionOptions
|object
|null
): optional parameter with the configuration to apply. Otherwise it uses the default values declared in the model. - cwd (
string
): optional parameter. Otherwise it usesprocess.cwd()
> semver 1.2.3 --increment patch 1.2.4
> semver 1.2.3 --increment minor 1.3.0
> semver 1.2.3 --increment major 2.0.0
> semver 1.2.3 --increment prerelease 1.2.4-0
> semver 1.2.3 --increment prepatch 1.2.4-0
> semver 1.2.3 --increment preminor 1.3.0-0
> semver 1.2.3 --increment premajor 2.0.0-0
> semver 1.2.3-0 --increment patch 1.2.3
> semver 1.2.3-0 --increment minor 1.3.0
> semver 1.2.3-0 --increment major 2.0.0
> semver 1.2.3-0 --increment prerelease 1.2.3-1
> semver 1.2.3-0 --increment prepatch 1.2.4-0
> semver 1.2.3-0 --increment preminor 1.3.0-0
> semver 1.2.3-0 --increment premajor 2.0.0-0
> semver 1.2.3-beta --increment patch 1.2.4
> semver 1.2.3-beta --increment minor 1.3.0
> semver 1.2.3-beta --increment major 2.0.0
> semver 1.2.3-beta --increment prerelease 1.2.3-beta.0
> semver 1.2.3-beta --increment prepatch 1.2.4-0
> semver 1.2.3-beta --increment preminor 1.3.0-0
> semver 1.2.3-beta --increment premajor 2.0.0-0
> semver 1.2.3-beta.0 --increment patch 1.2.4
> semver 1.2.3-beta.0 --increment minor 1.3.0
> semver 1.2.3-beta.0 --increment major 2.0.0
> semver 1.2.3-beta.0 --increment prerelease 1.2.3-beta.1
> semver 1.2.3-beta.0 --increment prepatch 1.2.4-0
> semver 1.2.3-beta.0 --increment preminor 1.3.0-0
> semver 1.2.3-beta.0 --increment premajor 2.0.0-0
> semver 1.2.3 --preid beta --increment patch 1.2.4
> semver 1.2.3 --preid beta --increment minor 1.3.0
> semver 1.2.3 --preid beta --increment major 2.0.0
> semver 1.2.3 --preid beta --increment prerelease 1.2.4-beta.0
> semver 1.2.3 --preid beta --increment prepatch 1.2.4-beta.0
> semver 1.2.3 --preid beta --increment preminor 1.3.0-beta.0
> semver 1.2.3 --preid beta --increment premajor 2.0.0-beta.0
> semver 1.2.3-0 --preid beta --increment patch 1.2.4
> semver 1.2.3-0 --preid beta --increment minor 1.3.0
> semver 1.2.3-0 --preid beta --increment major 2.0.0
> semver 1.2.3-0 --preid beta --increment prerelease 1.2.3-beta.0
> semver 1.2.3-0 --preid beta --increment prepatch 1.2.4-beta.0
> semver 1.2.3-0 --preid beta --increment preminor 1.3.0-beta.0
> semver 1.2.3-0 --preid beta --increment premajor 2.0.0-beta.0
> semver 1.2.3-beta --preid beta --increment patch 1.2.4
> semver 1.2.3-beta --preid beta --increment minor 1.3.0
> semver 1.2.3-beta --preid beta --increment major 2.0.0
> semver 1.2.3-beta --preid beta --increment prerelease 1.2.3-beta.0
> semver 1.2.3-beta --preid beta --increment prepatch 1.2.4-beta.0
> semver 1.2.3-beta --preid beta --increment preminor 1.3.0-beta.0
> semver 1.2.3-beta --preid beta --increment premajor 2.0.0-beta.0
> semver 1.2.3-beta.0 --preid beta --increment patch 1.2.4
> semver 1.2.3-beta.0 --preid beta --increment minor 1.3.0
> semver 1.2.3-beta.0 --preid beta --increment major 2.0.0
> semver 1.2.3-beta.0 --preid beta --increment prerelease 1.2.3-beta.1
> semver 1.2.3-beta.0 --preid beta --increment prepatch 1.2.4-beta.0
> semver 1.2.3-beta.0 --preid beta --increment preminor 1.3.0-beta.0
> semver 1.2.3-beta.0 --preid beta --increment premajor 2.0.0-beta.0
> semver 1.2.3 --increment patch 1.2.4
> semver 1.2.3 --increment minor 1.3.0
> semver 1.2.3 --increment major 2.0.0
> semver 1.2.3 --increment prerelease 1.2.4-0
> semver 1.2.3 --increment prepatch 1.2.4-0
> semver 1.2.3 --increment preminor 1.3.0-0
> semver 1.2.3 --increment premajor 2.0.0-0
> semver 1.2.3-0 --increment patch 1.2.3
> semver 1.2.3-0 --increment minor 1.3.0
> semver 1.2.3-0 --increment major 2.0.0
> semver 1.2.3-0 --increment prerelease 1.2.3-1
> semver 1.2.3-0 --increment prepatch 1.2.4-0
> semver 1.2.3-0 --increment preminor 1.3.0-0
> semver 1.2.3-0 --increment premajor 2.0.0-0
> semver 1.2.3-beta --increment patch 1.2.4
> semver 1.2.3-beta --increment minor 1.3.0
> semver 1.2.3-beta --increment major 2.0.0
> semver 1.2.3-beta --increment prerelease 1.2.3-beta.0
> semver 1.2.3-beta --increment prepatch 1.2.4-0
> semver 1.2.3-beta --increment preminor 1.3.0-0
> semver 1.2.3-beta --increment premajor 2.0.0-0
> semver 1.2.3-beta.0 --increment patch 1.2.4
> semver 1.2.3-beta.0 --increment minor 1.3.0
> semver 1.2.3-beta.0 --increment major 2.0.0
> semver 1.2.3-beta.0 --increment prerelease 1.2.3-beta.1
> semver 1.2.3-beta.0 --increment prepatch 1.2.4-0
> semver 1.2.3-beta.0 --increment preminor 1.3.0-0
> semver 1.2.3-beta.0 --increment premajor 2.0.0-0
> semver 1.2.3 --preid beta --increment patch 1.2.4-beta
> semver 1.2.3 --preid beta --increment minor 1.3.0-beta
> semver 1.2.3 --preid beta --increment major 2.0.0-beta
> semver 1.2.3 --preid beta --increment prerelease 1.2.4-beta.0
> semver 1.2.3 --preid beta --increment prepatch 1.2.4-beta.0
> semver 1.2.3 --preid beta --increment preminor 1.3.0-beta.0
> semver 1.2.3 --preid beta --increment premajor 2.0.0-beta.0
> semver 1.2.3-0 --preid beta --increment patch 1.2.3-beta
> semver 1.2.3-0 --preid beta --increment minor 1.3.0-beta
> semver 1.2.3-0 --preid beta --increment major 2.0.0-beta
> semver 1.2.3-0 --preid beta --increment prerelease 1.2.3-beta.0
> semver 1.2.3-0 --preid beta --increment prepatch 1.2.4-beta.0
> semver 1.2.3-0 --preid beta --increment preminor 1.3.0-beta.0
> semver 1.2.3-0 --preid beta --increment premajor 2.0.0-beta.0
> semver 1.2.3-beta --preid beta --increment patch 1.2.4-beta
> semver 1.2.3-beta --preid beta --increment minor 1.3.0-beta
> semver 1.2.3-beta --preid beta --increment major 2.0.0-beta
> semver 1.2.3-beta --preid beta --increment prerelease 1.2.3-beta.0
> semver 1.2.3-beta --preid beta --increment prepatch 1.2.4-beta.0
> semver 1.2.3-beta --preid beta --increment preminor 1.3.0-beta.0
> semver 1.2.3-beta --preid beta --increment premajor 2.0.0-beta.0
> semver 1.2.3-beta.0 --preid beta --increment patch 1.2.4-beta
> semver 1.2.3-beta.0 --preid beta --increment minor 1.3.0-beta
> semver 1.2.3-beta.0 --preid beta --increment major 2.0.0-beta
> semver 1.2.3-beta.0 --preid beta --increment prerelease 1.2.3-beta.1
> semver 1.2.3-beta.0 --preid beta --increment prepatch 1.2.4-beta.0
> semver 1.2.3-beta.0 --preid beta --increment preminor 1.3.0-beta.0
> semver 1.2.3-beta.0 --preid beta --increment premajor 2.0.0-beta.0
npm run dev:linting
: Lint filesnpm test
: Run testsnpm run test:coverage
: Run tests and see coverage reports