@featurevisor/types 0.31.0 → 0.33.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 +15 -5
- package/package.json +2 -2
- package/src/index.ts +21 -5
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.33.0](https://github.com/fahad19/featurevisor/compare/v0.32.1...v0.33.0) (2023-07-06)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @featurevisor/types
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [0.32.0](https://github.com/fahad19/featurevisor/compare/v0.31.2...v0.32.0) (2023-07-02)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Features
|
|
18
|
+
|
|
19
|
+
* make segments testable ([#95](https://github.com/fahad19/featurevisor/issues/95)) ([15eae3c](https://github.com/fahad19/featurevisor/commit/15eae3cdf12a32e376e68ced015a9e697eb61da4))
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
# [0.31.0](https://github.com/fahad19/featurevisor/compare/v0.30.1...v0.31.0) (2023-06-24)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @featurevisor/types
|
package/lib/index.d.ts
CHANGED
|
@@ -213,7 +213,7 @@ export interface ExistingState {
|
|
|
213
213
|
/**
|
|
214
214
|
* Tests
|
|
215
215
|
*/
|
|
216
|
-
export interface
|
|
216
|
+
export interface FeatureAssertion {
|
|
217
217
|
description?: string;
|
|
218
218
|
at: Weight;
|
|
219
219
|
attributes: Attributes;
|
|
@@ -224,13 +224,23 @@ export interface Assertion {
|
|
|
224
224
|
}
|
|
225
225
|
export interface TestFeature {
|
|
226
226
|
key: FeatureKey;
|
|
227
|
-
assertions:
|
|
227
|
+
assertions: FeatureAssertion[];
|
|
228
|
+
}
|
|
229
|
+
export interface SegmentAssertion {
|
|
230
|
+
description?: string;
|
|
231
|
+
attributes: Attributes;
|
|
232
|
+
expected: boolean;
|
|
233
|
+
}
|
|
234
|
+
export interface TestSegment {
|
|
235
|
+
key: SegmentKey;
|
|
236
|
+
assertions: SegmentAssertion[];
|
|
228
237
|
}
|
|
229
238
|
export interface Test {
|
|
230
239
|
description?: string;
|
|
231
|
-
tag
|
|
232
|
-
environment
|
|
233
|
-
features
|
|
240
|
+
tag?: string;
|
|
241
|
+
environment?: string;
|
|
242
|
+
features?: TestFeature[];
|
|
243
|
+
segments?: TestSegment[];
|
|
234
244
|
}
|
|
235
245
|
export interface Spec {
|
|
236
246
|
tests: Test[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@featurevisor/types",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.33.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": "a03246983110e5e83432b0a90849aece2fae1512"
|
|
45
45
|
}
|
package/src/index.ts
CHANGED
|
@@ -328,7 +328,7 @@ export interface ExistingState {
|
|
|
328
328
|
/**
|
|
329
329
|
* Tests
|
|
330
330
|
*/
|
|
331
|
-
export interface
|
|
331
|
+
export interface FeatureAssertion {
|
|
332
332
|
description?: string;
|
|
333
333
|
at: Weight; // bucket weight: 0 to 100
|
|
334
334
|
attributes: Attributes;
|
|
@@ -340,14 +340,30 @@ export interface Assertion {
|
|
|
340
340
|
|
|
341
341
|
export interface TestFeature {
|
|
342
342
|
key: FeatureKey;
|
|
343
|
-
assertions:
|
|
343
|
+
assertions: FeatureAssertion[];
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
export interface SegmentAssertion {
|
|
347
|
+
description?: string;
|
|
348
|
+
attributes: Attributes;
|
|
349
|
+
expected: boolean;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export interface TestSegment {
|
|
353
|
+
key: SegmentKey;
|
|
354
|
+
assertions: SegmentAssertion[];
|
|
344
355
|
}
|
|
345
356
|
|
|
346
357
|
export interface Test {
|
|
347
358
|
description?: string;
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
359
|
+
|
|
360
|
+
// needed for feature testing
|
|
361
|
+
tag?: string;
|
|
362
|
+
environment?: string;
|
|
363
|
+
features?: TestFeature[];
|
|
364
|
+
|
|
365
|
+
// needed for segment testing
|
|
366
|
+
segments?: TestSegment[];
|
|
351
367
|
}
|
|
352
368
|
|
|
353
369
|
export interface Spec {
|