@finnair/v-validation-luxon 1.1.0 → 2.0.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,6 +3,28 @@
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
+ # [2.0.0](https://github.com/finnair/v-validation/compare/v1.1.0...v2.0.0) (2022-09-08)
7
+
8
+
9
+ * Upgrade All Dependencies (#80) ([fb6309c](https://github.com/finnair/v-validation/commit/fb6309cc1d9fd90f3e8c5ba79798fae1450b66a6)), closes [#80](https://github.com/finnair/v-validation/issues/80)
10
+
11
+
12
+ ### Features
13
+
14
+ * Implement toString in Luxon wrapper types ([#79](https://github.com/finnair/v-validation/issues/79)) ([3f3f3e8](https://github.com/finnair/v-validation/commit/3f3f3e8a4172c7803a7be4809f06aba554f7090f))
15
+
16
+
17
+ ### BREAKING CHANGES
18
+
19
+ * Drop Node 12 support
20
+ * Add .nvmrc
21
+ * Introduce CI build for Node 18
22
+ * Upgrade All Dependencies
23
+
24
+
25
+
26
+
27
+
6
28
  # [1.1.0](https://github.com/finnair/v-validation/compare/v1.0.1...v1.1.0) (2022-08-29)
7
29
 
8
30
 
package/dist/index.js CHANGED
@@ -1,7 +1,11 @@
1
1
  "use strict";
2
2
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
3
  if (k2 === undefined) k2 = k;
4
- Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
5
9
  }) : (function(o, m, k, k2) {
6
10
  if (k2 === undefined) k2 = k;
7
11
  o[k2] = m[k];
package/dist/luxon.d.ts CHANGED
@@ -10,6 +10,7 @@ export declare abstract class LuxonDateTime {
10
10
  new (...args: any[]): T;
11
11
  }): T;
12
12
  equals(other: any): boolean;
13
+ toString(): string;
13
14
  abstract wrap(fn: (dateTime: DateTime) => DateTime): LuxonDateTime;
14
15
  abstract toJSON(): string;
15
16
  }
package/dist/luxon.js CHANGED
@@ -33,6 +33,9 @@ class LuxonDateTime {
33
33
  }
34
34
  return false;
35
35
  }
36
+ toString() {
37
+ return this.toJSON();
38
+ }
36
39
  }
37
40
  exports.LuxonDateTime = LuxonDateTime;
38
41
  class LocalDateLuxon extends LuxonDateTime {
@@ -1,4 +1,7 @@
1
1
  "use strict";
2
+ var _a, _b;
2
3
  Object.defineProperty(exports, "__esModule", { value: true });
3
4
  const luxon_1 = require("luxon");
4
- console.log(luxon_1.DateTime.fromSQL('09:24:15').toJSON());
5
+ console.log(luxon_1.DateTime.fromMillis(luxon_1.DateTime.fromISO('2022-08-30T23:00:00Z').toMillis(), { zone: luxon_1.FixedOffsetZone.instance(180) }).toJSON());
6
+ let o = { foo: 1 };
7
+ console.log((_b = (_a = o.foo) === null || _a === void 0 ? void 0 : _a.toString()) !== null && _b !== void 0 ? _b : 'not found');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@finnair/v-validation-luxon",
3
- "version": "1.1.0",
3
+ "version": "2.0.0",
4
4
  "private": false,
5
5
  "description": "Luxon validators",
6
6
  "main": "dist/index.js",
@@ -25,12 +25,12 @@
25
25
  "build": "tsc -b ."
26
26
  },
27
27
  "dependencies": {
28
- "@finnair/path": "^1.1.0",
29
- "@finnair/v-validation": "^1.1.0",
30
- "luxon": "3.0.1"
28
+ "@finnair/path": "^2.0.0",
29
+ "@finnair/v-validation": "^2.0.0",
30
+ "luxon": "3.0.3"
31
31
  },
32
32
  "devDependencies": {
33
- "@types/luxon": "3.0.0"
33
+ "@types/luxon": "3.0.1"
34
34
  },
35
- "gitHead": "860263e814c178790766b48e22d8a8995e33ae40"
35
+ "gitHead": "432759665b664859d5ed80e4b573432abdb23afc"
36
36
  }