@featurevisor/types 0.28.0 → 0.29.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.29.0](https://github.com/fahad19/featurevisor/compare/v0.28.1...v0.29.0) (2023-06-10)
7
+
8
+
9
+ ### Features
10
+
11
+ * drop Allocation.percentage in datafiles ([#80](https://github.com/fahad19/featurevisor/issues/80)) ([b43da69](https://github.com/fahad19/featurevisor/commit/b43da6922f81aef9fe8e8a54342067627adb990b))
12
+
13
+
14
+
15
+
16
+
6
17
  # [0.28.0](https://github.com/fahad19/featurevisor/compare/v0.27.1...v0.28.0) (2023-06-08)
7
18
 
8
19
 
package/lib/index.d.ts CHANGED
@@ -108,15 +108,9 @@ export type BucketValue = number;
108
108
  * Datafile-only types
109
109
  */
110
110
  export type Percentage = number;
111
- export interface RangeObject {
112
- start: Percentage;
113
- end: Percentage;
114
- }
115
- export type RangeTuple = [Percentage, Percentage];
116
- export type Range = RangeObject | RangeTuple;
111
+ export type Range = [Percentage, Percentage];
117
112
  export interface Allocation {
118
113
  variation: VariationValue;
119
- percentage?: Percentage;
120
114
  range: Range;
121
115
  }
122
116
  export interface Traffic {
@@ -185,7 +179,7 @@ export interface ParsedFeature {
185
179
  archived: boolean;
186
180
  description: string;
187
181
  tags: string[];
188
- bucketBy?: AttributeKey | AttributeKey[];
182
+ bucketBy: BucketBy;
189
183
  defaultVariation: VariationValue;
190
184
  variablesSchema?: VariableSchema[];
191
185
  variations: Variation[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@featurevisor/types",
3
- "version": "0.28.0",
3
+ "version": "0.29.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": "349f2c213ee65025a4ee4cd6697fa45b8b5fd9eb"
44
+ "gitHead": "a58d59a7de4df79575589520415b261cae519b1c"
45
45
  }
package/src/index.ts CHANGED
@@ -199,19 +199,10 @@ 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
- // @TODO: remove this in next breaking semver
203
- export interface RangeObject {
204
- start: Percentage; // 0 to 100k
205
- end: Percentage; // 0 to 100k
206
- }
207
-
208
- export type RangeTuple = [Percentage, Percentage]; // 0 to 100k
209
-
210
- export type Range = RangeObject | RangeTuple;
202
+ export type Range = [Percentage, Percentage]; // 0 to 100k
211
203
 
212
204
  export interface Allocation {
213
205
  variation: VariationValue;
214
- percentage?: Percentage; // @TODO: remove it in next breaking semver
215
206
  range: Range; // @TODO: in future, turn it into `ranges`, so that Allocations with same variation do not repeat
216
207
  }
217
208
 
@@ -236,7 +227,6 @@ export type BucketBy = PlainBucketBy | AndBucketBy | OrBucketBy;
236
227
  export interface Feature {
237
228
  key: FeatureKey;
238
229
  // @TODO: introduce new `parent` key?
239
- // @TODO: introduce `type` for distinguishing between feature flags and experiments?
240
230
  defaultVariation: VariationValue;
241
231
  variablesSchema?: VariableSchema[];
242
232
  variations: Variation[];
@@ -296,7 +286,7 @@ export interface ParsedFeature {
296
286
  description: string;
297
287
  tags: string[];
298
288
 
299
- bucketBy?: AttributeKey | AttributeKey[]; // @TODO: have first available attribute as well?
289
+ bucketBy: BucketBy;
300
290
 
301
291
  defaultVariation: VariationValue;
302
292
  variablesSchema?: VariableSchema[];