Skip to content

Commit

Permalink
prepare 2.9.0 release (#131)
Browse files Browse the repository at this point in the history
  • Loading branch information
eli-darkly authored Feb 2, 2019
1 parent ad5b5a1 commit 741c04a
Show file tree
Hide file tree
Showing 113 changed files with 48,541 additions and 7,995 deletions.
27 changes: 21 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,33 @@ version: 2
jobs:
build:
docker:
- image: circleci/node:6-browsers
- image: circleci/node:latest
steps:
- checkout
- run: npm install
- run: mkdir -p reports/junit
- run: npm run lint:all

- run: npm install # this automatically runs "npm prepare" too
# Note that for CI to work properly, our lerna command for "npm prepare" in package.json needs to
# have "--concurrency=2", otherwise we may run out of memory. This is a known issue with Lerna.
- run: npm run lint
- run: npm run build

# We could do "npm run test" here to run tests for all the packages, but then we would not be
# able to produce separate output files.
- run: mkdir -p reports/junit
- run:
command: cd ~/project/packages/ldclient-js-common && npm run test:junit
environment:
JEST_JUNIT_OUTPUT: "./reports/junit/js-common-test-results.xml"
- run:
command: npm run test:junit
command: cd ~/project/packages/ldclient-js && npm run test:junit
environment:
JEST_JUNIT_OUTPUT: "./reports/junit/js-test-results.xml"
- run: npm run check-typescript
- run:
command: cd ~/project/packages/ldclient-react && npm run test:junit
environment:
JEST_JUNIT_OUTPUT: "./reports/junit/react-test-results.xml"

- run: cd ~/project && npm run check-typescript
- store_test_results:
path: reports/junit/
- store_artifacts:
Expand Down
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
node_modules/
coverage/
dist/
eventsource.js
1 change: 1 addition & 0 deletions .eslintrc.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
parser: babel-eslint
root: true
extends:
- prettier
env:
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,7 @@ npm-debug.log
yarn-error.log
node_modules
dist
lib
.idea
.vscode/
.vscode/
test-types.js
11 changes: 10 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,17 @@
# Change log

All notable changes to the LaunchDarkly client-side JavaScript SDK will be documented in this file.
All notable changes to the LaunchDarkly client-side JavaScript SDKs will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org).

## [2.9.0-beta.1] - 2018-12-06
### Added:
- There is now a LaunchDarkly client-side SDK for [Electron](https://electronjs.org/). See the [main project readme](README.md) and the [Electron readme](packages/ldclient-electron/README.md) for more details. Both the Electron SDK and the previously existing JavaScript SDK are contained in this project, since they share much of the same code; this changelog will describe changes to both.
- Both of the SDKs now have a `getUser()` method that returns the current user object.
- In both SDKs, the client options can now have a `logger` property that defines a custom logging mechanism, using the `LDLogger` interface that is described in the [TypeScript definitions](packages/ldclient-js-common/typings.d.ts). In a web browser, the default is still to use `console.warn` and `console.error`; you could override this to send log messages to another destination or to suppress them.

### Changed:
- Due to the addition of the Electron SDK, the code has been reorganized. There are now three modules: `ldclient-js` (the browser SDK), `ldclient-electron` (the Electron SDK), and `ldclient-js-common` (code that is used by both). Existing projects that use `ldclient-js` should not need to make any changes; if you are using a package manager, the `ldclient-js-common` dependency will be brought in automatically, and if you are using the pre-built `ldclient.min.js`, it includes all of the necessary code.

## [2.8.0] - 2018-12-03
### Added:
- The use of a streaming connection to LaunchDarkly for receiving live updates can now be controlled with the new `client.setStreaming()` method, or the equivalent boolean `streaming` property in the client configuration. If you set this to `false`, the client will not open a streaming connection even if you subscribe to change events (you might want to do this if, for instance, you just want to be notified when the client gets new flag values due to having switched users). If you set it to `true`, the client will open a streaming connection regardless of whether you subscribe to change events or not (the flag values will simply be updated in the background). If you don't set it either way then the default behavior still applies, i.e. the client opens a streaming connection if and only if you subscribe to change events.
Expand Down
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
# Contributing to LaunchDarkly SDK for JavaScript

We encourage pull-requests and other contributions from the community. We've also published an [SDK contributor's guide](http://docs.launchdarkly.com/docs/sdk-contributors-guide) that provides a detailed explanation of how our SDKs work.

This repository is a monorepo containing three projects, each of which is published to npm as a package with the same name:

- `ldclient-js`: This is the main SDK package that applications will import. Any logic that specifically relies on being in a browser environment should go here (see `browserPlatform.js`). This automatically imports `ldclient-js-common`.
- `ldclient-js-common`: Internal implementation code that is not browser-specific.
- `ldclient-react`: The React wrapper. This automatically imports both of the other packages.

The reason `ldclient-js-common` exists is that the [Electron SDK](https://github.com/launchdarkly/electron-client) has very similar functionality to the browser SDK. Therefore, all of the code that is used by both has been factored out into the common package.

To build and test the project, you will first need to run `npm install lerna`. Then, running `npm run build` or `npm test` from the project root directory will build or test all three packages.
Loading

0 comments on commit 741c04a

Please sign in to comment.