@finnair/v-validation-moment 1.0.0 → 1.1.0-alpha.5

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 CHANGED
@@ -3,83 +3,82 @@
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
- # [1.0.0](https://github.com/finnair/v-validation/compare/v0.9.1...v1.0.0) (2022-01-20)
6
+ # [1.1.0-alpha.5](https://github.com/finnair/v-validation/compare/v1.0.1...v1.1.0-alpha.5) (2022-08-16)
7
7
 
8
- **Note:** Version bump only for package @finnair/v-validation-moment
9
8
 
9
+ ### Features
10
10
 
11
+ * Support for Luxon ([6a243f0](https://github.com/finnair/v-validation/commit/6a243f043db2ca6700180eb758a08d8edfe1e538))
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
15
 
16
- **Note:** Version bump only for package @finnair/v-validation-moment
17
16
 
17
+ # [1.1.0-alpha.0](https://github.com/finnair/v-validation/compare/v1.0.1...v1.1.0-alpha.0) (2022-08-12)
18
18
 
19
19
 
20
+ ### Features
20
21
 
22
+ * Support for Luxon ([6f982df](https://github.com/finnair/v-validation/commit/6f982df9b55395e953069914c93fef677dec171e))
21
23
 
22
- # [0.9.0](https://github.com/finnair/v-validation/compare/v0.8.0...v0.9.0) (2020-09-23)
23
24
 
24
- **Note:** Version bump only for package @finnair/v-validation-moment
25
25
 
26
26
 
27
27
 
28
+ ## [1.0.1](https://github.com/finnair/v-validation/compare/v0.9.1...v1.0.1) (2022-01-20)
28
29
 
30
+ ### Features
29
31
 
30
- # [0.8.0](https://github.com/finnair/v-validation/compare/v0.7.0...v0.8.0) (2020-09-09)
32
+ - Add support for Node v14 and v16
33
+ - Update Jest and Lerna
34
+ - Update other vulnerable packages
35
+
36
+ ### BREAKING CHANGES
37
+
38
+ - Drop support for Node v10
39
+
40
+ ## [0.9.1](https://github.com/finnair/v-validation/compare/v0.9.0...v0.9.1) (2020-12-07)
31
41
 
32
42
  **Note:** Version bump only for package @finnair/v-validation-moment
33
43
 
44
+ # [0.9.0](https://github.com/finnair/v-validation/compare/v0.8.0...v0.9.0) (2020-09-23)
34
45
 
46
+ **Note:** Version bump only for package @finnair/v-validation-moment
35
47
 
48
+ # [0.8.0](https://github.com/finnair/v-validation/compare/v0.7.0...v0.8.0) (2020-09-09)
36
49
 
50
+ **Note:** Version bump only for package @finnair/v-validation-moment
37
51
 
38
52
  # [0.7.0](https://github.com/finnair/v-validation/compare/v0.6.2...v0.7.0) (2020-08-26)
39
53
 
40
-
41
54
  ### Features
42
55
 
43
- * refactor "then" to "next" ([9b02d2c](https://github.com/finnair/v-validation/commit/9b02d2c6cca8f6a5e44633b6dad2df2ecec28af2))
44
-
56
+ - refactor "then" to "next" ([9b02d2c](https://github.com/finnair/v-validation/commit/9b02d2c6cca8f6a5e44633b6dad2df2ecec28af2))
45
57
 
46
58
  ### BREAKING CHANGES
47
59
 
48
- * Validator:
49
- * then -> next
50
- * thenMap -> nextMap
60
+ - Validator:
61
+ - then -> next
62
+ - thenMap -> nextMap
51
63
 
52
64
  ObjectModel & ClassModel:
53
- * then -> next
54
- * localThen -> localNext
55
-
56
- Signed-off-by: Samppa Saarela <samppa.saarela@iki.fi>
57
-
58
-
59
65
 
66
+ - then -> next
67
+ - localThen -> localNext
60
68
 
69
+ Signed-off-by: Samppa Saarela <samppa.saarela@iki.fi>
61
70
 
62
71
  ## [0.6.2](https://github.com/finnair/v-validation/compare/v0.6.1...v0.6.2) (2020-05-22)
63
72
 
64
-
65
73
  ### Bug Fixes
66
74
 
67
- * Update Moment.js and fix dependencies ([2e9a16d](https://github.com/finnair/v-validation/commit/2e9a16d297994a557133a853ed6556d16552c21a))
68
-
69
-
70
-
71
-
75
+ - Update Moment.js and fix dependencies ([2e9a16d](https://github.com/finnair/v-validation/commit/2e9a16d297994a557133a853ed6556d16552c21a))
72
76
 
73
77
  ## [0.6.1](https://github.com/finnair/v-validation/compare/v0.6.0...v0.6.1) (2020-05-22)
74
78
 
75
-
76
79
  ### Bug Fixes
77
80
 
78
- * NPM ignore node_modules ([9f1264f](https://github.com/finnair/v-validation/commit/9f1264f5086e406d30f94f5a47aa3fb6956d725a))
79
-
80
-
81
-
82
-
81
+ - NPM ignore node_modules ([9f1264f](https://github.com/finnair/v-validation/commit/9f1264f5086e406d30f94f5a47aa3fb6956d725a))
83
82
 
84
83
  # [0.6.0](https://github.com/finnair/v-validation/compare/v0.5.0...v0.6.0) (2020-05-19)
85
84
 
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
- value = moment_1.default.duration(value);
49
- if (value.isValid()) {
50
- return ctx.success(value);
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 {};
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const Vmoment_1 = require("./Vmoment");
4
+ console.log((0, Vmoment_1.timeMoment)('24:00:01').toDate().toISOString());
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finnair/v-validation-moment",
3
- "version": "1.0.0",
3
+ "version": "1.1.0-alpha.5",
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.0",
29
- "@finnair/v-validation": "^1.0.0",
30
- "moment": "2.27.0"
28
+ "@finnair/path": "^1.1.0-alpha.5",
29
+ "@finnair/v-validation": "^1.1.0-alpha.5",
30
+ "moment": "2.29.4"
31
31
  },
32
- "gitHead": "bd40a739be8c006e46f0b9f59426f435a971389b"
32
+ "gitHead": "593b0dc9cb646a7059d2ede95c44c3b80bec51d3"
33
33
  }