The Node SDK only fetched flags once at start(), so customers had to restart their servers to pick up a change. This PR:
start()
/v2/flags
pollIntervalMs
onChange(key, listener)
getBoolean
getVariant<T>
semverGte
userId
attributes
close()
Marked breaking because getBoolean is gone; will add a deprecation shim in a follow-up.
Updated the unit tests for rules; tried polling against staging with a flag flip.
f0e6d23
efe6d0a
f2e6d55
f1e6d3c
Summary
The Node SDK only fetched flags once at
start(), so customers had to restart their servers to pick up a change. This PR:/v2/flagsevery 30 s (configurable withpollIntervalMs)onChange(key, listener)so apps can react to flips (we need this for the React SDK bridge, which subscribes per component)getBooleanwith a genericgetVariant<T>so string and number flags work toosemverGterule op for app-version targeting (server side already shipped)userIdwithout callers copying it intoattributesclose()for clean shutdownNotes
Marked breaking because
getBooleanis gone; will add a deprecation shim in a follow-up.Testing
Updated the unit tests for rules; tried polling against staging with a flag flip.