Second-Generation Managed Packaging Keywords

A keyword is a variable that you can use to specify a package version number.

You can use keywords to automatically increment the value of the package build numbers, ancestor version numbers, set the package dependency to the latest version, or the latest released and promoted version.

Use the Keyword Example
LATEST to specify the latest version of the package dependency when you create a package version.
1"dependencies": [ 
2   {
3      "package": "MyPackageName",
4      "versionNumber": "0.1.0.LATEST"
5   }
6]
NEXT to increment the build number to the next available for the package version.

If you don’t use NEXT, and you also forget to update the version number in your sfdx-project.json file, the new package version uses the same number as the previous package version. Although we don’t enforce uniqueness on package version numbers, every package version is assigned a unique subscriber package version ID (starts with 04t).

1"versionNumber": "1.2.0.NEXT"
RELEASED to specify the latest promoted and released version of the package dependency when you create a package version.
1"dependencies": [
2   {
3    "package": "pkgB",
4    "versionNumber": "2.1.0.RELEASED"
5    }
6]
HIGHEST to automatically set the package ancestor to the highest promoted and released package version number.

Use only with ancestor version or ancestor ID.

1"packageDirectories": [
2{
3"path": "util",
4"package": "Expense Manager - Util",
5"versionNumber": "4.7.0.NEXT",
6"ancestorVersion": "HIGHEST"
7},
NONE in the ancestor version or ancestor ID field.

Ancestry defines package upgrade paths. If the package ancestor is set to NONE, an existing customer can’t upgrade to that package version.

1"packageDirectories": [
2{
3"path": "util",
4"package": "Expense Manager - Util",
5"versionNumber": "4.7.0.NEXT",
6"ancestorVersion": "NONE"
7},