Releases: cap-js-community/feature-toggle-library
v1.2.2
v1.2.1
Changed
- cds-plugin: service endpoint
/rest/feature/redisRead
will return server in-memory changes in NO_REDIS mode in
order to be consistent with/rest/feature/redisUpdate
.
Added
- cds-plugin: added
cds.test()
basic request/response tests for service.
Fixed
- cds-plugin: service endpoint
/rest/feature/redisRead
works without http errors in NO_REDIS mode.
v1.2.0
Changed
-
The main class of the library is no longer explicitly exported. You can access it implicitly as constructor of the
exported class instance.// before const { FeatureToggles } = require("@cap-js-community/feature-toggle-library"); const myToggles = new FeatureToggles({ uniqueName: "snowflake" }); // after const toggles = require("@cap-js-community/feature-toggle-library"); const FeatureToggles = toggles.constructor; const myToggles = new FeatureToggles({ uniqueName: "snowflake" });
-
cds-plugin: rewrote
/rest/feature/redisRead
endpoint to show all Redis maintained toggle values, including those of
toggles that are not configured. The endpoint no longer refreshes the server-local toggle state. Consequently, it
will work withread
access privileges, since it can no longer modify the server-local state (fixes #69).
Added
- added
remoteOnly
option for/rest/feature/redisUpdate
endpoint and thechangeFeatureValue()
API. With this
option, you can clean up Redis maintained values that are no longer configured (fixes #69). - cds-plugin: better detection of serve mode following changes in @sap/cds
v8.2.3
Fixed
- multiple, even concurrent, calls of
initializeFeatures()
will only ever trigger one execution of the underlying
initialization.
v1.1.7
Fixed
- setting a root value with the option
{ clearSubScopes: true }
only deleted the root and scoped values, but did
not set the new root value.
v1.1.6
Fixed
- cds-plugin: fix
uniqueName
configuration processing - more consistent scope preference order when 2 out of 4 scopes are set
v1.1.5
Changed
- fallback value
null
is no longer allowed (fixes #62). - change handlers no longer receive
null
as new values, they get the actual new value for the relevant scope instead
(fixes #64).
Fixed
- cds-plugin: unify and fix syntax of
context.error
andcontext.reject
for cds service. - change processing is more resilient. for redis message with multiple changes, if one change fails, then subsequent
changes will still be processed.
v1.1.4
v1.1.2
Added
- cds-plugin: fts feature toggles are detected and configured automatically (fixes #50).
- cds-plugin: allow custom scope map callback for fts feature toggles (fixes #51).
- cds-plugin: can configure unique name, i.e. which apps store the same toggles in redis, as part of cds configuration.
Fixed
- cds-plugin: feature toggles will not initialize during cds build.
- redis: proper usage of redis-client built-in reconnect capabilities.
v1.1.1
v1.1.0
require
API and
made it much leaner. These changes should have happened in 1.0, sorry for the inconvenience.
// before
const {
singleton: { getFeatureValue },
} = require("@cap-js-community/feature-toggle-library");
function someFunc() {
getFeatureValue(key);
}
// after
const toggles = require("@cap-js-community/feature-toggle-library");
function someFunc() {
toggles.getFeatureValue(key);
}
For details see
https://cap-js-community.github.io/feature-toggle-library/usage/