@todesktop/shared 7.77.0 → 7.78.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/lib/validations.js +1 -2
- package/package.json +1 -1
- package/src/validations.ts +1 -2
package/lib/validations.js
CHANGED
|
@@ -27,9 +27,8 @@ function isNumericSemver(value) {
|
|
|
27
27
|
exports.forceVersionValidation = yup
|
|
28
28
|
.string()
|
|
29
29
|
.label("App version")
|
|
30
|
-
.min(5)
|
|
31
30
|
.required()
|
|
32
|
-
.when("$currentVersion", (currentVersion, schema) => schema.test("semantic-version", "
|
|
31
|
+
.when("$currentVersion", (currentVersion, schema) => schema.test("semantic-version", "App version must follow a numeric SemVer versioning scheme (e.g. 1.0.0) and be greater than prior version.", (forceVersion) => {
|
|
33
32
|
return (isNumericSemver(forceVersion) &&
|
|
34
33
|
semver.gt(forceVersion, currentVersion));
|
|
35
34
|
}));
|
package/package.json
CHANGED
package/src/validations.ts
CHANGED
|
@@ -30,12 +30,11 @@ function isNumericSemver(value: string) {
|
|
|
30
30
|
export const forceVersionValidation = yup
|
|
31
31
|
.string()
|
|
32
32
|
.label("App version")
|
|
33
|
-
.min(5)
|
|
34
33
|
.required()
|
|
35
34
|
.when("$currentVersion", (currentVersion, schema) =>
|
|
36
35
|
schema.test(
|
|
37
36
|
"semantic-version",
|
|
38
|
-
"
|
|
37
|
+
"App version must follow a numeric SemVer versioning scheme (e.g. 1.0.0) and be greater than prior version.",
|
|
39
38
|
(forceVersion: string) => {
|
|
40
39
|
return (
|
|
41
40
|
isNumericSemver(forceVersion) &&
|