@utiliread/primitives 1.0.0-118 → 1.0.0-119
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/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -7
- package/dist/index.mjs.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/luxon-local.d.ts +2 -0
- package/dist/types/step.d.ts +2 -2
- package/package.json +1 -1
- package/src/index.ts +3 -1
- package/src/luxon-local.ts +3 -0
- package/src/step.ts +2 -3
- package/dist/types/parcel-workaround.d.ts +0 -1
package/dist/types/index.d.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { NumberFormatter, invariantDecimalSeparator, localeDecimalSeparator } fr
|
|
|
5
5
|
import type { AggregateId } from "./aggregate-id";
|
|
6
6
|
import type { BreakdownPeriod } from "./breakdown-rule";
|
|
7
7
|
import { BreakdownRule } from "./breakdown-rule";
|
|
8
|
-
import { Duration } from "luxon";
|
|
8
|
+
import { Duration } from "./luxon-local";
|
|
9
9
|
import type { MeasureId } from "./measure-id";
|
|
10
10
|
import type { Medium } from "./medium";
|
|
11
11
|
import type { Optional } from "./optional";
|
package/dist/types/step.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DateTime
|
|
1
|
+
import { DateTime } from "luxon";
|
|
2
|
+
import { Duration } from "./luxon-local";
|
|
2
3
|
export type Step = "hour" | "day" | "week" | "month" | "year";
|
|
3
4
|
export declare enum DayOfWeek {
|
|
4
5
|
Monday = 1,
|
|
@@ -9,7 +10,6 @@ export declare enum DayOfWeek {
|
|
|
9
10
|
Saturday = 6,
|
|
10
11
|
Sunday = 7
|
|
11
12
|
}
|
|
12
|
-
export { Duration };
|
|
13
13
|
export declare namespace Step {
|
|
14
14
|
function startOf(dateTime: DateTime, step: Step, firstDayOfWeek?: DayOfWeek): DateTime;
|
|
15
15
|
function asDuration(step: Step, amount?: number): Duration;
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
import type { AggregateId } from "./aggregate-id";
|
|
13
13
|
import type { BreakdownPeriod } from "./breakdown-rule";
|
|
14
14
|
import { BreakdownRule } from "./breakdown-rule";
|
|
15
|
-
import { Duration } from "luxon";
|
|
15
|
+
import { Duration } from "./luxon-local";
|
|
16
16
|
import type { MeasureId } from "./measure-id";
|
|
17
17
|
import type { Medium } from "./medium";
|
|
18
18
|
import type { Optional } from "./optional";
|
|
@@ -49,5 +49,7 @@ export {
|
|
|
49
49
|
|
|
50
50
|
// Hack to force parcel to include Duration in typings file
|
|
51
51
|
// Otherwise it seems to only include DateTime in the dist/index.d.ts which causes the file to be invalid
|
|
52
|
+
// The reason for the ./parcel-workaround file is that it seems to generate the expected typings.
|
|
53
|
+
// If we did `import { Duration } from "luxon"` instead and re-exported it as `__Duration` then it seems invalid.
|
|
52
54
|
Duration as __Duration,
|
|
53
55
|
};
|
package/src/step.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { DateTime
|
|
1
|
+
import { DateTime } from "luxon";
|
|
2
|
+
import { Duration } from "./luxon-local";
|
|
2
3
|
|
|
3
4
|
export type Step = "hour" | "day" | "week" | "month" | "year";
|
|
4
5
|
|
|
@@ -12,8 +13,6 @@ export enum DayOfWeek {
|
|
|
12
13
|
Sunday = 7,
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
export { Duration };
|
|
16
|
-
|
|
17
16
|
export namespace Step {
|
|
18
17
|
export function startOf(
|
|
19
18
|
dateTime: DateTime,
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Duration } from "luxon";
|