Releases: cap-js-community/feature-toggle-library
v1.3.1
v1.3.0
correctness. The coalesce logic for using multiple configuration sources has changed. For details see
Layered Configuration.
Changed
-
core: initialization throws if mandatory configuration
fallbackValueisundefined(missing) ornull(always
invalid). -
core: initialization throws if mandatory configuration
typeis not in["boolean", "number", "string"](invalid). -
core: initialization throws if its invoked more than once. previously subsequent calls and their options were
ignored. -
core: configuration reading and coalescing has changed:
- up to
v1.2.5, the order wasruntime,files,auto, where the first occurrence is used for each toggle - from
v1.3.0, the order isauto,files,runtime, where the last occurrence is used for each toggle - this enables overriding the configuration based on environmental factors, by mixing in dedicated config files
- up to
v1.2.5
Fixed
-
core: if a
./default-env.jsonfile was present andNODE_ENV !== "production", we had assumed that cf env variables
VCAP_APPLCATIONandVCAP_SERVICESare always present in the file. now this is more resilient. -
core: [regression] initialize timing was noticeably slower, because the initial connection check was running with the
default reconnect strategy that takes 2000ms. now the reconnect strategy is disabled for the initial connection check.
v1.2.4
Changed
- cds-plugin: change default service access role to
internal-user(fixes #90). - redis: changed dependency from redis to @redis/client.
Added
-
core: [undocumented] plugin-config/initialize support multiple configuration files.
-
redis: [undocumented] cds-config/initialize take redis credentials and client options for fine-tuning or as an
alternative to VCAP_SERVICES (brought up by #92).the cds-config approach is consistent with the redis integration of other cap-js-community projects, see event-queue, websocket.
v1.2.3
Added
- cds-plugin: added explicit implementation for
FeatureService. - enable node v22 voters.
Fixed
- cds-plugin: allow feature toggles to initialize with no configured toggles.
- use proper cds syntax to get service operations (by johannes-vogel).
v1.2.2
Changed
- the initialization log of the library will now show the unique name used. this name is used to derive both the redis
storage key and pub/sub channel.
Fixed
- internal naming cleanup and consistency work.
v1.2.1
Changed
- cds-plugin: service endpoint
/rest/feature/redisReadwill 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/redisReadworks 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/redisReadendpoint 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 withreadaccess privileges, since it can no longer modify the server-local state (fixes #69).
Added
- added
remoteOnlyoption for/rest/feature/redisUpdateendpoint 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
uniqueNameconfiguration processing - more consistent scope preference order when 2 out of 4 scopes are set