From e9852e4f52fd598cebb9d74f3c22abdb832ebac9 Mon Sep 17 00:00:00 2001 From: Michael Beemer Date: Thu, 25 Aug 2022 11:49:36 -0400 Subject: [PATCH] feat!: remove flag evaluation options from the provider interface (#185) Closes #183 Signed-off-by: Michael Beemer --- README.md | 3 ++- src/types.ts | 12 ++++-------- 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 10700f44e..64bac3323 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,11 @@ [![codecov](https://codecov.io/gh/open-feature/node-sdk/branch/main/graph/badge.svg?token=3DC5XOEHMY)](https://codecov.io/gh/open-feature/node-sdk) [![npm version](https://badge.fury.io/js/@openfeature%2Fnodejs-sdk.svg)](https://badge.fury.io/js/@openfeature%2Fnodejs-sdk) [![Known Vulnerabilities](https://snyk.io/test/github/open-feature/node-sdk/badge.svg)](https://snyk.io/test/github/open-feature/node-sdk) +[![Specification](https://img.shields.io/static/v1?label=Specification&message=v0.4.0&color=yellow)](https://github.com/open-feature/spec/tree/v0.4.0) This is the NodeJS implementation of [OpenFeature](https://openfeature.dev), a vendor-agnostic abstraction library for evaluating feature flags. -We support multiple data types for flags (numbers, strings, booleans, objects) as well as hooks, which can alter the lifecycle of a flag evaluation. +We support multiple data types for flags (numbers, strings, booleans, objects) as well as hooks, which can alter the lifecycle of a flag evaluation. This library is intended to be used in server-side contexts and has not been evaluated for use in mobile devices. diff --git a/src/types.ts b/src/types.ts index 48459e3f8..a370df934 100644 --- a/src/types.ts +++ b/src/types.ts @@ -118,8 +118,7 @@ export interface Provider extends Pick, 'hooks'> { resolveBooleanEvaluation( flagKey: string, defaultValue: boolean, - context: EvaluationContext, - options: FlagEvaluationOptions | undefined + context: EvaluationContext ): Promise>; /** @@ -128,8 +127,7 @@ export interface Provider extends Pick, 'hooks'> { resolveStringEvaluation( flagKey: string, defaultValue: string, - context: EvaluationContext, - options: FlagEvaluationOptions | undefined + context: EvaluationContext ): Promise>; /** @@ -138,8 +136,7 @@ export interface Provider extends Pick, 'hooks'> { resolveNumberEvaluation( flagKey: string, defaultValue: number, - context: EvaluationContext, - options: FlagEvaluationOptions | undefined + context: EvaluationContext ): Promise>; /** @@ -148,8 +145,7 @@ export interface Provider extends Pick, 'hooks'> { resolveObjectEvaluation( flagKey: string, defaultValue: U, - context: EvaluationContext, - options: FlagEvaluationOptions | undefined + context: EvaluationContext ): Promise>; }