Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use OrderedMap to maintain YML input file props order. #201

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomger
Copy link
Contributor

@tomger tomger commented Feb 10, 2020

In our token setup the order of the YML props has a meaning. e.g. colors are grouped by hue.

As far as I can tell without this patch the order of the output is nondeterministic/scrambled. This is because Immutable.fromJS, at least in our case, converts the input JS array into a non-ordered Map instead of an OrderedMap.

Example.yml

  • colorYellow
  • colorDarkYellow
  • colorGreen

Example.output (without patch)

  • $yellow
  • $green
  • $darkYellow

Example.output (with patch)

  • $yellow
  • $darkYellow
  • $green

@KITSStuCoe
Copy link

KITSStuCoe commented Aug 26, 2021

@tomger, the failing test just needs a done() in the r func:

lib/tests/effects.js, line 103.

r => { done(); }

worked for me, anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants