message: Replace use of lodash's assign with destructuring assignment in image-writer
  Change-type: patch
diff: @@ -58,14 +58,12 @@ function handleErrorLogging(
  error: Error & { code: string },
  analyticsData: any,
  ) {
  - const eventData = _.assign(
  - {
  + const eventData = {
  + ...analyticsData,
  applicationSessionUuid: store.getState().toJS().applicationSessionUuid,
  flashingWorkflowUuid: store.getState().toJS().flashingWorkflowUuid,
  flashInstanceUuid: flashState.getFlashUuid(),
  - },
  - analyticsData,
  - );
  + };
  if (error.code === 'EVALIDATION') {
  analytics.logEvent('Validation error', eventData);
  @@ -78,15 +76,10 @@ function handleErrorLogging(
  } else if (error.code === 'ECHILDDIED') {
  analytics.logEvent('Child died unexpectedly', eventData);
  } else {
  - analytics.logEvent(
  - 'Flash error',
  - _.merge(
  - {
  + analytics.logEvent('Flash error', {
  + ...eventData,
  error: errors.toJSON(error),
  - },
  - eventData,
  - ),
  - );
  + });
  }
  }
  @@ -305,18 +298,19 @@ export async function flash(
  }
  windowProgress.clear();
  if (flashState.wasLastFlashCancelled()) {
  - const eventData = _.assign({ status: 'cancel' }, analyticsData);
  + const eventData = {
  + ...analyticsData,
  + status: 'cancel',
  + };
  analytics.logEvent('Elevation cancelled', eventData);
  } else {
  const { results } = flashState.getFlashResults();
  - const eventData = _.assign(
  - {
  + const eventData = {
  + ...analyticsData,
  errors: results.errors,
  devices: results.devices,
  status: 'finished',
  - },
  - analyticsData,
  - );
  + };
  analytics.logEvent('Done', eventData);
  }
  }
  