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