@featurevisor/types 0.28.0 → 0.30.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 +19 -0
- package/lib/index.d.ts +2 -8
- package/package.json +2 -2
- package/src/index.ts +2 -12
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
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.30.0](https://github.com/fahad19/featurevisor/compare/v0.29.0...v0.30.0) (2023-06-10)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @featurevisor/types
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [0.29.0](https://github.com/fahad19/featurevisor/compare/v0.28.1...v0.29.0) (2023-06-10)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* drop Allocation.percentage in datafiles ([#80](https://github.com/fahad19/featurevisor/issues/80)) ([b43da69](https://github.com/fahad19/featurevisor/commit/b43da6922f81aef9fe8e8a54342067627adb990b))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [0.28.0](https://github.com/fahad19/featurevisor/compare/v0.27.1...v0.28.0) (2023-06-08)
|
|
7
26
|
|
|
8
27
|
|
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
|
|
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
|
|
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.
|
|
3
|
+
"version": "0.30.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": "
|
|
44
|
+
"gitHead": "665b9d4d1586886bffe4a94cc2e2c5a3ffa708f3"
|
|
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
|
-
|
|
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
|
|
289
|
+
bucketBy: BucketBy;
|
|
300
290
|
|
|
301
291
|
defaultVariation: VariationValue;
|
|
302
292
|
variablesSchema?: VariableSchema[];
|