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

Commit ff86964

Browse files
authored
(3.0) update minimum SDK version and Node version (#16)
1 parent 013a440 commit ff86964

File tree

5 files changed

+102
-35
lines changed

5 files changed

+102
-35
lines changed

.circleci/config.yml

Lines changed: 51 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,58 @@
1-
version: 2
1+
version: 2.1
22

33
workflows:
4-
version: 2
5-
test:
4+
build-and-test-all:
65
jobs:
7-
- oldest-long-term-support-release
8-
- current-release
9-
10-
node-template: &node-template
11-
steps:
12-
- checkout
13-
- run: echo "Node version:" `node --version`
14-
- run: npm install
15-
- run: npm run lint
16-
- run:
17-
command: npm test
18-
environment:
19-
JEST_JUNIT_OUTPUT: "reports/junit/js-test-results.xml"
20-
- store_test_results:
21-
path: reports/junit
22-
- run: npm run check-typescript
23-
- store_artifacts:
24-
path: reports/junit
6+
# CircleCI's current generation of Node images, cimg/node, allow you to leave the
7+
# patch version unpinned, but require you to specify the minor version. The one
8+
# exception is cimg/node:current, which will always give us the latest release in
9+
# the latest major version-- and the latest major version is where it's most likely
10+
# that there would be a new minor version, anyway.
11+
- build-test-linux:
12+
name: latest Node version
13+
docker-image: cimg/node:current
14+
run-lint: true
15+
- build-test-linux:
16+
name: Node 16.3
17+
docker-image: cimg/node:16.3
18+
- build-test-linux:
19+
name: Node 15.14
20+
docker-image: cimg/node:15.14
21+
- build-test-linux:
22+
name: Node 14.17
23+
docker-image: cimg/node:14.17
24+
- build-test-linux:
25+
name: Node 13.14
26+
docker-image: cimg/node:13.14
27+
- build-test-linux:
28+
name: Node 12.22
29+
docker-image: cimg/node:12.22
2530

2631
jobs:
27-
oldest-long-term-support-release:
28-
<<: *node-template
29-
docker:
30-
- image: circleci/node:6
31-
- image: amazon/dynamodb-local
32-
33-
current-release:
34-
<<: *node-template
32+
build-test-linux:
33+
parameters:
34+
run-lint:
35+
type: boolean
36+
default: false
37+
docker-image:
38+
type: string
3539
docker:
36-
- image: circleci/node:latest
40+
- image: <<parameters.docker-image>>
3741
- image: amazon/dynamodb-local
42+
steps:
43+
- checkout
44+
- run: echo "Node version:" `node --version`
45+
- run: npm install
46+
- run:
47+
command: npm test
48+
environment:
49+
JEST_JUNIT_OUTPUT: "reports/junit/js-test-results.xml"
50+
- run: npm run check-typescript
51+
- when:
52+
condition: <<parameters.run-lint>>
53+
steps:
54+
- run: npm run lint
55+
- store_test_results:
56+
path: reports/junit
57+
- store_artifacts:
58+
path: reports/junit

.eslintignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
node_modules/
2+
test-types.js

CONTRIBUTING.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# Contributing to this library
2+
3+
The source code for this library is [here](https://github.com/launchdarkly/node-server-sdk-dynamodb). We encourage pull-requests and other contributions from the community. Since this library is meant to be used in conjunction with the LaunchDarkly Server-Side Node.js SDK, you may want to look at the [SDK source code](https://github.com/launchdarkly/node-server-sdk) and our [SDK contributor's guide](http://docs.launchdarkly.com/docs/sdk-contributors-guide).
4+
5+
## Submitting bug reports and feature requests
6+
7+
The LaunchDarkly SDK team monitors the [issue tracker](https://github.com/launchdarkly/node-server-sdk-dynamodb/issues) in this repository. Bug reports and feature requests specific to this project should be filed in the issue tracker. The SDK team will respond to all newly filed issues within two business days.
8+
9+
## Submitting pull requests
10+
11+
We encourage pull requests and other contributions from the community. Before submitting pull requests, ensure that all temporary or unintended code is removed. Don't worry about adding reviewers to the pull request; the LaunchDarkly SDK team will add themselves. The SDK team will acknowledge all pull requests within two business days.
12+
13+
## Build instructions
14+
15+
### Prerequisites
16+
17+
The project uses `npm`, which is bundled in all supported versions of Node. It should be built against the lowest compatible version, Node 12.
18+
19+
### Setup
20+
21+
To install project dependencies, from the project root directory:
22+
23+
```
24+
npm install
25+
```
26+
27+
### Testing
28+
29+
To run all unit tests:
30+
31+
```
32+
npm test
33+
```
34+
35+
The tests expect you to have DynamoDB running locally on the default port, 6379. One way to do this is with Docker:
36+
37+
```bash
38+
docker run -p 8000:8000 amazon/dynamodb-local
39+
```
40+
41+
To verify that the TypeScript declarations compile correctly (this involves compiling the file `test-types.ts`, so if you have changed any types or interfaces, you will want to update that code):
42+
43+
```
44+
npm run check-typescript
45+
```

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
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.8.1.
7+
The minimum version of the LaunchDarkly Node.js SDK for use with this library is 6.0.0.
88

9-
For more information, see also: [Using a persistent feature store](https://docs.launchdarkly.com/v2.0/docs/using-a-persistent-feature-store).
9+
For more information, see the [SDK features guide](https://docs.launchdarkly.com/sdk/features/database-integrations).
1010

1111
TypeScript API documentation is [here](https://launchdarkly.github.io/node-server-sdk-dynamodb).
1212

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"jest": "24.7.1",
2121
"jest-junit": "6.3.0",
2222
"launchdarkly-js-test-helpers": "^1.0.0",
23-
"launchdarkly-node-server-sdk": ">= 5.8.1",
23+
"launchdarkly-node-server-sdk": "^6.0.0-alpha.1",
2424
"typescript": "^3.8.3"
2525
},
2626
"jest": {
@@ -38,10 +38,10 @@
3838
},
3939
"peerDependencies": {
4040
"aws-sdk": "^2.349.0",
41-
"launchdarkly-node-server-sdk": ">= 5.8.1"
41+
"launchdarkly-node-server-sdk": "^6.0.0-alpha.1"
4242
},
4343
"engines": {
44-
"node": ">= 0.8.x"
44+
"node": ">= 12.0"
4545
},
4646
"bugs": {
4747
"url": "https://github.com/launchdarkly/node-server-sdk-dynamodb/issues"

0 commit comments

Comments
 (0)