@launchdarkly/js-server-sdk-common
Advanced tools
Comparing version 2.4.5 to 2.5.0
@@ -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 @@ |
"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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
620749
8635
+ Added@launchdarkly/js-sdk-common@2.7.0(transitive)
- Removed@launchdarkly/js-sdk-common@2.6.0(transitive)