Releases: Flagsmith/flagsmith-nodejs-client
v6.2.0
v6.1.0
What's Changed
- Bump undici from 6.21.1 to 6.21.2 by @dependabot in #184
- feat: Export FeatureModel to enable custom offline handler by @phiggins in #187
- Update test running instructions in README and other housekeeping by @phiggins in #186
- Bump vite from 5.4.18 to 5.4.19 by @dependabot in #185
- feat: Export BaseFlag, FlagsmithConfig, FlagsmithValue, TraitConfig types by @rolodato in #188
Full Changelog: v6.0.1...v6.1.0
v6.0.1
What's Changed
- Remove uses of
anyin models.ts by @phiggins in #180 - Bump esbuild from 0.14.54 to 0.25.0 by @dependabot in #175
- Bump vite from 5.4.14 to 5.4.18 by @dependabot in #182
New Contributors
Full Changelog: v6.0.0...v6.0.1
v6.0.0
What's Changed
BREAKING CHANGES
Flagsmith.environmentwas removed. UsegetEnvironmentinstead. This returns a Promise, and not a reference to the environment which could be uninitialised.onEnvironmentChangehandlers can now be invoked with anundefinedenvironment if an error occurred.- The
Flagsmithclient now returns an error if initialised with local evaluation enabled but without a server-side SDK key. Previously, it would log an error and continue.
New features
- Added a new
requestRetryDelayMillisecondswhich controls how long the SDK will wait before retrying any failed HTTP requests. Previously, this was hard-coded to always be 1 second. - Added a
getEnvironmentmethod which returns the SDK's current local environment state as a Promise.
Bug fixes
getIdentityFlagsnow uses any provided default flag handler if it fails, instead of just returning an error.- Setting
environmentRefreshIntervalto0now prevents any environment polling from happening. - Fixed a bug where if the SDK initially failed to fetch the environment document, then
getIdentityFlagswould always fail with an error even if the environment was later fetched successfully (#177).
Full Changelog: v5.1.1...v6.0.0
v5.1.1
What's Changed
- Bump undici from 6.19.8 to 6.21.1 by @dependabot in #170
- Bump vite from 5.4.8 to 5.4.14 by @dependabot in #171
- Bump vitest and @vitest/coverage-v8 by @dependabot in #173
Full Changelog: v5.1.0...v5.1.1
v5.1.0
What's Changed
- feat: Allow configuring analytics API endpoint separate from flags API by @rolodato in #168
- ci: Run tests on currently maintained Node LTS versions by @rolodato in #169
Deprecated
The baseApiUrl constructor argument of AnalyticsProcessor is now deprecated. Instead, pass the full URL to the analytics endpoint using the analyticsUrl parameter. This deprecation only affects you if you are manually managing analytics, rather than having the SDK do it for you using the enableAnalytics option.
Full Changelog: v5.0.1...v5.1.0
v5.0.1
v5.0.0
What's Changed
- fix: Export offline handler types by @rolodato in #166
- feat!: Simplify FlagsmithCache interface by @rolodato in #165
BREAKING CHANGES
The FlagsmithCache interface has been simplified. In practice, this will not affect most users:
- Removed
hasmethod - Removed
ttlparameter fromset - Changed
setreturn type toPromise<void> - Changed
getreturn type toPromise<Flags | undefined>
FlagsmithCache since 5.0.0: https://www.tsdocs.dev/docs/flagsmith-nodejs/5.0.0/interfaces/FlagsmithCache.html
FlagsmithCache prior to 5.0.0: https://www.tsdocs.dev/docs/flagsmith-nodejs/4.0.0/interfaces/FlagsmithCache.html
Full Changelog: v4.0.0...v5.0.0
v4.0.0
What's Changed
- feat: Support transient identities and traits by @novakzaballa in #158
- feat!: Custom fetch support, remove node-fetch, ESM+CJS dual build, migrate to vitest, TS fixes, test improvements by @rolodato in #162
- feat!: Remove all uses of CJS, add named Flagsmith export by @rolodato in #163
BREAKING CHANGES
Node.js 18 or later is now required.
Flagsmith is now a named export and not a default export. This only changes how you import the Flagsmith Node.js SDK and not how you use it.
In 3.x and earlier, Flagsmith is the default export:
// ES modules
import Flagsmith from 'flagsmith-nodejs'// CommonJS
const Flagsmith = require('flagsmith-nodejs')In 4.x, you must use the named export:
// ES modules
import { Flagsmith } from 'flagsmith-nodejs'// CommonJS
const { Flagsmith } = require('flagsmith-nodejs')Full Changelog: v3.3.3...v4.0.0
v4.0.0-beta.1
Breaking changes
Node.js >=18 is now required.
New features
flagsmith-nodejsis now published as both an ES and CommonJS module. This lets you use eitherimportorrequiresyntax to use this module from your application code- Support transient identities and traits by @novakzaballa in #158
- Support custom
fetchimplementations
Bug fixes
- Use
AbortSignalto cancel timed outfetchcalls by @AlissonRS in #161 - Fix environment document being fetched twice on startup by @rolodato in #147
Full Changelog: v3.3.3...v4.0.0-beta.1