From 741fc4cc64278c5335067751f51db12abe9836f6 Mon Sep 17 00:00:00 2001 From: Alexis Georges Date: Thu, 3 May 2018 11:31:42 -0400 Subject: [PATCH 1/3] update package-lock.json --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index 12a1b4a..db85170 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ldclient-node", - "version": "4.0.3", + "version": "4.0.4", "lockfileVersion": 1, "requires": true, "dependencies": { From 93cfa5d8c64dc3cc44d6c5072c9009895102c28d Mon Sep 17 00:00:00 2001 From: Alexis Georges Date: Thu, 3 May 2018 11:33:28 -0400 Subject: [PATCH 2/3] prepare 4.0.5 --- CHANGELOG.md | 4 ++++ index.js | 5 ++++- package.json | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 214116c..ead6893 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ All notable changes to the LaunchDarkly Node.js SDK will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org). +## [4.0.5] - 2018-05-03 +### Fixed +- The waitUntilReady Promise will now resolve even after the ready event was emitted — thanks @dylanjha + ## [4.0.4] - 2018-04-17 ### Fixed - Fixed a bug that could cause a call stack overflow when calling `all_flags` with a very large number of flags, or evaluating a flag with a very large number of rules. This should no longer happen no matter how many flags or rules there are. diff --git a/index.js b/index.js index b7d7fbd..6eda8dc 100644 --- a/index.js +++ b/index.js @@ -121,7 +121,10 @@ var new_client = function(sdk_key, config) { } client.waitUntilReady = function() { - if (init_complete) return Promise.resolve() + if (init_complete){ + return Promise.resolve(); + } + return new Promise(function(resolve) { client.once('ready', resolve); }); diff --git a/package.json b/package.json index a4e3b24..caa8c75 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ldclient-node", - "version": "4.0.4", + "version": "4.0.5", "description": "LaunchDarkly SDK for Node.js", "main": "index.js", "scripts": { From 3f6bfd4936e334406ebc42a44cc3c5ab069ae877 Mon Sep 17 00:00:00 2001 From: Alexis Georges Date: Thu, 3 May 2018 14:27:21 -0400 Subject: [PATCH 3/3] bump version in package-lock.json --- package-lock.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package-lock.json b/package-lock.json index db85170..a984ea8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "ldclient-node", - "version": "4.0.4", + "version": "4.0.5", "lockfileVersion": 1, "requires": true, "dependencies": {