renovate
Version:
Automated dependency updates. Flexible so you don't need to be.
17 lines (16 loc) • 765 B
TypeScript
/**
* This can convert most hashicorp ranges to valid npm syntax
* The `!=` syntax is currently unsupported as there is no direct
* equivalent in npm and isn't widely used
* The version part of the constraint is parsed as a semver but with the minor and patch versions being optional.
* The prerelease syntax is less well-defined for hashicorp and will
* cause issues if it is not semvar compatible as no attempts to convert it
* are made
*/
export declare function hashicorp2npm(input: string): string;
/**
* This can convert a limited set of npm range syntax to hashicorp,
* it supports all the syntax that hashicorp2npm can output
* It cannot handle `*`, `1.x.x`, range with `-`, `||`
*/
export declare function npm2hashicorp(input: string): string;