|
2 | 2 |
|
3 | 3 | This is a port of Featurevisor [Javascript SDK](https://featurevisor.com/docs/sdks/javascript/) v3.x to Java, providing a way to evaluate feature flags, variations, and variables in your Java applications. |
4 | 4 |
|
5 | | -This SDK supports Featurevisor v3 behavior and v2 datafiles. Generated datafiles continue to carry `schemaVersion: "2"`. |
| 5 | +This SDK supports Featurevisor v3 behaviour and v2 datafiles. Generated datafiles continue to carry `schemaVersion: "2"`. |
6 | 6 |
|
7 | 7 | ## Table of contents <!-- omit in toc --> |
8 | 8 |
|
@@ -526,7 +526,7 @@ loadDatafile("checkout"); |
526 | 526 |
|
527 | 527 | ### Updating datafile |
528 | 528 |
|
529 | | -You can set the datafile as many times as you want in your application, which will result in emitting a [`datafile_set`](#datafile_set) event that you can listen and react to accordingly. |
| 529 | +You can set the datafile as many times as you want in your application, which will result in emitting a [`datafile_set`](#datafile-set) event that you can listen and react to accordingly. |
530 | 530 |
|
531 | 531 | The triggers for setting the datafile again can be: |
532 | 532 |
|
@@ -584,7 +584,7 @@ Featurevisor f = Featurevisor.createFeaturevisor(new Featurevisor.FeaturevisorOp |
584 | 584 |
|
585 | 585 | Every diagnostic has `level`, `code`, `message`, and an object-shaped `details` map. Optional `module`, `moduleName`, and `originalError` fields describe provenance. Evaluation metadata belongs in `details`. |
586 | 586 |
|
587 | | -Diagnostic handlers are isolated from SDK behavior. An exception in a handler does not stop other handlers or evaluations. |
| 587 | +Diagnostic handlers are isolated from SDK behaviour. An exception in a handler does not stop other handlers or evaluations. |
588 | 588 |
|
589 | 589 |
|
590 | 590 | ## Events |
@@ -709,6 +709,8 @@ Modules allow you to intercept the evaluation process and customize it further a |
709 | 709 |
|
710 | 710 | For feature evaluations, all `before` callbacks run in registration order, followed by all `beforeEvaluation` callbacks. After evaluation and caller defaults, all `afterEvaluation` callbacks run, followed by all `after` callbacks. Global variable evaluations use only `beforeEvaluation` and `afterEvaluation`. Required feature checks run through the complete module pipeline, and transformed defaults are preserved. |
711 | 711 |
|
| 712 | +`before` and `after` remain available as deprecated feature-only compatibility callbacks. Use `beforeEvaluation` and `afterEvaluation` for new modules so the same callbacks can handle feature and global variable evaluations. |
| 713 | + |
712 | 714 | ### Defining a module |
713 | 715 |
|
714 | 716 | A module is a `FeaturevisorModule` with a unique `name` and optional lifecycle functions: |
@@ -855,7 +857,7 @@ f.close(); |
855 | 857 |
|
856 | 858 | This package also provides a CLI tool for running your Featurevisor project's test specs and benchmarking against this Java SDK: |
857 | 859 |
|
858 | | -All three commands accept repeatable `--target=<target>` options. `test` builds only the selected Target datafiles and runs untargeted assertions plus assertions for those targets. `benchmark` and `assess-distribution` run independently against every selected Target datafile. Without `--target`, existing project-wide behavior is preserved. Project definitions, test specs, Target discovery, and datafile generation continue to come from the Node.js CLI. |
| 860 | +All three commands accept repeatable `--target=<target>` options. `test` builds only the selected Target datafiles and runs untargeted assertions plus assertions for those targets. `benchmark` and `assess-distribution` run independently against every selected Target datafile. Without `--target`, existing project-wide behaviour is preserved. Project definitions, test specs, Target discovery, and datafile generation continue to come from the Node.js CLI. |
859 | 861 |
|
860 | 862 | ### Test |
861 | 863 |
|
|
0 commit comments