@naturalcycles/abba 1.25.2 → 1.25.3

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/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CommonDB } from '@naturalcycles/db-lib';
2
- import { AnyObject, BaseDBEntity, IsoDateString, Saved } from '@naturalcycles/js-lib';
2
+ import { AnyObject, BaseDBEntity, IsoDate, Saved } from '@naturalcycles/js-lib';
3
3
  export interface AbbaConfig {
4
4
  db: CommonDB;
5
5
  }
@@ -24,11 +24,11 @@ export type BaseExperiment = BaseDBEntity & {
24
24
  /**
25
25
  * Date range start for the experiment assignments
26
26
  */
27
- startDateIncl: IsoDateString;
27
+ startDateIncl: IsoDate;
28
28
  /**
29
29
  * Date range end for the experiment assignments
30
30
  */
31
- endDateExcl: IsoDateString;
31
+ endDateExcl: IsoDate;
32
32
  };
33
33
  export type Experiment = BaseExperiment & {
34
34
  rules: SegmentationRule[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@naturalcycles/abba",
3
- "version": "1.25.2",
3
+ "version": "1.25.3",
4
4
  "scripts": {
5
5
  "prepare": "husky",
6
6
  "build": "dev-lib build",
@@ -39,7 +39,7 @@
39
39
  "url": "https://github.com/NaturalCycles/abba"
40
40
  },
41
41
  "engines": {
42
- "node": ">=20.13.0"
42
+ "node": ">=22.10.0"
43
43
  },
44
44
  "description": "AB test assignment configuration tool for Node.js",
45
45
  "author": "Natural Cycles Team",
@@ -1,5 +1,5 @@
1
1
  import { CommonDao, CommonDB } from '@naturalcycles/db-lib'
2
- import { IsoDateString, localDate, Saved } from '@naturalcycles/js-lib'
2
+ import { IsoDate, localDate, Saved } from '@naturalcycles/js-lib'
3
3
  import { BaseExperiment, Experiment } from '../types'
4
4
 
5
5
  type ExperimentDBM = Saved<BaseExperiment> & {
@@ -46,8 +46,8 @@ export const experimentDao = (db: CommonDB): ExperimentDao =>
46
46
  * MySQL Automatically parses Date fields as Date objects
47
47
  * For simplicity let's not do that by having this function...
48
48
  */
49
- function parseMySQLDate(date: string): IsoDateString {
49
+ function parseMySQLDate(date: string): IsoDate {
50
50
  // @ts-expect-error
51
51
  if (date instanceof Date) return localDate(date).toISODate()
52
- return date
52
+ return date as IsoDate
53
53
  }
package/src/types.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { CommonDB } from '@naturalcycles/db-lib'
2
- import { AnyObject, BaseDBEntity, IsoDateString, Saved } from '@naturalcycles/js-lib'
2
+ import { AnyObject, BaseDBEntity, IsoDate, Saved } from '@naturalcycles/js-lib'
3
3
 
4
4
  export interface AbbaConfig {
5
5
  db: CommonDB
@@ -26,11 +26,11 @@ export type BaseExperiment = BaseDBEntity & {
26
26
  /**
27
27
  * Date range start for the experiment assignments
28
28
  */
29
- startDateIncl: IsoDateString
29
+ startDateIncl: IsoDate
30
30
  /**
31
31
  * Date range end for the experiment assignments
32
32
  */
33
- endDateExcl: IsoDateString
33
+ endDateExcl: IsoDate
34
34
  }
35
35
 
36
36
  export type Experiment = BaseExperiment & {