@featurevisor/types 0.23.0 → 0.24.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.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [0.24.0](https://github.com/fahad19/featurevisor/compare/v0.23.0...v0.24.0) (2023-05-21)
7
+
8
+
9
+ ### Features
10
+
11
+ * ranges in datafiles as tuples ([#74](https://github.com/fahad19/featurevisor/issues/74)) ([07a3d92](https://github.com/fahad19/featurevisor/commit/07a3d9292f4038ebd68338bb905a34b2f13d36d9))
12
+
13
+
14
+
15
+
16
+
6
17
  # [0.23.0](https://github.com/fahad19/featurevisor/compare/v0.22.0...v0.23.0) (2023-05-20)
7
18
 
8
19
  **Note:** Version bump only for package @featurevisor/types
package/lib/index.d.ts CHANGED
@@ -108,10 +108,12 @@ export type BucketValue = number;
108
108
  * Datafile-only types
109
109
  */
110
110
  export type Percentage = number;
111
- export interface Range {
111
+ export interface RangeObject {
112
112
  start: Percentage;
113
113
  end: Percentage;
114
114
  }
115
+ export type RangeTuple = [Percentage, Percentage];
116
+ export type Range = RangeObject | RangeTuple;
115
117
  export interface Allocation {
116
118
  variation: VariationValue;
117
119
  percentage?: Percentage;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@featurevisor/types",
3
- "version": "0.23.0",
3
+ "version": "0.24.0",
4
4
  "description": "Common Typescript types for Featurevisor",
5
5
  "main": "dist/index.js",
6
6
  "module": "lib/index.js",
@@ -41,5 +41,5 @@
41
41
  "url": "https://github.com/fahad19/featurevisor/issues"
42
42
  },
43
43
  "license": "MIT",
44
- "gitHead": "9b700ea4437fa7cef9dbcac1b786ab49f62ffcab"
44
+ "gitHead": "b682809599adf027404e3368aa5690f705aa0736"
45
45
  }
package/src/index.ts CHANGED
@@ -199,11 +199,16 @@ export type BucketValue = number; // 0 to 100,000 (100% * 1000 to include three
199
199
  */
200
200
  export type Percentage = number; // 0 to 100,000 (100% * 1000 to include three decimal places in same integer)
201
201
 
202
- export interface Range {
202
+ // @TODO: remove this in next breaking semver
203
+ export interface RangeObject {
203
204
  start: Percentage; // 0 to 100k
204
205
  end: Percentage; // 0 to 100k
205
206
  }
206
207
 
208
+ export type RangeTuple = [Percentage, Percentage]; // 0 to 100k
209
+
210
+ export type Range = RangeObject | RangeTuple;
211
+
207
212
  export interface Allocation {
208
213
  variation: VariationValue;
209
214
  percentage?: Percentage; // @TODO: remove it in next breaking semver