date-vir 7.2.0 → 7.3.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.
@@ -42,6 +42,12 @@ export type DateTimeString = `${JustDateString}T${JustTimeString}`;
42
42
  * - https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date#date_time_string_format
43
43
  */
44
44
  export type UtcIsoString = `${JustDateString}T${JustTimeWithSecondsString}.${number}Z`;
45
+ /**
46
+ * A shape definition for {@link UtcIsoString}.
47
+ *
48
+ * @category ISO
49
+ */
50
+ export declare const utcIsoStringShape: import("object-shape-tester").ShapeDefinition<import("object-shape-tester").CustomSpecifier<`${number}-${number}-${number}T${number}:${number}:${number}.${number}Z`>, false>;
45
51
  /**
46
52
  * Checks if the input is a valid UTC ISO string and type guards the input.
47
53
  *
@@ -1,4 +1,17 @@
1
1
  import { DateTime } from 'luxon';
2
+ import { customShape, defineShape } from 'object-shape-tester';
3
+ /**
4
+ * A shape definition for {@link UtcIsoString}.
5
+ *
6
+ * @category ISO
7
+ */
8
+ export const utcIsoStringShape = defineShape(customShape({
9
+ defaultValue: new Date().toISOString(),
10
+ customName: 'UtcIsoString',
11
+ checker(value) {
12
+ return isValidIsoString(value);
13
+ },
14
+ }));
2
15
  /**
3
16
  * Checks if the input is a valid UTC ISO string and type guards the input.
4
17
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "date-vir",
3
- "version": "7.2.0",
3
+ "version": "7.3.0",
4
4
  "description": "Easy and explicit dates and times.",
5
5
  "keywords": [
6
6
  "date",
@@ -34,26 +34,26 @@
34
34
  "test:docs": "virmator docs check"
35
35
  },
36
36
  "dependencies": {
37
- "@augment-vir/assert": "^31.9.1",
38
- "@augment-vir/common": "^31.9.1",
39
- "@date-vir/duration": "^7.2.0",
37
+ "@augment-vir/assert": "^31.9.4",
38
+ "@augment-vir/common": "^31.9.4",
39
+ "@date-vir/duration": "^7.3.0",
40
40
  "@types/luxon": "^3.4.2",
41
41
  "luxon": "^3.5.0",
42
- "object-shape-tester": "^4.1.0",
43
- "type-fest": "^4.33.0"
42
+ "object-shape-tester": "^5.1.4",
43
+ "type-fest": "^4.37.0"
44
44
  },
45
45
  "devDependencies": {
46
- "@augment-vir/test": "^31.9.1",
47
- "@web/dev-server-esbuild": "^1.0.3",
48
- "@web/test-runner": "^0.19.0",
46
+ "@augment-vir/test": "^31.9.4",
47
+ "@web/dev-server-esbuild": "^1.0.4",
48
+ "@web/test-runner": "^0.20.0",
49
49
  "@web/test-runner-commands": "^0.9.0",
50
50
  "@web/test-runner-playwright": "^0.11.0",
51
51
  "@web/test-runner-visual-regression": "^0.10.0",
52
- "element-vir": "^23.1.1",
52
+ "element-vir": "^23.4.2",
53
53
  "istanbul-smart-text-reporter": "^1.1.5",
54
54
  "markdown-code-example-inserter": "^3.0.3",
55
- "typedoc": "^0.27.6",
56
- "typescript": "^5.7.3"
55
+ "typedoc": "^0.27.9",
56
+ "typescript": "^5.8.2"
57
57
  },
58
58
  "engines": {
59
59
  "node": ">=22"