@featurevisor/types 1.2.0 → 1.3.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":9616,"mtime":1705426709027,"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":10214,"mtime":1706045803783,"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.3.0](https://github.com/featurevisor/featurevisor/compare/v1.2.4...v1.3.0) (2024-01-23)
7
+
8
+
9
+ ### Features
10
+
11
+ * allow exposing features with tags + environment combination ([#254](https://github.com/featurevisor/featurevisor/issues/254)) ([1ae08e7](https://github.com/featurevisor/featurevisor/commit/1ae08e71393b620f98f7080aff18033a3e3b7192))
12
+
13
+
14
+
15
+
16
+
17
+ ## [1.2.2](https://github.com/featurevisor/featurevisor/compare/v1.2.1...v1.2.2) (2024-01-17)
18
+
19
+ **Note:** Version bump only for package @featurevisor/types
20
+
21
+
22
+
23
+
24
+
6
25
  # [1.2.0](https://github.com/featurevisor/featurevisor/compare/v1.1.1...v1.2.0) (2024-01-16)
7
26
 
8
27
 
package/lib/index.d.ts CHANGED
@@ -183,12 +183,12 @@ export interface Rule {
183
183
  [key: string]: VariableValue;
184
184
  };
185
185
  }
186
+ export type Tag = string;
186
187
  export interface Environment {
187
- expose?: boolean;
188
+ expose?: boolean | Tag[];
188
189
  rules: Rule[];
189
190
  force?: Force[];
190
191
  }
191
- export type Tag = string;
192
192
  export interface ParsedFeature {
193
193
  key: FeatureKey;
194
194
  archived?: boolean;
@@ -259,6 +259,27 @@ export interface TestSegment {
259
259
  assertions: SegmentAssertion[];
260
260
  }
261
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
+ }
262
283
  /**
263
284
  * Site index and history
264
285
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@featurevisor/types",
3
- "version": "1.2.0",
3
+ "version": "1.3.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": "e733c84d2fcdc6205df5ae75e5bbf73753141646"
47
+ "gitHead": "92829e94ab09474433695d29577bd3eb22490f97"
48
48
  }
package/src/index.ts CHANGED
@@ -293,14 +293,14 @@ export interface Rule {
293
293
  };
294
294
  }
295
295
 
296
+ export type Tag = string;
297
+
296
298
  export interface Environment {
297
- expose?: boolean;
299
+ expose?: boolean | Tag[];
298
300
  rules: Rule[];
299
301
  force?: Force[];
300
302
  }
301
303
 
302
- export type Tag = string;
303
-
304
304
  export interface ParsedFeature {
305
305
  key: FeatureKey;
306
306
 
@@ -389,6 +389,30 @@ export interface TestSegment {
389
389
 
390
390
  export type Test = TestSegment | TestFeature;
391
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
+
392
416
  /**
393
417
  * Site index and history
394
418
  */