Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@launchdarkly/js-server-sdk-common

Package Overview
Dependencies
Maintainers
1
Versions
57
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@launchdarkly/js-server-sdk-common - npm Package Compare versions

Comparing version 2.4.5 to 2.5.0

14

CHANGELOG.md

@@ -11,2 +11,16 @@ # Changelog

## [2.5.0](https://github.com/launchdarkly/js-core/compare/js-server-sdk-common-v2.4.5...js-server-sdk-common-v2.5.0) (2024-08-28)
### Features
* Correct client evaluation typings. ([#554](https://github.com/launchdarkly/js-core/issues/554)) ([64ab88d](https://github.com/launchdarkly/js-core/commit/64ab88d278308564b4cd7b6433870c7adb09142a))
### Dependencies
* The following workspace dependencies were updated
* dependencies
* @launchdarkly/js-sdk-common bumped from 2.6.0 to 2.7.0
## [2.4.5](https://github.com/launchdarkly/js-core/compare/js-server-sdk-common-v2.4.4...js-server-sdk-common-v2.4.5) (2024-08-12)

@@ -13,0 +27,0 @@

15

dist/evaluation/EvalResult.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const js_sdk_common_1 = require("@launchdarkly/js-sdk-common");
const Reasons_1 = require("./Reasons");
const { createErrorEvaluationDetail, createSuccessEvaluationDetail } = js_sdk_common_1.internal;
/**

@@ -28,7 +26,14 @@ * A class which encapsulates the result of an evaluation. It allows for differentiating between

static forError(errorKind, message, def) {
return new EvalResult(true, createErrorEvaluationDetail(errorKind, def), message);
return new EvalResult(true, {
value: def !== null && def !== void 0 ? def : null,
variationIndex: null,
reason: { kind: 'ERROR', errorKind },
}, message);
}
static forSuccess(value, reason, variationIndex) {
const successDetail = createSuccessEvaluationDetail(value, variationIndex, reason);
return new EvalResult(false, successDetail);
return new EvalResult(false, {
value,
variationIndex: variationIndex === undefined ? null : variationIndex,
reason,
});
}

@@ -35,0 +40,0 @@ }

{
"name": "@launchdarkly/js-server-sdk-common",
"version": "2.4.5",
"version": "2.5.0",
"type": "commonjs",

@@ -30,3 +30,3 @@ "main": "./dist/index.js",

"dependencies": {
"@launchdarkly/js-sdk-common": "2.6.0",
"@launchdarkly/js-sdk-common": "2.7.0",
"semver": "7.5.4"

@@ -33,0 +33,0 @@ },

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc