@utiliread/primitives 1.0.0-117 → 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.
@@ -5,6 +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-local";
8
9
  import type { MeasureId } from "./measure-id";
9
10
  import type { Medium } from "./medium";
10
11
  import type { Optional } from "./optional";
@@ -16,4 +17,4 @@ import { RegisterLibrary } from "./register-library";
16
17
  import { Repository } from "./repository";
17
18
  import { TimeOrRule } from "./time-or-rule";
18
19
  import type { UnitId } from "./unit-id";
19
- export { AggregateId, BreakdownPeriod, BreakdownRule, DayOfWeek, invariantDecimalSeparator, localeDecimalSeparator, MeasureId, Medium, NumberFormatter, Optional, PrecisionNumber, RegisterConvention, RegisterDefinition, RegisterId, RegisterLibrary, registers, Repository, Step, TimeOrRule, UnitId, };
20
+ export { AggregateId, BreakdownPeriod, BreakdownRule, DayOfWeek, invariantDecimalSeparator, localeDecimalSeparator, MeasureId, Medium, NumberFormatter, Optional, PrecisionNumber, RegisterConvention, RegisterDefinition, RegisterId, RegisterLibrary, registers, Repository, Step, TimeOrRule, UnitId, Duration as __Duration, };
@@ -0,0 +1,2 @@
1
+ import { Duration } from "luxon";
2
+ export { Duration };
@@ -1,4 +1,5 @@
1
- import { DateTime, Duration } from "luxon";
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,
package/package.json CHANGED
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@utiliread/primitives",
3
- "version": "1.0.0-117",
3
+ "version": "1.0.0-119",
4
4
  "source": "src/index.ts",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",
7
7
  "types": "dist/index.d.ts",
8
8
  "sideEffects": false,
9
9
  "scripts": {
10
- "build": "parcel build && tsc --emitDeclarationOnly --outFile dist/index.d.ts && tsc --emitDeclarationOnly --outDir dist/types",
10
+ "build": "parcel build && tsc --emitDeclarationOnly --outDir dist/types",
11
11
  "prettier": "prettier --write src/**/*.ts locales/**/*.json",
12
12
  "test": "web-test-runner",
13
13
  "clean": "rimraf .parcel-cache dist"
package/src/index.ts CHANGED
@@ -12,6 +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-local";
15
16
  import type { MeasureId } from "./measure-id";
16
17
  import type { Medium } from "./medium";
17
18
  import type { Optional } from "./optional";
@@ -45,4 +46,10 @@ export {
45
46
  Step,
46
47
  TimeOrRule,
47
48
  UnitId,
49
+
50
+ // Hack to force parcel to include Duration in typings file
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.
54
+ Duration as __Duration,
48
55
  };
@@ -0,0 +1,3 @@
1
+ import { Duration } from "luxon";
2
+
3
+ export {Duration};
package/src/step.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { DateTime, Duration } from "luxon";
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
 
package/tsconfig.json CHANGED
@@ -6,6 +6,7 @@
6
6
  "declaration": true,
7
7
  "sourceMap": true,
8
8
  "strict": true,
9
+ "stripInternal": true,
9
10
  "rootDir": "src",
10
11
  "lib": ["ES2018", "DOM"],
11
12
  "types": ["mocha"]