Skip to content

Commit

Permalink
spelling: versioning
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Soref <[email protected]>
  • Loading branch information
jsoref committed Oct 19, 2020
1 parent 8c5c697 commit 455a80d
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/manager/regex/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,6 @@ The above (obviously not a complete `Dockerfile`, but abbreviated for this examp
}
```

In the above the `versioningTemplate` is not actually necessary because Renovate already defaults to `semver` versioning, but it has been included to help illustrate why we call these fields _templates_. They are named this way because they are compiled using `handlebars` and so can be composed from values you collect in named capture groups. You will usually want to use the tripe brace `{{{ }}}` template (e.v. `{{{versioniong}}}` to be safe because `handlebars` escapes special characters by default with double braces.
In the above the `versioningTemplate` is not actually necessary because Renovate already defaults to `semver` versioning, but it has been included to help illustrate why we call these fields _templates_. They are named this way because they are compiled using `handlebars` and so can be composed from values you collect in named capture groups. You will usually want to use the tripe brace `{{{ }}}` template (e.v. `{{{versioning}}}` to be safe because `handlebars` escapes special characters by default with double braces.

By adding the comments to the `Dockerfile`, you can see that instead of four separate `regexManagers` being required, there is now only one - and the `Dockerfile` itself is now somewhat better documented too. The syntax we used there is completely arbitrary and you may choose your own instead if you prefer - just be sure to update your `matchStrings` regex.
2 changes: 1 addition & 1 deletion lib/versioning/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export * from './common';

export const getVersioningList = (): string[] => Array.from(versionings.keys());
/**
* Get versioning map. Can be used to dynamically add new versionig type
* Get versioning map. Can be used to dynamically add new versioning type
*/
export const getVersionings = (): Map<
string,
Expand Down
2 changes: 1 addition & 1 deletion lib/versioning/poetry/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function poetry2npm(input: string): string {
return versions.join(' ');
}

// NOTE: This function is copied from cargo versionsing code.
// NOTE: This function is copied from cargo versioning code.
// Poetry uses commas (like in cargo) instead of spaces (like in npm)
// for AND operation.
function npm2poetry(input: string): string {
Expand Down

0 comments on commit 455a80d

Please sign in to comment.