From dcbc30090e7611c60e06d05826f6471f0c8c4009 Mon Sep 17 00:00:00 2001 From: Michael Beemer Date: Thu, 13 Feb 2025 15:59:56 -0500 Subject: [PATCH 01/26] fix: export missing telemetry functionality (#1148) Signed-off-by: Michael Beemer --- packages/shared/src/index.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/shared/src/index.ts b/packages/shared/src/index.ts index 42c1504a0..c708fb9af 100644 --- a/packages/shared/src/index.ts +++ b/packages/shared/src/index.ts @@ -4,6 +4,7 @@ export * from './client'; export * from './errors'; export * from './events'; export * from './logger'; +export * from './telemetry'; export * from './provider'; export * from './evaluation'; export * from './type-guards'; From 30004ea88f84e7304b5c5d5d89121cce7e48f1b0 Mon Sep 17 00:00:00 2001 From: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Date: Thu, 13 Feb 2025 16:03:13 -0500 Subject: [PATCH 02/26] chore(main): release core 1.7.1 (#1149) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release *beep* *boop* --- ## [1.7.1](https://github.com/open-feature/js-sdk/compare/core-v1.7.0...core-v1.7.1) (2025-02-13) ### πŸ› Bug Fixes * export missing telemetry functionality ([#1148](https://github.com/open-feature/js-sdk/issues/1148)) ([dcbc300](https://github.com/open-feature/js-sdk/commit/dcbc30090e7611c60e06d05826f6471f0c8c4009)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> --- .release-please-manifest.json | 2 +- packages/shared/CHANGELOG.md | 7 +++++++ packages/shared/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 23cabcfe6..dbbda7ab7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -4,6 +4,6 @@ "packages/angular": "0.0.1-experimental", "packages/web": "1.4.1", "packages/server": "1.17.1", - "packages/shared": "1.7.0", + "packages/shared": "1.7.1", "packages/angular/projects/angular-sdk": "0.0.9-experimental" } diff --git a/packages/shared/CHANGELOG.md b/packages/shared/CHANGELOG.md index 5ed5c2a66..51051bb78 100644 --- a/packages/shared/CHANGELOG.md +++ b/packages/shared/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.7.1](https://github.com/open-feature/js-sdk/compare/core-v1.7.0...core-v1.7.1) (2025-02-13) + + +### πŸ› Bug Fixes + +* export missing telemetry functionality ([#1148](https://github.com/open-feature/js-sdk/issues/1148)) ([dcbc300](https://github.com/open-feature/js-sdk/commit/dcbc30090e7611c60e06d05826f6471f0c8c4009)) + ## [1.7.0](https://github.com/open-feature/js-sdk/compare/core-v1.6.0...core-v1.7.0) (2025-02-07) diff --git a/packages/shared/package.json b/packages/shared/package.json index dd812242c..93674c23d 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@openfeature/core", - "version": "1.7.0", + "version": "1.7.1", "description": "Shared OpenFeature JS components (server and web)", "main": "./dist/cjs/index.js", "files": [ From 5272f76c4075ebbd21f9b24dacac8f2d22e31ca9 Mon Sep 17 00:00:00 2001 From: Lukas Reining Date: Thu, 13 Feb 2025 22:08:56 +0100 Subject: [PATCH 03/26] chore(angular): update angular package to a non-experimental version (#1147) Release Angular SDK as non-experimental version as described in #1110 Release-As: 0.0.10 Fixes #1110 Signed-off-by: Lukas Reining Co-authored-by: Michael Beemer --- packages/angular/projects/angular-sdk/package.json | 2 +- release-please-config.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/angular/projects/angular-sdk/package.json b/packages/angular/projects/angular-sdk/package.json index f3a3e6c5d..88fd60bf5 100644 --- a/packages/angular/projects/angular-sdk/package.json +++ b/packages/angular/projects/angular-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@openfeature/angular-sdk", - "version": "0.0.9-experimental", + "version": "0.0.10", "description": "OpenFeature Angular SDK", "repository": { "type": "git", diff --git a/release-please-config.json b/release-please-config.json index 6d4574698..4b909e3d6 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -29,7 +29,7 @@ }, "packages/angular/projects/angular-sdk": { "release-type": "node", - "prerelease": true, + "prerelease": false, "bump-minor-pre-major": true, "bump-patch-for-minor-pre-major": true, "extra-files": ["README.md"], From 40deec04147655312acfcc629017ccc60fe74efa Mon Sep 17 00:00:00 2001 From: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Date: Thu, 13 Feb 2025 16:11:57 -0500 Subject: [PATCH 04/26] chore(main): release angular-sdk 0.0.10 (#1143) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release *beep* *boop* --- ## [0.0.10](https://github.com/open-feature/js-sdk/compare/angular-sdk-v0.0.9-experimental...angular-sdk-v0.0.10) (2025-02-13) ### 🧹 Chore * **angular:** update angular package to a non-experimental version ([#1147](https://github.com/open-feature/js-sdk/issues/1147)) ([5272f76](https://github.com/open-feature/js-sdk/commit/5272f76c4075ebbd21f9b24dacac8f2d22e31ca9)), closes [#1110](https://github.com/open-feature/js-sdk/issues/1110) * update sdk peer ([#1142](https://github.com/open-feature/js-sdk/issues/1142)) ([8bb6206](https://github.com/open-feature/js-sdk/commit/8bb620601e2b8dc7b62d717169b585bd1c886996)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> --- .release-please-manifest.json | 2 +- packages/angular/projects/angular-sdk/CHANGELOG.md | 8 ++++++++ packages/angular/projects/angular-sdk/README.md | 4 ++-- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index dbbda7ab7..d8ec0aca0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -5,5 +5,5 @@ "packages/web": "1.4.1", "packages/server": "1.17.1", "packages/shared": "1.7.1", - "packages/angular/projects/angular-sdk": "0.0.9-experimental" + "packages/angular/projects/angular-sdk": "0.0.10" } diff --git a/packages/angular/projects/angular-sdk/CHANGELOG.md b/packages/angular/projects/angular-sdk/CHANGELOG.md index e2b3db07c..22528e550 100644 --- a/packages/angular/projects/angular-sdk/CHANGELOG.md +++ b/packages/angular/projects/angular-sdk/CHANGELOG.md @@ -1,6 +1,14 @@ # Changelog +## [0.0.10](https://github.com/open-feature/js-sdk/compare/angular-sdk-v0.0.9-experimental...angular-sdk-v0.0.10) (2025-02-13) + + +### 🧹 Chore + +* **angular:** update angular package to a non-experimental version ([#1147](https://github.com/open-feature/js-sdk/issues/1147)) ([5272f76](https://github.com/open-feature/js-sdk/commit/5272f76c4075ebbd21f9b24dacac8f2d22e31ca9)), closes [#1110](https://github.com/open-feature/js-sdk/issues/1110) +* update sdk peer ([#1142](https://github.com/open-feature/js-sdk/issues/1142)) ([8bb6206](https://github.com/open-feature/js-sdk/commit/8bb620601e2b8dc7b62d717169b585bd1c886996)) + ## [0.0.9-experimental](https://github.com/open-feature/js-sdk/compare/angular-sdk-v0.0.8-experimental...angular-sdk-v0.0.9-experimental) (2024-11-21) diff --git a/packages/angular/projects/angular-sdk/README.md b/packages/angular/projects/angular-sdk/README.md index 129f21b40..bb4270cd1 100644 --- a/packages/angular/projects/angular-sdk/README.md +++ b/packages/angular/projects/angular-sdk/README.md @@ -16,8 +16,8 @@ Specification - - Release + + Release
From 4c2b01e36773091038d758ac10bba06056ff4c45 Mon Sep 17 00:00:00 2001 From: Michael Beemer Date: Tue, 18 Feb 2025 18:46:02 +0000 Subject: [PATCH 05/26] fix: rename evaluation event property from data to body Signed-off-by: Michael Beemer --- packages/shared/src/telemetry/evaluation-event.ts | 8 ++++---- packages/shared/test/telemetry.spec.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/shared/src/telemetry/evaluation-event.ts b/packages/shared/src/telemetry/evaluation-event.ts index 91bfc2d1e..3ee1630d7 100644 --- a/packages/shared/src/telemetry/evaluation-event.ts +++ b/packages/shared/src/telemetry/evaluation-event.ts @@ -8,7 +8,7 @@ import { TelemetryFlagMetadata } from './flag-metadata'; type EvaluationEvent = { name: string; attributes: Record; - data: Record; + body: Record; }; const FLAG_EVALUATION_EVENT_NAME = 'feature_flag.evaluation'; @@ -28,12 +28,12 @@ export function createEvaluationEvent( [TelemetryAttribute.PROVIDER]: hookContext.providerMetadata.name, [TelemetryAttribute.REASON]: (evaluationDetails.reason ?? StandardResolutionReasons.UNKNOWN).toLowerCase(), }; - const data: EvaluationEvent['data'] = {}; + const body: EvaluationEvent['body'] = {}; if (evaluationDetails.variant) { attributes[TelemetryAttribute.VARIANT] = evaluationDetails.variant; } else { - data[TelemetryEvaluationData.VALUE] = evaluationDetails.value; + body[TelemetryEvaluationData.VALUE] = evaluationDetails.value; } const contextId = @@ -62,6 +62,6 @@ export function createEvaluationEvent( return { name: FLAG_EVALUATION_EVENT_NAME, attributes, - data, + body, }; } diff --git a/packages/shared/test/telemetry.spec.ts b/packages/shared/test/telemetry.spec.ts index c105d29e7..62d9871cf 100644 --- a/packages/shared/test/telemetry.spec.ts +++ b/packages/shared/test/telemetry.spec.ts @@ -44,7 +44,7 @@ describe('evaluationEvent', () => { [TelemetryAttribute.REASON]: StandardResolutionReasons.STATIC.toLowerCase(), [TelemetryAttribute.CONTEXT_ID]: 'test-target', }); - expect(result.data).toEqual({ + expect(result.body).toEqual({ [TelemetryEvaluationData.VALUE]: true, }); }); From a703ee7a6fc183bcfdf3f67b342b0b3cd76d43f9 Mon Sep 17 00:00:00 2001 From: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Date: Tue, 18 Feb 2025 13:50:35 -0500 Subject: [PATCH 06/26] chore(main): release core 1.7.2 (#1150) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release *beep* *boop* --- ## [1.7.2](https://github.com/open-feature/js-sdk/compare/core-v1.7.1...core-v1.7.2) (2025-02-18) ### πŸ› Bug Fixes * rename evaluation event property from data to body ([4c2b01e](https://github.com/open-feature/js-sdk/commit/4c2b01e36773091038d758ac10bba06056ff4c45)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> --- .release-please-manifest.json | 2 +- packages/shared/CHANGELOG.md | 7 +++++++ packages/shared/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d8ec0aca0..542144763 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -4,6 +4,6 @@ "packages/angular": "0.0.1-experimental", "packages/web": "1.4.1", "packages/server": "1.17.1", - "packages/shared": "1.7.1", + "packages/shared": "1.7.2", "packages/angular/projects/angular-sdk": "0.0.10" } diff --git a/packages/shared/CHANGELOG.md b/packages/shared/CHANGELOG.md index 51051bb78..5f8e726ff 100644 --- a/packages/shared/CHANGELOG.md +++ b/packages/shared/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.7.2](https://github.com/open-feature/js-sdk/compare/core-v1.7.1...core-v1.7.2) (2025-02-18) + + +### πŸ› Bug Fixes + +* rename evaluation event property from data to body ([4c2b01e](https://github.com/open-feature/js-sdk/commit/4c2b01e36773091038d758ac10bba06056ff4c45)) + ## [1.7.1](https://github.com/open-feature/js-sdk/compare/core-v1.7.0...core-v1.7.1) (2025-02-13) diff --git a/packages/shared/package.json b/packages/shared/package.json index 93674c23d..5d5580877 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@openfeature/core", - "version": "1.7.1", + "version": "1.7.2", "description": "Shared OpenFeature JS components (server and web)", "main": "./dist/cjs/index.js", "files": [ From 6a224830fa4e62fc30a7802536f6f6fc3f772038 Mon Sep 17 00:00:00 2001 From: Michael Beemer Date: Wed, 26 Feb 2025 16:17:28 -0500 Subject: [PATCH 07/26] feat: add support for abort controllers to event handlers (#1151) Signed-off-by: Michael Beemer --- .../react/src/evaluation/use-feature-flag.ts | 18 ++++------ .../use-open-feature-client-status.ts | 20 +++++------ .../client/internal/open-feature-client.ts | 9 ++++- packages/server/test/events.spec.ts | 31 +++++++++++++++- packages/shared/src/events/eventing.ts | 7 ++++ packages/shared/src/open-feature.ts | 19 ++++++---- packages/shared/test/events.spec.ts | 36 ++++++------------- .../client/internal/open-feature-client.ts | 9 ++++- packages/web/test/events.spec.ts | 31 +++++++++++++++- 9 files changed, 120 insertions(+), 60 deletions(-) diff --git a/packages/react/src/evaluation/use-feature-flag.ts b/packages/react/src/evaluation/use-feature-flag.ts index 899c042cc..7d3bab251 100644 --- a/packages/react/src/evaluation/use-feature-flag.ts +++ b/packages/react/src/evaluation/use-feature-flag.ts @@ -280,6 +280,7 @@ function attachHandlersAndResolve( const defaultedOptions = { ...DEFAULT_OPTIONS, ...useProviderOptions(), ...normalizeOptions(options) }; const client = useOpenFeatureClient(); const status = useOpenFeatureClientStatus(); + const controller = new AbortController(); // suspense if (defaultedOptions.suspendUntilReady && status === ProviderStatus.NOT_READY) { @@ -322,28 +323,23 @@ function attachHandlersAndResolve( useEffect(() => { if (status === ProviderStatus.NOT_READY) { // update when the provider is ready - client.addHandler(ProviderEvents.Ready, updateEvaluationDetailsCallback); + client.addHandler(ProviderEvents.Ready, updateEvaluationDetailsCallback, { signal: controller.signal }); } if (defaultedOptions.updateOnContextChanged) { // update when the context changes - client.addHandler(ProviderEvents.ContextChanged, updateEvaluationDetailsCallback); + client.addHandler(ProviderEvents.ContextChanged, updateEvaluationDetailsCallback, { signal: controller.signal }); } - return () => { - // cleanup the handlers - client.removeHandler(ProviderEvents.Ready, updateEvaluationDetailsCallback); - client.removeHandler(ProviderEvents.ContextChanged, updateEvaluationDetailsCallback); - }; - }, []); - useEffect(() => { if (defaultedOptions.updateOnConfigurationChanged) { // update when the provider configuration changes - client.addHandler(ProviderEvents.ConfigurationChanged, configurationChangeCallback); + client.addHandler(ProviderEvents.ConfigurationChanged, configurationChangeCallback, { + signal: controller.signal, + }); } return () => { // cleanup the handlers - client.removeHandler(ProviderEvents.ConfigurationChanged, configurationChangeCallback); + controller.abort(); }; }, []); diff --git a/packages/react/src/provider/use-open-feature-client-status.ts b/packages/react/src/provider/use-open-feature-client-status.ts index fac4a42b7..544cf5b54 100644 --- a/packages/react/src/provider/use-open-feature-client-status.ts +++ b/packages/react/src/provider/use-open-feature-client-status.ts @@ -10,22 +10,18 @@ import { ProviderEvents } from '@openfeature/web-sdk'; export function useOpenFeatureClientStatus(): ProviderStatus { const client = useOpenFeatureClient(); const [status, setStatus] = useState(client.providerStatus); + const controller = new AbortController(); useEffect(() => { const updateStatus = () => setStatus(client.providerStatus); - client.addHandler(ProviderEvents.ConfigurationChanged, updateStatus); - client.addHandler(ProviderEvents.ContextChanged, updateStatus); - client.addHandler(ProviderEvents.Error, updateStatus); - client.addHandler(ProviderEvents.Ready, updateStatus); - client.addHandler(ProviderEvents.Stale, updateStatus); - client.addHandler(ProviderEvents.Reconciling, updateStatus); + client.addHandler(ProviderEvents.ConfigurationChanged, updateStatus, { signal: controller.signal }); + client.addHandler(ProviderEvents.ContextChanged, updateStatus, { signal: controller.signal }); + client.addHandler(ProviderEvents.Error, updateStatus, { signal: controller.signal }); + client.addHandler(ProviderEvents.Ready, updateStatus, { signal: controller.signal }); + client.addHandler(ProviderEvents.Stale, updateStatus, { signal: controller.signal }); + client.addHandler(ProviderEvents.Reconciling, updateStatus, { signal: controller.signal }); return () => { - client.removeHandler(ProviderEvents.ConfigurationChanged, updateStatus); - client.removeHandler(ProviderEvents.ContextChanged, updateStatus); - client.removeHandler(ProviderEvents.Error, updateStatus); - client.removeHandler(ProviderEvents.Ready, updateStatus); - client.removeHandler(ProviderEvents.Stale, updateStatus); - client.removeHandler(ProviderEvents.Reconciling, updateStatus); + controller.abort(); }; }, [client]); diff --git a/packages/server/src/client/internal/open-feature-client.ts b/packages/server/src/client/internal/open-feature-client.ts index 08a577845..4f440e940 100644 --- a/packages/server/src/client/internal/open-feature-client.ts +++ b/packages/server/src/client/internal/open-feature-client.ts @@ -12,6 +12,7 @@ import type { OpenFeatureError, FlagMetadata, ResolutionDetails, + EventOptions, } from '@openfeature/core'; import { ErrorCode, @@ -79,7 +80,7 @@ export class OpenFeatureClient implements Client { return this.providerStatusAccessor(); } - addHandler(eventType: ProviderEvents, handler: EventHandler): void { + addHandler(eventType: ProviderEvents, handler: EventHandler, options?: EventOptions): void { this.emitterAccessor().addHandler(eventType, handler); const shouldRunNow = statusMatchesEvent(eventType, this._providerStatus); @@ -95,6 +96,12 @@ export class OpenFeatureClient implements Client { this._logger?.error('Error running event handler:', err); } } + + if (options?.signal && typeof options.signal.addEventListener === 'function') { + options.signal.addEventListener('abort', () => { + this.removeHandler(eventType, handler); + }); + } } removeHandler(eventType: ProviderEvents, handler: EventHandler) { diff --git a/packages/server/test/events.spec.ts b/packages/server/test/events.spec.ts index 07b3babe3..010a0f33d 100644 --- a/packages/server/test/events.spec.ts +++ b/packages/server/test/events.spec.ts @@ -449,7 +449,21 @@ describe('Events', () => { expect(OpenFeature.getHandlers(eventType)).toHaveLength(0); }); - it('The API provides a function allowing the removal of event handlers', () => { + it('The event handler can be removed using an abort signal', () => { + const abortController = new AbortController(); + const handler1 = jest.fn(); + const handler2 = jest.fn(); + const eventType = ProviderEvents.Stale; + + OpenFeature.addHandler(eventType, handler1, { signal: abortController.signal }); + OpenFeature.addHandler(eventType, handler2); + expect(OpenFeature.getHandlers(eventType)).toHaveLength(2); + + abortController.abort(); + expect(OpenFeature.getHandlers(eventType)).toHaveLength(1); + }); + + it('The API provides a function allowing the removal of event handlers from client', () => { const client = OpenFeature.getClient(domain); const handler = jest.fn(); const eventType = ProviderEvents.Stale; @@ -459,6 +473,21 @@ describe('Events', () => { client.removeHandler(eventType, handler); expect(client.getHandlers(eventType)).toHaveLength(0); }); + + it('The event handler on the client can be removed using an abort signal', () => { + const abortController = new AbortController(); + const client = OpenFeature.getClient(domain); + const handler1 = jest.fn(); + const handler2 = jest.fn(); + const eventType = ProviderEvents.Stale; + + client.addHandler(eventType, handler1, { signal: abortController.signal }); + client.addHandler(eventType, handler2); + expect(client.getHandlers(eventType)).toHaveLength(2); + + abortController.abort(); + expect(client.getHandlers(eventType)).toHaveLength(1); + }); }); describe('Requirement 5.3.1', () => { diff --git a/packages/shared/src/events/eventing.ts b/packages/shared/src/events/eventing.ts index 976e12cf4..c3ae8b9db 100644 --- a/packages/shared/src/events/eventing.ts +++ b/packages/shared/src/events/eventing.ts @@ -66,6 +66,9 @@ export type EventDetails< export type EventHandler< T extends ServerProviderEvents | ClientProviderEvents = ServerProviderEvents | ClientProviderEvents, > = (eventDetails?: EventDetails) => Promise | unknown; +export type EventOptions = { + signal?: AbortSignal; +}; export interface Eventing { /** @@ -73,6 +76,7 @@ export interface Eventing * The handlers are called in the order they have been added. * @param eventType The provider event type to listen to * @param {EventHandler} handler The handler to run on occurrence of the event type + * @param {EventOptions} options Optional options such as signal for aborting */ addHandler( eventType: T extends ClientProviderEvents @@ -83,14 +87,17 @@ export interface Eventing ? ClientProviderEvents.ConfigurationChanged : ServerProviderEvents.ConfigurationChanged >, + options?: EventOptions, ): void; addHandler( eventType: T extends ClientProviderEvents ? ClientNotChangeEvents : ServerNotChangeEvents, handler: EventHandler, + options?: EventOptions, ): void; addHandler( eventType: T extends ClientProviderEvents ? ClientProviderEvents : ServerProviderEvents, handler: EventHandler, + options?: EventOptions, ): void; /** diff --git a/packages/shared/src/open-feature.ts b/packages/shared/src/open-feature.ts index 58e1e6a14..fc82bc908 100644 --- a/packages/shared/src/open-feature.ts +++ b/packages/shared/src/open-feature.ts @@ -7,14 +7,13 @@ import type { EventDetails, EventHandler, Eventing, - GenericEventEmitter} from './events'; -import { - AllProviderEvents, - statusMatchesEvent, + EventOptions, + GenericEventEmitter, } from './events'; +import { AllProviderEvents, statusMatchesEvent } from './events'; import { isDefined } from './filter'; import type { BaseHook, EvaluationLifeCycle } from './hooks'; -import type { Logger, ManageLogger} from './logger'; +import type { Logger, ManageLogger } from './logger'; import { DefaultLogger, SafeLogger } from './logger'; import type { ClientProviderStatus, CommonProvider, ProviderMetadata, ServerProviderStatus } from './provider'; import { objectOrUndefined, stringOrUndefined } from './type-guards'; @@ -154,8 +153,9 @@ export abstract class OpenFeatureCommonAPI< * API (global) events run for all providers. * @param {AnyProviderEvent} eventType The provider event type to listen to * @param {EventHandler} handler The handler to run on occurrence of the event type + * @param {EventOptions} options Optional options such as signal for aborting */ - addHandler(eventType: T, handler: EventHandler): void { + addHandler(eventType: T, handler: EventHandler, options?: EventOptions): void { [...new Map([[undefined, this._defaultProvider]]), ...this._domainScopedProviders].forEach((keyProviderTuple) => { const domain = keyProviderTuple[0]; const provider = keyProviderTuple[1].provider; @@ -173,6 +173,11 @@ export abstract class OpenFeatureCommonAPI< }); this._apiEmitter.addHandler(eventType, handler); + if (options?.signal && typeof options.signal.addEventListener === 'function') { + options.signal.addEventListener('abort', () => { + this.removeHandler(eventType, handler); + }); + } } /** @@ -248,7 +253,7 @@ export abstract class OpenFeatureCommonAPI< // initialize the provider if it implements "initialize" and it's not already registered if (typeof provider.initialize === 'function' && !this.allProviders.includes(provider)) { initializationPromise = provider - .initialize?.(domain ? this._domainScopedContext.get(domain) ?? this._context : this._context) + .initialize?.(domain ? (this._domainScopedContext.get(domain) ?? this._context) : this._context) ?.then(() => { wrappedProvider.status = this._statusEnumType.READY; // fetch the most recent event emitters, some may have been added during init diff --git a/packages/shared/test/events.spec.ts b/packages/shared/test/events.spec.ts index f490892a9..a5597329f 100644 --- a/packages/shared/test/events.spec.ts +++ b/packages/shared/test/events.spec.ts @@ -14,17 +14,23 @@ class TestEventEmitter extends GenericEventEmitter { } } -// a little function to make sure we're at least waiting for the event loop +// a little function to make sure we're at least waiting for the event loop // to clear before we start making assertions const wait = (millis = 0) => { - return new Promise(resolve => {setTimeout(resolve, millis);}); + return new Promise((resolve) => { + setTimeout(resolve, millis); + }); }; describe('GenericEventEmitter', () => { + const emitter = new TestEventEmitter(); + + afterEach(() => { + emitter.removeAllHandlers(); + }); + describe('addHandler should', function () { it('attach handler for event type', async function () { - const emitter = new TestEventEmitter(); - const handler1 = jest.fn(); emitter.addHandler(AllProviderEvents.Ready, handler1); emitter.emit(AllProviderEvents.Ready); @@ -35,8 +41,6 @@ describe('GenericEventEmitter', () => { }); it('attach several handlers for event type', async function () { - const emitter = new TestEventEmitter(); - const handler1 = jest.fn(); const handler2 = jest.fn(); const handler3 = jest.fn(); @@ -64,7 +68,6 @@ describe('GenericEventEmitter', () => { debug: () => done(), }; - const emitter = new TestEventEmitter(); emitter.setLogger(logger); emitter.addHandler(AllProviderEvents.Ready, async () => { @@ -74,8 +77,6 @@ describe('GenericEventEmitter', () => { }); it('trigger handler for event type', async function () { - const emitter = new TestEventEmitter(); - const handler1 = jest.fn(); emitter.addHandler(AllProviderEvents.Ready, handler1); emitter.emit(AllProviderEvents.Ready); @@ -87,7 +88,6 @@ describe('GenericEventEmitter', () => { it('trigger handler for event type with event data', async function () { const event: ReadyEvent = { message: 'message' }; - const emitter = new TestEventEmitter(); const handler1 = jest.fn(); emitter.addHandler(AllProviderEvents.Ready, handler1); @@ -99,8 +99,6 @@ describe('GenericEventEmitter', () => { }); it('trigger several handlers for event type', async function () { - const emitter = new TestEventEmitter(); - const handler1 = jest.fn(); const handler2 = jest.fn(); const handler3 = jest.fn(); @@ -121,8 +119,6 @@ describe('GenericEventEmitter', () => { describe('removeHandler should', () => { it('remove single handler', async function () { - const emitter = new TestEventEmitter(); - const handler1 = jest.fn(); emitter.addHandler(AllProviderEvents.Ready, handler1); @@ -138,8 +134,6 @@ describe('GenericEventEmitter', () => { describe('removeAllHandlers should', () => { it('remove all handlers for event type', async function () { - const emitter = new TestEventEmitter(); - const handler1 = jest.fn(); const handler2 = jest.fn(); emitter.addHandler(AllProviderEvents.Ready, handler1); @@ -156,8 +150,6 @@ describe('GenericEventEmitter', () => { }); it('remove same handler when assigned to multiple events', async function () { - const emitter = new TestEventEmitter(); - const handler = jest.fn(); emitter.addHandler(AllProviderEvents.Stale, handler); emitter.addHandler(AllProviderEvents.ContextChanged, handler); @@ -174,8 +166,6 @@ describe('GenericEventEmitter', () => { }); it('allow addition/removal of duplicate handlers', async function () { - const emitter = new TestEventEmitter(); - const handler = jest.fn(); emitter.addHandler(AllProviderEvents.Stale, handler); emitter.addHandler(AllProviderEvents.Stale, handler); @@ -191,8 +181,6 @@ describe('GenericEventEmitter', () => { }); it('allow duplicate event handlers and call them', async function () { - const emitter = new TestEventEmitter(); - const handler = jest.fn(); emitter.addHandler(AllProviderEvents.Stale, handler); emitter.addHandler(AllProviderEvents.Stale, handler); @@ -205,8 +193,6 @@ describe('GenericEventEmitter', () => { }); it('remove all handlers only for event type', async function () { - const emitter = new TestEventEmitter(); - const handler1 = jest.fn(); const handler2 = jest.fn(); emitter.addHandler(AllProviderEvents.Ready, handler1); @@ -223,8 +209,6 @@ describe('GenericEventEmitter', () => { }); it('remove all handlers if no event type is given', async function () { - const emitter = new TestEventEmitter(); - const handler1 = jest.fn(); const handler2 = jest.fn(); emitter.addHandler(AllProviderEvents.Ready, handler1); diff --git a/packages/web/src/client/internal/open-feature-client.ts b/packages/web/src/client/internal/open-feature-client.ts index 0e0379f8e..7eed9a9a6 100644 --- a/packages/web/src/client/internal/open-feature-client.ts +++ b/packages/web/src/client/internal/open-feature-client.ts @@ -12,6 +12,7 @@ import type { OpenFeatureError, FlagMetadata, ResolutionDetails, + EventOptions, } from '@openfeature/core'; import { ErrorCode, @@ -74,7 +75,7 @@ export class OpenFeatureClient implements Client { return this.providerStatusAccessor(); } - addHandler(eventType: ProviderEvents, handler: EventHandler): void { + addHandler(eventType: ProviderEvents, handler: EventHandler, options: EventOptions): void { this.emitterAccessor().addHandler(eventType, handler); const shouldRunNow = statusMatchesEvent(eventType, this.providerStatus); @@ -90,6 +91,12 @@ export class OpenFeatureClient implements Client { this._logger?.error('Error running event handler:', err); } } + + if (options?.signal && typeof options.signal.addEventListener === 'function') { + options.signal.addEventListener('abort', () => { + this.removeHandler(eventType, handler); + }); + } } removeHandler(notificationType: ProviderEvents, handler: EventHandler): void { diff --git a/packages/web/test/events.spec.ts b/packages/web/test/events.spec.ts index ea020b438..208b027fc 100644 --- a/packages/web/test/events.spec.ts +++ b/packages/web/test/events.spec.ts @@ -476,7 +476,21 @@ describe('Events', () => { expect(OpenFeature.getHandlers(eventType)).toHaveLength(0); }); - it('The API provides a function allowing the removal of event handlers', () => { + it('The event handler can be removed using an abort signal', () => { + const abortController = new AbortController(); + const handler1 = jest.fn(); + const handler2 = jest.fn(); + const eventType = ProviderEvents.Stale; + + OpenFeature.addHandler(eventType, handler1, { signal: abortController.signal }); + OpenFeature.addHandler(eventType, handler2); + expect(OpenFeature.getHandlers(eventType)).toHaveLength(2); + + abortController.abort(); + expect(OpenFeature.getHandlers(eventType)).toHaveLength(1); + }); + + it('The API provides a function allowing the removal of event handlers from client', () => { const client = OpenFeature.getClient(domain); const handler = jest.fn(); const eventType = ProviderEvents.Stale; @@ -486,6 +500,21 @@ describe('Events', () => { client.removeHandler(eventType, handler); expect(client.getHandlers(eventType)).toHaveLength(0); }); + + it('The event handler on the client can be removed using an abort signal', () => { + const abortController = new AbortController(); + const client = OpenFeature.getClient(domain); + const handler1 = jest.fn(); + const handler2 = jest.fn(); + const eventType = ProviderEvents.Stale; + + client.addHandler(eventType, handler1, { signal: abortController.signal }); + client.addHandler(eventType, handler2); + expect(client.getHandlers(eventType)).toHaveLength(2); + + abortController.abort(); + expect(client.getHandlers(eventType)).toHaveLength(1); + }); }); describe('Requirement 5.3.1', () => { From eec21dda821af412594347b2b79bd376544e7fd8 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 10:59:42 -0500 Subject: [PATCH 08/26] chore(deps): update dependency uuid to v11 (#1073) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [uuid](https://redirect.github.com/uuidjs/uuid) | [`^9.0.1` -> `^11.0.0`](https://renovatebot.com/diffs/npm/uuid/9.0.1/11.1.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/uuid/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/uuid/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/uuid/9.0.1/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/uuid/9.0.1/11.1.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
uuidjs/uuid (uuid) ### [`v11.1.0`](https://redirect.github.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#1110-2025-02-19) [Compare Source](https://redirect.github.com/uuidjs/uuid/compare/v11.0.5...v11.1.0) ##### Features - update TS types to allow`Uint8Array` subtypes for `buffer` option ([#​865](https://redirect.github.com/uuidjs/uuid/issues/865)) ([a5231e7](https://redirect.github.com/uuidjs/uuid/commit/a5231e7e1b98c20b23c35402a232167f476b39a2)) ### [`v11.0.5`](https://redirect.github.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#1105-2025-01-09) [Compare Source](https://redirect.github.com/uuidjs/uuid/compare/v11.0.4...v11.0.5) ##### Bug Fixes - add TS unit test, pin to typescript@5.0.4 ([#​860](https://redirect.github.com/uuidjs/uuid/issues/860)) ([24ac2fd](https://redirect.github.com/uuidjs/uuid/commit/24ac2fd067e5bab97a5ccea3f6f365a64c01d140)) ### [`v11.0.4`](https://redirect.github.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#1104-2025-01-05) [Compare Source](https://redirect.github.com/uuidjs/uuid/compare/v11.0.3...v11.0.4) ##### Bug Fixes - **docs:** insure -> ensure ([#​843](https://redirect.github.com/uuidjs/uuid/issues/843)) ([d2a61e1](https://redirect.github.com/uuidjs/uuid/commit/d2a61e154d861e58549466e753bb9e4d5bfffb68)) - exclude tests from published package ([#​840](https://redirect.github.com/uuidjs/uuid/issues/840)) ([f992ff4](https://redirect.github.com/uuidjs/uuid/commit/f992ff4780937089b0134195fa22e76e2e1cb3a7)) - Test for invalid byte array sizes and ranges in `v1()`, `v4()`, and `v7()` ([#​845](https://redirect.github.com/uuidjs/uuid/issues/845)) ([e0ee900](https://redirect.github.com/uuidjs/uuid/commit/e0ee90051ebd13475bbcff4d371330aa4f9bd1dd)) ### [`v11.0.3`](https://redirect.github.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#1103-2024-11-04) [Compare Source](https://redirect.github.com/uuidjs/uuid/compare/v11.0.2...v11.0.3) ##### Bug Fixes - apply stricter typing to the v\* signatures ([#​831](https://redirect.github.com/uuidjs/uuid/issues/831)) ([c2d3fed](https://redirect.github.com/uuidjs/uuid/commit/c2d3fed22cfd47c22c8f22f6154abb5060648ce5)) - export internal uuid types ([#​833](https://redirect.github.com/uuidjs/uuid/issues/833)) ([341edf4](https://redirect.github.com/uuidjs/uuid/commit/341edf444ced63708ba336285dbec29443523939)) - remove sourcemaps ([#​827](https://redirect.github.com/uuidjs/uuid/issues/827)) ([b93ea10](https://redirect.github.com/uuidjs/uuid/commit/b93ea101af7382053032d4fb61cc85599d6c7216)) - revert "simplify type for v3 and v5" ([#​835](https://redirect.github.com/uuidjs/uuid/issues/835)) ([e2dee69](https://redirect.github.com/uuidjs/uuid/commit/e2dee691e95aba854a892d2507d8cd9f009bf61d)) ### [`v11.0.2`](https://redirect.github.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#1102-2024-10-28) [Compare Source](https://redirect.github.com/uuidjs/uuid/compare/v11.0.1...v11.0.2) ##### Bug Fixes - remove wrapper.mjs ([2a18871](https://redirect.github.com/uuidjs/uuid/commit/2a18871f00f6f9effa9f8afadd98278e6866112c)) - remove wrapper.mjs ([#​822](https://redirect.github.com/uuidjs/uuid/issues/822)) ([6683ad3](https://redirect.github.com/uuidjs/uuid/commit/6683ad38b048375b451eac1194960f24ba20e0ca)) ### [`v11.0.1`](https://redirect.github.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#1101-2024-10-27) [Compare Source](https://redirect.github.com/uuidjs/uuid/compare/v11.0.0...v11.0.1) ##### Bug Fixes - restore package.json#browser field ([#​817](https://redirect.github.com/uuidjs/uuid/issues/817)) ([ae8f386](https://redirect.github.com/uuidjs/uuid/commit/ae8f38657bca0ee053bf29c88c006b1ea05af1b5)) ### [`v11.0.0`](https://redirect.github.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#1100-2024-10-27) [Compare Source](https://redirect.github.com/uuidjs/uuid/compare/v10.0.0...v11.0.0) ##### ⚠ BREAKING CHANGES - refactor v1 internal state and options logic ([#​780](https://redirect.github.com/uuidjs/uuid/issues/780)) - refactor v7 internal state and options logic, fixes [#​764](https://redirect.github.com/uuidjs/uuid/issues/764) ([#​779](https://redirect.github.com/uuidjs/uuid/issues/779)) - Port to TypeScript, closes [#​762](https://redirect.github.com/uuidjs/uuid/issues/762) ([#​763](https://redirect.github.com/uuidjs/uuid/issues/763)) - update node support matrix (only support node 16-20) ([#​750](https://redirect.github.com/uuidjs/uuid/issues/750)) - This library always aims at supporting one EOLed LTS release which by this time now is 12.x which has reached EOL 30 Apr 2022. - Remove the minified UMD build from the package. - Drop support for browsers that don't correctly implement const/let and default arguments, and no longer transpile the browser build to ES2015. - Although in practice this is currently a noop since the resulting build does not change, the build will no longer transpiles future changes for Node.js 8.x targets, so semantically this is still a breaking change. - Deep requiring specific algorithms of this library like require('uuid/v4'), which has been deprecated in uuid@7, is no longer supported. - The default export, which used to be the v4() method but which was already discouraged in v3.x of this library, has been removed. - Explicitly note that deep imports of the different uuid version functions are deprecated and no longer encouraged and that ECMAScript module named imports should be used instead. Emit a deprecation warning for people who deep-require the different algorithm variants. - Remove builtin support for insecure random number generators in the browser. Users who want that will have to supply their own random number generator function. - Remove support for generating v3 and v5 UUIDs in Node.js<4.x - Convert code base to ECMAScript Modules (ESM) and release CommonJS build for node and ESM build for browser bundlers. ##### Features - add parse/stringify/validate/version/NIL APIs ([#​479](https://redirect.github.com/uuidjs/uuid/issues/479)) ([0e6c10b](https://redirect.github.com/uuidjs/uuid/commit/0e6c10ba1bf9517796ff23c052fc0468eedfd5f4)) - add support for MAX uuid (new in RFC9562) ([#​714](https://redirect.github.com/uuidjs/uuid/issues/714)) ([0385cd3](https://redirect.github.com/uuidjs/uuid/commit/0385cd3f18ae9920678b2849932fa7a9d9aee7d0)) - add UMD build to npm package ([#​357](https://redirect.github.com/uuidjs/uuid/issues/357)) ([4e75adf](https://redirect.github.com/uuidjs/uuid/commit/4e75adf435196f28e3fbbe0185d654b5ded7ca2c)) - add various es module and CommonJS examples ([b238510](https://redirect.github.com/uuidjs/uuid/commit/b238510bf352463521f74bab175a3af9b7a42555)) - enforce Conventional Commit style commit messages ([#​282](https://redirect.github.com/uuidjs/uuid/issues/282)) ([0705cd5](https://redirect.github.com/uuidjs/uuid/commit/0705cd5bae3ab07415294e5544901ffcf0ad4e23)) - ensure that docs are up-to-date in CI ([ee5e77d](https://redirect.github.com/uuidjs/uuid/commit/ee5e77db547474f5a8f23d6c857a6d399209986b)) - hybrid CommonJS & ECMAScript modules build ([a3f078f](https://redirect.github.com/uuidjs/uuid/commit/a3f078faa0baff69ab41aed08e041f8f9c8993d0)) - improve performance of v1 string representation ([#​453](https://redirect.github.com/uuidjs/uuid/issues/453)) ([0ee0b67](https://redirect.github.com/uuidjs/uuid/commit/0ee0b67c37846529c66089880414d29f3ae132d5)) - improve v4 performance by reusing random number array ([#​435](https://redirect.github.com/uuidjs/uuid/issues/435)) ([bf4af0d](https://redirect.github.com/uuidjs/uuid/commit/bf4af0d711b4d2ed03d1f74fd12ad0baa87dc79d)) - optimize uuid.v1 by 1.3x uuid.v4 by 4.3x (430%) ([#​597](https://redirect.github.com/uuidjs/uuid/issues/597)) ([3a033f6](https://redirect.github.com/uuidjs/uuid/commit/3a033f6bab6bb3780ece6d645b902548043280bc)) - optimize V8 performance of bytesToUuid ([#​434](https://redirect.github.com/uuidjs/uuid/issues/434)) ([e156415](https://redirect.github.com/uuidjs/uuid/commit/e156415448ec1af2351fa0b6660cfb22581971f2)) - Port to TypeScript, closes [#​762](https://redirect.github.com/uuidjs/uuid/issues/762) ([#​763](https://redirect.github.com/uuidjs/uuid/issues/763)) ([1e0f987](https://redirect.github.com/uuidjs/uuid/commit/1e0f9870db864ca93f7a69db0d468b5e1b7605e7)) - remove deep requires ([#​426](https://redirect.github.com/uuidjs/uuid/issues/426)) ([daf72b8](https://redirect.github.com/uuidjs/uuid/commit/daf72b84ceb20272a81bb5fbddb05dd95922cbba)) - remove deprecated v4 string parameter ([#​454](https://redirect.github.com/uuidjs/uuid/issues/454)) ([88ce3ca](https://redirect.github.com/uuidjs/uuid/commit/88ce3ca0ba046f60856de62c7ce03f7ba98ba46c)) - remove insecure fallback random number generator ([3a5842b](https://redirect.github.com/uuidjs/uuid/commit/3a5842b141a6e5de0ae338f391661e6b84b167c9)) - remove support for pre Node.js v4 Buffer API ([#​356](https://redirect.github.com/uuidjs/uuid/issues/356)) ([b59b5c5](https://redirect.github.com/uuidjs/uuid/commit/b59b5c5ecad271c5453f1a156f011671f6d35627)) - remove UMD build ([#​645](https://redirect.github.com/uuidjs/uuid/issues/645)) ([e948a0f](https://redirect.github.com/uuidjs/uuid/commit/e948a0f22bf22f4619b27bd913885e478e20fe6f)), closes [#​620](https://redirect.github.com/uuidjs/uuid/issues/620) - rename repository to github:uuidjs/uuid ([#​351](https://redirect.github.com/uuidjs/uuid/issues/351)) ([c37a518](https://redirect.github.com/uuidjs/uuid/commit/c37a518e367ac4b6d0aa62dba1bc6ce9e85020f7)), closes [#​338](https://redirect.github.com/uuidjs/uuid/issues/338) - rename repository to github:uuidjs/uuid ([#​351](https://redirect.github.com/uuidjs/uuid/issues/351)) ([e2d7314](https://redirect.github.com/uuidjs/uuid/commit/e2d731463b680c5b816d144f66feef902586410e)), closes [#​338](https://redirect.github.com/uuidjs/uuid/issues/338) - support v6 uuids ([#​754](https://redirect.github.com/uuidjs/uuid/issues/754)) ([c4ed13e](https://redirect.github.com/uuidjs/uuid/commit/c4ed13e7159d87c9e42a349bdd9dc955f1af46b6)) - update node support matrix (only support node 16-20) ([#​750](https://redirect.github.com/uuidjs/uuid/issues/750)) ([883b163](https://redirect.github.com/uuidjs/uuid/commit/883b163b9ab9d6655bfbd8a35e61a3c71674dfe1)) - use native crypto.randomUUID when available ([#​600](https://redirect.github.com/uuidjs/uuid/issues/600)) ([c9e076c](https://redirect.github.com/uuidjs/uuid/commit/c9e076c852edad7e9a06baaa1d148cf4eda6c6c4)) - v8 support ([#​759](https://redirect.github.com/uuidjs/uuid/issues/759)) ([35a5342](https://redirect.github.com/uuidjs/uuid/commit/35a53428202657e402e6b4aa68f56c08194541bf)) ##### Bug Fixes - 248 ([#​251](https://redirect.github.com/uuidjs/uuid/issues/251)) ([67d697c](https://redirect.github.com/uuidjs/uuid/commit/67d697cd83580a5be090eb18c935da2e402c5657)) - 30, \_rb not defined for lesser node.js versions ([8a6c03f](https://redirect.github.com/uuidjs/uuid/commit/8a6c03f969b3332846159312dc583d1746609eea)) - add CommonJS syntax example to README quickstart section ([#​417](https://redirect.github.com/uuidjs/uuid/issues/417)) ([e0ec840](https://redirect.github.com/uuidjs/uuid/commit/e0ec8402c7ad44b7ef0453036c612f5db513fda0)) - add deep-require proxies for local testing and adjust tests ([#​365](https://redirect.github.com/uuidjs/uuid/issues/365)) ([7fedc79](https://redirect.github.com/uuidjs/uuid/commit/7fedc79ac8fda4bfd1c566c7f05ef4ac13b2db48)) - add Jest/jsdom compatibility ([#​642](https://redirect.github.com/uuidjs/uuid/issues/642)) ([16f9c46](https://redirect.github.com/uuidjs/uuid/commit/16f9c469edf46f0786164cdf4dc980743984a6fd)) - add missing exports and tests for new APIs ([#​495](https://redirect.github.com/uuidjs/uuid/issues/495)) ([681e1da](https://redirect.github.com/uuidjs/uuid/commit/681e1dabfb21314e6b11a564ed6d3d1fa558dcd7)) - assignment to readonly property to allow running in strict mode ([#​270](https://redirect.github.com/uuidjs/uuid/issues/270)) ([d062fdc](https://redirect.github.com/uuidjs/uuid/commit/d062fdc14aae6980cbd6c8350c4af70c1db30b0f)) - change default export to named function ([#​545](https://redirect.github.com/uuidjs/uuid/issues/545)) ([c57bc5a](https://redirect.github.com/uuidjs/uuid/commit/c57bc5a9a0653273aa639cda9177ce52efabe42a)) - clean up esm builds for node and browser ([#​383](https://redirect.github.com/uuidjs/uuid/issues/383)) ([59e6a49](https://redirect.github.com/uuidjs/uuid/commit/59e6a49e7ce7b3e8fb0f3ee52b9daae72af467dc)) - export package.json required by react-native and bundlers ([#​449](https://redirect.github.com/uuidjs/uuid/issues/449)) ([be1c8fe](https://redirect.github.com/uuidjs/uuid/commit/be1c8fe9a3206c358e0059b52fafd7213aa48a52)), closes [#​444](https://redirect.github.com/uuidjs/uuid/issues/444) - fix [#​229](https://redirect.github.com/uuidjs/uuid/issues/229) ([d9033cf](https://redirect.github.com/uuidjs/uuid/commit/d9033cf35881c867aa028b851d1da80bb47ddfb1)) - fix [#​284](https://redirect.github.com/uuidjs/uuid/issues/284) by setting function name in try-catch ([f2a60f2](https://redirect.github.com/uuidjs/uuid/commit/f2a60f2fcdd7957cc7ae201165377af698e5b0ef)) - Get correct version of IE11 crypto ([#​274](https://redirect.github.com/uuidjs/uuid/issues/274)) ([205e0ed](https://redirect.github.com/uuidjs/uuid/commit/205e0ed1f710199e4afbc3480da58e042d899b11)) - handle error when parameter is not set in v3 and v5 ([#​622](https://redirect.github.com/uuidjs/uuid/issues/622)) ([fcd7388](https://redirect.github.com/uuidjs/uuid/commit/fcd73881692d9fabb63872576ba28e30ff852091)) - lazy load getRandomValues ([#​537](https://redirect.github.com/uuidjs/uuid/issues/537)) ([16c8f6d](https://redirect.github.com/uuidjs/uuid/commit/16c8f6df2f6b09b4d6235602d6a591188320a82e)), closes [#​536](https://redirect.github.com/uuidjs/uuid/issues/536) - make access to msCrypto consistent ([#​393](https://redirect.github.com/uuidjs/uuid/issues/393)) ([8bf2a20](https://redirect.github.com/uuidjs/uuid/commit/8bf2a20f3565df743da7215eebdbada9d2df118c)) - make deep require deprecation warning work in browsers ([#​409](https://redirect.github.com/uuidjs/uuid/issues/409)) ([4b71107](https://redirect.github.com/uuidjs/uuid/commit/4b71107d8c0d2ef56861ede6403fc9dc35a1e6bf)) - mem issue when generating uuid ([#​267](https://redirect.github.com/uuidjs/uuid/issues/267)) ([c47702c](https://redirect.github.com/uuidjs/uuid/commit/c47702c29172e70a5da5650ba905c067d37f3658)) - missing v7 expectations in browser spec ([#​751](https://redirect.github.com/uuidjs/uuid/issues/751)) ([f54a866](https://redirect.github.com/uuidjs/uuid/commit/f54a866cedb2b3b96581157c1f4ac935a0b11411)) - prepare package exports for webpack 5 ([#​468](https://redirect.github.com/uuidjs/uuid/issues/468)) ([8d6e6a5](https://redirect.github.com/uuidjs/uuid/commit/8d6e6a5f8965ca9575eb4d92e99a43435f4a58a8)) - provide browser versions independent from module system ([#​380](https://redirect.github.com/uuidjs/uuid/issues/380)) ([4344a22](https://redirect.github.com/uuidjs/uuid/commit/4344a22e7aed33be8627eeaaf05360f256a21753)) - refactor v1 internal state and options logic ([#​780](https://redirect.github.com/uuidjs/uuid/issues/780)) ([031b3d3](https://redirect.github.com/uuidjs/uuid/commit/031b3d3d738bc6694501ac0a37152b95ed500989)) - refactor v7 internal state and options logic, fixes [#​764](https://redirect.github.com/uuidjs/uuid/issues/764) ([#​779](https://redirect.github.com/uuidjs/uuid/issues/779)) ([9dbd1cd](https://redirect.github.com/uuidjs/uuid/commit/9dbd1cd4177c43fcaac961a3b16fb2d044c9940a)) - remove v4 options default assignment preventing native.randomUUID from being used ([#​786](https://redirect.github.com/uuidjs/uuid/issues/786)) ([afe6232](https://redirect.github.com/uuidjs/uuid/commit/afe62323c4408a824755a39d7b971a8ae06f7199)) - revert "perf: remove superfluous call to toLowerCase ([#​677](https://redirect.github.com/uuidjs/uuid/issues/677))" ([#​738](https://redirect.github.com/uuidjs/uuid/issues/738)) ([e267b90](https://redirect.github.com/uuidjs/uuid/commit/e267b9073df1d0ce119ee53c0487fe76acb2be37)) - run npm audit fix ([#​644](https://redirect.github.com/uuidjs/uuid/issues/644)) ([04686f5](https://redirect.github.com/uuidjs/uuid/commit/04686f54c5fed2cfffc1b619f4970c4bb8532353)) - seq_hi shift for byte 6 ([#​775](https://redirect.github.com/uuidjs/uuid/issues/775)) ([1d532ca](https://redirect.github.com/uuidjs/uuid/commit/1d532ca374f181932a24a83fa98f71a5bd4f3e96)) - simplify link in deprecation warning ([#​391](https://redirect.github.com/uuidjs/uuid/issues/391)) ([bb2c8e4](https://redirect.github.com/uuidjs/uuid/commit/bb2c8e4e9f4c5f9c1eaaf3ea59710c633cd90cb7)) - support expo>=39.0.0 ([#​515](https://redirect.github.com/uuidjs/uuid/issues/515)) ([c65a0f3](https://redirect.github.com/uuidjs/uuid/commit/c65a0f3fa73b901959d638d1e3591dfacdbed867)), closes [#​375](https://redirect.github.com/uuidjs/uuid/issues/375) - tsconfig module type ([#​778](https://redirect.github.com/uuidjs/uuid/issues/778)) ([7eff835](https://redirect.github.com/uuidjs/uuid/commit/7eff835cba334ad418f57768c00d15b918a9b419)) - typo ([305d877](https://redirect.github.com/uuidjs/uuid/commit/305d87779000d9b0e40ab4d481eb3b79c5965607)) - update links to match content in readme ([#​386](https://redirect.github.com/uuidjs/uuid/issues/386)) ([44f2f86](https://redirect.github.com/uuidjs/uuid/commit/44f2f86e9d2bbf14ee5f0f00f72a3db1292666d4)) - upgrading from uuid3 broken link ([#​568](https://redirect.github.com/uuidjs/uuid/issues/568)) ([1c849da](https://redirect.github.com/uuidjs/uuid/commit/1c849da6e164259e72e18636726345b13a7eddd6)) - use msCrypto if available. Fixes [#​241](https://redirect.github.com/uuidjs/uuid/issues/241) ([#​247](https://redirect.github.com/uuidjs/uuid/issues/247)) ([1fef18b](https://redirect.github.com/uuidjs/uuid/commit/1fef18baf249867ad12bc35f5a239e5339073758)) ##### Performance Improvements - **nodejs:** introduce pool into default rng ([#​513](https://redirect.github.com/uuidjs/uuid/issues/513)) ([7f1af04](https://redirect.github.com/uuidjs/uuid/commit/7f1af044be4a21c5cc41e410b3bb86048be14093)) - remove superfluous call to toLowerCase ([#​677](https://redirect.github.com/uuidjs/uuid/issues/677)) ([e53793f](https://redirect.github.com/uuidjs/uuid/commit/e53793f5be93413cad68b05b3a339ca23e993342)) ##### Documentation - add note about removal of default export ([#​372](https://redirect.github.com/uuidjs/uuid/issues/372)) ([12749b7](https://redirect.github.com/uuidjs/uuid/commit/12749b700eb49db8a9759fd306d8be05dbfbd58c)), closes [#​370](https://redirect.github.com/uuidjs/uuid/issues/370) - deprecated deep requiring of the different algorithm versions ([#​361](https://redirect.github.com/uuidjs/uuid/issues/361)) ([c0bdf15](https://redirect.github.com/uuidjs/uuid/commit/c0bdf15e417639b1aeb0b247b2fb11f7a0a26b23)) ##### Miscellaneous Chores - drop node 10.x to upgrade dev dependencies ([#​653](https://redirect.github.com/uuidjs/uuid/issues/653)) ([28a5712](https://redirect.github.com/uuidjs/uuid/commit/28a571283f8abda6b9d85e689f95b7d3ee9e282e)) - release 11.0.0 ([#​805](https://redirect.github.com/uuidjs/uuid/issues/805)) ([b003cde](https://redirect.github.com/uuidjs/uuid/commit/b003cdeda4c6a7ab525f79b9a3d87d1395a1fb4e)) ##### Build System - drop Node.js 8.x from babel transpile target ([#​603](https://redirect.github.com/uuidjs/uuid/issues/603)) ([aa11485](https://redirect.github.com/uuidjs/uuid/commit/aa114858260402107ec8a1e1a825dea0a259bcb5)) - drop support for legacy browsers (IE11, Safari 10) ([#​604](https://redirect.github.com/uuidjs/uuid/issues/604)) ([0f433e5](https://redirect.github.com/uuidjs/uuid/commit/0f433e5ec444edacd53016de67db021102f36148)) ### [`v10.0.0`](https://redirect.github.com/uuidjs/uuid/blob/HEAD/CHANGELOG.md#1000-2024-06-07) [Compare Source](https://redirect.github.com/uuidjs/uuid/compare/v9.0.1...v10.0.0) ##### ⚠ BREAKING CHANGES - update node support (drop node@12, node@14, add node@20) ([#​750](https://redirect.github.com/uuidjs/uuid/issues/750)) ##### Features - support support rfc9562 MAX uuid (new in RFC9562) ([#​714](https://redirect.github.com/uuidjs/uuid/issues/714)) ([0385cd3](https://redirect.github.com/uuidjs/uuid/commit/0385cd3f18ae9920678b2849932fa7a9d9aee7d0)) - support rfc9562 v6 uuids ([#​754](https://redirect.github.com/uuidjs/uuid/issues/754)) ([c4ed13e](https://redirect.github.com/uuidjs/uuid/commit/c4ed13e7159d87c9e42a349bdd9dc955f1af46b6)) - support rfc9562 v7 uuids ([#​681](https://redirect.github.com/uuidjs/uuid/issues/681)) ([db76a12](https://redirect.github.com/uuidjs/uuid/commit/db76a1284760c441438f50a57924b322dae08891)) - update node support matrix (only support node 16-20) ([#​750](https://redirect.github.com/uuidjs/uuid/issues/750)) ([883b163](https://redirect.github.com/uuidjs/uuid/commit/883b163b9ab9d6655bfbd8a35e61a3c71674dfe1)) - support rfc9562 v8 uuids ([#​759](https://redirect.github.com/uuidjs/uuid/issues/759)) ([35a5342](https://redirect.github.com/uuidjs/uuid/commit/35a53428202657e402e6b4aa68f56c08194541bf)) ##### Bug Fixes - revert "perf: remove superfluous call to toLowerCase ([#​677](https://redirect.github.com/uuidjs/uuid/issues/677))" ([#​738](https://redirect.github.com/uuidjs/uuid/issues/738)) ([e267b90](https://redirect.github.com/uuidjs/uuid/commit/e267b9073df1d0ce119ee53c0487fe76acb2be37))
--- ### Configuration πŸ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β™» **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. πŸ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-feature/js-sdk). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 31 +++++++++++++++++++++++-------- package.json | 2 +- 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/package-lock.json b/package-lock.json index e6e41e9a1..b4d0ea464 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53,7 +53,7 @@ "tslib": "^2.3.0", "typedoc": "^0.26.0", "typescript": "^4.7.4", - "uuid": "^9.0.1" + "uuid": "^11.0.0" }, "engines": { "node": ">=18" @@ -2170,6 +2170,20 @@ "deprecated": "This version has a critical bug in fallback handling. Please upgrade to reflect-metadata@0.2.2 or newer.", "dev": true }, + "node_modules/@cucumber/messages/node_modules/uuid": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", + "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "dev": true, + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist/bin/uuid" + } + }, "node_modules/@es-joy/jsdoccomment": { "version": "0.49.0", "resolved": "https://registry.npmjs.org/@es-joy/jsdoccomment/-/jsdoccomment-0.49.0.tgz", @@ -18441,16 +18455,17 @@ } }, "node_modules/uuid": { - "version": "9.0.1", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-9.0.1.tgz", - "integrity": "sha512-b+1eJOlsR9K8HJpow9Ok3fiWOWSIcIzXodvv0rQjVoOVNpWMpxf1wZNpt4y9h10odCNrqnYp1OBzRktckBe3sA==", + "version": "11.1.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.1.0.tgz", + "integrity": "sha512-0/A9rDy9P7cJ+8w1c9WD9V//9Wj15Ce2MPz8Ri6032usz+NfePxx5AcN3bN+r6ZL6jEo066/yNYB3tn4pQEx+A==", "dev": true, "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" ], + "license": "MIT", "bin": { - "uuid": "dist/bin/uuid" + "uuid": "dist/esm/bin/uuid" } }, "node_modules/v8-compile-cache-lib": { @@ -23723,7 +23738,7 @@ }, "packages/angular/projects/angular-sdk": { "name": "@openfeature/angular-sdk", - "version": "0.0.9-experimental", + "version": "0.0.10", "dependencies": { "tslib": "^2.3.0" }, @@ -23762,7 +23777,7 @@ }, "packages/react": { "name": "@openfeature/react-sdk", - "version": "0.4.10", + "version": "0.4.11", "license": "Apache-2.0", "devDependencies": { "@openfeature/core": "*", @@ -23789,7 +23804,7 @@ }, "packages/shared": { "name": "@openfeature/core", - "version": "1.7.0", + "version": "1.7.2", "license": "Apache-2.0", "devDependencies": {} }, diff --git a/package.json b/package.json index 320292dce..9d209a436 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "tslib": "^2.3.0", "typedoc": "^0.26.0", "typescript": "^4.7.4", - "uuid": "^9.0.1" + "uuid": "^11.0.0" }, "overrides": { "typescript": "^4.7.4" From ae8fce87530005ed20f7e68dc696ce67053fca31 Mon Sep 17 00:00:00 2001 From: Michael Beemer Date: Thu, 6 Mar 2025 15:50:06 -0500 Subject: [PATCH 09/26] feat: add a top-level method for accessing providers (#1152) ## This PR - add a top-level method for accessing providers ### Notes While working on some improvements to the way Suspense works in the React SDK, I ran into a few scenarios were having access to the provider itself was important. I needed a way to confidently tell that a provider was the noop provider since it has special properties like never being in a ready state. There are a few ways could could achieve this but I noticed that the Java SDK [already has methods](https://github.com/open-feature/java-sdk/blob/main/src/main/java/dev/openfeature/sdk/OpenFeatureAPI.java#L279) that expose the provider. It also allowed me to improve some of our existing tests. ### How to test Unit tests have been updated accordingly. Signed-off-by: Michael Beemer --- packages/server/src/open-feature.ts | 21 ++++++++++++++++++ packages/server/test/open-feature.spec.ts | 12 +++++----- packages/web/src/open-feature.ts | 27 ++++++++++++++++++++--- packages/web/test/open-feature.spec.ts | 12 +++++----- 4 files changed, 57 insertions(+), 15 deletions(-) diff --git a/packages/server/src/open-feature.ts b/packages/server/src/open-feature.ts index ae4b439f0..3e818af05 100644 --- a/packages/server/src/open-feature.ts +++ b/packages/server/src/open-feature.ts @@ -138,6 +138,27 @@ export class OpenFeatureAPI return this; } + /** + * Get the default provider. + * + * Note that it isn't recommended to interact with the provider directly, but rather through + * an OpenFeature client. + * @returns {Provider} Default Provider + */ + getProvider(): Provider; + /** + * Get the provider bound to the specified domain. + * + * Note that it isn't recommended to interact with the provider directly, but rather through + * an OpenFeature client. + * @param {string} domain An identifier which logically binds clients with providers + * @returns {Provider} Domain-scoped provider + */ + getProvider(domain?: string): Provider; + getProvider(domain?: string): Provider { + return this.getProviderForClient(domain); + } + setContext(context: EvaluationContext): this { this._context = context; return this; diff --git a/packages/server/test/open-feature.spec.ts b/packages/server/test/open-feature.spec.ts index fb83f0c91..fe41f8354 100644 --- a/packages/server/test/open-feature.spec.ts +++ b/packages/server/test/open-feature.spec.ts @@ -74,8 +74,8 @@ describe('OpenFeature', () => { it('should set the default provider if no domain is provided', () => { const provider = mockProvider(); OpenFeature.setProvider(provider); - const client = OpenFeature.getClient(); - expect(client.metadata.providerMetadata.name).toEqual(provider.metadata.name); + const registeredProvider = OpenFeature.getProvider(); + expect(registeredProvider).toEqual(provider); }); it('should not change providers associated with a domain when setting a new default provider', () => { @@ -85,11 +85,11 @@ describe('OpenFeature', () => { OpenFeature.setProvider(provider); OpenFeature.setProvider(domain, fakeProvider); - const defaultClient = OpenFeature.getClient(); - const domainSpecificClient = OpenFeature.getClient(domain); + const defaultProvider = OpenFeature.getProvider(); + const domainSpecificProvider = OpenFeature.getProvider(domain); - expect(defaultClient.metadata.providerMetadata.name).toEqual(provider.metadata.name); - expect(domainSpecificClient.metadata.providerMetadata.name).toEqual(fakeProvider.metadata.name); + expect(defaultProvider).toEqual(provider); + expect(domainSpecificProvider).toEqual(fakeProvider); }); it('should bind a new provider to existing clients in a matching domain', () => { diff --git a/packages/web/src/open-feature.ts b/packages/web/src/open-feature.ts index 9c35a31a4..eb32877db 100644 --- a/packages/web/src/open-feature.ts +++ b/packages/web/src/open-feature.ts @@ -205,6 +205,27 @@ export class OpenFeatureAPI return this; } + /** + * Get the default provider. + * + * Note that it isn't recommended to interact with the provider directly, but rather through + * an OpenFeature client. + * @returns {Provider} Default Provider + */ + getProvider(): Provider; + /** + * Get the provider bound to the specified domain. + * + * Note that it isn't recommended to interact with the provider directly, but rather through + * an OpenFeature client. + * @param {string} domain An identifier which logically binds clients with providers + * @returns {Provider} Domain-scoped provider + */ + getProvider(domain?: string): Provider; + getProvider(domain?: string): Provider { + return this.getProviderForClient(domain); + } + /** * Sets the evaluation context globally. * This will be used by all providers that have not bound to a domain. @@ -325,9 +346,9 @@ export class OpenFeatureAPI } /** - * A factory function for creating new named OpenFeature clients. Clients can contain - * their own state (e.g. logger, hook, context). Multiple clients can be used - * to segment feature flag configuration. + * A factory function for creating new domain-scoped OpenFeature clients. Clients + * can contain their own state (e.g. logger, hook, context). Multiple domains + * can be used to segment feature flag configuration. * * If there is already a provider bound to this name via {@link this.setProvider setProvider}, this provider will be used. * Otherwise, the default provider is used until a provider is assigned to that name. diff --git a/packages/web/test/open-feature.spec.ts b/packages/web/test/open-feature.spec.ts index 2e2f32b69..bf0589ca7 100644 --- a/packages/web/test/open-feature.spec.ts +++ b/packages/web/test/open-feature.spec.ts @@ -75,8 +75,8 @@ describe('OpenFeature', () => { it('should set the default provider if no domain is provided', () => { const provider = mockProvider(); OpenFeature.setProvider(provider); - const client = OpenFeature.getClient(); - expect(client.metadata.providerMetadata.name).toEqual(provider.metadata.name); + const registeredProvider = OpenFeature.getProvider(); + expect(registeredProvider).toEqual(provider); }); it('should not change providers associated with a domain when setting a new default provider', () => { @@ -86,11 +86,11 @@ describe('OpenFeature', () => { OpenFeature.setProvider(provider); OpenFeature.setProvider(domain, fakeProvider); - const defaultClient = OpenFeature.getClient(); - const domainSpecificClient = OpenFeature.getClient(domain); + const defaultProvider = OpenFeature.getProvider(); + const domainSpecificProvider = OpenFeature.getProvider(domain); - expect(defaultClient.metadata.providerMetadata.name).toEqual(provider.metadata.name); - expect(domainSpecificClient.metadata.providerMetadata.name).toEqual(fakeProvider.metadata.name); + expect(defaultProvider).toEqual(provider); + expect(domainSpecificProvider).toEqual(fakeProvider); }); it('should bind a new provider to existing clients in a matching domain', () => { From cf89e7da24f43e8142e117ae3b662f380a66e514 Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Tue, 25 Mar 2025 13:29:46 -0400 Subject: [PATCH 10/26] chore: add nest to test script (#1160) Somehow we forgot to add this module here. Signed-off-by: Todd Baert --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9d209a436..9456a0fb4 100644 --- a/package.json +++ b/package.json @@ -4,7 +4,7 @@ "private": true, "description": "OpenFeature SDK for JavaScript", "scripts": { - "test": "jest --selectProjects=shared --selectProjects=server --selectProjects=web --selectProjects=react --selectProjects=angular --silent", + "test": "jest --selectProjects=shared --selectProjects=server --selectProjects=web --selectProjects=react --selectProjects=angular --selectProjects=nest --silent", "e2e-server": "git submodule update --init --recursive && shx cp test-harness/features/evaluation.feature packages/server/e2e/features && jest --selectProjects=server-e2e --verbose", "e2e-web": "git submodule update --init --recursive && shx cp test-harness/features/evaluation.feature packages/web/e2e/features && jest --selectProjects=web-e2e --verbose", "e2e": "npm run e2e-server && npm run e2e-web", From 2c5b37c79d72d60864c27b9e67d96e99ef4ae241 Mon Sep 17 00:00:00 2001 From: Thomas Poignant Date: Fri, 28 Mar 2025 17:37:58 +0100 Subject: [PATCH 11/26] fix: Typo in name of the function Signed-off-by: Thomas Poignant --- packages/web/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web/README.md b/packages/web/README.md index e84d9446b..c862352c4 100644 --- a/packages/web/README.md +++ b/packages/web/README.md @@ -172,7 +172,7 @@ await OpenFeature.setContext({ targetingKey: localStorage.getItem("targetingKey" ``` Context is global and setting it is `async`. -Providers may implement an `onContextChanged` method that receives the old and newer contexts. +Providers may implement an `onContextChange` method that receives the old and newer contexts. Given a context change, providers can use this method internally to detect if the flag values cached on the client are still valid. If needed, a request will be made to the provider with the new context in order to get the correct flag values. From 4482c2b33a55cf3f8bf9a3bb0934558ea0157d5d Mon Sep 17 00:00:00 2001 From: Simon Schrottner Date: Sat, 5 Apr 2025 17:18:44 +0100 Subject: [PATCH 12/26] chore: add global maintainers to codeowners (#1163) Global maintainers approval should also work as a codeowner approval Signed-off-by: Simon Schrottner --- CODEOWNERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CODEOWNERS b/CODEOWNERS index d6e561d63..23c36d46e 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -3,4 +3,4 @@ # # Managed by Peribolos: https://github.com/open-feature/community/blob/main/config/open-feature/sdk-javascript/workgroup.yaml # -* @open-feature/sdk-javascript-maintainers +* @open-feature/sdk-javascript-maintainers @open-feature/maintainers From 60401b6ceccc345fdadccfab18ba07b5981b540c Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Mon, 7 Apr 2025 08:46:59 +0200 Subject: [PATCH 13/26] chore: prompt release of react v1 (#1162) This proposes prompting the release of `@openfeature/react-sdk` 1.0.0. My reasoning: - as far as I know, there's no breaking changes on the horizon - this is being used in production by multiple orgs - it only depends on other 1.0+ deps Please let me know what you think, especially if you have objections. :warning: this will not release 1.0, but will mark the NEXT release of the react SDK as 1.0 Signed-off-by: Todd Baert --- release-please-config.json | 1 + 1 file changed, 1 insertion(+) diff --git a/release-please-config.json b/release-please-config.json index 4b909e3d6..cbea531c5 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -20,6 +20,7 @@ "versioning": "default" }, "packages/react": { + "release-as": "1.0.0", "release-type": "node", "prerelease": false, "bump-minor-pre-major": true, From 5afe61f9e351b037b04c93a1d81aee8016756748 Mon Sep 17 00:00:00 2001 From: Michael Beemer Date: Thu, 10 Apr 2025 14:06:19 +0200 Subject: [PATCH 14/26] feat: add polyfill for react use hook (#1157) ## This PR - adds an internal `use` polyfill - refactors suspense support to maintain state across rerenders ### Notes Previously, the Next.JS build process would timeout when using a suspense flag hook. The reason for this is because the noop provider (which is used during a build) is never ready. That meant that the promise thrown to initiate suspense never resolved. To address this, I've added global state using a weak map that's keyed off a provider. A `useRef` won't help because the value is only retained if the component renders successfully. > [!NOTE] > This unblocks suspense in our demo app but does not mean NextJS is officially support (yet). ### How to test I've added some tests and manually tested in the Toggle Shop. --------- Signed-off-by: Michael Beemer Co-authored-by: Todd Baert --- .../react/src/evaluation/use-feature-flag.ts | 25 +++-- packages/react/src/internal/context.ts | 6 +- packages/react/src/internal/errors.ts | 9 ++ .../hook-flag-query.ts | 0 packages/react/src/internal/suspense.ts | 67 ++++++++++---- packages/react/src/internal/use.ts | 53 +++++++++++ packages/react/src/provider/provider.tsx | 2 +- .../src/provider/use-open-feature-client.ts | 7 +- .../src/provider/use-open-feature-provider.ts | 21 +++++ .../src/provider/use-when-provider-ready.ts | 11 ++- packages/react/test/evaluation.spec.tsx | 91 +++++++++++++------ 11 files changed, 227 insertions(+), 65 deletions(-) create mode 100644 packages/react/src/internal/errors.ts rename packages/react/src/{evaluation => internal}/hook-flag-query.ts (100%) create mode 100644 packages/react/src/internal/use.ts create mode 100644 packages/react/src/provider/use-open-feature-provider.ts diff --git a/packages/react/src/evaluation/use-feature-flag.ts b/packages/react/src/evaluation/use-feature-flag.ts index 7d3bab251..c128dfaaf 100644 --- a/packages/react/src/evaluation/use-feature-flag.ts +++ b/packages/react/src/evaluation/use-feature-flag.ts @@ -5,18 +5,24 @@ import type { EventHandler, FlagEvaluationOptions, FlagValue, - JsonValue} from '@openfeature/web-sdk'; -import { - ProviderEvents, - ProviderStatus, + JsonValue, } from '@openfeature/web-sdk'; +import { ProviderEvents, ProviderStatus } from '@openfeature/web-sdk'; import { useEffect, useRef, useState } from 'react'; +import { + DEFAULT_OPTIONS, + isEqual, + normalizeOptions, + suspendUntilInitialized, + suspendUntilReconciled, + useProviderOptions, +} from '../internal'; import type { ReactFlagEvaluationNoSuspenseOptions, ReactFlagEvaluationOptions } from '../options'; -import { DEFAULT_OPTIONS, isEqual, normalizeOptions, suspendUntilReady, useProviderOptions } from '../internal'; import { useOpenFeatureClient } from '../provider/use-open-feature-client'; import { useOpenFeatureClientStatus } from '../provider/use-open-feature-client-status'; +import { useOpenFeatureProvider } from '../provider/use-open-feature-provider'; import type { FlagQuery } from '../query'; -import { HookFlagQuery } from './hook-flag-query'; +import { HookFlagQuery } from '../internal/hook-flag-query'; // This type is a bit wild-looking, but I think we need it. // We have to use the conditional, because otherwise useFlag('key', false) would return false, not boolean (too constrained). @@ -280,15 +286,16 @@ function attachHandlersAndResolve( const defaultedOptions = { ...DEFAULT_OPTIONS, ...useProviderOptions(), ...normalizeOptions(options) }; const client = useOpenFeatureClient(); const status = useOpenFeatureClientStatus(); + const provider = useOpenFeatureProvider(); + const controller = new AbortController(); - // suspense if (defaultedOptions.suspendUntilReady && status === ProviderStatus.NOT_READY) { - suspendUntilReady(client); + suspendUntilInitialized(provider, client); } if (defaultedOptions.suspendWhileReconciling && status === ProviderStatus.RECONCILING) { - suspendUntilReady(client); + suspendUntilReconciled(client); } const [evaluationDetails, setEvaluationDetails] = useState>( diff --git a/packages/react/src/internal/context.ts b/packages/react/src/internal/context.ts index 4b495bac3..3fc7d7707 100644 --- a/packages/react/src/internal/context.ts +++ b/packages/react/src/internal/context.ts @@ -5,7 +5,8 @@ import { normalizeOptions } from '.'; /** * The underlying React context. - * DO NOT EXPORT PUBLICLY + * + * **DO NOT EXPORT PUBLICLY** * @internal */ export const Context = React.createContext< @@ -14,7 +15,8 @@ export const Context = React.createContext< /** * Get a normalized copy of the options used for this OpenFeatureProvider, see {@link normalizeOptions}. - * DO NOT EXPORT PUBLICLY + * + * **DO NOT EXPORT PUBLICLY** * @internal * @returns {NormalizedOptions} normalized options the defaulted options, not defaulted or normalized. */ diff --git a/packages/react/src/internal/errors.ts b/packages/react/src/internal/errors.ts new file mode 100644 index 000000000..81a72de65 --- /dev/null +++ b/packages/react/src/internal/errors.ts @@ -0,0 +1,9 @@ +const context = 'Components using OpenFeature must be wrapped with an .'; +const tip = 'If you are seeing this in a test, see: https://openfeature.dev/docs/reference/technologies/client/web/react#testing'; + +export class MissingContextError extends Error { + constructor(reason: string) { + super(`${reason}: ${context} ${tip}`); + this.name = 'MissingContextError'; + } +} \ No newline at end of file diff --git a/packages/react/src/evaluation/hook-flag-query.ts b/packages/react/src/internal/hook-flag-query.ts similarity index 100% rename from packages/react/src/evaluation/hook-flag-query.ts rename to packages/react/src/internal/hook-flag-query.ts diff --git a/packages/react/src/internal/suspense.ts b/packages/react/src/internal/suspense.ts index 72f4ca0d0..319a256e1 100644 --- a/packages/react/src/internal/suspense.ts +++ b/packages/react/src/internal/suspense.ts @@ -1,21 +1,56 @@ -import type { Client} from '@openfeature/web-sdk'; -import { ProviderEvents } from '@openfeature/web-sdk'; +import type { Client, Provider } from '@openfeature/web-sdk'; +import { NOOP_PROVIDER, ProviderEvents } from '@openfeature/web-sdk'; +import { use } from './use'; + +/** + * A weak map is used to store the global suspense status for each provider. It's + * important for this to be global to avoid rerender loops. Using useRef won't + * work because the value isn't preserved when a promise is thrown in a component, + * which is how suspense operates. + */ +const globalProviderSuspenseStatus = new WeakMap>(); /** * Suspends until the client is ready to evaluate feature flags. - * DO NOT EXPORT PUBLICLY - * @param {Client} client OpenFeature client + * + * **DO NOT EXPORT PUBLICLY** + * @internal + * @param {Provider} provider the provider to suspend for + * @param {Client} client the client to check for readiness */ -export function suspendUntilReady(client: Client): Promise { - let resolve: (value: unknown) => void; - let reject: () => void; - throw new Promise((_resolve, _reject) => { - resolve = _resolve; - reject = _reject; - client.addHandler(ProviderEvents.Ready, resolve); - client.addHandler(ProviderEvents.Error, reject); - }).finally(() => { - client.removeHandler(ProviderEvents.Ready, resolve); - client.removeHandler(ProviderEvents.Ready, reject); - }); +export function suspendUntilInitialized(provider: Provider, client: Client) { + const statusPromiseRef = globalProviderSuspenseStatus.get(provider); + if (!statusPromiseRef) { + // Noop provider is never ready, so we resolve immediately + const statusPromise = provider !== NOOP_PROVIDER ? isProviderReady(client) : Promise.resolve(); + globalProviderSuspenseStatus.set(provider, statusPromise); + // Use will throw the promise and React will trigger a rerender when it's resolved + use(statusPromise); + } else { + // Reuse the existing promise, use won't rethrow if the promise has settled. + use(statusPromiseRef); + } +} + +/** + * Suspends until the provider has finished reconciling. + * + * **DO NOT EXPORT PUBLICLY** + * @internal + * @param {Client} client the client to check for readiness + */ +export function suspendUntilReconciled(client: Client) { + use(isProviderReady(client)); +} + +async function isProviderReady(client: Client) { + const controller = new AbortController(); + try { + return await new Promise((resolve, reject) => { + client.addHandler(ProviderEvents.Ready, resolve, { signal: controller.signal }); + client.addHandler(ProviderEvents.Error, reject, { signal: controller.signal }); + }); + } finally { + controller.abort(); + } } diff --git a/packages/react/src/internal/use.ts b/packages/react/src/internal/use.ts new file mode 100644 index 000000000..186c832b9 --- /dev/null +++ b/packages/react/src/internal/use.ts @@ -0,0 +1,53 @@ +/// +// This function is adopted from https://github.com/vercel/swr +import React from 'react'; + +/** + * Extends a Promise-like value to include status tracking. + * The extra properties are used to manage the lifecycle of the Promise, indicating its current state. + * More information can be found in the React RFE for the use hook. + * @see https://github.com/reactjs/rfcs/pull/229 + */ +export type UsePromise = + Promise & { + status?: 'pending' | 'fulfilled' | 'rejected'; + value?: T; + reason?: unknown; + }; + +/** + * React.use is a React API that lets you read the value of a resource like a Promise or context. + * It was officially added in React 19, so needs to be polyfilled to support older React versions. + * @param {UsePromise} thenable A thenable object that represents a Promise-like value. + * @returns {unknown} The resolved value of the thenable or throws if it's still pending or rejected. + */ +export const use = + React.use || + // This extra generic is to avoid TypeScript mixing up the generic and JSX syntax + // and emitting an error. + // We assume that this is only for the `use(thenable)` case, not `use(context)`. + // https://github.com/facebook/react/blob/aed00dacfb79d17c53218404c52b1c7aa59c4a89/packages/react-server/src/ReactFizzThenable.js#L45 + // eslint-disable-next-line @typescript-eslint/no-unused-vars + ((thenable: UsePromise): T => { + switch (thenable.status) { + case 'pending': + throw thenable; + case 'fulfilled': + return thenable.value as T; + case 'rejected': + throw thenable.reason; + default: + thenable.status = 'pending'; + thenable.then( + (v) => { + thenable.status = 'fulfilled'; + thenable.value = v; + }, + (e) => { + thenable.status = 'rejected'; + thenable.reason = e; + }, + ); + throw thenable; + } + }); diff --git a/packages/react/src/provider/provider.tsx b/packages/react/src/provider/provider.tsx index 64da42fdb..35333db5f 100644 --- a/packages/react/src/provider/provider.tsx +++ b/packages/react/src/provider/provider.tsx @@ -31,7 +31,7 @@ type ProviderProps = { * @param {ProviderProps} properties props for the context provider * @returns {OpenFeatureProvider} context provider */ -export function OpenFeatureProvider({ client, domain, children, ...options }: ProviderProps) { +export function OpenFeatureProvider({ client, domain, children, ...options }: ProviderProps): JSX.Element { if (!client) { client = OpenFeature.getClient(domain); } diff --git a/packages/react/src/provider/use-open-feature-client.ts b/packages/react/src/provider/use-open-feature-client.ts index ecd776451..093fe1c5e 100644 --- a/packages/react/src/provider/use-open-feature-client.ts +++ b/packages/react/src/provider/use-open-feature-client.ts @@ -1,6 +1,7 @@ import React from 'react'; import { Context } from '../internal'; -import type { Client } from '@openfeature/web-sdk'; +import { type Client } from '@openfeature/web-sdk'; +import { MissingContextError } from '../internal/errors'; /** * Get the {@link Client} instance for this OpenFeatureProvider context. @@ -11,9 +12,7 @@ export function useOpenFeatureClient(): Client { const { client } = React.useContext(Context) || {}; if (!client) { - throw new Error( - 'No OpenFeature client available - components using OpenFeature must be wrapped with an . If you are seeing this in a test, see: https://openfeature.dev/docs/reference/technologies/client/web/react#testing', - ); + throw new MissingContextError('No OpenFeature client available'); } return client; diff --git a/packages/react/src/provider/use-open-feature-provider.ts b/packages/react/src/provider/use-open-feature-provider.ts new file mode 100644 index 000000000..f15d0321e --- /dev/null +++ b/packages/react/src/provider/use-open-feature-provider.ts @@ -0,0 +1,21 @@ +import React from 'react'; +import { Context } from '../internal'; +import { OpenFeature } from '@openfeature/web-sdk'; +import type { Provider } from '@openfeature/web-sdk'; +import { MissingContextError } from '../internal/errors'; + +/** + * Get the {@link Provider} bound to the domain specified in the OpenFeatureProvider context. + * Note that it isn't recommended to interact with the provider directly, but rather through + * an OpenFeature client. + * @returns {Provider} provider for this scope + */ +export function useOpenFeatureProvider(): Provider { + const openFeatureContext = React.useContext(Context); + + if (!openFeatureContext) { + throw new MissingContextError('No OpenFeature context available'); + } + + return OpenFeature.getProvider(openFeatureContext.domain); +} diff --git a/packages/react/src/provider/use-when-provider-ready.ts b/packages/react/src/provider/use-when-provider-ready.ts index 4cb5d0f0f..f66b2606c 100644 --- a/packages/react/src/provider/use-when-provider-ready.ts +++ b/packages/react/src/provider/use-when-provider-ready.ts @@ -2,7 +2,8 @@ import { ProviderStatus } from '@openfeature/web-sdk'; import { useOpenFeatureClient } from './use-open-feature-client'; import { useOpenFeatureClientStatus } from './use-open-feature-client-status'; import type { ReactFlagEvaluationOptions } from '../options'; -import { DEFAULT_OPTIONS, useProviderOptions, normalizeOptions, suspendUntilReady } from '../internal'; +import { DEFAULT_OPTIONS, useProviderOptions, normalizeOptions, suspendUntilInitialized } from '../internal'; +import { useOpenFeatureProvider } from './use-open-feature-provider'; type Options = Pick; @@ -14,14 +15,14 @@ type Options = Pick; * @returns {boolean} boolean indicating if provider is {@link ProviderStatus.READY}, useful if suspense is disabled and you want to handle loaders on your own */ export function useWhenProviderReady(options?: Options): boolean { - const client = useOpenFeatureClient(); - const status = useOpenFeatureClientStatus(); // highest priority > evaluation hook options > provider options > default options > lowest priority const defaultedOptions = { ...DEFAULT_OPTIONS, ...useProviderOptions(), ...normalizeOptions(options) }; + const client = useOpenFeatureClient(); + const status = useOpenFeatureClientStatus(); + const provider = useOpenFeatureProvider(); - // suspense if (defaultedOptions.suspendUntilReady && status === ProviderStatus.NOT_READY) { - suspendUntilReady(client); + suspendUntilInitialized(provider, client); } return status === ProviderStatus.READY; diff --git a/packages/react/test/evaluation.spec.tsx b/packages/react/test/evaluation.spec.tsx index 5c9108c5a..5b08b30f5 100644 --- a/packages/react/test/evaluation.spec.tsx +++ b/packages/react/test/evaluation.spec.tsx @@ -6,12 +6,7 @@ import '@testing-library/jest-dom'; // see: https://testing-library.com/docs/rea import { act, render, renderHook, screen, waitFor } from '@testing-library/react'; import * as React from 'react'; import { startTransition, useState } from 'react'; -import type { - EvaluationContext, - EvaluationDetails, - EventContext, - Hook -} from '../src/'; +import type { EvaluationContext, EvaluationDetails, EventContext, Hook } from '../src/'; import { ErrorCode, InMemoryProvider, @@ -27,15 +22,18 @@ import { useObjectFlagValue, useStringFlagDetails, useStringFlagValue, - useSuspenseFlag + useSuspenseFlag, } from '../src/'; -import { HookFlagQuery } from '../src/evaluation/hook-flag-query'; +import { HookFlagQuery } from '../src/internal/hook-flag-query'; import { TestingProvider } from './test.utils'; // custom provider to have better control over the emitted events class CustomEventInMemoryProvider extends InMemoryProvider { - - putConfigurationWithCustomEvent(flagConfiguration: FlagConfiguration, event: ProviderEmittableEvents, eventContext: EventContext) { + putConfigurationWithCustomEvent( + flagConfiguration: FlagConfiguration, + event: ProviderEmittableEvents, + eventContext: EventContext, + ) { // eslint-disable-next-line @typescript-eslint/no-explicit-any this['_flagConfiguration'] = { ...flagConfiguration }; // private access hack this.events.emit(event, eventContext); @@ -395,16 +393,19 @@ describe('evaluation', () => { expect(screen.queryByTestId('render-count')).toHaveTextContent('1'); await act(async () => { - await rerenderProvider.putConfigurationWithCustomEvent({ - ...FLAG_CONFIG, - [BOOL_FLAG_KEY]: { - ...FLAG_CONFIG[BOOL_FLAG_KEY], - // Change the default; this should be ignored and not cause a re-render because flagsChanged is empty - defaultVariant: 'off', + await rerenderProvider.putConfigurationWithCustomEvent( + { + ...FLAG_CONFIG, + [BOOL_FLAG_KEY]: { + ...FLAG_CONFIG[BOOL_FLAG_KEY], + // Change the default; this should be ignored and not cause a re-render because flagsChanged is empty + defaultVariant: 'off', + }, + // if the flagsChanged is empty, we know nothing has changed, so we don't bother diffing }, - // if the flagsChanged is empty, we know nothing has changed, so we don't bother diffing - }, ClientProviderEvents.ConfigurationChanged, { flagsChanged: [] }); - + ClientProviderEvents.ConfigurationChanged, + { flagsChanged: [] }, + ); }); expect(screen.queryByTestId('render-count')).toHaveTextContent('1'); @@ -420,16 +421,19 @@ describe('evaluation', () => { expect(screen.queryByTestId('render-count')).toHaveTextContent('1'); await act(async () => { - await rerenderProvider.putConfigurationWithCustomEvent({ - ...FLAG_CONFIG, - [BOOL_FLAG_KEY]: { - ...FLAG_CONFIG[BOOL_FLAG_KEY], - // Change the default variant to trigger a rerender since not only do we check flagsChanged, but we also diff the value - defaultVariant: 'off', + await rerenderProvider.putConfigurationWithCustomEvent( + { + ...FLAG_CONFIG, + [BOOL_FLAG_KEY]: { + ...FLAG_CONFIG[BOOL_FLAG_KEY], + // Change the default variant to trigger a rerender since not only do we check flagsChanged, but we also diff the value + defaultVariant: 'off', + }, + // if the flagsChanged is falsy, we don't know what flags changed - so we attempt to diff everything }, - // if the flagsChanged is falsy, we don't know what flags changed - so we attempt to diff everything - }, ClientProviderEvents.ConfigurationChanged, { flagsChanged: undefined }); - + ClientProviderEvents.ConfigurationChanged, + { flagsChanged: undefined }, + ); }); expect(screen.queryByTestId('render-count')).toHaveTextContent('2'); @@ -573,10 +577,41 @@ describe('evaluation', () => { }, }; + afterEach(() => { + OpenFeature.clearProviders(); + }); + const suspendingProvider = () => { return new TestingProvider(CONFIG, DELAY); // delay init by 100ms }; + describe('when using the noop provider', () => { + function TestComponent() { + const { value } = useSuspenseFlag(SUSPENSE_FLAG_KEY, DEFAULT); + return ( + <> +
{value}
+ + ); + } + it('should fallback to the default value on the next rerender', async () => { + render( + + {FALLBACK}}> + + + , + ); + // The loading indicator should be shown on the first render + expect(screen.queryByText(FALLBACK)).toBeInTheDocument(); + + // The default value should be shown on the next render + await waitFor(() => expect(screen.queryByText(DEFAULT)).toBeInTheDocument(), { + timeout: DELAY, + }); + }); + }); + describe('updateOnConfigurationChanged=true (default)', () => { function TestComponent() { const { value } = useFlag(SUSPENSE_FLAG_KEY, DEFAULT); From 5b19eb035ab79633f675d2ae891f96b356ae34df Mon Sep 17 00:00:00 2001 From: Todd Baert Date: Thu, 10 Apr 2025 14:39:39 +0200 Subject: [PATCH 15/26] chore: use server src not dist in nest tests (#1166) Fixes issue where nest test suite was running using dist not source of server sdk. Signed-off-by: Todd Baert --- jest.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/jest.config.ts b/jest.config.ts index 161e5d085..f37298f8c 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -161,6 +161,7 @@ export default { testMatch: ['/packages/nest/test/**/*.spec.ts'], moduleNameMapper: { '@openfeature/core': '/packages/shared/src', + '@openfeature/server-sdk': '/packages/server/src', }, transform: { '^.+\\.ts$': [ From b60c3df3727232a5b2366e4327eab754fbfa790a Mon Sep 17 00:00:00 2001 From: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Date: Thu, 10 Apr 2025 09:52:28 -0400 Subject: [PATCH 16/26] chore(main): release core 1.8.0 (#1155) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release *beep* *boop* --- ## [1.8.0](https://github.com/open-feature/js-sdk/compare/core-v1.7.2...core-v1.8.0) (2025-04-10) ### ✨ New Features * add support for abort controllers to event handlers ([#1151](https://github.com/open-feature/js-sdk/issues/1151)) ([6a22483](https://github.com/open-feature/js-sdk/commit/6a224830fa4e62fc30a7802536f6f6fc3f772038)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> --- .release-please-manifest.json | 2 +- packages/shared/CHANGELOG.md | 7 +++++++ packages/shared/package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 542144763..8458abd62 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -4,6 +4,6 @@ "packages/angular": "0.0.1-experimental", "packages/web": "1.4.1", "packages/server": "1.17.1", - "packages/shared": "1.7.2", + "packages/shared": "1.8.0", "packages/angular/projects/angular-sdk": "0.0.10" } diff --git a/packages/shared/CHANGELOG.md b/packages/shared/CHANGELOG.md index 5f8e726ff..1c5f9f6bb 100644 --- a/packages/shared/CHANGELOG.md +++ b/packages/shared/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [1.8.0](https://github.com/open-feature/js-sdk/compare/core-v1.7.2...core-v1.8.0) (2025-04-10) + + +### ✨ New Features + +* add support for abort controllers to event handlers ([#1151](https://github.com/open-feature/js-sdk/issues/1151)) ([6a22483](https://github.com/open-feature/js-sdk/commit/6a224830fa4e62fc30a7802536f6f6fc3f772038)) + ## [1.7.2](https://github.com/open-feature/js-sdk/compare/core-v1.7.1...core-v1.7.2) (2025-02-18) diff --git a/packages/shared/package.json b/packages/shared/package.json index 5d5580877..43416ee6c 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -1,6 +1,6 @@ { "name": "@openfeature/core", - "version": "1.7.2", + "version": "1.8.0", "description": "Shared OpenFeature JS components (server and web)", "main": "./dist/cjs/index.js", "files": [ From aafdb4382f113f96a649f5fc0cecadb4178ada67 Mon Sep 17 00:00:00 2001 From: Lukas Reining Date: Fri, 11 Apr 2025 12:02:02 +0200 Subject: [PATCH 17/26] feat(angular): add option for initial context injection Signed-off-by: Lukas Reining --- .../projects/angular-sdk/src/lib/open-feature.module.ts | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/angular/projects/angular-sdk/src/lib/open-feature.module.ts b/packages/angular/projects/angular-sdk/src/lib/open-feature.module.ts index 6abc81d56..e667b6e8b 100644 --- a/packages/angular/projects/angular-sdk/src/lib/open-feature.module.ts +++ b/packages/angular/projects/angular-sdk/src/lib/open-feature.module.ts @@ -1,10 +1,13 @@ import { InjectionToken, ModuleWithProviders, NgModule } from '@angular/core'; import { CommonModule } from '@angular/common'; -import { OpenFeature, Provider } from '@openfeature/web-sdk'; +import { EvaluationContext, OpenFeature, Provider } from '@openfeature/web-sdk'; + +export type EvaluationContextFactory = () => EvaluationContext; export interface OpenFeatureConfig { provider: Provider; domainBoundProviders?: Record; + context?: EvaluationContext | EvaluationContextFactory; } export const OPEN_FEATURE_CONFIG_TOKEN = new InjectionToken('OPEN_FEATURE_CONFIG_TOKEN'); @@ -16,7 +19,9 @@ export const OPEN_FEATURE_CONFIG_TOKEN = new InjectionToken(' }) export class OpenFeatureModule { static forRoot(config: OpenFeatureConfig): ModuleWithProviders { - OpenFeature.setProvider(config.provider); + const context = typeof config.context === 'function' ? config.context() : config.context; + OpenFeature.setProvider(config.provider, context); + if (config.domainBoundProviders) { Object.entries(config.domainBoundProviders).map(([domain, provider]) => OpenFeature.setProvider(domain, provider), From 7f81917226876f22999923fbe4fd7f696ee5386e Mon Sep 17 00:00:00 2001 From: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Date: Fri, 11 Apr 2025 06:08:35 -0400 Subject: [PATCH 18/26] chore(main): release angular-sdk 0.0.11 (#1167) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release *beep* *boop* --- ## [0.0.11](https://github.com/open-feature/js-sdk/compare/angular-sdk-v0.0.10...angular-sdk-v0.0.11) (2025-04-11) ### ✨ New Features * **angular:** add option for initial context injection ([aafdb43](https://github.com/open-feature/js-sdk/commit/aafdb4382f113f96a649f5fc0cecadb4178ada67)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: Lukas Reining Co-authored-by: Lukas Reining --- .release-please-manifest.json | 2 +- packages/angular/projects/angular-sdk/CHANGELOG.md | 8 ++++++++ packages/angular/projects/angular-sdk/README.md | 4 ++-- packages/angular/projects/angular-sdk/package.json | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8458abd62..d36a43710 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -5,5 +5,5 @@ "packages/web": "1.4.1", "packages/server": "1.17.1", "packages/shared": "1.8.0", - "packages/angular/projects/angular-sdk": "0.0.10" + "packages/angular/projects/angular-sdk": "0.0.11" } diff --git a/packages/angular/projects/angular-sdk/CHANGELOG.md b/packages/angular/projects/angular-sdk/CHANGELOG.md index 22528e550..d5abfad0e 100644 --- a/packages/angular/projects/angular-sdk/CHANGELOG.md +++ b/packages/angular/projects/angular-sdk/CHANGELOG.md @@ -1,6 +1,14 @@ # Changelog +## [0.0.11](https://github.com/open-feature/js-sdk/compare/angular-sdk-v0.0.10...angular-sdk-v0.0.11) (2025-04-11) + + +### ✨ New Features + +* **angular:** add option for initial context injection ([aafdb43](https://github.com/open-feature/js-sdk/commit/aafdb4382f113f96a649f5fc0cecadb4178ada67)) + + ## [0.0.10](https://github.com/open-feature/js-sdk/compare/angular-sdk-v0.0.9-experimental...angular-sdk-v0.0.10) (2025-02-13) diff --git a/packages/angular/projects/angular-sdk/README.md b/packages/angular/projects/angular-sdk/README.md index bb4270cd1..dd37e86ee 100644 --- a/packages/angular/projects/angular-sdk/README.md +++ b/packages/angular/projects/angular-sdk/README.md @@ -16,8 +16,8 @@ Specification - - Release + + Release
diff --git a/packages/angular/projects/angular-sdk/package.json b/packages/angular/projects/angular-sdk/package.json index 88fd60bf5..cb7c54318 100644 --- a/packages/angular/projects/angular-sdk/package.json +++ b/packages/angular/projects/angular-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@openfeature/angular-sdk", - "version": "0.0.10", + "version": "0.0.11", "description": "OpenFeature Angular SDK", "repository": { "type": "git", From 9218e987a01e8905bff2762a7d6b3722efc52a16 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 12:20:57 +0200 Subject: [PATCH 19/26] chore(deps): update angular-eslint monorepo to v19 (major) (#1140) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [@angular-eslint/builder](https://redirect.github.com/angular-eslint/angular-eslint) ([source](https://redirect.github.com/angular-eslint/angular-eslint/tree/HEAD/packages/builder)) | [`18.4.3` -> `19.3.0`](https://renovatebot.com/diffs/npm/@angular-eslint%2fbuilder/18.4.3/19.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@angular-eslint%2fbuilder/19.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@angular-eslint%2fbuilder/19.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@angular-eslint%2fbuilder/18.4.3/19.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@angular-eslint%2fbuilder/18.4.3/19.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@angular-eslint/eslint-plugin](https://redirect.github.com/angular-eslint/angular-eslint) ([source](https://redirect.github.com/angular-eslint/angular-eslint/tree/HEAD/packages/eslint-plugin)) | [`18.4.3` -> `19.3.0`](https://renovatebot.com/diffs/npm/@angular-eslint%2feslint-plugin/18.4.3/19.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@angular-eslint%2feslint-plugin/19.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@angular-eslint%2feslint-plugin/19.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@angular-eslint%2feslint-plugin/18.4.3/19.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@angular-eslint%2feslint-plugin/18.4.3/19.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@angular-eslint/eslint-plugin-template](https://redirect.github.com/angular-eslint/angular-eslint) ([source](https://redirect.github.com/angular-eslint/angular-eslint/tree/HEAD/packages/eslint-plugin-template)) | [`18.4.3` -> `19.3.0`](https://renovatebot.com/diffs/npm/@angular-eslint%2feslint-plugin-template/18.4.3/19.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@angular-eslint%2feslint-plugin-template/19.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@angular-eslint%2feslint-plugin-template/19.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@angular-eslint%2feslint-plugin-template/18.4.3/19.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@angular-eslint%2feslint-plugin-template/18.4.3/19.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@angular-eslint/schematics](https://redirect.github.com/angular-eslint/angular-eslint) ([source](https://redirect.github.com/angular-eslint/angular-eslint/tree/HEAD/packages/schematics)) | [`18.4.3` -> `19.3.0`](https://renovatebot.com/diffs/npm/@angular-eslint%2fschematics/18.4.3/19.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@angular-eslint%2fschematics/19.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@angular-eslint%2fschematics/19.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@angular-eslint%2fschematics/18.4.3/19.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@angular-eslint%2fschematics/18.4.3/19.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [@angular-eslint/template-parser](https://redirect.github.com/angular-eslint/angular-eslint) ([source](https://redirect.github.com/angular-eslint/angular-eslint/tree/HEAD/packages/template-parser)) | [`18.4.3` -> `19.3.0`](https://renovatebot.com/diffs/npm/@angular-eslint%2ftemplate-parser/18.4.3/19.3.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/@angular-eslint%2ftemplate-parser/19.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@angular-eslint%2ftemplate-parser/19.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@angular-eslint%2ftemplate-parser/18.4.3/19.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@angular-eslint%2ftemplate-parser/18.4.3/19.3.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes
angular-eslint/angular-eslint (@​angular-eslint/builder) ### [`v19.3.0`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/builder/CHANGELOG.md#1930-2025-03-22) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.2.1...v19.3.0) This was a version bump only for builder to align it with other projects, there were no code changes. ### [`v19.2.1`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/builder/CHANGELOG.md#1921-2025-03-08) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.2.0...v19.2.1) This was a version bump only for builder to align it with other projects, there were no code changes. ### [`v19.2.0`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/builder/CHANGELOG.md#1920-2025-03-02) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.1.0...v19.2.0) ##### 🩹 Fixes - **eslint-plugin-template:** find inline templates on components in blocks ([#​2238](https://redirect.github.com/angular-eslint/angular-eslint/pull/2238)) ##### ❀️ Thank You - Dave [@​reduckted](https://redirect.github.com/reduckted) ### [`v19.1.0`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/builder/CHANGELOG.md#1910-2025-02-09) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.0.2...v19.1.0) This was a version bump only for builder to align it with other projects, there were no code changes. ### [`v19.0.2`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/builder/CHANGELOG.md#1902-2024-12-10) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.0.1...v19.0.2) This was a version bump only for builder to align it with other projects, there were no code changes. ### [`v19.0.1`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/builder/CHANGELOG.md#1901-2024-12-06) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.0.0...v19.0.1) This was a version bump only for builder to align it with other projects, there were no code changes. ### [`v19.0.0`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/builder/CHANGELOG.md#1900-2024-11-29) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v18.4.3...v19.0.0) ##### πŸš€ Features - update angular packages to the stable v19 ([#​2120](https://redirect.github.com/angular-eslint/angular-eslint/pull/2120)) ##### ❀️ Thank You - Leosvel PΓ©rez Espinosa [@​leosvelperez](https://redirect.github.com/leosvelperez) #### 18.4.3 (2024-11-29) ##### 🩹 Fixes - yarn pnp issues ([#​2143](https://redirect.github.com/angular-eslint/angular-eslint/pull/2143)) ##### ❀️ Thank You - James Henry [@​JamesHenry](https://redirect.github.com/JamesHenry) #### 18.4.2 (2024-11-23) This was a version bump only for builder to align it with other projects, there were no code changes. #### 18.4.1 (2024-11-18) This was a version bump only for builder to align it with other projects, there were no code changes. #### 18.4.0 (2024-10-21) ##### πŸš€ Features - support ESM configs and .cjs and .mjs extensions ([#​2068](https://redirect.github.com/angular-eslint/angular-eslint/pull/2068)) ##### 🩹 Fixes - update dependency eslint to v9.13.0, support noConfigLookup ([#​2045](https://redirect.github.com/angular-eslint/angular-eslint/pull/2045)) ##### ❀️ Thank You - James Henry [@​JamesHenry](https://redirect.github.com/JamesHenry) #### 18.3.1 (2024-09-11) This was a version bump only for builder to align it with other projects, there were no code changes. #### 18.3.0 (2024-08-13) ##### 🩹 Fixes - ensure consistent nx dependency versions ##### ❀️ Thank You - James Henry #### 18.2.0 (2024-07-31) This was a version bump only for builder to align it with other projects, there were no code changes. #### 18.1.0 (2024-07-01) This was a version bump only for builder to align it with other projects, there were no code changes. #### 18.0.1 (2024-05-30) ##### 🩹 Fixes - move typescript-eslint packages to peerDeps, consistently allow v7 and v8 ##### ❀️ Thank You - James Henry
angular-eslint/angular-eslint (@​angular-eslint/eslint-plugin) ### [`v19.3.0`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#1930-2025-03-22) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.2.1...v19.3.0) This was a version bump only for eslint-plugin to align it with other projects, there were no code changes. ### [`v19.2.1`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#1921-2025-03-08) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.2.0...v19.2.1) This was a version bump only for eslint-plugin to align it with other projects, there were no code changes. ### [`v19.2.0`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#1920-2025-03-02) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.1.0...v19.2.0) ##### πŸš€ Features - **eslint-plugin:** add rule require-lifecycle-on-prototype ([#​2259](https://redirect.github.com/angular-eslint/angular-eslint/pull/2259)) ##### 🩹 Fixes - **eslint-plugin-template:** find inline templates on components in blocks ([#​2238](https://redirect.github.com/angular-eslint/angular-eslint/pull/2238)) ##### ❀️ Thank You - Dave [@​reduckted](https://redirect.github.com/reduckted) ### [`v19.1.0`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#1910-2025-02-09) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.0.2...v19.1.0) ##### πŸš€ Features - **eslint-plugin:** prefer-signals now checks .asReadonly() calls ([#​2218](https://redirect.github.com/angular-eslint/angular-eslint/pull/2218)) - **eslint-plugin:** prefer-signals read-only suggestion is now a fix ([#​2175](https://redirect.github.com/angular-eslint/angular-eslint/pull/2175)) ##### 🩹 Fixes - **eslint-plugin:** \[no-input-prefix] false positive on input initializer value ([#​2184](https://redirect.github.com/angular-eslint/angular-eslint/pull/2184)) - **eslint-plugin:** \[prefer-signals] support linkedSignal ([#​2213](https://redirect.github.com/angular-eslint/angular-eslint/pull/2213)) ##### ❀️ Thank You - CΓ©dric Exbrayat [@​cexbrayat](https://redirect.github.com/cexbrayat) - Dave [@​reduckted](https://redirect.github.com/reduckted) - Lucas Neto Moreira ### [`v19.0.2`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#1902-2024-12-10) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.0.1...v19.0.2) ##### 🩹 Fixes - **eslint-plugin:** \[prefer-standalone] error range should only include property and value ([#​2172](https://redirect.github.com/angular-eslint/angular-eslint/pull/2172)) ##### ❀️ Thank You - James Henry [@​JamesHenry](https://redirect.github.com/JamesHenry) ### [`v19.0.1`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#1901-2024-12-06) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.0.0...v19.0.1) ##### 🩹 Fixes - **eslint-plugin:** adding prefer-signals rule to exported config ([#​2150](https://redirect.github.com/angular-eslint/angular-eslint/pull/2150)) ##### ❀️ Thank You - Quentin Deroubaix [@​quentinderoubaix](https://redirect.github.com/quentinderoubaix) ### [`v19.0.0`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/eslint-plugin/CHANGELOG.md#1900-2024-11-29) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v18.4.3...v19.0.0) ##### πŸš€ Features - ⚠️ **eslint-plugin:** promote prefer-standalone to recommended ([8dfdc4f4](https://redirect.github.com/angular-eslint/angular-eslint/commit/8dfdc4f4)) - **eslint-plugin:** new rule prefer-signals ([#​1872](https://redirect.github.com/angular-eslint/angular-eslint/pull/1872)) - ⚠️ **eslint-plugin:** remove deprecated no-host-metadata-property rule ([#​2113](https://redirect.github.com/angular-eslint/angular-eslint/pull/2113)) - ⚠️ **eslint-plugin:** remove deprecated sort-ngmodule-metadata-arrays rule ([#​2114](https://redirect.github.com/angular-eslint/angular-eslint/pull/2114)) - ⚠️ **eslint-plugin:** prefer-standalone recognizes that standalone is the default ([#​2096](https://redirect.github.com/angular-eslint/angular-eslint/pull/2096)) - ⚠️ **eslint-plugin:** remove deprecated prefer-standalone-component rule ([#​2112](https://redirect.github.com/angular-eslint/angular-eslint/pull/2112)) ##### ⚠️ Breaking Changes - ⚠️ **eslint-plugin:** promote prefer-standalone to recommended ([8dfdc4f4](https://redirect.github.com/angular-eslint/angular-eslint/commit/8dfdc4f4)) - ⚠️ **eslint-plugin:** remove deprecated no-host-metadata-property rule ([#​2113](https://redirect.github.com/angular-eslint/angular-eslint/pull/2113)) - ⚠️ **eslint-plugin:** remove deprecated sort-ngmodule-metadata-arrays rule ([#​2114](https://redirect.github.com/angular-eslint/angular-eslint/pull/2114)) - ⚠️ **eslint-plugin:** prefer-standalone recognizes that standalone is the default ([#​2096](https://redirect.github.com/angular-eslint/angular-eslint/pull/2096)) - ⚠️ **eslint-plugin:** remove deprecated prefer-standalone-component rule ([#​2112](https://redirect.github.com/angular-eslint/angular-eslint/pull/2112)) ##### ❀️ Thank You - Daniel Kimmich [@​json-derulo](https://redirect.github.com/json-derulo) - Dave [@​reduckted](https://redirect.github.com/reduckted) - James Henry [@​JamesHenry](https://redirect.github.com/JamesHenry) - JamesHenry [@​JamesHenry](https://redirect.github.com/JamesHenry) #### 18.4.3 (2024-11-29) This was a version bump only for eslint-plugin to align it with other projects, there were no code changes. #### 18.4.2 (2024-11-23) ##### 🩹 Fixes - **eslint-plugin:** fix placement of lifecycle interface for subclasses ([#​1965](https://redirect.github.com/angular-eslint/angular-eslint/pull/1965)) - **eslint-plugin:** handle `output()` and `input()` functions in various rules ([#​2098](https://redirect.github.com/angular-eslint/angular-eslint/pull/2098)) ##### ❀️ Thank You - Aleksandr Martirosyan - Dave [@​reduckted](https://redirect.github.com/reduckted) #### 18.4.1 (2024-11-18) This was a version bump only for eslint-plugin to align it with other projects, there were no code changes. #### 18.4.0 (2024-10-21) This was a version bump only for eslint-plugin to align it with other projects, there were no code changes. #### 18.3.1 (2024-09-11) This was a version bump only for eslint-plugin to align it with other projects, there were no code changes. #### 18.3.0 (2024-08-13) ##### πŸš€ Features - **eslint-plugin:** new rule runtime-localize ##### ❀️ Thank You - m-akinc #### 18.2.0 (2024-07-31) ##### πŸš€ Features - update typescript-eslint to v8 stable, eslint v9.8.0 ##### 🩹 Fixes - **eslint-plugin:** \[prefer-standalone] ignore empty Directive decorators ##### ❀️ Thank You - James Henry - PaweΕ‚ Maniecki #### 18.1.0 (2024-07-01) ##### πŸš€ Features - **eslint-plugin:** \[prefer-output-readonly] support output() function ##### 🩹 Fixes - update typescript-eslint packages to v8.0.0-alpha.37 ##### ❀️ Thank You - Christian Svensson - Daniel Kimmich - Dave - Martijn van der Meij - Maximilian Main #### 18.0.1 (2024-05-30) ##### 🩹 Fixes - move typescript-eslint packages to peerDeps, consistently allow v7 and v8 ##### ❀️ Thank You - James Henry
angular-eslint/angular-eslint (@​angular-eslint/eslint-plugin-template) ### [`v19.3.0`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/eslint-plugin-template/CHANGELOG.md#1930-2025-03-22) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.2.1...v19.3.0) ##### πŸš€ Features - use [@​angular/compiler](https://redirect.github.com/angular/compiler) 19.2.3 and rename some AST nodes to match ([#​2320](https://redirect.github.com/angular-eslint/angular-eslint/pull/2320)) - **eslint-plugin-template:** add rule prefer-contextual-for-variables ([#​2311](https://redirect.github.com/angular-eslint/angular-eslint/pull/2311)) - **eslint-plugin-template:** \[button-has-type] add option to ignore missing type ([#​2326](https://redirect.github.com/angular-eslint/angular-eslint/pull/2326)) ##### 🩹 Fixes - **eslint-plugin-template:** \[attributes-order] treat inputs without square brackets as attributes ([#​2316](https://redirect.github.com/angular-eslint/angular-eslint/pull/2316)) - **eslint-plugin-template:** \[attributes-order] order i18n attributes ([#​2307](https://redirect.github.com/angular-eslint/angular-eslint/pull/2307)) - **eslint-plugin-template:** \[i18n] Avoid exception in i18n rule with allowMarkupInContent=false ([#​2327](https://redirect.github.com/angular-eslint/angular-eslint/pull/2327)) ##### ❀️ Thank You - Dave [@​reduckted](https://redirect.github.com/reduckted) - m-akinc [@​m-akinc](https://redirect.github.com/m-akinc) ### [`v19.2.1`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/eslint-plugin-template/CHANGELOG.md#1921-2025-03-08) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.2.0...v19.2.1) ##### 🩹 Fixes - **eslint-plugin-template:** \[prefer-self-closing-tags] resolve wrong reports when structural directive + no content + no self-closing ([#​2287](https://redirect.github.com/angular-eslint/angular-eslint/pull/2287)) ##### ❀️ Thank You - Guillaume DROUARD ### [`v19.2.0`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/eslint-plugin-template/CHANGELOG.md#1920-2025-03-02) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.1.0...v19.2.0) ##### 🩹 Fixes - **prefer-static-string-properties:** exclude special attributes ([#​2273](https://redirect.github.com/angular-eslint/angular-eslint/pull/2273)) - **prefer-static-string-properties:** resolve bug with directives ([#​2271](https://redirect.github.com/angular-eslint/angular-eslint/pull/2271)) - **eslint-plugin-template:** find inline templates on components in blocks ([#​2238](https://redirect.github.com/angular-eslint/angular-eslint/pull/2238)) - **eslint-plugin-template:** \[prefer-static-string-properties] do not check structural directives ([#​2253](https://redirect.github.com/angular-eslint/angular-eslint/pull/2253)) - **eslint-plugin-template:** \[prefer-self-closing-tags] allow nested ng-content ([#​2257](https://redirect.github.com/angular-eslint/angular-eslint/pull/2257)) - **eslint-plugin-template:** \[prefer-self-closing-tags] do not treat comments as whitespace ([#​2256](https://redirect.github.com/angular-eslint/angular-eslint/pull/2256)) ##### ❀️ Thank You - Dave [@​reduckted](https://redirect.github.com/reduckted) - Marie Briand [@​mbriand-lucca](https://redirect.github.com/mbriand-lucca) ### [`v19.1.0`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/eslint-plugin-template/CHANGELOG.md#1910-2025-02-09) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.0.2...v19.1.0) ##### πŸš€ Features - **eslint-plugin-template:** add rule prefer-static-string-properties ([#​2228](https://redirect.github.com/angular-eslint/angular-eslint/pull/2228)) ##### 🩹 Fixes - **eslint-plugin-template:** \[attribute-order] check for ng-template within svg ([#​2223](https://redirect.github.com/angular-eslint/angular-eslint/pull/2223)) - **eslint-plugin-template:** \[prefer-self-closing-tags] do not remove HTML-encoded whitespace ([#​2229](https://redirect.github.com/angular-eslint/angular-eslint/pull/2229)) ##### ❀️ Thank You - Dave [@​reduckted](https://redirect.github.com/reduckted) ### [`v19.0.2`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/eslint-plugin-template/CHANGELOG.md#1902-2024-12-10) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.0.1...v19.0.2) This was a version bump only for eslint-plugin-template to align it with other projects, there were no code changes. ### [`v19.0.1`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/eslint-plugin-template/CHANGELOG.md#1901-2024-12-06) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.0.0...v19.0.1) ##### 🩹 Fixes - **eslint-plugin-template:** prevent the slot tag from being self-closing ([#​2088](https://redirect.github.com/angular-eslint/angular-eslint/pull/2088)) ##### ❀️ Thank You - Joan Llenas [@​joanllenas](https://redirect.github.com/joanllenas) ### [`v19.0.0`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/eslint-plugin-template/CHANGELOG.md#1900-2024-11-29) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v18.4.3...v19.0.0) This was a version bump only for eslint-plugin-template to align it with other projects, there were no code changes. #### 18.4.3 (2024-11-29) This was a version bump only for eslint-plugin-template to align it with other projects, there were no code changes. #### 18.4.2 (2024-11-23) This was a version bump only for eslint-plugin-template to align it with other projects, there were no code changes. #### 18.4.1 (2024-11-18) This was a version bump only for eslint-plugin-template to align it with other projects, there were no code changes. #### 18.4.0 (2024-10-21) ##### 🩹 Fixes - update typescript-eslint packages to v8.10.0 ([#​2046](https://redirect.github.com/angular-eslint/angular-eslint/pull/2046)) - update dependency aria-query to v5.3.2 ([#​2053](https://redirect.github.com/angular-eslint/angular-eslint/pull/2053)) - update dependency aria-query to v5.3.1 ([#​2043](https://redirect.github.com/angular-eslint/angular-eslint/pull/2043)) #### 18.3.1 (2024-09-11) ##### 🩹 Fixes - **template-parser:** visit receiver of Call expression - **template-parser:** visit receiver of Call expression" - **template-parser:** visit receiver of Call expression ##### ❀️ Thank You - James Henry - PaweΕ‚ Maniecki #### 18.3.0 (2024-08-13) ##### 🩹 Fixes - **eslint-plugin-template:** \[interactive-supports-focus] allowList with form as default option to support event bubbling - **eslint-plugin-template:** \[prefer-self-closing-tags] fix ng-content with rich default content - **prefer-self-closing-tags:** handle both forward and backward slash ##### ❀️ Thank You - Daniel Kimmich - Sandi Barr - Simon #### 18.2.0 (2024-07-31) ##### πŸš€ Features - update typescript-eslint to v8 stable, eslint v9.8.0 ##### 🩹 Fixes - update dependency axobject-query to v4.1.0 - **eslint-plugin-template:** add meta to preprocessor to resolve eslint cache error ##### ❀️ Thank You - James Henry - kwiateusz #### 18.1.0 (2024-07-01) ##### πŸš€ Features - **eslint-plugin:** \[no-call-expression] add allowPrefix and allowSuffix ##### 🩹 Fixes - update typescript-eslint packages to v8.0.0-alpha.37 - **eslint-plugin-template:** \[prefer-self-closing-tags] always ignore index.html files - **eslint-plugin-template:** \[prefer-self-closing-tags] support ng-content with fallback content ##### ❀️ Thank You - Christian Svensson - Daniel Kimmich - Dave - Martijn van der Meij - Maximilian Main #### 18.0.1 (2024-05-30) ##### 🩹 Fixes - move typescript-eslint packages to peerDeps, consistently allow v7 and v8 ##### ❀️ Thank You - James Henry
angular-eslint/angular-eslint (@​angular-eslint/schematics) ### [`v19.3.0`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/schematics/CHANGELOG.md#1930-2025-03-22) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.2.1...v19.3.0) ##### 🩹 Fixes - update dependency eslint to v9.23.0 ([#​2331](https://redirect.github.com/angular-eslint/angular-eslint/pull/2331)) - update typescript-eslint packages to v8.27.0 ([#​2328](https://redirect.github.com/angular-eslint/angular-eslint/pull/2328)) - update typescript-eslint packages to v8.26.1 ([#​2313](https://redirect.github.com/angular-eslint/angular-eslint/pull/2313)) ### [`v19.2.1`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/schematics/CHANGELOG.md#1921-2025-03-08) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.2.0...v19.2.1) ##### 🩹 Fixes - update dependency eslint to v9.22.0 ([#​2294](https://redirect.github.com/angular-eslint/angular-eslint/pull/2294)) - update typescript-eslint packages to v8.26.0 ([#​2282](https://redirect.github.com/angular-eslint/angular-eslint/pull/2282)) ### [`v19.2.0`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/schematics/CHANGELOG.md#1920-2025-03-02) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.1.0...v19.2.0) ##### 🩹 Fixes - update typescript-eslint packages to v8.25.0 ([#​2263](https://redirect.github.com/angular-eslint/angular-eslint/pull/2263)) - update dependency eslint to v9.21.0 ([#​2243](https://redirect.github.com/angular-eslint/angular-eslint/pull/2243)) - **eslint-plugin-template:** find inline templates on components in blocks ([#​2238](https://redirect.github.com/angular-eslint/angular-eslint/pull/2238)) - update typescript-eslint packages to v8.24.0 ([#​2240](https://redirect.github.com/angular-eslint/angular-eslint/pull/2240)) ##### ❀️ Thank You - Dave [@​reduckted](https://redirect.github.com/reduckted) ### [`v19.1.0`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/schematics/CHANGELOG.md#1910-2025-02-09) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.0.2...v19.1.0) ##### 🩹 Fixes - update dependency eslint to v9.20.0 ([#​2217](https://redirect.github.com/angular-eslint/angular-eslint/pull/2217)) - update typescript-eslint packages to v8.23.0 ([#​2212](https://redirect.github.com/angular-eslint/angular-eslint/pull/2212)) - update dependency semver to v7.7.1 ([#​2225](https://redirect.github.com/angular-eslint/angular-eslint/pull/2225)) - update typescript-eslint packages to v8.20.0 ([#​2185](https://redirect.github.com/angular-eslint/angular-eslint/pull/2185)) - update dependency eslint to v9.18.0 ([#​2181](https://redirect.github.com/angular-eslint/angular-eslint/pull/2181)) - update dependency ignore to v7 ([#​2200](https://redirect.github.com/angular-eslint/angular-eslint/pull/2200)) ### [`v19.0.2`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/schematics/CHANGELOG.md#1902-2024-12-10) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.0.1...v19.0.2) ##### 🩹 Fixes - update typescript-eslint packages to v8.18.0 ([#​2171](https://redirect.github.com/angular-eslint/angular-eslint/pull/2171)) ### [`v19.0.1`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/schematics/CHANGELOG.md#1901-2024-12-06) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.0.0...v19.0.1) ##### 🩹 Fixes - update typescript-eslint packages to v8.17.0 ([#​2153](https://redirect.github.com/angular-eslint/angular-eslint/pull/2153)) - update dependency eslint to v9.16.0 ([#​2148](https://redirect.github.com/angular-eslint/angular-eslint/pull/2148)) ### [`v19.0.0`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/schematics/CHANGELOG.md#1900-2024-11-29) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v18.4.3...v19.0.0) ##### πŸš€ Features - allow referencing angular-eslint as the schematics collection ([2be3107b](https://redirect.github.com/angular-eslint/angular-eslint/commit/2be3107b)) - update angular packages to the stable v19 ([#​2120](https://redirect.github.com/angular-eslint/angular-eslint/pull/2120)) ##### ❀️ Thank You - JamesHenry [@​JamesHenry](https://redirect.github.com/JamesHenry) - Leosvel PΓ©rez Espinosa [@​leosvelperez](https://redirect.github.com/leosvelperez) #### 18.4.3 (2024-11-29) ##### 🩹 Fixes - update typescript-eslint packages to v8.16.0 ([#​2135](https://redirect.github.com/angular-eslint/angular-eslint/pull/2135)) - yarn pnp issues ([#​2143](https://redirect.github.com/angular-eslint/angular-eslint/pull/2143)) ##### ❀️ Thank You - James Henry [@​JamesHenry](https://redirect.github.com/JamesHenry) #### 18.4.2 (2024-11-23) This was a version bump only for schematics to align it with other projects, there were no code changes. #### 18.4.1 (2024-11-18) ##### 🩹 Fixes - update dependency ignore to v6 ([#​2047](https://redirect.github.com/angular-eslint/angular-eslint/pull/2047)) #### 18.4.0 (2024-10-21) ##### πŸš€ Features - support ESM configs and .cjs and .mjs extensions ([#​2068](https://redirect.github.com/angular-eslint/angular-eslint/pull/2068)) ##### 🩹 Fixes - update dependency eslint to v9.13.0, support noConfigLookup ([#​2045](https://redirect.github.com/angular-eslint/angular-eslint/pull/2045)) - update typescript-eslint packages to v8.10.0 ([#​2046](https://redirect.github.com/angular-eslint/angular-eslint/pull/2046)) - update typescript-eslint packages to v8.5.0 ([#​2020](https://redirect.github.com/angular-eslint/angular-eslint/pull/2020)) ##### ❀️ Thank You - James Henry [@​JamesHenry](https://redirect.github.com/JamesHenry) #### 18.3.1 (2024-09-11) ##### 🩹 Fixes - update dependency eslint to v9.9.1 - update typescript-eslint packages to v8.2.0 #### 18.3.0 (2024-08-13) ##### 🩹 Fixes - ensure consistent nx dependency versions - update dependency eslint to v9.9.0 - update dependency ignore to v5.3.2 - update typescript-eslint packages to v8.0.1 - update typescript-eslint packages to v8.1.0 ##### ❀️ Thank You - James Henry #### 18.2.0 (2024-07-31) ##### πŸš€ Features - update typescript-eslint to v8 stable, eslint v9.8.0 ##### 🩹 Fixes - update dependency semver to v7.6.3 ##### ❀️ Thank You - James Henry #### 18.1.0 (2024-07-01) ##### 🩹 Fixes - update dependency eslint to v9.4.0 - update dependency eslint to v9.5.0 - update dependency eslint to v9.6.0 - update typescript-eslint packages to v8.0.0-alpha.37 - update typescript-eslint packages to v8.0.0-alpha.38 ##### ❀️ Thank You - Christian Svensson - Daniel Kimmich - Dave - Martijn van der Meij - Maximilian Main #### 18.0.1 (2024-05-30) This was a version bump only for schematics to align it with other projects, there were no code changes.
angular-eslint/angular-eslint (@​angular-eslint/template-parser) ### [`v19.3.0`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/template-parser/CHANGELOG.md#1930-2025-03-22) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.2.1...v19.3.0) ##### πŸš€ Features - use [@​angular/compiler](https://redirect.github.com/angular/compiler) 19.2.3 and rename some AST nodes to match ([#​2320](https://redirect.github.com/angular-eslint/angular-eslint/pull/2320)) - **template-parser:** visit [@​let](https://redirect.github.com/let) child nodes ([#​2312](https://redirect.github.com/angular-eslint/angular-eslint/pull/2312)) ##### ❀️ Thank You - Dave [@​reduckted](https://redirect.github.com/reduckted) ### [`v19.2.1`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/template-parser/CHANGELOG.md#1921-2025-03-08) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.2.0...v19.2.1) This was a version bump only for template-parser to align it with other projects, there were no code changes. ### [`v19.2.0`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/template-parser/CHANGELOG.md#1920-2025-03-02) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.1.0...v19.2.0) ##### 🩹 Fixes - **eslint-plugin-template:** find inline templates on components in blocks ([#​2238](https://redirect.github.com/angular-eslint/angular-eslint/pull/2238)) ##### ❀️ Thank You - Dave [@​reduckted](https://redirect.github.com/reduckted) ### [`v19.1.0`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/template-parser/CHANGELOG.md#1910-2025-02-09) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.0.2...v19.1.0) This was a version bump only for template-parser to align it with other projects, there were no code changes. ### [`v19.0.2`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/template-parser/CHANGELOG.md#1902-2024-12-10) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.0.1...v19.0.2) This was a version bump only for template-parser to align it with other projects, there were no code changes. ### [`v19.0.1`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/template-parser/CHANGELOG.md#1901-2024-12-06) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v19.0.0...v19.0.1) This was a version bump only for template-parser to align it with other projects, there were no code changes. ### [`v19.0.0`](https://redirect.github.com/angular-eslint/angular-eslint/blob/HEAD/packages/template-parser/CHANGELOG.md#1900-2024-11-29) [Compare Source](https://redirect.github.com/angular-eslint/angular-eslint/compare/v18.4.3...v19.0.0) This was a version bump only for template-parser to align it with other projects, there were no code changes. #### 18.4.3 (2024-11-29) This was a version bump only for template-parser to align it with other projects, there were no code changes. #### 18.4.2 (2024-11-23) This was a version bump only for template-parser to align it with other projects, there were no code changes. #### 18.4.1 (2024-11-18) This was a version bump only for template-parser to align it with other projects, there were no code changes. #### 18.4.0 (2024-10-21) ##### 🩹 Fixes - **template-parser:** traverse ng-content fallback content ([#​2031](https://redirect.github.com/angular-eslint/angular-eslint/pull/2031)) ##### ❀️ Thank You - Matt Lewis [@​mattlewis92](https://redirect.github.com/mattlewis92) #### 18.3.1 (2024-09-11) ##### 🩹 Fixes - **template-parser:** visit receiver of Call expression - **template-parser:** visit receiver of Call expression" - **template-parser:** visit receiver of Call expression ##### ❀️ Thank You - James Henry - PaweΕ‚ Maniecki #### 18.3.0 (2024-08-13) This was a version bump only for template-parser to align it with other projects, there were no code changes. #### 18.2.0 (2024-07-31) ##### πŸš€ Features - update typescript-eslint to v8 stable, eslint v9.8.0 ##### ❀️ Thank You - James Henry #### 18.1.0 (2024-07-01) This was a version bump only for template-parser to align it with other projects, there were no code changes. #### 18.0.1 (2024-05-30) This was a version bump only for template-parser to align it with other projects, there were no code changes.
--- ### Configuration πŸ“… **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β™» **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. πŸ”• **Ignore**: Close this PR and you won't be reminded about these updates again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-feature/js-sdk). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 371 ++++++++++++++++++++++++++++------ packages/angular/package.json | 10 +- 2 files changed, 314 insertions(+), 67 deletions(-) diff --git a/package-lock.json b/package-lock.json index b4d0ea464..c88be9336 100644 --- a/package-lock.json +++ b/package-lock.json @@ -79,12 +79,13 @@ } }, "node_modules/@angular-devkit/architect": { - "version": "0.1802.10", - "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1802.10.tgz", - "integrity": "sha512-/xudcHK2s4J/GcL6qyobmGaWMHQcYLSMqCaWMT+nK6I6tu9VEAj/p3R83Tzx8B/eKi31Pz499uHw9pmqdtbafg==", + "version": "0.1902.7", + "resolved": "https://registry.npmjs.org/@angular-devkit/architect/-/architect-0.1902.7.tgz", + "integrity": "sha512-XPKbesrGJ3qOHLcwb3y8X14NlBIwxnh9OvsfyqgBujByJq0LIg4CaU/GrX0Lo4RmX3UQBli668TjFgmIkMTL7Q==", "dev": true, + "license": "MIT", "dependencies": { - "@angular-devkit/core": "18.2.10", + "@angular-devkit/core": "19.2.7", "rxjs": "7.8.1" }, "engines": { @@ -93,11 +94,12 @@ "yarn": ">= 1.13.0" } }, - "node_modules/@angular-devkit/core": { - "version": "18.2.10", - "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-18.2.10.tgz", - "integrity": "sha512-LFqiNdraBujg8e1lhuB0bkFVAoIbVbeXXwfoeROKH60OPbP8tHdgV6sFTqU7UGBKA+b+bYye70KFTG2Ys8QzKQ==", + "node_modules/@angular-devkit/architect/node_modules/@angular-devkit/core": { + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-19.2.7.tgz", + "integrity": "sha512-WeX/7HuNooJ4UhvVdremj6it0cX3nreG0/5r3QfrQd5Tz3sCHnh/lO5TW31gHtSqVgPjBGmzSzsyZ1Mi0lI7FA==", "dev": true, + "license": "MIT", "dependencies": { "ajv": "8.17.1", "ajv-formats": "3.0.1", @@ -112,7 +114,7 @@ "yarn": ">= 1.13.0" }, "peerDependencies": { - "chokidar": "^3.5.2" + "chokidar": "^4.0.0" }, "peerDependenciesMeta": { "chokidar": { @@ -120,15 +122,50 @@ } } }, + "node_modules/@angular-devkit/architect/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@angular-devkit/architect/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@angular-devkit/schematics": { - "version": "18.2.10", - "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-18.2.10.tgz", - "integrity": "sha512-EIm/yCYg3ZYPsPYJxXRX5F6PofJCbNQ5rZEuQEY09vy+ZRTqGezH0qoUP5WxlYeJrjiRLYqADI9WtVNzDyaD4w==", + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/@angular-devkit/schematics/-/schematics-19.2.7.tgz", + "integrity": "sha512-kE9W1MqfasumAYVD8egMHefyxmA93KfBYrWqcepZaFPQTPwg1AGTlID7YLHToLQquw4Iqen6Xv8Bzfv05IZ+tw==", "dev": true, + "license": "MIT", "dependencies": { - "@angular-devkit/core": "18.2.10", + "@angular-devkit/core": "19.2.7", "jsonc-parser": "3.3.1", - "magic-string": "0.30.11", + "magic-string": "0.30.17", "ora": "5.4.1", "rxjs": "7.8.1" }, @@ -138,37 +175,171 @@ "yarn": ">= 1.13.0" } }, + "node_modules/@angular-devkit/schematics/node_modules/@angular-devkit/core": { + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-19.2.7.tgz", + "integrity": "sha512-WeX/7HuNooJ4UhvVdremj6it0cX3nreG0/5r3QfrQd5Tz3sCHnh/lO5TW31gHtSqVgPjBGmzSzsyZ1Mi0lI7FA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "8.17.1", + "ajv-formats": "3.0.1", + "jsonc-parser": "3.3.1", + "picomatch": "4.0.2", + "rxjs": "7.8.1", + "source-map": "0.7.4" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "chokidar": "^4.0.0" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/@angular-devkit/schematics/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@angular-devkit/schematics/node_modules/magic-string": { + "version": "0.30.17", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.17.tgz", + "integrity": "sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0" + } + }, + "node_modules/@angular-devkit/schematics/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@angular-eslint/builder": { - "version": "18.4.3", - "resolved": "https://registry.npmjs.org/@angular-eslint/builder/-/builder-18.4.3.tgz", - "integrity": "sha512-NzmrXlr7GFE+cjwipY/CxBscZXNqnuK0us1mO6Z2T6MeH6m+rRcdlY/rZyKoRniyNNvuzl6vpEsfMIMmnfebrA==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/builder/-/builder-19.3.0.tgz", + "integrity": "sha512-j9xNrzZJq29ONSG6EaeQHve0Squkm6u6Dm8fZgWP7crTFOrtLXn7Wxgxuyl9eddpbWY1Ov1gjFuwBVnxIdyAqg==", "dev": true, "license": "MIT", "dependencies": { - "@angular-devkit/architect": ">= 0.1800.0 < 0.1900.0", - "@angular-devkit/core": ">= 18.0.0 < 19.0.0" + "@angular-devkit/architect": ">= 0.1900.0 < 0.2000.0", + "@angular-devkit/core": ">= 19.0.0 < 20.0.0" }, "peerDependencies": { "eslint": "^8.57.0 || ^9.0.0", "typescript": "*" } }, + "node_modules/@angular-eslint/builder/node_modules/@angular-devkit/core": { + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-19.2.7.tgz", + "integrity": "sha512-WeX/7HuNooJ4UhvVdremj6it0cX3nreG0/5r3QfrQd5Tz3sCHnh/lO5TW31gHtSqVgPjBGmzSzsyZ1Mi0lI7FA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "8.17.1", + "ajv-formats": "3.0.1", + "jsonc-parser": "3.3.1", + "picomatch": "4.0.2", + "rxjs": "7.8.1", + "source-map": "0.7.4" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "chokidar": "^4.0.0" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/@angular-eslint/builder/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@angular-eslint/builder/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@angular-eslint/bundled-angular-compiler": { - "version": "18.4.3", - "resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-18.4.3.tgz", - "integrity": "sha512-zdrA8mR98X+U4YgHzUKmivRU+PxzwOL/j8G7eTOvBuq8GPzsP+hvak+tyxlgeGm9HsvpFj9ERHLtJ0xDUPs8fg==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/bundled-angular-compiler/-/bundled-angular-compiler-19.3.0.tgz", + "integrity": "sha512-63Zci4pvnUR1iSkikFlNbShF1tO5HOarYd8fvNfmOZwFfZ/1T3j3bCy9YbE+aM5SYrWqPaPP/OcwZ3wJ8WNvqA==", "dev": true, "license": "MIT" }, "node_modules/@angular-eslint/eslint-plugin": { - "version": "18.4.3", - "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-18.4.3.tgz", - "integrity": "sha512-AyJbupiwTBR81P6T59v+aULEnPpZBCBxL2S5QFWfAhNCwWhcof4GihvdK2Z87yhvzDGeAzUFSWl/beJfeFa+PA==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin/-/eslint-plugin-19.3.0.tgz", + "integrity": "sha512-nBLslLI20KnVbqlfNW7GcnI9R6cYCvRGjOE2QYhzxM316ciAQ62tvQuXP9ZVnRBLSKDAVnMeC0eTq9O4ysrxrQ==", "dev": true, "license": "MIT", "dependencies": { - "@angular-eslint/bundled-angular-compiler": "18.4.3", - "@angular-eslint/utils": "18.4.3" + "@angular-eslint/bundled-angular-compiler": "19.3.0", + "@angular-eslint/utils": "19.3.0" }, "peerDependencies": { "@typescript-eslint/utils": "^7.11.0 || ^8.0.0", @@ -177,14 +348,14 @@ } }, "node_modules/@angular-eslint/eslint-plugin-template": { - "version": "18.4.3", - "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-18.4.3.tgz", - "integrity": "sha512-ijGlX2N01ayMXTpeQivOA31AszO8OEbu9ZQUCxnu9AyMMhxyi2q50bujRChAvN9YXQfdQtbxuajxV6+aiWb5BQ==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/eslint-plugin-template/-/eslint-plugin-template-19.3.0.tgz", + "integrity": "sha512-WyouppTpOYut+wvv13wlqqZ8EHoDrCZxNfGKuEUYK1BPmQlTB8EIZfQH4iR1rFVS28Rw+XRIiXo1x3oC0SOfnA==", "dev": true, "license": "MIT", "dependencies": { - "@angular-eslint/bundled-angular-compiler": "18.4.3", - "@angular-eslint/utils": "18.4.3", + "@angular-eslint/bundled-angular-compiler": "19.3.0", + "@angular-eslint/utils": "19.3.0", "aria-query": "5.3.2", "axobject-query": "4.1.0" }, @@ -206,39 +377,114 @@ } }, "node_modules/@angular-eslint/schematics": { - "version": "18.4.3", - "resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-18.4.3.tgz", - "integrity": "sha512-D5maKn5e6n58+8n7jLFLD4g+RGPOPeDSsvPc1sqial5tEKLxAJQJS9WZ28oef3bhkob6C60D+1H0mMmEEVvyVA==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/schematics/-/schematics-19.3.0.tgz", + "integrity": "sha512-Wl5sFQ4t84LUb8mJ2iVfhYFhtF55IugXu7rRhPHtgIu9Ty5s1v3HGUx4LKv51m2kWhPPeFOTmjeBv1APzFlmnQ==", "dev": true, "license": "MIT", "dependencies": { - "@angular-devkit/core": ">= 18.0.0 < 19.0.0", - "@angular-devkit/schematics": ">= 18.0.0 < 19.0.0", - "@angular-eslint/eslint-plugin": "18.4.3", - "@angular-eslint/eslint-plugin-template": "18.4.3", - "ignore": "6.0.2", - "semver": "7.6.3", + "@angular-devkit/core": ">= 19.0.0 < 20.0.0", + "@angular-devkit/schematics": ">= 19.0.0 < 20.0.0", + "@angular-eslint/eslint-plugin": "19.3.0", + "@angular-eslint/eslint-plugin-template": "19.3.0", + "ignore": "7.0.3", + "semver": "7.7.1", "strip-json-comments": "3.1.1" } }, + "node_modules/@angular-eslint/schematics/node_modules/@angular-devkit/core": { + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/@angular-devkit/core/-/core-19.2.7.tgz", + "integrity": "sha512-WeX/7HuNooJ4UhvVdremj6it0cX3nreG0/5r3QfrQd5Tz3sCHnh/lO5TW31gHtSqVgPjBGmzSzsyZ1Mi0lI7FA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ajv": "8.17.1", + "ajv-formats": "3.0.1", + "jsonc-parser": "3.3.1", + "picomatch": "4.0.2", + "rxjs": "7.8.1", + "source-map": "0.7.4" + }, + "engines": { + "node": "^18.19.1 || ^20.11.1 || >=22.0.0", + "npm": "^6.11.0 || ^7.5.6 || >=8.0.0", + "yarn": ">= 1.13.0" + }, + "peerDependencies": { + "chokidar": "^4.0.0" + }, + "peerDependenciesMeta": { + "chokidar": { + "optional": true + } + } + }, + "node_modules/@angular-eslint/schematics/node_modules/chokidar": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-4.0.3.tgz", + "integrity": "sha512-Qgzu8kfBvo+cA4962jnP1KkS6Dop5NS6g7R5LFYJr4b8Ub94PPQXUksCw9PvXoeXPRRddRNC5C1JQUR2SMGtnA==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "dependencies": { + "readdirp": "^4.0.1" + }, + "engines": { + "node": ">= 14.16.0" + }, + "funding": { + "url": "https://paulmillr.com/funding/" + } + }, "node_modules/@angular-eslint/schematics/node_modules/ignore": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-6.0.2.tgz", - "integrity": "sha512-InwqeHHN2XpumIkMvpl/DCJVrAHgCsG5+cn1XlnLWGwtZBm8QJfSusItfrwx81CTp5agNZqpKU2J/ccC5nGT4A==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-7.0.3.tgz", + "integrity": "sha512-bAH5jbK/F3T3Jls4I0SO1hmPR0dKU0a7+SY6n1yzRtG54FLO8d6w/nxLFX2Nb7dBu6cCWXPaAME6cYqFUMmuCA==", "dev": true, "license": "MIT", "engines": { "node": ">= 4" } }, + "node_modules/@angular-eslint/schematics/node_modules/readdirp": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-4.1.2.tgz", + "integrity": "sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==", + "dev": true, + "license": "MIT", + "optional": true, + "peer": true, + "engines": { + "node": ">= 14.18.0" + }, + "funding": { + "type": "individual", + "url": "https://paulmillr.com/funding/" + } + }, + "node_modules/@angular-eslint/schematics/node_modules/semver": { + "version": "7.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.7.1.tgz", + "integrity": "sha512-hlq8tAfn0m/61p4BVRcPzIGr6LKiMwo4VM6dGi6pt4qcRkmNzTcWq6eCEjEh+qXjkMDvPlOFFSGwQjoEa6gyMA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@angular-eslint/template-parser": { - "version": "18.4.3", - "resolved": "https://registry.npmjs.org/@angular-eslint/template-parser/-/template-parser-18.4.3.tgz", - "integrity": "sha512-JZMPtEB8yNip3kg4WDEWQyObSo2Hwf+opq2ElYuwe85GQkGhfJSJ2CQYo4FSwd+c5MUQAqESNRg9QqGYauDsiw==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/template-parser/-/template-parser-19.3.0.tgz", + "integrity": "sha512-VxMNgsHXMWbbmZeBuBX5i8pzsSSEaoACVpaE+j8Muk60Am4Mxc0PytJm4n3znBSvI3B7Kq2+vStSRYPkOER4lA==", "dev": true, "license": "MIT", "dependencies": { - "@angular-eslint/bundled-angular-compiler": "18.4.3", + "@angular-eslint/bundled-angular-compiler": "19.3.0", "eslint-scope": "^8.0.2" }, "peerDependencies": { @@ -247,9 +493,9 @@ } }, "node_modules/@angular-eslint/template-parser/node_modules/eslint-scope": { - "version": "8.2.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.2.0.tgz", - "integrity": "sha512-PHlWUfG6lvPc3yvP5A4PNyBL1W8fkDUccmI21JUu/+GKZBoH/W5u6usENXUrWFRsyoW5ACUjFGgAFQp5gUlb/A==", + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-8.3.0.tgz", + "integrity": "sha512-pUNxi75F8MJ/GdeKtVLSbYg4ZI34J6C0C7sbL4YOp2exGwen7ZsuBqKzUhXd0qMQ362yET3z+uPwKeg/0C2XCQ==", "dev": true, "license": "BSD-2-Clause", "dependencies": { @@ -264,13 +510,13 @@ } }, "node_modules/@angular-eslint/utils": { - "version": "18.4.3", - "resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-18.4.3.tgz", - "integrity": "sha512-w0bJ9+ELAEiPBSTPPm9bvDngfu1d8JbzUhvs2vU+z7sIz/HMwUZT5S4naypj2kNN0gZYGYrW0lt+HIbW87zTAQ==", + "version": "19.3.0", + "resolved": "https://registry.npmjs.org/@angular-eslint/utils/-/utils-19.3.0.tgz", + "integrity": "sha512-ovvbQh96FIJfepHqLCMdKFkPXr3EbcvYc9kMj9hZyIxs/9/VxwPH7x25mMs4VsL6rXVgH2FgG5kR38UZlcTNNw==", "dev": true, "license": "MIT", "dependencies": { - "@angular-eslint/bundled-angular-compiler": "18.4.3" + "@angular-eslint/bundled-angular-compiler": "19.3.0" }, "peerDependencies": { "@typescript-eslint/utils": "^7.11.0 || ^8.0.0", @@ -19761,11 +20007,11 @@ "version": "0.0.0", "devDependencies": { "@angular-devkit/build-angular": "^19.0.0", - "@angular-eslint/builder": "18.4.3", - "@angular-eslint/eslint-plugin": "18.4.3", - "@angular-eslint/eslint-plugin-template": "18.4.3", - "@angular-eslint/schematics": "18.4.3", - "@angular-eslint/template-parser": "18.4.3", + "@angular-eslint/builder": "19.3.0", + "@angular-eslint/eslint-plugin": "19.3.0", + "@angular-eslint/eslint-plugin-template": "19.3.0", + "@angular-eslint/schematics": "19.3.0", + "@angular-eslint/template-parser": "19.3.0", "@angular/animations": "^19.0.0", "@angular/cli": "^19.0.0", "@angular/common": "^19.0.0", @@ -23337,6 +23583,7 @@ "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz", "integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==", "dev": true, + "peer": true, "bin": { "tsc": "bin/tsc", "tsserver": "bin/tsserver" @@ -23738,7 +23985,7 @@ }, "packages/angular/projects/angular-sdk": { "name": "@openfeature/angular-sdk", - "version": "0.0.10", + "version": "0.0.11", "dependencies": { "tslib": "^2.3.0" }, @@ -23804,7 +24051,7 @@ }, "packages/shared": { "name": "@openfeature/core", - "version": "1.7.2", + "version": "1.8.0", "license": "Apache-2.0", "devDependencies": {} }, diff --git a/packages/angular/package.json b/packages/angular/package.json index 345666e13..66c36a164 100644 --- a/packages/angular/package.json +++ b/packages/angular/package.json @@ -15,11 +15,11 @@ "private": true, "devDependencies": { "@angular-devkit/build-angular": "^19.0.0", - "@angular-eslint/builder": "18.4.3", - "@angular-eslint/eslint-plugin": "18.4.3", - "@angular-eslint/eslint-plugin-template": "18.4.3", - "@angular-eslint/schematics": "18.4.3", - "@angular-eslint/template-parser": "18.4.3", + "@angular-eslint/builder": "19.3.0", + "@angular-eslint/eslint-plugin": "19.3.0", + "@angular-eslint/eslint-plugin-template": "19.3.0", + "@angular-eslint/schematics": "19.3.0", + "@angular-eslint/template-parser": "19.3.0", "@angular/animations": "^19.0.0", "@angular/cli": "^19.0.0", "@angular/common": "^19.0.0", From 5f85a5636255535312e8b23618d4462d29c9df11 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 12:21:28 +0200 Subject: [PATCH 20/26] chore(deps): update dependency esbuild to ^0.25.0 [security] (#1145) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [esbuild](https://redirect.github.com/evanw/esbuild) | [`^0.24.0` -> `^0.25.0`](https://renovatebot.com/diffs/npm/esbuild/0.24.2/0.25.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/esbuild/0.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/esbuild/0.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/esbuild/0.24.2/0.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/esbuild/0.24.2/0.25.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | ### GitHub Vulnerability Alerts #### [GHSA-67mh-4wv8-2f99](https://redirect.github.com/evanw/esbuild/security/advisories/GHSA-67mh-4wv8-2f99) ### Summary esbuild allows any websites to send any request to the development server and read the response due to default CORS settings. ### Details esbuild sets `Access-Control-Allow-Origin: *` header to all requests, including the SSE connection, which allows any websites to send any request to the development server and read the response. https://github.com/evanw/esbuild/blob/df815ac27b84f8b34374c9182a93c94718f8a630/pkg/api/serve_other.go#L121 https://github.com/evanw/esbuild/blob/df815ac27b84f8b34374c9182a93c94718f8a630/pkg/api/serve_other.go#L363 **Attack scenario**: 1. The attacker serves a malicious web page (`http://malicious.example.com`). 1. The user accesses the malicious web page. 1. The attacker sends a `fetch('http://127.0.0.1:8000/main.js')` request by JS in that malicious web page. This request is normally blocked by same-origin policy, but that's not the case for the reasons above. 1. The attacker gets the content of `http://127.0.0.1:8000/main.js`. In this scenario, I assumed that the attacker knows the URL of the bundle output file name. But the attacker can also get that information by - Fetching `/index.html`: normally you have a script tag here - Fetching `/assets`: it's common to have a `assets` directory when you have JS files and CSS files in a different directory and the directory listing feature tells the attacker the list of files - Connecting `/esbuild` SSE endpoint: the SSE endpoint sends the URL path of the changed files when the file is changed (`new EventSource('/esbuild').addEventListener('change', e => console.log(e.type, e.data))`) - Fetching URLs in the known file: once the attacker knows one file, the attacker can know the URLs imported from that file The scenario above fetches the compiled content, but if the victim has the source map option enabled, the attacker can also get the non-compiled content by fetching the source map file. ### PoC 1. Download [reproduction.zip](https://redirect.github.com/user-attachments/files/18561484/reproduction.zip) 2. Extract it and move to that directory 1. Run `npm i` 1. Run `npm run watch` 1. Run `fetch('http://127.0.0.1:8000/app.js').then(r => r.text()).then(content => console.log(content))` in a different website's dev tools. ![image](https://redirect.github.com/user-attachments/assets/08fc2e4d-e1ec-44ca-b0ea-78a73c3c40e9) ### Impact Users using the serve feature may get the source code stolen by malicious websites. --- ### Release Notes
evanw/esbuild (esbuild) ### [`v0.25.0`](https://redirect.github.com/evanw/esbuild/blob/HEAD/CHANGELOG.md#v0250) [Compare Source](https://redirect.github.com/evanw/esbuild/compare/v0.24.2...v0.25.0) **This release deliberately contains backwards-incompatible changes.** To avoid automatically picking up releases like this, you should either be pinning the exact version of `esbuild` in your `package.json` file (recommended) or be using a version range syntax that only accepts patch upgrades such as `^0.24.0` or `~0.24.0`. See npm's documentation about [semver](https://docs.npmjs.com/cli/v6/using-npm/semver/) for more information. - Restrict access to esbuild's development server ([GHSA-67mh-4wv8-2f99](https://redirect.github.com/evanw/esbuild/security/advisories/GHSA-67mh-4wv8-2f99)) This change addresses esbuild's first security vulnerability report. Previously esbuild set the `Access-Control-Allow-Origin` header to `*` to allow esbuild's development server to be flexible in how it's used for development. However, this allows the websites you visit to make HTTP requests to esbuild's local development server, which gives read-only access to your source code if the website were to fetch your source code's specific URL. You can read more information in [the report](https://redirect.github.com/evanw/esbuild/security/advisories/GHSA-67mh-4wv8-2f99). Starting with this release, [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) will now be disabled, and requests will now be denied if the host does not match the one provided to `--serve=`. The default host is `0.0.0.0`, which refers to all of the IP addresses that represent the local machine (e.g. both `127.0.0.1` and `192.168.0.1`). If you want to customize anything about esbuild's development server, you can [put a proxy in front of esbuild](https://esbuild.github.io/api/#serve-proxy) and modify the incoming and/or outgoing requests. In addition, the `serve()` API call has been changed to return an array of `hosts` instead of a single `host` string. This makes it possible to determine all of the hosts that esbuild's development server will accept. Thanks to [@​sapphi-red](https://redirect.github.com/sapphi-red) for reporting this issue. - Delete output files when a build fails in watch mode ([#​3643](https://redirect.github.com/evanw/esbuild/issues/3643)) It has been requested for esbuild to delete files when a build fails in watch mode. Previously esbuild left the old files in place, which could cause people to not immediately realize that the most recent build failed. With this release, esbuild will now delete all output files if a rebuild fails. Fixing the build error and triggering another rebuild will restore all output files again. - Fix correctness issues with the CSS nesting transform ([#​3620](https://redirect.github.com/evanw/esbuild/issues/3620), [#​3877](https://redirect.github.com/evanw/esbuild/issues/3877), [#​3933](https://redirect.github.com/evanw/esbuild/issues/3933), [#​3997](https://redirect.github.com/evanw/esbuild/issues/3997), [#​4005](https://redirect.github.com/evanw/esbuild/issues/4005), [#​4037](https://redirect.github.com/evanw/esbuild/pull/4037), [#​4038](https://redirect.github.com/evanw/esbuild/pull/4038)) This release fixes the following problems: - Naive expansion of CSS nesting can result in an exponential blow-up of generated CSS if each nesting level has multiple selectors. Previously esbuild sometimes collapsed individual nesting levels using `:is()` to limit expansion. However, this collapsing wasn't correct in some cases, so it has been removed to fix correctness issues. ```css /* Original code */ .parent { > .a, > .b1 > .b2 { color: red; } } /* Old output (with --supported:nesting=false) */ .parent > :is(.a, .b1 > .b2) { color: red; } /* New output (with --supported:nesting=false) */ .parent > .a, .parent > .b1 > .b2 { color: red; } ``` Thanks to [@​tim-we](https://redirect.github.com/tim-we) for working on a fix. - The `&` CSS nesting selector can be repeated multiple times to increase CSS specificity. Previously esbuild ignored this possibility and incorrectly considered `&&` to have the same specificity as `&`. With this release, this should now work correctly: ```css /* Original code (color should be red) */ div { && { color: red } & { color: blue } } /* Old output (with --supported:nesting=false) */ div { color: red; } div { color: blue; } /* New output (with --supported:nesting=false) */ div:is(div) { color: red; } div { color: blue; } ``` Thanks to [@​CPunisher](https://redirect.github.com/CPunisher) for working on a fix. - Previously transforming nested CSS incorrectly removed leading combinators from within pseudoclass selectors such as `:where()`. This edge case has been fixed and how has test coverage. ```css /* Original code */ a b:has(> span) { a & { color: green; } } /* Old output (with --supported:nesting=false) */ a :is(a b:has(span)) { color: green; } /* New output (with --supported:nesting=false) */ a :is(a b:has(> span)) { color: green; } ``` This fix was contributed by [@​NoremacNergfol](https://redirect.github.com/NoremacNergfol). - The CSS minifier contains logic to remove the `&` selector when it can be implied, which happens when there is only one and it's the leading token. However, this logic was incorrectly also applied to selector lists inside of pseudo-class selectors such as `:where()`. With this release, the minifier will now avoid applying this logic in this edge case: ```css /* Original code */ .a { & .b { color: red } :where(& .b) { color: blue } } /* Old output (with --minify) */ .a{.b{color:red}:where(.b){color:#​00f}} /* New output (with --minify) */ .a{.b{color:red}:where(& .b){color:#​00f}} ``` - Fix some correctness issues with source maps ([#​1745](https://redirect.github.com/evanw/esbuild/issues/1745), [#​3183](https://redirect.github.com/evanw/esbuild/issues/3183), [#​3613](https://redirect.github.com/evanw/esbuild/issues/3613), [#​3982](https://redirect.github.com/evanw/esbuild/issues/3982)) Previously esbuild incorrectly treated source map path references as file paths instead of as URLs. With this release, esbuild will now treat source map path references as URLs. This fixes the following problems with source maps: - File names in `sourceMappingURL` that contained a space previously did not encode the space as `%20`, which resulted in JavaScript tools (including esbuild) failing to read that path back in when consuming the generated output file. This should now be fixed. - Absolute URLs in `sourceMappingURL` that use the `file://` scheme previously attempted to read from a folder called `file:`. These URLs should now be recognized and parsed correctly. - Entries in the `sources` array in the source map are now treated as URLs instead of file paths. The correct behavior for this is much more clear now that source maps has a [formal specification](https://tc39.es/ecma426/). Many thanks to those who worked on the specification. - Fix incorrect package for `@esbuild/netbsd-arm64` ([#​4018](https://redirect.github.com/evanw/esbuild/issues/4018)) Due to a copy+paste typo, the binary published to `@esbuild/netbsd-arm64` was not actually for `arm64`, and didn't run in that environment. This release should fix running esbuild in that environment (NetBSD on 64-bit ARM). Sorry about the mistake. - Fix a minification bug with bitwise operators and bigints ([#​4065](https://redirect.github.com/evanw/esbuild/issues/4065)) This change removes an incorrect assumption in esbuild that all bitwise operators result in a numeric integer. That assumption was correct up until the introduction of bigints in ES2020, but is no longer correct because almost all bitwise operators now operate on both numbers and bigints. Here's an example of the incorrect minification: ```js // Original code if ((a & b) !== 0) found = true // Old output (with --minify) a&b&&(found=!0); // New output (with --minify) (a&b)!==0&&(found=!0); ``` - Fix esbuild incorrectly rejecting valid TypeScript edge case ([#​4027](https://redirect.github.com/evanw/esbuild/issues/4027)) The following TypeScript code is valid: ```ts export function open(async?: boolean): void { console.log(async as boolean) } ``` Before this version, esbuild would fail to parse this with a syntax error as it expected the token sequence `async as ...` to be the start of an async arrow function expression `async as => ...`. This edge case should be parsed correctly by esbuild starting with this release. - Transform BigInt values into constructor calls when unsupported ([#​4049](https://redirect.github.com/evanw/esbuild/issues/4049)) Previously esbuild would refuse to compile the BigInt literals (such as `123n`) if they are unsupported in the configured target environment (such as with `--target=es6`). The rationale was that they cannot be polyfilled effectively because they change the behavior of JavaScript's arithmetic operators and JavaScript doesn't have operator overloading. However, this prevents using esbuild with certain libraries that would otherwise work if BigInt literals were ignored, such as with old versions of the [`buffer` library](https://redirect.github.com/feross/buffer) before the library fixed support for running in environments without BigInt support. So with this release, esbuild will now turn BigInt literals into BigInt constructor calls (so `123n` becomes `BigInt(123)`) and generate a warning in this case. You can turn off the warning with `--log-override:bigint=silent` or restore the warning to an error with `--log-override:bigint=error` if needed. - Change how `console` API dropping works ([#​4020](https://redirect.github.com/evanw/esbuild/issues/4020)) Previously the `--drop:console` feature replaced all method calls off of the `console` global with `undefined` regardless of how long the property access chain was (so it applied to `console.log()` and `console.log.call(console)` and `console.log.not.a.method()`). However, it was pointed out that this breaks uses of `console.log.bind(console)`. That's also incompatible with Terser's implementation of the feature, which is where this feature originally came from (it does support `bind`). So with this release, using this feature with esbuild will now only replace one level of method call (unless extended by `call` or `apply`) and will replace the method being called with an empty function in complex cases: ```js // Original code const x = console.log('x') const y = console.log.call(console, 'y') const z = console.log.bind(console)('z') // Old output (with --drop-console) const x = void 0; const y = void 0; const z = (void 0)("z"); // New output (with --drop-console) const x = void 0; const y = void 0; const z = (() => { }).bind(console)("z"); ``` This should more closely match Terser's existing behavior. - Allow BigInt literals as `define` values With this release, you can now use BigInt literals as define values, such as with `--define:FOO=123n`. Previously trying to do this resulted in a syntax error. - Fix a bug with resolve extensions in `node_modules` ([#​4053](https://redirect.github.com/evanw/esbuild/issues/4053)) The `--resolve-extensions=` option lets you specify the order in which to try resolving implicit file extensions. For complicated reasons, esbuild reorders TypeScript file extensions after JavaScript ones inside of `node_modules` so that JavaScript source code is always preferred to TypeScript source code inside of dependencies. However, this reordering had a bug that could accidentally change the relative order of TypeScript file extensions if one of them was a prefix of the other. That bug has been fixed in this release. You can see the issue for details. - Better minification of statically-determined `switch` cases ([#​4028](https://redirect.github.com/evanw/esbuild/issues/4028)) With this release, esbuild will now try to trim unused code within `switch` statements when the test expression and `case` expressions are primitive literals. This can arise when the test expression is an identifier that is substituted for a primitive literal at compile time. For example: ```js // Original code switch (MODE) { case 'dev': installDevToolsConsole() break case 'prod': return default: throw new Error } // Old output (with --minify '--define:MODE="prod"') switch("prod"){case"dev":installDevToolsConsole();break;case"prod":return;default:throw new Error} // New output (with --minify '--define:MODE="prod"') return; ``` - Emit `/* @​__KEY__ */` for string literals derived from property names ([#​4034](https://redirect.github.com/evanw/esbuild/issues/4034)) Property name mangling is an advanced feature that shortens certain property names for better minification (I say "advanced feature" because it's very easy to break your code with it). Sometimes you need to store a property name in a string, such as `obj.get('foo')` instead of `obj.foo`. JavaScript minifiers such as esbuild and [Terser](https://terser.org/) have a convention where a `/* @​__KEY__ */` comment before the string makes it behave like a property name. So `obj.get(/* @​__KEY__ */ 'foo')` allows the contents of the string `'foo'` to be shortened. However, esbuild sometimes itself generates string literals containing property names when transforming code, such as when lowering class fields to ES6 or when transforming TypeScript decorators. Previously esbuild didn't generate its own `/* @​__KEY__ */` comments in this case, which means that minifying your code by running esbuild again on its own output wouldn't work correctly (this does not affect people that both minify and transform their code in a single step). With this release, esbuild will now generate `/* @​__KEY__ */` comments for property names in generated string literals. To avoid lots of unnecessary output for people that don't use this advanced feature, the generated comments will only be present when the feature is active. If you want to generate the comments but not actually mangle any property names, you can use a flag that has no effect such as `--reserve-props=.`, which tells esbuild to not mangle any property names (but still activates this feature). - The `text` loader now strips the UTF-8 BOM if present ([#​3935](https://redirect.github.com/evanw/esbuild/issues/3935)) Some software (such as Notepad on Windows) can create text files that start with the three bytes `0xEF 0xBB 0xBF`, which is referred to as the "byte order mark". This prefix is intended to be removed before using the text. Previously esbuild's `text` loader included this byte sequence in the string, which turns into a prefix of `\uFEFF` in a JavaScript string when decoded from UTF-8. With this release, esbuild's `text` loader will now remove these bytes when they occur at the start of the file. - Omit legal comment output files when empty ([#​3670](https://redirect.github.com/evanw/esbuild/issues/3670)) Previously configuring esbuild with `--legal-comment=external` or `--legal-comment=linked` would always generate a `.LEGAL.txt` output file even if it was empty. Starting with this release, esbuild will now only do this if the file will be non-empty. This should result in a more organized output directory in some cases. - Update Go from 1.23.1 to 1.23.5 ([#​4056](https://redirect.github.com/evanw/esbuild/issues/4056), [#​4057](https://redirect.github.com/evanw/esbuild/pull/4057)) This should have no effect on existing code as this version change does not change Go's operating system support. It may remove certain reports from vulnerability scanners that detect which version of the Go compiler esbuild uses. This PR was contributed by [@​MikeWillCook](https://redirect.github.com/MikeWillCook). - Allow passing a port of 0 to the development server ([#​3692](https://redirect.github.com/evanw/esbuild/issues/3692)) Unix sockets interpret a port of 0 to mean "pick a random unused port in the [ephemeral port](https://en.wikipedia.org/wiki/Ephemeral_port) range". However, esbuild's default behavior when the port is not specified is to pick the first unused port starting from 8000 and upward. This is more convenient because port 8000 is typically free, so you can for example restart the development server and reload your app in the browser without needing to change the port in the URL. Since esbuild is written in Go (which does not have optional fields like JavaScript), not specifying the port in Go means it defaults to 0, so previously passing a port of 0 to esbuild caused port 8000 to be picked. Starting with this release, passing a port of 0 to esbuild when using the CLI or the JS API will now pass port 0 to the OS, which will pick a random ephemeral port. To make this possible, the `Port` option in the Go API has been changed from `uint16` to `int` (to allow for additional sentinel values) and passing a port of -1 in Go now picks a random port. Both the CLI and JS APIs now remap an explicitly-provided port of 0 into -1 for the internal Go API. Another option would have been to change `Port` in Go from `uint16` to `*uint16` (Go's closest equivalent of `number | undefined`). However, that would make the common case of providing an explicit port in Go very awkward as Go doesn't support taking the address of integer constants. This tradeoff isn't worth it as picking a random ephemeral port is a rare use case. So the CLI and JS APIs should now match standard Unix behavior when the port is 0, but you need to use -1 instead with Go API. - Minification now avoids inlining constants with direct `eval` ([#​4055](https://redirect.github.com/evanw/esbuild/issues/4055)) Direct `eval` can be used to introduce a new variable like this: ```js const variable = false ;(function () { eval("var variable = true") console.log(variable) })() ``` Previously esbuild inlined `variable` here (which became `false`), which changed the behavior of the code. This inlining is now avoided, but please keep in mind that direct `eval` breaks many assumptions that JavaScript tools hold about normal code (especially when bundling) and I do not recommend using it. There are usually better alternatives that have a more localized impact on your code. You can read more about this here: https://esbuild.github.io/link/direct-eval/
--- ### Configuration πŸ“… **Schedule**: Branch creation - "" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. β™» **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. πŸ”• **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-feature/js-sdk). Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> --- package-lock.json | 208 +++++++++++++++++++++++----------------------- package.json | 2 +- 2 files changed, 105 insertions(+), 105 deletions(-) diff --git a/package-lock.json b/package-lock.json index c88be9336..6b7dc899a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -25,7 +25,7 @@ "@types/node": "^20.11.16", "@types/react": "^18.2.55", "@types/uuid": "^10.0.0", - "esbuild": "^0.24.0", + "esbuild": "^0.25.0", "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-alias": "^1.1.2", @@ -2445,9 +2445,9 @@ } }, "node_modules/@esbuild/aix-ppc64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.24.2.tgz", - "integrity": "sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.25.2.tgz", + "integrity": "sha512-wCIboOL2yXZym2cgm6mlA742s9QeJ8DjGVaL39dLN4rRwrOgOyYSnOaFPhKZGLb2ngj4EyfAFjsNJwPXZvseag==", "cpu": [ "ppc64" ], @@ -2462,9 +2462,9 @@ } }, "node_modules/@esbuild/android-arm": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.24.2.tgz", - "integrity": "sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.25.2.tgz", + "integrity": "sha512-NQhH7jFstVY5x8CKbcfa166GoV0EFkaPkCKBQkdPJFvo5u+nGXLEH/ooniLb3QI8Fk58YAx7nsPLozUWfCBOJA==", "cpu": [ "arm" ], @@ -2479,9 +2479,9 @@ } }, "node_modules/@esbuild/android-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.24.2.tgz", - "integrity": "sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.25.2.tgz", + "integrity": "sha512-5ZAX5xOmTligeBaeNEPnPaeEuah53Id2tX4c2CVP3JaROTH+j4fnfHCkr1PjXMd78hMst+TlkfKcW/DlTq0i4w==", "cpu": [ "arm64" ], @@ -2496,9 +2496,9 @@ } }, "node_modules/@esbuild/android-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.24.2.tgz", - "integrity": "sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.25.2.tgz", + "integrity": "sha512-Ffcx+nnma8Sge4jzddPHCZVRvIfQ0kMsUsCMcJRHkGJ1cDmhe4SsrYIjLUKn1xpHZybmOqCWwB0zQvsjdEHtkg==", "cpu": [ "x64" ], @@ -2513,9 +2513,9 @@ } }, "node_modules/@esbuild/darwin-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.24.2.tgz", - "integrity": "sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.25.2.tgz", + "integrity": "sha512-MpM6LUVTXAzOvN4KbjzU/q5smzryuoNjlriAIx+06RpecwCkL9JpenNzpKd2YMzLJFOdPqBpuub6eVRP5IgiSA==", "cpu": [ "arm64" ], @@ -2530,9 +2530,9 @@ } }, "node_modules/@esbuild/darwin-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.24.2.tgz", - "integrity": "sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.25.2.tgz", + "integrity": "sha512-5eRPrTX7wFyuWe8FqEFPG2cU0+butQQVNcT4sVipqjLYQjjh8a8+vUTfgBKM88ObB85ahsnTwF7PSIt6PG+QkA==", "cpu": [ "x64" ], @@ -2547,9 +2547,9 @@ } }, "node_modules/@esbuild/freebsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.24.2.tgz", - "integrity": "sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.25.2.tgz", + "integrity": "sha512-mLwm4vXKiQ2UTSX4+ImyiPdiHjiZhIaE9QvC7sw0tZ6HoNMjYAqQpGyui5VRIi5sGd+uWq940gdCbY3VLvsO1w==", "cpu": [ "arm64" ], @@ -2564,9 +2564,9 @@ } }, "node_modules/@esbuild/freebsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.24.2.tgz", - "integrity": "sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.25.2.tgz", + "integrity": "sha512-6qyyn6TjayJSwGpm8J9QYYGQcRgc90nmfdUb0O7pp1s4lTY+9D0H9O02v5JqGApUyiHOtkz6+1hZNvNtEhbwRQ==", "cpu": [ "x64" ], @@ -2581,9 +2581,9 @@ } }, "node_modules/@esbuild/linux-arm": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.24.2.tgz", - "integrity": "sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.25.2.tgz", + "integrity": "sha512-UHBRgJcmjJv5oeQF8EpTRZs/1knq6loLxTsjc3nxO9eXAPDLcWW55flrMVc97qFPbmZP31ta1AZVUKQzKTzb0g==", "cpu": [ "arm" ], @@ -2598,9 +2598,9 @@ } }, "node_modules/@esbuild/linux-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.24.2.tgz", - "integrity": "sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.25.2.tgz", + "integrity": "sha512-gq/sjLsOyMT19I8obBISvhoYiZIAaGF8JpeXu1u8yPv8BE5HlWYobmlsfijFIZ9hIVGYkbdFhEqC0NvM4kNO0g==", "cpu": [ "arm64" ], @@ -2615,9 +2615,9 @@ } }, "node_modules/@esbuild/linux-ia32": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.24.2.tgz", - "integrity": "sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.25.2.tgz", + "integrity": "sha512-bBYCv9obgW2cBP+2ZWfjYTU+f5cxRoGGQ5SeDbYdFCAZpYWrfjjfYwvUpP8MlKbP0nwZ5gyOU/0aUzZ5HWPuvQ==", "cpu": [ "ia32" ], @@ -2632,9 +2632,9 @@ } }, "node_modules/@esbuild/linux-loong64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.24.2.tgz", - "integrity": "sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.25.2.tgz", + "integrity": "sha512-SHNGiKtvnU2dBlM5D8CXRFdd+6etgZ9dXfaPCeJtz+37PIUlixvlIhI23L5khKXs3DIzAn9V8v+qb1TRKrgT5w==", "cpu": [ "loong64" ], @@ -2649,9 +2649,9 @@ } }, "node_modules/@esbuild/linux-mips64el": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.24.2.tgz", - "integrity": "sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.25.2.tgz", + "integrity": "sha512-hDDRlzE6rPeoj+5fsADqdUZl1OzqDYow4TB4Y/3PlKBD0ph1e6uPHzIQcv2Z65u2K0kpeByIyAjCmjn1hJgG0Q==", "cpu": [ "mips64el" ], @@ -2666,9 +2666,9 @@ } }, "node_modules/@esbuild/linux-ppc64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.24.2.tgz", - "integrity": "sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.25.2.tgz", + "integrity": "sha512-tsHu2RRSWzipmUi9UBDEzc0nLc4HtpZEI5Ba+Omms5456x5WaNuiG3u7xh5AO6sipnJ9r4cRWQB2tUjPyIkc6g==", "cpu": [ "ppc64" ], @@ -2683,9 +2683,9 @@ } }, "node_modules/@esbuild/linux-riscv64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.24.2.tgz", - "integrity": "sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.25.2.tgz", + "integrity": "sha512-k4LtpgV7NJQOml/10uPU0s4SAXGnowi5qBSjaLWMojNCUICNu7TshqHLAEbkBdAszL5TabfvQ48kK84hyFzjnw==", "cpu": [ "riscv64" ], @@ -2700,9 +2700,9 @@ } }, "node_modules/@esbuild/linux-s390x": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.24.2.tgz", - "integrity": "sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.25.2.tgz", + "integrity": "sha512-GRa4IshOdvKY7M/rDpRR3gkiTNp34M0eLTaC1a08gNrh4u488aPhuZOCpkF6+2wl3zAN7L7XIpOFBhnaE3/Q8Q==", "cpu": [ "s390x" ], @@ -2717,9 +2717,9 @@ } }, "node_modules/@esbuild/linux-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.24.2.tgz", - "integrity": "sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.25.2.tgz", + "integrity": "sha512-QInHERlqpTTZ4FRB0fROQWXcYRD64lAoiegezDunLpalZMjcUcld3YzZmVJ2H/Cp0wJRZ8Xtjtj0cEHhYc/uUg==", "cpu": [ "x64" ], @@ -2734,9 +2734,9 @@ } }, "node_modules/@esbuild/netbsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.24.2.tgz", - "integrity": "sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.25.2.tgz", + "integrity": "sha512-talAIBoY5M8vHc6EeI2WW9d/CkiO9MQJ0IOWX8hrLhxGbro/vBXJvaQXefW2cP0z0nQVTdQ/eNyGFV1GSKrxfw==", "cpu": [ "arm64" ], @@ -2751,9 +2751,9 @@ } }, "node_modules/@esbuild/netbsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.24.2.tgz", - "integrity": "sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.25.2.tgz", + "integrity": "sha512-voZT9Z+tpOxrvfKFyfDYPc4DO4rk06qamv1a/fkuzHpiVBMOhpjK+vBmWM8J1eiB3OLSMFYNaOaBNLXGChf5tg==", "cpu": [ "x64" ], @@ -2768,9 +2768,9 @@ } }, "node_modules/@esbuild/openbsd-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.24.2.tgz", - "integrity": "sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.25.2.tgz", + "integrity": "sha512-dcXYOC6NXOqcykeDlwId9kB6OkPUxOEqU+rkrYVqJbK2hagWOMrsTGsMr8+rW02M+d5Op5NNlgMmjzecaRf7Tg==", "cpu": [ "arm64" ], @@ -2785,9 +2785,9 @@ } }, "node_modules/@esbuild/openbsd-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.24.2.tgz", - "integrity": "sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.25.2.tgz", + "integrity": "sha512-t/TkWwahkH0Tsgoq1Ju7QfgGhArkGLkF1uYz8nQS/PPFlXbP5YgRpqQR3ARRiC2iXoLTWFxc6DJMSK10dVXluw==", "cpu": [ "x64" ], @@ -2802,9 +2802,9 @@ } }, "node_modules/@esbuild/sunos-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.24.2.tgz", - "integrity": "sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.25.2.tgz", + "integrity": "sha512-cfZH1co2+imVdWCjd+D1gf9NjkchVhhdpgb1q5y6Hcv9TP6Zi9ZG/beI3ig8TvwT9lH9dlxLq5MQBBgwuj4xvA==", "cpu": [ "x64" ], @@ -2819,9 +2819,9 @@ } }, "node_modules/@esbuild/win32-arm64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.24.2.tgz", - "integrity": "sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.25.2.tgz", + "integrity": "sha512-7Loyjh+D/Nx/sOTzV8vfbB3GJuHdOQyrOryFdZvPHLf42Tk9ivBU5Aedi7iyX+x6rbn2Mh68T4qq1SDqJBQO5Q==", "cpu": [ "arm64" ], @@ -2836,9 +2836,9 @@ } }, "node_modules/@esbuild/win32-ia32": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.24.2.tgz", - "integrity": "sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.25.2.tgz", + "integrity": "sha512-WRJgsz9un0nqZJ4MfhabxaD9Ft8KioqU3JMinOTvobbX6MOSUigSBlogP8QB3uxpJDsFS6yN+3FDBdqE5lg9kg==", "cpu": [ "ia32" ], @@ -2853,9 +2853,9 @@ } }, "node_modules/@esbuild/win32-x64": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.24.2.tgz", - "integrity": "sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.25.2.tgz", + "integrity": "sha512-kM3HKb16VIXZyIeVrM1ygYmZBKybX8N4p754bw390wGO3Tf2j4L2/WYL+4suWujpgf6GBYs3jv7TyUivdd05JA==", "cpu": [ "x64" ], @@ -9281,9 +9281,9 @@ } }, "node_modules/esbuild": { - "version": "0.24.2", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.24.2.tgz", - "integrity": "sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==", + "version": "0.25.2", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.25.2.tgz", + "integrity": "sha512-16854zccKPnC+toMywC+uKNeYSv+/eXkevRAfwRD/G9Cleq66m8XFIrigkbvauLLlCfDL45Q2cWegSg53gGBnQ==", "dev": true, "hasInstallScript": true, "license": "MIT", @@ -9294,31 +9294,31 @@ "node": ">=18" }, "optionalDependencies": { - "@esbuild/aix-ppc64": "0.24.2", - "@esbuild/android-arm": "0.24.2", - "@esbuild/android-arm64": "0.24.2", - "@esbuild/android-x64": "0.24.2", - "@esbuild/darwin-arm64": "0.24.2", - "@esbuild/darwin-x64": "0.24.2", - "@esbuild/freebsd-arm64": "0.24.2", - "@esbuild/freebsd-x64": "0.24.2", - "@esbuild/linux-arm": "0.24.2", - "@esbuild/linux-arm64": "0.24.2", - "@esbuild/linux-ia32": "0.24.2", - "@esbuild/linux-loong64": "0.24.2", - "@esbuild/linux-mips64el": "0.24.2", - "@esbuild/linux-ppc64": "0.24.2", - "@esbuild/linux-riscv64": "0.24.2", - "@esbuild/linux-s390x": "0.24.2", - "@esbuild/linux-x64": "0.24.2", - "@esbuild/netbsd-arm64": "0.24.2", - "@esbuild/netbsd-x64": "0.24.2", - "@esbuild/openbsd-arm64": "0.24.2", - "@esbuild/openbsd-x64": "0.24.2", - "@esbuild/sunos-x64": "0.24.2", - "@esbuild/win32-arm64": "0.24.2", - "@esbuild/win32-ia32": "0.24.2", - "@esbuild/win32-x64": "0.24.2" + "@esbuild/aix-ppc64": "0.25.2", + "@esbuild/android-arm": "0.25.2", + "@esbuild/android-arm64": "0.25.2", + "@esbuild/android-x64": "0.25.2", + "@esbuild/darwin-arm64": "0.25.2", + "@esbuild/darwin-x64": "0.25.2", + "@esbuild/freebsd-arm64": "0.25.2", + "@esbuild/freebsd-x64": "0.25.2", + "@esbuild/linux-arm": "0.25.2", + "@esbuild/linux-arm64": "0.25.2", + "@esbuild/linux-ia32": "0.25.2", + "@esbuild/linux-loong64": "0.25.2", + "@esbuild/linux-mips64el": "0.25.2", + "@esbuild/linux-ppc64": "0.25.2", + "@esbuild/linux-riscv64": "0.25.2", + "@esbuild/linux-s390x": "0.25.2", + "@esbuild/linux-x64": "0.25.2", + "@esbuild/netbsd-arm64": "0.25.2", + "@esbuild/netbsd-x64": "0.25.2", + "@esbuild/openbsd-arm64": "0.25.2", + "@esbuild/openbsd-x64": "0.25.2", + "@esbuild/sunos-x64": "0.25.2", + "@esbuild/win32-arm64": "0.25.2", + "@esbuild/win32-ia32": "0.25.2", + "@esbuild/win32-x64": "0.25.2" } }, "node_modules/esbuild-wasm": { diff --git a/package.json b/package.json index 9456a0fb4..3104c1b41 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "@types/node": "^20.11.16", "@types/react": "^18.2.55", "@types/uuid": "^10.0.0", - "esbuild": "^0.24.0", + "esbuild": "^0.25.0", "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", "eslint-import-resolver-alias": "^1.1.2", From 24f1b230bf1d57971a336ac21b9ee46e8baf0cab Mon Sep 17 00:00:00 2001 From: Lukas Reining Date: Fri, 11 Apr 2025 13:56:24 +0200 Subject: [PATCH 21/26] feat(angular): add docs for setting evaluation context in angular (#1170) Adds docs for setting evaluation context in angular Signed-off-by: Lukas Reining --- .../angular/projects/angular-sdk/README.md | 92 +++++++++++++++---- 1 file changed, 75 insertions(+), 17 deletions(-) diff --git a/packages/angular/projects/angular-sdk/README.md b/packages/angular/projects/angular-sdk/README.md index dd37e86ee..5df5ab617 100644 --- a/packages/angular/projects/angular-sdk/README.md +++ b/packages/angular/projects/angular-sdk/README.md @@ -44,21 +44,22 @@ In addition to the features provided by the [web sdk](https://openfeature.dev/do - [Overview](#overview) - [Quick start](#quick-start) - - [Requirements](#requirements) - - [Install](#install) - - [npm](#npm) - - [yarn](#yarn) - - [Required peer dependencies](#required-peer-dependencies) - - [Usage](#usage) - - [Module](#module) - - [Minimal Example](#minimal-example) - - [How to use](#how-to-use) - - [Boolean Feature Flag](#boolean-feature-flag) - - [Number Feature Flag](#number-feature-flag) - - [String Feature Flag](#string-feature-flag) - - [Object Feature Flag](#object-feature-flag) - - [Opting-out of automatic re-rendering](#opting-out-of-automatic-re-rendering) - - [Consuming the evaluation details](#consuming-the-evaluation-details) + - [Requirements](#requirements) + - [Install](#install) + - [npm](#npm) + - [yarn](#yarn) + - [Required peer dependencies](#required-peer-dependencies) + - [Usage](#usage) + - [Module](#module) + - [Minimal Example](#minimal-example) + - [How to use](#how-to-use) + - [Boolean Feature Flag](#boolean-feature-flag) + - [Number Feature Flag](#number-feature-flag) + - [String Feature Flag](#string-feature-flag) + - [Object Feature Flag](#object-feature-flag) + - [Opting-out of automatic re-rendering](#opting-out-of-automatic-re-rendering) + - [Consuming the evaluation details](#consuming-the-evaluation-details) + - [Setting Evaluation Context](#setting-evaluation-context) - [FAQ and troubleshooting](#faq-and-troubleshooting) - [Resources](#resources) @@ -156,7 +157,7 @@ This parameter is optional, if omitted, the `thenTemplate` will always be render The `domain` parameter is _optional_ and will be used as domain when getting the OpenFeature provider. The `updateOnConfigurationChanged` and `updateOnContextChanged` parameter are _optional_ and used to disable the -automatic re-rendering on flag value or context change. They are set to `true` by default. +automatic re-rendering on flag value or contex change. They are set to `true` by default. The template referenced in `else` will be rendered if the evaluated feature flag is `false` for the `booleanFeatureFlag` directive and if the `value` does not match evaluated flag value for all other directives. @@ -281,6 +282,63 @@ This can be used to just render the flag value or details without conditional re ``` +##### Setting evaluation context + +To set the initial evaluation context, you can add the `context` parameter to the `OpenFeatureModule` configuration. +This context can be either an object or a factory function that returns an `EvaluationContext`. + +> [!TIP] +> Updating the context can be done directly via the global OpenFeature API using `OpenFeature.setContext()` + +Here’s how you can define and use the initial client evaluation context: + +###### Using a static object + +```typescript +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { OpenFeatureModule } from '@openfeature/angular-sdk'; + +const initialContext = { + user: { + id: 'user123', + role: 'admin', + } +}; + +@NgModule({ + imports: [ + CommonModule, + OpenFeatureModule.forRoot({ + provider: yourFeatureProvider, + context: initialContext + }) + ], +}) +export class AppModule {} +``` + +###### Using a factory function + +```typescript +import { NgModule } from '@angular/core'; +import { CommonModule } from '@angular/common'; +import { OpenFeatureModule, EvaluationContext } from '@openfeature/angular-sdk'; + +const contextFactory = (): EvaluationContext => loadContextFromLocalStorage(); + +@NgModule({ + imports: [ + CommonModule, + OpenFeatureModule.forRoot({ + provider: yourFeatureProvider, + context: contextFactory + }) + ], +}) +export class AppModule {} +``` + ## FAQ and troubleshooting > I can import things form the `@openfeature/angular-sdk`, `@openfeature/web-sdk`, and `@openfeature/core`; which should I use? @@ -291,4 +349,4 @@ Avoid importing anything from `@openfeature/web-sdk` or `@openfeature/core`. ## Resources - - [Example repo](https://github.com/open-feature/angular-test-app) +- [Example repo](https://github.com/open-feature/angular-test-app) From 191433e705db50af9621d31e693e1ab2ab656bfe Mon Sep 17 00:00:00 2001 From: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Date: Fri, 11 Apr 2025 08:04:30 -0400 Subject: [PATCH 22/26] chore(main): release angular-sdk 0.0.12 (#1171) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release *beep* *boop* --- ## [0.0.12](https://github.com/open-feature/js-sdk/compare/angular-sdk-v0.0.11...angular-sdk-v0.0.12) (2025-04-11) ### ✨ New Features * **angular:** add docs for setting evaluation context in angular ([#1170](https://github.com/open-feature/js-sdk/issues/1170)) ([24f1b23](https://github.com/open-feature/js-sdk/commit/24f1b230bf1d57971a336ac21b9ee46e8baf0cab)) ### Dependencies * The following workspace dependencies were updated * devDependencies * @openfeature/web-sdk bumped from * to 1.5.0 --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: Lukas Reining Co-authored-by: Lukas Reining --- .release-please-manifest.json | 2 +- packages/angular/projects/angular-sdk/CHANGELOG.md | 8 ++++++++ packages/angular/projects/angular-sdk/README.md | 4 ++-- packages/angular/projects/angular-sdk/package.json | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d36a43710..4fb5e25df 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -5,5 +5,5 @@ "packages/web": "1.4.1", "packages/server": "1.17.1", "packages/shared": "1.8.0", - "packages/angular/projects/angular-sdk": "0.0.11" + "packages/angular/projects/angular-sdk": "0.0.12" } diff --git a/packages/angular/projects/angular-sdk/CHANGELOG.md b/packages/angular/projects/angular-sdk/CHANGELOG.md index d5abfad0e..dccda7489 100644 --- a/packages/angular/projects/angular-sdk/CHANGELOG.md +++ b/packages/angular/projects/angular-sdk/CHANGELOG.md @@ -1,6 +1,14 @@ # Changelog +## [0.0.12](https://github.com/open-feature/js-sdk/compare/angular-sdk-v0.0.11...angular-sdk-v0.0.12) (2025-04-11) + + +### ✨ New Features + +* **angular:** add docs for setting evaluation context in angular ([#1170](https://github.com/open-feature/js-sdk/issues/1170)) ([24f1b23](https://github.com/open-feature/js-sdk/commit/24f1b230bf1d57971a336ac21b9ee46e8baf0cab)) + + ## [0.0.11](https://github.com/open-feature/js-sdk/compare/angular-sdk-v0.0.10...angular-sdk-v0.0.11) (2025-04-11) diff --git a/packages/angular/projects/angular-sdk/README.md b/packages/angular/projects/angular-sdk/README.md index 5df5ab617..a79b7efce 100644 --- a/packages/angular/projects/angular-sdk/README.md +++ b/packages/angular/projects/angular-sdk/README.md @@ -16,8 +16,8 @@ Specification - - Release + + Release
diff --git a/packages/angular/projects/angular-sdk/package.json b/packages/angular/projects/angular-sdk/package.json index cb7c54318..f874abe88 100644 --- a/packages/angular/projects/angular-sdk/package.json +++ b/packages/angular/projects/angular-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@openfeature/angular-sdk", - "version": "0.0.11", + "version": "0.0.12", "description": "OpenFeature Angular SDK", "repository": { "type": "git", From 7864bd704c2cef4d86bab8051ea60f1b5b17b2ed Mon Sep 17 00:00:00 2001 From: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Date: Fri, 11 Apr 2025 08:17:48 -0400 Subject: [PATCH 23/26] chore(main): release nestjs-sdk 0.2.3 (#1144) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release *beep* *boop* --- ## [0.2.3](https://github.com/open-feature/js-sdk/compare/nestjs-sdk-v0.2.2...nestjs-sdk-v0.2.3) (2025-04-11) ### 🧹 Chore * update sdk peer ([#1142](https://github.com/open-feature/js-sdk/issues/1142)) ([8bb6206](https://github.com/open-feature/js-sdk/commit/8bb620601e2b8dc7b62d717169b585bd1c886996)) ### Dependencies * The following workspace dependencies were updated * devDependencies * @openfeature/server-sdk bumped from * to 1.18.0 --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> --- .release-please-manifest.json | 2 +- packages/nest/CHANGELOG.md | 14 ++++++++++++++ packages/nest/README.md | 4 ++-- packages/nest/package.json | 4 ++-- 4 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4fb5e25df..d78bfd32a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,5 +1,5 @@ { - "packages/nest": "0.2.2", + "packages/nest": "0.2.3", "packages/react": "0.4.11", "packages/angular": "0.0.1-experimental", "packages/web": "1.4.1", diff --git a/packages/nest/CHANGELOG.md b/packages/nest/CHANGELOG.md index fba3e44e8..8ba7a7d54 100644 --- a/packages/nest/CHANGELOG.md +++ b/packages/nest/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## [0.2.3](https://github.com/open-feature/js-sdk/compare/nestjs-sdk-v0.2.2...nestjs-sdk-v0.2.3) (2025-04-11) + + +### 🧹 Chore + +* update sdk peer ([#1142](https://github.com/open-feature/js-sdk/issues/1142)) ([8bb6206](https://github.com/open-feature/js-sdk/commit/8bb620601e2b8dc7b62d717169b585bd1c886996)) + + +### Dependencies + +* The following workspace dependencies were updated + * devDependencies + * @openfeature/server-sdk bumped from * to 1.18.0 + ## [0.2.2](https://github.com/open-feature/js-sdk/compare/nestjs-sdk-v0.2.1-experimental...nestjs-sdk-v0.2.2) (2024-10-29) diff --git a/packages/nest/README.md b/packages/nest/README.md index 997444f0b..67a412da9 100644 --- a/packages/nest/README.md +++ b/packages/nest/README.md @@ -16,8 +16,8 @@ Specification - - Release + + Release
diff --git a/packages/nest/package.json b/packages/nest/package.json index 579191cf0..558996ef4 100644 --- a/packages/nest/package.json +++ b/packages/nest/package.json @@ -1,6 +1,6 @@ { "name": "@openfeature/nestjs-sdk", - "version": "0.2.2", + "version": "0.2.3", "description": "OpenFeature Nest.js SDK", "main": "./dist/cjs/index.js", "files": [ @@ -57,7 +57,7 @@ "@nestjs/platform-express": "^10.3.6", "@nestjs/testing": "^10.3.6", "@openfeature/core": "*", - "@openfeature/server-sdk": "*", + "@openfeature/server-sdk": "1.18.0", "@types/supertest": "^6.0.0", "supertest": "^7.0.0" } From aff60f6776043bee3360053bbc76af5d95e907ae Mon Sep 17 00:00:00 2001 From: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Date: Fri, 11 Apr 2025 08:30:17 -0400 Subject: [PATCH 24/26] chore(main): release server-sdk 1.18.0 (#1153) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release *beep* *boop* --- ## [1.18.0](https://github.com/open-feature/js-sdk/compare/server-sdk-v1.17.1...server-sdk-v1.18.0) (2025-04-11) ### ✨ New Features * add a top-level method for accessing providers ([#1152](https://github.com/open-feature/js-sdk/issues/1152)) ([ae8fce8](https://github.com/open-feature/js-sdk/commit/ae8fce87530005ed20f7e68dc696ce67053fca31)) * add support for abort controllers to event handlers ([#1151](https://github.com/open-feature/js-sdk/issues/1151)) ([6a22483](https://github.com/open-feature/js-sdk/commit/6a224830fa4e62fc30a7802536f6f6fc3f772038)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Co-authored-by: Lukas Reining --- .release-please-manifest.json | 2 +- packages/server/CHANGELOG.md | 8 ++++++++ packages/server/README.md | 4 ++-- packages/server/package.json | 2 +- 4 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d78bfd32a..1d9c72f41 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -3,7 +3,7 @@ "packages/react": "0.4.11", "packages/angular": "0.0.1-experimental", "packages/web": "1.4.1", - "packages/server": "1.17.1", + "packages/server": "1.18.0", "packages/shared": "1.8.0", "packages/angular/projects/angular-sdk": "0.0.12" } diff --git a/packages/server/CHANGELOG.md b/packages/server/CHANGELOG.md index 1142bfecd..dc3ba8755 100644 --- a/packages/server/CHANGELOG.md +++ b/packages/server/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.18.0](https://github.com/open-feature/js-sdk/compare/server-sdk-v1.17.1...server-sdk-v1.18.0) (2025-04-11) + + +### ✨ New Features + +* add a top-level method for accessing providers ([#1152](https://github.com/open-feature/js-sdk/issues/1152)) ([ae8fce8](https://github.com/open-feature/js-sdk/commit/ae8fce87530005ed20f7e68dc696ce67053fca31)) +* add support for abort controllers to event handlers ([#1151](https://github.com/open-feature/js-sdk/issues/1151)) ([6a22483](https://github.com/open-feature/js-sdk/commit/6a224830fa4e62fc30a7802536f6f6fc3f772038)) + ## [1.17.1](https://github.com/open-feature/js-sdk/compare/server-sdk-v1.17.0...server-sdk-v1.17.1) (2025-02-07) diff --git a/packages/server/README.md b/packages/server/README.md index 9069395c7..748e2de9c 100644 --- a/packages/server/README.md +++ b/packages/server/README.md @@ -16,8 +16,8 @@ Specification - - Release + + Release
diff --git a/packages/server/package.json b/packages/server/package.json index 0655c7667..8e039cfdc 100644 --- a/packages/server/package.json +++ b/packages/server/package.json @@ -1,6 +1,6 @@ { "name": "@openfeature/server-sdk", - "version": "1.17.1", + "version": "1.18.0", "description": "OpenFeature SDK for JavaScript", "main": "./dist/cjs/index.js", "files": [ From 37bcf3cf481736ba171bcfc83c0fbb5d0db66c85 Mon Sep 17 00:00:00 2001 From: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Date: Mon, 14 Apr 2025 11:48:45 -0400 Subject: [PATCH 25/26] chore(main): release web-sdk 1.5.0 (#1156) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release *beep* *boop* --- ## [1.5.0](https://github.com/open-feature/js-sdk/compare/web-sdk-v1.4.1...web-sdk-v1.5.0) (2025-04-11) ### ✨ New Features * add a top-level method for accessing providers ([#1152](https://github.com/open-feature/js-sdk/issues/1152)) ([ae8fce8](https://github.com/open-feature/js-sdk/commit/ae8fce87530005ed20f7e68dc696ce67053fca31)) * add support for abort controllers to event handlers ([#1151](https://github.com/open-feature/js-sdk/issues/1151)) ([6a22483](https://github.com/open-feature/js-sdk/commit/6a224830fa4e62fc30a7802536f6f6fc3f772038)) ### πŸ› Bug Fixes * Typo in name of the function ([2c5b37c](https://github.com/open-feature/js-sdk/commit/2c5b37c79d72d60864c27b9e67d96e99ef4ae241)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: Todd Baert Co-authored-by: Lukas Reining Co-authored-by: Todd Baert --- .release-please-manifest.json | 2 +- packages/web/CHANGELOG.md | 13 +++++++++++++ packages/web/README.md | 4 ++-- packages/web/package.json | 6 +++--- 4 files changed, 19 insertions(+), 6 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1d9c72f41..16ccdfdb7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -2,7 +2,7 @@ "packages/nest": "0.2.3", "packages/react": "0.4.11", "packages/angular": "0.0.1-experimental", - "packages/web": "1.4.1", + "packages/web": "1.5.0", "packages/server": "1.18.0", "packages/shared": "1.8.0", "packages/angular/projects/angular-sdk": "0.0.12" diff --git a/packages/web/CHANGELOG.md b/packages/web/CHANGELOG.md index ba426c32f..760896a54 100644 --- a/packages/web/CHANGELOG.md +++ b/packages/web/CHANGELOG.md @@ -1,6 +1,19 @@ # Changelog +## [1.5.0](https://github.com/open-feature/js-sdk/compare/web-sdk-v1.4.1...web-sdk-v1.5.0) (2025-04-11) + + +### ✨ New Features + +* add a top-level method for accessing providers ([#1152](https://github.com/open-feature/js-sdk/issues/1152)) ([ae8fce8](https://github.com/open-feature/js-sdk/commit/ae8fce87530005ed20f7e68dc696ce67053fca31)) +* add support for abort controllers to event handlers ([#1151](https://github.com/open-feature/js-sdk/issues/1151)) ([6a22483](https://github.com/open-feature/js-sdk/commit/6a224830fa4e62fc30a7802536f6f6fc3f772038)) + + +### πŸ› Bug Fixes + +* Typo in name of the function ([2c5b37c](https://github.com/open-feature/js-sdk/commit/2c5b37c79d72d60864c27b9e67d96e99ef4ae241)) + ## [1.4.1](https://github.com/open-feature/js-sdk/compare/web-sdk-v1.4.0...web-sdk-v1.4.1) (2025-02-07) diff --git a/packages/web/README.md b/packages/web/README.md index c862352c4..08c022fd7 100644 --- a/packages/web/README.md +++ b/packages/web/README.md @@ -16,8 +16,8 @@ Specification - - Release + + Release
diff --git a/packages/web/package.json b/packages/web/package.json index 39067d78a..2e071ef2b 100644 --- a/packages/web/package.json +++ b/packages/web/package.json @@ -1,6 +1,6 @@ { "name": "@openfeature/web-sdk", - "version": "1.4.1", + "version": "1.5.0", "description": "OpenFeature SDK for Web", "main": "./dist/cjs/index.js", "files": [ @@ -46,9 +46,9 @@ }, "homepage": "https://github.com/open-feature/js-sdk#readme", "peerDependencies": { - "@openfeature/core": "^1.7.0" + "@openfeature/core": "^1.8.0" }, "devDependencies": { - "@openfeature/core": "^1.7.0" + "@openfeature/core": "^1.8.0" } } From 07a3d857424f2a9867a0b2ecaf35c58e727ddb88 Mon Sep 17 00:00:00 2001 From: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Date: Mon, 14 Apr 2025 13:03:15 -0400 Subject: [PATCH 26/26] chore(main): release react-sdk 1.0.0 (#1154) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit :robot: I have created a release *beep* *boop* --- ## [1.0.0](https://github.com/open-feature/js-sdk/compare/react-sdk-v0.4.11...react-sdk-v1.0.0) (2025-04-14) ### ✨ New Features * add polyfill for react use hook ([#1157](https://github.com/open-feature/js-sdk/issues/1157)) ([5afe61f](https://github.com/open-feature/js-sdk/commit/5afe61f9e351b037b04c93a1d81aee8016756748)) * add support for abort controllers to event handlers ([#1151](https://github.com/open-feature/js-sdk/issues/1151)) ([6a22483](https://github.com/open-feature/js-sdk/commit/6a224830fa4e62fc30a7802536f6f6fc3f772038)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). --------- Signed-off-by: OpenFeature Bot <109696520+openfeaturebot@users.noreply.github.com> Signed-off-by: Todd Baert Co-authored-by: Todd Baert --- .release-please-manifest.json | 2 +- packages/react/CHANGELOG.md | 8 ++++++++ packages/react/README.md | 4 ++-- packages/react/package.json | 4 ++-- 4 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 16ccdfdb7..de672e1f3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,6 +1,6 @@ { "packages/nest": "0.2.3", - "packages/react": "0.4.11", + "packages/react": "1.0.0", "packages/angular": "0.0.1-experimental", "packages/web": "1.5.0", "packages/server": "1.18.0", diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md index 1b1d08299..9eebb994b 100644 --- a/packages/react/CHANGELOG.md +++ b/packages/react/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [1.0.0](https://github.com/open-feature/js-sdk/compare/react-sdk-v0.4.11...react-sdk-v1.0.0) (2025-04-14) + + +### ✨ New Features + +* add polyfill for react use hook ([#1157](https://github.com/open-feature/js-sdk/issues/1157)) ([5afe61f](https://github.com/open-feature/js-sdk/commit/5afe61f9e351b037b04c93a1d81aee8016756748)) +* add support for abort controllers to event handlers ([#1151](https://github.com/open-feature/js-sdk/issues/1151)) ([6a22483](https://github.com/open-feature/js-sdk/commit/6a224830fa4e62fc30a7802536f6f6fc3f772038)) + ## [0.4.11](https://github.com/open-feature/js-sdk/compare/react-sdk-v0.4.10...react-sdk-v0.4.11) (2025-02-07) diff --git a/packages/react/README.md b/packages/react/README.md index a6226f597..c5f326407 100644 --- a/packages/react/README.md +++ b/packages/react/README.md @@ -16,8 +16,8 @@ Specification - - Release + + Release
diff --git a/packages/react/package.json b/packages/react/package.json index e6f5cbb64..fa8380b91 100644 --- a/packages/react/package.json +++ b/packages/react/package.json @@ -1,6 +1,6 @@ { "name": "@openfeature/react-sdk", - "version": "0.4.11", + "version": "1.0.0", "description": "OpenFeature React SDK", "main": "./dist/cjs/index.js", "files": [ @@ -47,7 +47,7 @@ }, "homepage": "https://github.com/open-feature/js-sdk#readme", "peerDependencies": { - "@openfeature/web-sdk": "^1.4.1", + "@openfeature/web-sdk": "^1.5.0", "react": ">=16.8.0" }, "devDependencies": {