semver 5.7.0 → 5.7.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +12 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -398,14 +398,15 @@ range, use the `satisfies(version, range)` function.
|
|
|
398
398
|
|
|
399
399
|
* `coerce(version)`: Coerces a string to semver if possible
|
|
400
400
|
|
|
401
|
-
This aims to provide a very forgiving translation of a non-semver
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
Only text which lacks digits will fail coercion (`version one`
|
|
408
|
-
The maximum length for any semver component considered for
|
|
409
|
-
longer components will be ignored
|
|
410
|
-
The maximum value for any
|
|
411
|
-
|
|
401
|
+
This aims to provide a very forgiving translation of a non-semver string to
|
|
402
|
+
semver. It looks for the first digit in a string, and consumes all
|
|
403
|
+
remaining characters which satisfy at least a partial semver (e.g., `1`,
|
|
404
|
+
`1.2`, `1.2.3`) up to the max permitted length (256 characters). Longer
|
|
405
|
+
versions are simply truncated (`4.6.3.9.2-alpha2` becomes `4.6.3`). All
|
|
406
|
+
surrounding text is simply ignored (`v3.4 replaces v3.3.1` becomes
|
|
407
|
+
`3.4.0`). Only text which lacks digits will fail coercion (`version one`
|
|
408
|
+
is not valid). The maximum length for any semver component considered for
|
|
409
|
+
coercion is 16 characters; longer components will be ignored
|
|
410
|
+
(`10000000000000000.4.7.4` becomes `4.7.4`). The maximum value for any
|
|
411
|
+
semver component is `Number.MAX_SAFE_INTEGER || (2**53 - 1)`; higher value
|
|
412
|
+
components are invalid (`9999999999999999.4.7.4` is likely invalid).
|