@typeberry/convert 0.7.0-4f16a18 → 0.7.0
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/index.js +5 -2
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -4626,7 +4626,7 @@ function seeThrough(v) {
|
|
|
4626
4626
|
}
|
|
4627
4627
|
|
|
4628
4628
|
;// CONCATENATED MODULE: ./packages/core/utils/package.json
|
|
4629
|
-
const package_namespaceObject =
|
|
4629
|
+
const package_namespaceObject = {"rE":"0.7.0"};
|
|
4630
4630
|
;// CONCATENATED MODULE: ./packages/core/utils/result.ts
|
|
4631
4631
|
|
|
4632
4632
|
/**
|
|
@@ -11581,7 +11581,10 @@ class Version extends WithDebug {
|
|
|
11581
11581
|
static tryFromString(str) {
|
|
11582
11582
|
const parse = (v) => tryAsU8(Number(v));
|
|
11583
11583
|
try {
|
|
11584
|
-
|
|
11584
|
+
// strip any semver pre-release / build metadata (e.g. "-15ccd70", "+build.42")
|
|
11585
|
+
// so that only `major.minor.patch` is parsed.
|
|
11586
|
+
const core = str.trim().split(/[-+]/)[0];
|
|
11587
|
+
const [major, minor, patch] = core.split(".").map(parse);
|
|
11585
11588
|
return Version.create({
|
|
11586
11589
|
major,
|
|
11587
11590
|
minor,
|