@finnair/v-validation-moment 1.0.1 → 1.1.0-alpha.6
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/CHANGELOG.md +36 -26
- package/dist/Vmoment.js +3 -3
- package/dist/test-moment.d.ts +1 -0
- package/dist/test-moment.js +4 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,83 +3,93 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
# [1.1.0-alpha.6](https://github.com/finnair/v-validation/compare/v1.0.1...v1.1.0-alpha.6) (2022-08-17)
|
|
7
7
|
|
|
8
|
-
**Note:** Version bump only for package @finnair/v-validation-moment
|
|
9
8
|
|
|
9
|
+
### Features
|
|
10
10
|
|
|
11
|
+
* Support for Luxon ([00d0a8e](https://github.com/finnair/v-validation/commit/00d0a8e8c8de46bfeb3502f51bb8cd5a3627070e))
|
|
11
12
|
|
|
12
13
|
|
|
13
14
|
|
|
14
|
-
## [0.9.1](https://github.com/finnair/v-validation/compare/v0.9.0...v0.9.1) (2020-12-07)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @finnair/v-validation-moment
|
|
17
15
|
|
|
18
16
|
|
|
17
|
+
# [1.1.0-alpha.5](https://github.com/finnair/v-validation/compare/v1.0.1...v1.1.0-alpha.5) (2022-08-16)
|
|
19
18
|
|
|
20
19
|
|
|
20
|
+
### Features
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
* Support for Luxon ([6a243f0](https://github.com/finnair/v-validation/commit/6a243f043db2ca6700180eb758a08d8edfe1e538))
|
|
23
23
|
|
|
24
|
-
**Note:** Version bump only for package @finnair/v-validation-moment
|
|
25
24
|
|
|
26
25
|
|
|
27
26
|
|
|
28
27
|
|
|
28
|
+
# [1.1.0-alpha.0](https://github.com/finnair/v-validation/compare/v1.0.1...v1.1.0-alpha.0) (2022-08-12)
|
|
29
29
|
|
|
30
|
-
# [0.8.0](https://github.com/finnair/v-validation/compare/v0.7.0...v0.8.0) (2020-09-09)
|
|
31
30
|
|
|
32
|
-
|
|
31
|
+
### Features
|
|
33
32
|
|
|
33
|
+
* Support for Luxon ([6f982df](https://github.com/finnair/v-validation/commit/6f982df9b55395e953069914c93fef677dec171e))
|
|
34
34
|
|
|
35
35
|
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
# [0.7.0](https://github.com/finnair/v-validation/compare/v0.6.2...v0.7.0) (2020-08-26)
|
|
39
38
|
|
|
39
|
+
## [1.0.1](https://github.com/finnair/v-validation/compare/v0.9.1...v1.0.1) (2022-01-20)
|
|
40
40
|
|
|
41
41
|
### Features
|
|
42
42
|
|
|
43
|
-
|
|
44
|
-
|
|
43
|
+
- Add support for Node v14 and v16
|
|
44
|
+
- Update Jest and Lerna
|
|
45
|
+
- Update other vulnerable packages
|
|
45
46
|
|
|
46
47
|
### BREAKING CHANGES
|
|
47
48
|
|
|
48
|
-
|
|
49
|
-
* then -> next
|
|
50
|
-
* thenMap -> nextMap
|
|
51
|
-
|
|
52
|
-
ObjectModel & ClassModel:
|
|
53
|
-
* then -> next
|
|
54
|
-
* localThen -> localNext
|
|
49
|
+
- Drop support for Node v10
|
|
55
50
|
|
|
56
|
-
|
|
51
|
+
## [0.9.1](https://github.com/finnair/v-validation/compare/v0.9.0...v0.9.1) (2020-12-07)
|
|
57
52
|
|
|
53
|
+
**Note:** Version bump only for package @finnair/v-validation-moment
|
|
58
54
|
|
|
55
|
+
# [0.9.0](https://github.com/finnair/v-validation/compare/v0.8.0...v0.9.0) (2020-09-23)
|
|
59
56
|
|
|
57
|
+
**Note:** Version bump only for package @finnair/v-validation-moment
|
|
60
58
|
|
|
59
|
+
# [0.8.0](https://github.com/finnair/v-validation/compare/v0.7.0...v0.8.0) (2020-09-09)
|
|
61
60
|
|
|
62
|
-
|
|
61
|
+
**Note:** Version bump only for package @finnair/v-validation-moment
|
|
63
62
|
|
|
63
|
+
# [0.7.0](https://github.com/finnair/v-validation/compare/v0.6.2...v0.7.0) (2020-08-26)
|
|
64
64
|
|
|
65
|
-
###
|
|
65
|
+
### Features
|
|
66
66
|
|
|
67
|
-
|
|
67
|
+
- refactor "then" to "next" ([9b02d2c](https://github.com/finnair/v-validation/commit/9b02d2c6cca8f6a5e44633b6dad2df2ecec28af2))
|
|
68
68
|
|
|
69
|
+
### BREAKING CHANGES
|
|
69
70
|
|
|
71
|
+
- Validator:
|
|
72
|
+
- then -> next
|
|
73
|
+
- thenMap -> nextMap
|
|
70
74
|
|
|
75
|
+
ObjectModel & ClassModel:
|
|
71
76
|
|
|
77
|
+
- then -> next
|
|
78
|
+
- localThen -> localNext
|
|
72
79
|
|
|
73
|
-
|
|
80
|
+
Signed-off-by: Samppa Saarela <samppa.saarela@iki.fi>
|
|
74
81
|
|
|
82
|
+
## [0.6.2](https://github.com/finnair/v-validation/compare/v0.6.1...v0.6.2) (2020-05-22)
|
|
75
83
|
|
|
76
84
|
### Bug Fixes
|
|
77
85
|
|
|
78
|
-
|
|
79
|
-
|
|
86
|
+
- Update Moment.js and fix dependencies ([2e9a16d](https://github.com/finnair/v-validation/commit/2e9a16d297994a557133a853ed6556d16552c21a))
|
|
80
87
|
|
|
88
|
+
## [0.6.1](https://github.com/finnair/v-validation/compare/v0.6.0...v0.6.1) (2020-05-22)
|
|
81
89
|
|
|
90
|
+
### Bug Fixes
|
|
82
91
|
|
|
92
|
+
- NPM ignore node_modules ([9f1264f](https://github.com/finnair/v-validation/commit/9f1264f5086e406d30f94f5a47aa3fb6956d725a))
|
|
83
93
|
|
|
84
94
|
# [0.6.0](https://github.com/finnair/v-validation/compare/v0.5.0...v0.6.0) (2020-05-19)
|
|
85
95
|
|
package/dist/Vmoment.js
CHANGED
|
@@ -45,9 +45,9 @@ class DurationValidator extends v_validation_1.Validator {
|
|
|
45
45
|
return ctx.failure(v_validation_1.defaultViolations.notNull(path), value);
|
|
46
46
|
}
|
|
47
47
|
if (((0, v_validation_1.isString)(value) && durationPattern.test(value)) || moment_1.default.isDuration(value)) {
|
|
48
|
-
|
|
49
|
-
if (
|
|
50
|
-
return ctx.success(
|
|
48
|
+
const convertedValue = moment_1.default.duration(value);
|
|
49
|
+
if (convertedValue.isValid()) {
|
|
50
|
+
return ctx.success(convertedValue);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
return ctx.failure(new v_validation_1.TypeMismatch(path, 'Duration', value), value);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@finnair/v-validation-moment",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.1.0-alpha.6",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Moment validators",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -25,9 +25,9 @@
|
|
|
25
25
|
"build": "tsc -b ."
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@finnair/path": "^1.0.
|
|
29
|
-
"@finnair/v-validation": "^1.0.
|
|
30
|
-
"moment": "2.
|
|
28
|
+
"@finnair/path": "^1.1.0-alpha.6",
|
|
29
|
+
"@finnair/v-validation": "^1.1.0-alpha.6",
|
|
30
|
+
"moment": "2.29.4"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "cbca3585a6777f34cd135c6c22be566aea34e69b"
|
|
33
33
|
}
|