Socket
Socket
Sign inDemoInstall

@launchdarkly/js-server-sdk-common

Package Overview
Dependencies
Maintainers
1
Versions
52
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.5.0 to 2.6.0

14

CHANGELOG.md

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

## [2.6.0](https://github.com/launchdarkly/js-core/compare/js-server-sdk-common-v2.5.0...js-server-sdk-common-v2.6.0) (2024-09-03)
### Features
* Add support for Payload Filtering ([#551](https://github.com/launchdarkly/js-core/issues/551)) ([6f44383](https://github.com/launchdarkly/js-core/commit/6f4438323baed802d8f951ac82494e6cfa9932c5))
### Dependencies
* The following workspace dependencies were updated
* dependencies
* @launchdarkly/js-sdk-common bumped from 2.7.0 to 2.8.0
## [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)

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

@@ -233,2 +233,17 @@ import { LDClientContext, LDLogger, subsystem, VoidFunction } from '@launchdarkly/js-sdk-common';

versionName?: string;
/**
* LaunchDarkly Server SDKs historically downloaded all flag configuration and segments for a particular environment
* during initialization.
*
* For some customers, this is an unacceptably large amount of data, and has contributed to performance issues
* within their products.
*
* Filtered environments aim to solve this problem. By allowing customers to specify subsets of an environment's
* flags using a filter key, SDKs will initialize faster and use less memory.
*
* This payload filter key only applies to the default streaming and polling data sources. It will not affect
* TestData or FileData data sources, nor will it be applied to any data source provided through the featureStore
* config property.
*/
payloadFilterKey?: string;
};

@@ -235,0 +250,0 @@ /**

2

dist/data_sources/Requestor.js

@@ -12,3 +12,3 @@ "use strict";

this.headers = (0, js_sdk_common_1.defaultHeaders)(sdkKey, info, config.tags);
this.uri = `${config.serviceEndpoints.polling}/sdk/latest-all`;
this.uri = (0, js_sdk_common_1.getPollingUri)(config.serviceEndpoints, '/sdk/latest-all', []);
}

@@ -15,0 +15,0 @@ /**

@@ -97,3 +97,3 @@ "use strict";

const makeDefaultProcessor = () => config.stream
? new js_sdk_common_1.internal.StreamingProcessor(sdkKey, clientContext, '/all', listeners, this.diagnosticsManager, (e) => this.dataSourceErrorHandler(e), this.config.streamInitialReconnectDelay)
? new js_sdk_common_1.internal.StreamingProcessor(sdkKey, clientContext, '/all', [], listeners, this.diagnosticsManager, (e) => this.dataSourceErrorHandler(e), this.config.streamInitialReconnectDelay)
: new PollingProcessor_1.default(config, new Requestor_1.default(sdkKey, config, this.platform.info, this.platform.requests), dataSourceUpdates, () => this.initSuccess(), (e) => this.dataSourceErrorHandler(e));

@@ -100,0 +100,0 @@ if (!(config.offline || config.useLdd)) {

@@ -42,2 +42,3 @@ "use strict";

application: js_sdk_common_1.TypeValidators.Object,
payloadFilterKey: js_sdk_common_1.TypeValidators.stringMatchingRegex(/^[a-zA-Z0-9](\w|\.|-)*$/),
hooks: js_sdk_common_1.TypeValidators.createTypeArray('Hook[]', {}),

@@ -145,3 +146,3 @@ };

validateEndpoints(options, validatedOptions);
this.serviceEndpoints = new js_sdk_common_1.ServiceEndpoints(validatedOptions.streamUri, validatedOptions.baseUri, validatedOptions.eventsUri, internalOptions.analyticsEventPath, internalOptions.diagnosticEventPath, internalOptions.includeAuthorizationHeader);
this.serviceEndpoints = new js_sdk_common_1.ServiceEndpoints(validatedOptions.streamUri, validatedOptions.baseUri, validatedOptions.eventsUri, internalOptions.analyticsEventPath, internalOptions.diagnosticEventPath, internalOptions.includeAuthorizationHeader, validatedOptions.payloadFilterKey);
this.eventsCapacity = validatedOptions.capacity;

@@ -165,2 +166,3 @@ this.timeout = validatedOptions.timeout;

this.wrapperName = validatedOptions.wrapperName;
this.payloadFilterKey = validatedOptions.payloadFilterKey;
this.wrapperVersion = validatedOptions.wrapperVersion;

@@ -167,0 +169,0 @@ this.tags = new js_sdk_common_1.ApplicationTags(validatedOptions);

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

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

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

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

@@ -15,3 +15,3 @@ # LaunchDarkly SDK JavaScript Common Server Code

LaunchDarkly uses the [SLSA framework](https://slsa.dev/spec/v1.0/about) (Supply-chain Levels for Software Artifacts) to help developers make their supply chain more secure by ensuring the authenticity and build integrity of our published SDK packages. To learn more, see the [provenance guide](PROVENANCE.md).
LaunchDarkly uses the [SLSA framework](https://slsa.dev/spec/v1.0/about) (Supply-chain Levels for Software Artifacts) to help developers make their supply chain more secure by ensuring the authenticity and build integrity of our published SDK packages. To learn more, see the [provenance guide](PROVENANCE.md).

@@ -24,3 +24,3 @@ ## About LaunchDarkly

- Turn off a feature that you realize is causing performance problems in production, without needing to re-deploy, or even restart the application with a changed configuration file.
- Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan).
- Grant access to certain features based on user attributes, like payment plan (eg: users on the ‘gold’ plan get access to more features than users in the ‘silver’ plan).
- Disable parts of your application to facilitate maintenance, without taking everything offline.

@@ -27,0 +27,0 @@ - LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out [our documentation](https://docs.launchdarkly.com/sdk) for a complete list.

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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