commercetools / nodejs

Everything related to the Node.js ecosystem for the commercetools platform.
https://commercetools.github.io/nodejs/
MIT License
75 stars 70 forks source link

fix(sync-actions): fix enum type actions #1796

Closed VineetKumarKushwaha closed 2 years ago

VineetKumarKushwaha commented 2 years ago

Fix (sync-actions): addEnumValue should be generated when there type is ``

Fixes: https://jira.commercetools.com/browse/SUPPORT-16999

When using the sync-actions library to sync custom types wrong update actions are generated when enum values are updated. we check for the attribute type with a lower ‘e’ instead of an capital 'E’ as required in the CustomFieldEnumType. Also, we don't pass fieldName when generating the action so it takes type as a fieldName which is incorrect.

changeset-bot[bot] commented 2 years ago

🦋 Changeset detected

Latest commit: 51a2fd69c6fc6f65a4be94aea6ee9295afdfc5b6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package | Name | Type | | --------------------------- | ----- | | @commercetools/sync-actions | Minor |

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

codecov[bot] commented 2 years ago

Codecov Report

Merging #1796 (51a2fd6) into master (3955666) will not change coverage. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #1796   +/-   ##
=======================================
  Coverage   94.29%   94.29%           
=======================================
  Files         137      137           
  Lines        4817     4817           
  Branches     1280     1280           
=======================================
  Hits         4542     4542           
  Misses        271      271           
  Partials        4        4           
Impacted Files Coverage Δ
packages/sync-actions/src/types-actions.js 100.00% <ø> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3955666...51a2fd6. Read the comment docs.