@featurevisor/types 1.0.0 → 1.2.2

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/.eslintcache CHANGED
@@ -1 +1 @@
1
- [{"/home/runner/work/featurevisor/featurevisor/packages/types/src/index.ts":"1"},{"size":9487,"mtime":1702488845025,"results":"2","hashOfConfig":"3"},{"filePath":"4","messages":"5","suppressedMessages":"6","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"sabtla","/home/runner/work/featurevisor/featurevisor/packages/types/src/index.ts",[],[]]
1
+ [{"/home/runner/work/featurevisor/featurevisor/packages/types/src/index.ts":"1"},{"size":10206,"mtime":1705524041722,"results":"2","hashOfConfig":"3"},{"filePath":"4","messages":"5","suppressedMessages":"6","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"sabtla","/home/runner/work/featurevisor/featurevisor/packages/types/src/index.ts",[],[]]
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
+ ## [1.2.2](https://github.com/featurevisor/featurevisor/compare/v1.2.1...v1.2.2) (2024-01-17)
7
+
8
+ **Note:** Version bump only for package @featurevisor/types
9
+
10
+
11
+
12
+
13
+
14
+ # [1.2.0](https://github.com/featurevisor/featurevisor/compare/v1.1.1...v1.2.0) (2024-01-16)
15
+
16
+
17
+ ### Features
18
+
19
+ * Matrix for test specs ([#244](https://github.com/featurevisor/featurevisor/issues/244)) ([bfcb9c2](https://github.com/featurevisor/featurevisor/commit/bfcb9c21703e182bf5cadd58f371935df4bef3d4))
20
+
21
+
22
+
23
+
24
+
6
25
  # [0.69.0](https://github.com/featurevisor/featurevisor/compare/v0.68.0...v0.69.0) (2023-12-13)
7
26
 
8
27
 
package/lib/index.d.ts CHANGED
@@ -229,7 +229,11 @@ export interface ExistingState {
229
229
  /**
230
230
  * Tests
231
231
  */
232
+ export interface AssertionMatrix {
233
+ [key: string]: AttributeValue[];
234
+ }
232
235
  export interface FeatureAssertion {
236
+ matrix?: AssertionMatrix;
233
237
  description?: string;
234
238
  environment: EnvironmentKey;
235
239
  at: Weight;
@@ -245,6 +249,7 @@ export interface TestFeature {
245
249
  assertions: FeatureAssertion[];
246
250
  }
247
251
  export interface SegmentAssertion {
252
+ matrix?: AssertionMatrix;
248
253
  description?: string;
249
254
  context: Context;
250
255
  expectedToMatch: boolean;
@@ -254,6 +259,27 @@ export interface TestSegment {
254
259
  assertions: SegmentAssertion[];
255
260
  }
256
261
  export type Test = TestSegment | TestFeature;
262
+ export interface TestResultAssertionError {
263
+ type: "flag" | "variation" | "variable" | "segment";
264
+ expected: string | number | boolean | Date | null | undefined;
265
+ actual: string | number | boolean | Date | null | undefined;
266
+ message?: string;
267
+ details?: object;
268
+ }
269
+ export interface TestResultAssertion {
270
+ description: string;
271
+ duration: number;
272
+ passed: boolean;
273
+ errors?: TestResultAssertionError[];
274
+ }
275
+ export interface TestResult {
276
+ type: "feature" | "segment";
277
+ key: string;
278
+ notFound?: boolean;
279
+ passed: boolean;
280
+ duration: number;
281
+ assertions: TestResultAssertion[];
282
+ }
257
283
  /**
258
284
  * Site index and history
259
285
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@featurevisor/types",
3
- "version": "1.0.0",
3
+ "version": "1.2.2",
4
4
  "description": "Common Typescript types for Featurevisor",
5
5
  "main": "dist/index.js",
6
6
  "module": "lib/index.js",
@@ -44,5 +44,5 @@
44
44
  "url": "https://github.com/featurevisor/featurevisor/issues"
45
45
  },
46
46
  "license": "MIT",
47
- "gitHead": "02c2a84b1963688d521065075298c0e04ee6fdf7"
47
+ "gitHead": "65f5422bceb755a6d6a2e5b0c025b41486612c73"
48
48
  }
package/src/index.ts CHANGED
@@ -353,7 +353,12 @@ export interface ExistingState {
353
353
  /**
354
354
  * Tests
355
355
  */
356
+ export interface AssertionMatrix {
357
+ [key: string]: AttributeValue[];
358
+ }
359
+
356
360
  export interface FeatureAssertion {
361
+ matrix?: AssertionMatrix;
357
362
  description?: string;
358
363
  environment: EnvironmentKey;
359
364
  at: Weight; // bucket weight: 0 to 100
@@ -371,6 +376,7 @@ export interface TestFeature {
371
376
  }
372
377
 
373
378
  export interface SegmentAssertion {
379
+ matrix?: AssertionMatrix;
374
380
  description?: string;
375
381
  context: Context;
376
382
  expectedToMatch: boolean;
@@ -383,6 +389,30 @@ export interface TestSegment {
383
389
 
384
390
  export type Test = TestSegment | TestFeature;
385
391
 
392
+ export interface TestResultAssertionError {
393
+ type: "flag" | "variation" | "variable" | "segment";
394
+ expected: string | number | boolean | Date | null | undefined;
395
+ actual: string | number | boolean | Date | null | undefined;
396
+ message?: string;
397
+ details?: object;
398
+ }
399
+
400
+ export interface TestResultAssertion {
401
+ description: string;
402
+ duration: number;
403
+ passed: boolean;
404
+ errors?: TestResultAssertionError[];
405
+ }
406
+
407
+ export interface TestResult {
408
+ type: "feature" | "segment";
409
+ key: string;
410
+ notFound?: boolean;
411
+ passed: boolean;
412
+ duration: number;
413
+ assertions: TestResultAssertion[];
414
+ }
415
+
386
416
  /**
387
417
  * Site index and history
388
418
  */