Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit a5b7885

Browse files
authored
version 1.1.5 - update package names (#8)
* version 1.1.5 - update package names * rm duplicate text * update minimum SDK version
1 parent 47775d0 commit a5b7885

File tree

9 files changed

+71
-61
lines changed

9 files changed

+71
-61
lines changed

.babelrc

Lines changed: 0 additions & 16 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
All notable changes to the LaunchDarkly Node.js SDK DynamoDB integration will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org).
44

5+
## [1.1.5] - 2019-05-14
6+
### Changed:
7+
- Corresponding to the SDK package name change from `ldclient-node` to `launchdarkly-node-server-sdk`, this package is now called `launchdarkly-node-server-sdk-dynamodb`. The functionality of the package, including the namespaces and class names, has not changed.
8+
59
## [1.1.4] - 2019-01-25
610
### Fixed:
711
- Fixed a bug that could cause a database error when overwriting the entire data set with new data, if there is a key prefix.

README.md

Lines changed: 14 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,26 @@
1-
LaunchDarkly SDK for Node.js - DynamoDB integration
2-
===================================================
1+
# LaunchDarkly Server-Side SDK for Node.js - DynamoDB integration
2+
33
[![CircleCI](https://circleci.com/gh/launchdarkly/node-server-sdk-dynamodb.svg?style=svg)](https://circleci.com/gh/launchdarkly/node-server-sdk-dynamodb)
44

5-
This library provides a DynamoDB-backed persistence mechanism (feature store) for the [LaunchDarkly Node.js SDK](https://github.com/launchdarkly/node-client), replacing the default in-memory feature store. It uses the AWS SDK for Node.js.
5+
This library provides a DynamoDB-backed persistence mechanism (feature store) for the [LaunchDarkly Node.js SDK](https://github.com/launchdarkly/node-server-sdk), replacing the default in-memory feature store. It uses the AWS SDK for Node.js.
66

7-
The minimum version of the LaunchDarkly Node.js SDK for use with this library is 5.7.0.
7+
The minimum version of the LaunchDarkly Node.js SDK for use with this library is 5.8.1.
88

99
For more information, see also: [Using a persistent feature store](https://docs.launchdarkly.com/v2.0/docs/using-a-persistent-feature-store).
1010

11-
Quick setup
12-
-----------
11+
## Quick setup
1312

1413
This assumes that you have already installed the LaunchDarkly Node.js SDK.
1514

1615
1. In DynamoDB, create a table which has the following schema: a partition key called "namespace" and a sort key called "key", both with a string type. The LaunchDarkly library does not create the table automatically, because it has no way of knowing what additional properties (such as permissions and throughput) you would want it to have.
1716

1817
2. Install this package with `npm`:
1918

20-
npm install ldclient-node-dynamodb-store --save
19+
npm install launchdarkly-node-server-sdk-dynamodb --save
2120

2221
3. Require the package:
2322

24-
var DynamoDBFeatureStore = require('ldclient-node-dynamodb-store');
23+
var DynamoDBFeatureStore = require('launchdarkly-node-server-sdk-dynamodb');
2524

2625
4. When configuring your SDK client, add the DynamoDB feature store:
2726

@@ -47,36 +46,23 @@ This assumes that you have already installed the LaunchDarkly Node.js SDK.
4746

4847
var store = DynamoDBFeatureStore('YOUR TABLE NAME', { prefix: 'env1' });
4948

50-
Caching behavior
51-
----------------
49+
## Caching behavior
5250

5351
To reduce traffic to DynamoDB, there is an optional in-memory cache that retains the last known data for a configurable amount of time. This is on by default; to turn it off (and guarantee that the latest feature flag data will always be retrieved from DynamoDB for every flag evaluation), configure the store as follows:
5452

5553
var store = DynamoDBFeatureStore('YOUR TABLE NAME', { cacheTTL: 0 });
5654

57-
About LaunchDarkly
58-
------------------
55+
## About LaunchDarkly
5956

6057
* LaunchDarkly is a continuous delivery platform that provides feature flags as a service and allows developers to iterate quickly and safely. We allow you to easily flag your features and manage them from the LaunchDarkly dashboard. With LaunchDarkly, you can:
6158
* Roll out a new feature to a subset of your users (like a group of users who opt-in to a beta tester group), gathering feedback and bug reports from real-world use cases.
6259
* Gradually roll out a feature to an increasing percentage of users, and track the effect that the feature has on key metrics (for instance, how likely is a user to complete a purchase if they have feature A versus feature B?).
6360
* 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.
6461
* 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.
65-
* LaunchDarkly provides feature flag SDKs for
66-
* [Java](http://docs.launchdarkly.com/docs/java-sdk-reference "Java SDK")
67-
* [JavaScript](http://docs.launchdarkly.com/docs/js-sdk-reference "LaunchDarkly JavaScript SDK")
68-
* [PHP](http://docs.launchdarkly.com/docs/php-sdk-reference "LaunchDarkly PHP SDK")
69-
* [Python](http://docs.launchdarkly.com/docs/python-sdk-reference "LaunchDarkly Python SDK")
70-
* [Go](http://docs.launchdarkly.com/docs/go-sdk-reference "LaunchDarkly Go SDK")
71-
* [Node.JS](http://docs.launchdarkly.com/docs/node-sdk-reference "LaunchDarkly Node SDK")
72-
* [Electron](http://docs.launchdarkly.com/docs/electron-sdk-reference "LaunchDarkly Electron SDK")
73-
* [.NET](http://docs.launchdarkly.com/docs/dotnet-sdk-reference "LaunchDarkly .Net SDK")
74-
* [Ruby](http://docs.launchdarkly.com/docs/ruby-sdk-reference "LaunchDarkly Ruby SDK")
75-
* [iOS](http://docs.launchdarkly.com/docs/ios-sdk-reference "LaunchDarkly iOS SDK")
76-
* [Android](http://docs.launchdarkly.com/docs/android-sdk-reference "LaunchDarkly Android SDK")
62+
* LaunchDarkly provides feature flag SDKs for a wide variety of languages and technologies. Check out [our documentation](https://docs.launchdarkly.com/docs) for a complete list.
7763
* Explore LaunchDarkly
78-
* [launchdarkly.com](http://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information
79-
* [docs.launchdarkly.com](http://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDKs
80-
* [apidocs.launchdarkly.com](http://apidocs.launchdarkly.com/ "LaunchDarkly API Documentation") for our API documentation
81-
* [blog.launchdarkly.com](http://blog.launchdarkly.com/ "LaunchDarkly Blog Documentation") for the latest product updates
64+
* [launchdarkly.com](https://www.launchdarkly.com/ "LaunchDarkly Main Website") for more information
65+
* [docs.launchdarkly.com](https://docs.launchdarkly.com/ "LaunchDarkly Documentation") for our documentation and SDK reference guides
66+
* [apidocs.launchdarkly.com](https://apidocs.launchdarkly.com/ "LaunchDarkly API Documentation") for our API documentation
67+
* [blog.launchdarkly.com](https://blog.launchdarkly.com/ "LaunchDarkly Blog Documentation") for the latest product updates
8268
* [Feature Flagging Guide](https://github.com/launchdarkly/featureflags/ "Feature Flagging Guide") for best practices and strategies

babel.config.js

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
2+
// We must use babel.config.js instead of .babelrc because we also want to transpile the test code
3+
// that we import from the main SDK package (see jest.config.js), and .babelrc settings never apply
4+
// to code from other modules.
5+
6+
module.exports = {
7+
env: {
8+
test: {
9+
presets: [
10+
[
11+
'@babel/preset-env',
12+
{
13+
targets: {
14+
node: '6'
15+
}
16+
}
17+
]
18+
]
19+
}
20+
}
21+
};

dynamodb_feature_store.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ var AWS = require('aws-sdk');
22
var winston = require('winston');
33

44
var helpers = require('./dynamodb_helpers');
5-
var CachingStoreWrapper = require('ldclient-node/caching_store_wrapper');
5+
var CachingStoreWrapper = require('launchdarkly-node-server-sdk/caching_store_wrapper');
66

77
var defaultCacheTTLSeconds = 15;
88

index.d.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
// Type definitions for ldclient-node-dynamodb-store
1+
// Type definitions for launchdarkly-node-server-sdk-dynamodb
22

33
/**
44
* Interface for the DynamoDB feature store component to be used with the LaunchDarkly SDK.
55
*
66
* See: https://docs.launchdarkly.com/v2.0/docs/using-a-persistent-feature-store
77
*/
88

9-
declare module 'ldclient-node-dynamodb-store' {
10-
import { LDFeatureStore, LDLogger } from 'ldclient-node';
9+
declare module 'launchdarkly-node-server-sdk-dynamodb' {
10+
import { LDFeatureStore, LDLogger } from 'launchdarkly-node-server-sdk';
1111
import { DynamoDB } from 'aws-sdk';
1212

1313
/**

jest.config.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
module.exports = {
3+
automock: false,
4+
resetModules: true,
5+
testMatch: ['**/tests/**/*-test.js'],
6+
transform: {
7+
'^.+\\.js$': 'babel-jest',
8+
},
9+
transformIgnorePatterns: [
10+
'<rootDir>/[^/]*\\.js',
11+
'<rootDir>/node_modules/(?!(launchdarkly-node-server-sdk/test)/)',
12+
// The line above is necessary because the Node SDK shared test code uses syntax that isn't Node 6 compatible,
13+
// so we want to make sure it gets transpiled, which Babel won't do for imported modules by default.
14+
],
15+
};

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "ldclient-node-dynamodb-store",
3-
"version": "1.1.4",
2+
"name": "launchdarkly-node-server-sdk-dynamodb",
3+
"version": "1.1.5",
44
"description": "DynamoDB-backed feature store for the LaunchDarkly Node.js SDK",
55
"main": "dynamodb_feature_store.js",
66
"license": "Apache-2.0",
@@ -11,14 +11,14 @@
1111
},
1212
"types": "./index.d.ts",
1313
"devDependencies": {
14-
"babel-core": "6.26.0",
15-
"babel-jest": "22.4.3",
16-
"babel-preset-env": "1.6.1",
14+
"@babel/core": "7.4.3",
15+
"@babel/preset-env": "7.4.3",
16+
"babel-jest": "24.7.1",
1717
"eslint": "5.8.0",
1818
"eslint-formatter-pretty": "1.3.0",
19-
"jest": "23.6.0",
20-
"jest-junit": "5.2.0",
21-
"ldclient-node": ">= 5.7.1",
19+
"jest": "24.7.1",
20+
"jest-junit": "6.3.0",
21+
"launchdarkly-node-server-sdk": ">= 5.8.1",
2222
"typescript": "3.0.1"
2323
},
2424
"jest": {
@@ -36,13 +36,13 @@
3636
"winston": "2.4.1"
3737
},
3838
"peerDependencies": {
39-
"ldclient-node": ">= 5.7.0"
39+
"launchdarkly-node-server-sdk": ">= 5.8.1"
4040
},
4141
"engines": {
4242
"node": ">= 0.8.x"
4343
},
4444
"bugs": {
45-
"url": "https://github.com/launchdarkly/node-dynamodb-store/issues"
45+
"url": "https://github.com/launchdarkly/node-server-sdk-dynamodb/issues"
4646
},
47-
"homepage": "https://github.com/launchdarkly/node-dynamodb-store"
47+
"homepage": "https://github.com/launchdarkly/node-server-sdk-dynamodb"
4848
}

tests/dynamodb_feature_store-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
var DynamoDBFeatureStore = require('../dynamodb_feature_store');
22
var helpers = require('../dynamodb_helpers');
3-
var testBase = require('ldclient-node/test/feature_store_test_base');
4-
var dataKind = require('ldclient-node/versioned_data_kind');
3+
var testBase = require('launchdarkly-node-server-sdk/test/feature_store_test_base');
4+
var dataKind = require('launchdarkly-node-server-sdk/versioned_data_kind');
55
var AWS = require('aws-sdk');
66

77
function stubLogger() {

0 commit comments

Comments
 (0)