A compact string identifier for use within records, key lookups, and more.
Supports unicode alphanumeric characters, forward slash /, period .,
underscore _, and dash -. A leading @ is supported to support npm package names.
A version requirement composed of a comparison operator and a full
or partial version to match against. Build metadata is accepted
when parsing, but is otherwise ignored.
Cloning an entire list, like Vec, is very costly as it clones the entire structure.
This helper allows you to clone just the values, which is much faster if you don’t
need the list features.
Cloning an entire map, like IndexMap, is very costly as it clones the entire structure.
This helper allows you to clone just the keys and values, which is much faster if you
don’t need the map features.
Returns true if the provided value looks like a calendar version string,
instead of a semantic version string. This is used to determine which parser to use.
Returns true if the provided value looks like a semver version string,
instead of a calendar version string. This is used to determine which parser to use.
Serialize and write JSON to the provided path by writing to a temporary file
in the same directory, then atomically renaming it over the destination.
Unlike a truncate-then-write, another process can never observe an empty or
partially written file, even if this process is killed mid-write.
https://github.com/moonrepo/proto/issues/1057