@bgord/tools 1.3.7 → 1.3.10

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.
@@ -10,7 +10,7 @@ export declare class Duration {
10
10
  private static readonly MS_IN_HOUR;
11
11
  private static readonly MS_IN_DAY;
12
12
  private static readonly MS_IN_WEEK;
13
- private constructor();
13
+ constructor(candidateMs: number);
14
14
  static Weeks(value: number): Duration;
15
15
  static Days(value: number): Duration;
16
16
  static Hours(value: number): Duration;
@@ -32,4 +32,6 @@ export declare class Duration {
32
32
  subtract(another: Duration): Duration;
33
33
  times(factor: MultiplicationFactorType): Duration;
34
34
  toAbsolute(): Duration;
35
+ toString(): string;
36
+ toJSON(): number;
35
37
  }
@@ -78,4 +78,10 @@ export class Duration {
78
78
  toAbsolute() {
79
79
  return Duration.Ms(Math.abs(this.internal));
80
80
  }
81
+ toString() {
82
+ return this.internal.toString();
83
+ }
84
+ toJSON() {
85
+ return this.internal;
86
+ }
81
87
  }
@@ -1,7 +1,7 @@
1
1
  import * as z from "zod/v4";
2
2
  export const MimeValueError = { Type: "mime.value.type", Invalid: "mime.value.invalid" };
3
- // One to twenty four lowercase letters, asterisk or hyphen, forward slash, one to twenty four lowercase letters, digits, asterisk or hyphen
4
- const MIME_VALUE_CHARS_WHITELIST = /^[a-z*-]{1,24}\/[a-z0-9*-]{1,24}$/;
3
+ // One to twenty four lowercase letters, asterisk or hyphen, forward slash, one to seventy two lowercase letters, digits, asterisk, hyphen, plus, dot or underscore
4
+ const MIME_VALUE_CHARS_WHITELIST = /^[a-z*-]{1,24}\/[a-z0-9*+-_.]{1,72}$/;
5
5
  // Stryker disable all
6
6
  export const MimeValue = z
7
7
  // Stryker restore all
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bgord/tools",
3
- "version": "1.3.7",
3
+ "version": "1.3.10",
4
4
  "type": "module",
5
5
  "license": "MIT",
6
6
  "author": "Bartosz Gordon",
@@ -20,25 +20,25 @@
20
20
  "preinstall": "bunx only-allow bun"
21
21
  },
22
22
  "devDependencies": {
23
- "@biomejs/biome": "2.3.11",
23
+ "@biomejs/biome": "2.3.12",
24
24
  "@commitlint/cli": "20.3.1",
25
25
  "@commitlint/config-conventional": "20.3.1",
26
26
  "@stryker-mutator/core": "9.4.0",
27
27
  "@types/bun": "1.3.6",
28
28
  "cspell": "9.6.0",
29
- "knip": "5.82.0",
29
+ "knip": "5.82.1",
30
30
  "lefthook": "2.0.15",
31
31
  "lockfile-lint": "4.14.1",
32
32
  "only-allow": "1.2.2",
33
33
  "shellcheck": "4.1.0",
34
34
  "typescript": "5.9.3",
35
- "zod": "4.3.5"
35
+ "zod": "4.3.6"
36
36
  },
37
37
  "dependencies": {
38
38
  "date-fns": "4.1.0"
39
39
  },
40
40
  "peerDependencies": {
41
- "zod": "4.3.5"
41
+ "zod": "4.3.6"
42
42
  },
43
43
  "sideEffects": false
44
44
  }