Skip to content

Commit

Permalink
feat!: remove flag evaluation options from the provider interface (op…
Browse files Browse the repository at this point in the history
…en-feature#185)

Closes open-feature#183

Signed-off-by: Michael Beemer <[email protected]>
  • Loading branch information
beeme1mr authored Aug 25, 2022
1 parent ea36afb commit e9852e4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
12 changes: 4 additions & 8 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,7 @@ export interface Provider extends Pick<Partial<EvaluationLifeCycle>, 'hooks'> {
resolveBooleanEvaluation(
flagKey: string,
defaultValue: boolean,
context: EvaluationContext,
options: FlagEvaluationOptions | undefined
context: EvaluationContext
): Promise<ResolutionDetails<boolean>>;

/**
Expand All @@ -128,8 +127,7 @@ export interface Provider extends Pick<Partial<EvaluationLifeCycle>, 'hooks'> {
resolveStringEvaluation(
flagKey: string,
defaultValue: string,
context: EvaluationContext,
options: FlagEvaluationOptions | undefined
context: EvaluationContext
): Promise<ResolutionDetails<string>>;

/**
Expand All @@ -138,8 +136,7 @@ export interface Provider extends Pick<Partial<EvaluationLifeCycle>, 'hooks'> {
resolveNumberEvaluation(
flagKey: string,
defaultValue: number,
context: EvaluationContext,
options: FlagEvaluationOptions | undefined
context: EvaluationContext
): Promise<ResolutionDetails<number>>;

/**
Expand All @@ -148,8 +145,7 @@ export interface Provider extends Pick<Partial<EvaluationLifeCycle>, 'hooks'> {
resolveObjectEvaluation<U extends object>(
flagKey: string,
defaultValue: U,
context: EvaluationContext,
options: FlagEvaluationOptions | undefined
context: EvaluationContext
): Promise<ResolutionDetails<U>>;
}

Expand Down

0 comments on commit e9852e4

Please sign in to comment.