launch-darkly-feature-builder
Advanced tools
Comparing version 0.15.0 to 0.16.0
{ | ||
"name": "launch-darkly-feature-builder", | ||
"version": "0.15.0", | ||
"version": "0.16.0", | ||
"description": "Builds and manages launch darkly features from code.", | ||
@@ -5,0 +5,0 @@ "bin": { |
@@ -54,7 +54,22 @@ const _ = require( 'lodash' ); | ||
function removeEnvironmentSummaries( flag ) { | ||
if( flag.environments ) { | ||
_.forEach( flag.environments, env => { | ||
if( env._summary ) { | ||
delete env._summary; | ||
} | ||
} ); | ||
} | ||
} | ||
async function updateFeatureAsync( ldClient, project, key, plan, comment ) { | ||
const before = _.cloneDeep( plan.current ); | ||
removeEnvironmentSummaries( before ); | ||
const flag = await ldClient.getFeatureFlagAsync( project, key ); | ||
if( !_.isEqual( flag, plan.current ) ) { | ||
if( !_.isEqual( flag, before ) ) { | ||
@@ -65,3 +80,3 @@ log.warn( | ||
feature: key, | ||
before: plan.current, | ||
before: before, | ||
after: flag | ||
@@ -68,0 +83,0 @@ }, |
55146
2179