@featurevisor/types 0.49.0 → 0.50.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/.eslintcache CHANGED
@@ -1 +1 @@
1
- [{"/home/runner/work/featurevisor/featurevisor/packages/types/src/index.ts":"1"},{"size":9059,"mtime":1696103831033,"results":"2","hashOfConfig":"3"},{"filePath":"4","messages":"5","suppressedMessages":"6","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"wdwiro","/home/runner/work/featurevisor/featurevisor/packages/types/src/index.ts",[],[]]
1
+ [{"/home/runner/work/featurevisor/featurevisor/packages/types/src/index.ts":"1"},{"size":8888,"mtime":1696188445490,"results":"2","hashOfConfig":"3"},{"filePath":"4","messages":"5","suppressedMessages":"6","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"wdwiro","/home/runner/work/featurevisor/featurevisor/packages/types/src/index.ts",[],[]]
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.50.0](https://github.com/featurevisor/featurevisor/compare/v0.49.0...v0.50.0) (2023-10-01)
7
+
8
+
9
+ ### Features
10
+
11
+ * test specs improvements ([#160](https://github.com/featurevisor/featurevisor/issues/160)) ([fd8fa01](https://github.com/featurevisor/featurevisor/commit/fd8fa01f517bcfd5dfde80f311a9c546dd481ff1))
12
+
13
+
14
+
15
+
16
+
6
17
  # [0.49.0](https://github.com/featurevisor/featurevisor/compare/v0.48.0...v0.49.0) (2023-09-30)
7
18
 
8
19
  **Note:** Version bump only for package @featurevisor/types
package/lib/index.d.ts CHANGED
@@ -228,6 +228,7 @@ export interface ExistingState {
228
228
  */
229
229
  export interface FeatureAssertion {
230
230
  description?: string;
231
+ environment: EnvironmentKey;
231
232
  at: Weight;
232
233
  context: Context;
233
234
  expectedToBeEnabled: boolean;
@@ -237,7 +238,7 @@ export interface FeatureAssertion {
237
238
  };
238
239
  }
239
240
  export interface TestFeature {
240
- key: FeatureKey;
241
+ feature: FeatureKey;
241
242
  assertions: FeatureAssertion[];
242
243
  }
243
244
  export interface SegmentAssertion {
@@ -246,19 +247,10 @@ export interface SegmentAssertion {
246
247
  expectedToMatch: boolean;
247
248
  }
248
249
  export interface TestSegment {
249
- key: SegmentKey;
250
+ segment: SegmentKey;
250
251
  assertions: SegmentAssertion[];
251
252
  }
252
- export interface Test {
253
- description?: string;
254
- tag?: string;
255
- environment?: string;
256
- features?: TestFeature[];
257
- segments?: TestSegment[];
258
- }
259
- export interface Spec {
260
- tests: Test[];
261
- }
253
+ export type Test = TestSegment | TestFeature;
262
254
  /**
263
255
  * Site index and history
264
256
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@featurevisor/types",
3
- "version": "0.49.0",
3
+ "version": "0.50.0",
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": "85a73383e4efea6415af82360d51e884a64cf370"
47
+ "gitHead": "8185b286336d8fe3a9229e7d2545607a88f3c083"
48
48
  }
package/src/index.ts CHANGED
@@ -351,6 +351,7 @@ export interface ExistingState {
351
351
  */
352
352
  export interface FeatureAssertion {
353
353
  description?: string;
354
+ environment: EnvironmentKey;
354
355
  at: Weight; // bucket weight: 0 to 100
355
356
  context: Context;
356
357
  expectedToBeEnabled: boolean;
@@ -361,7 +362,7 @@ export interface FeatureAssertion {
361
362
  }
362
363
 
363
364
  export interface TestFeature {
364
- key: FeatureKey;
365
+ feature: FeatureKey;
365
366
  assertions: FeatureAssertion[];
366
367
  }
367
368
 
@@ -372,25 +373,11 @@ export interface SegmentAssertion {
372
373
  }
373
374
 
374
375
  export interface TestSegment {
375
- key: SegmentKey;
376
+ segment: SegmentKey;
376
377
  assertions: SegmentAssertion[];
377
378
  }
378
379
 
379
- export interface Test {
380
- description?: string;
381
-
382
- // needed for feature testing
383
- tag?: string;
384
- environment?: string;
385
- features?: TestFeature[];
386
-
387
- // needed for segment testing
388
- segments?: TestSegment[];
389
- }
390
-
391
- export interface Spec {
392
- tests: Test[];
393
- }
380
+ export type Test = TestSegment | TestFeature;
394
381
 
395
382
  /**
396
383
  * Site index and history