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

Ability to declare aliases in an array #243

Merged
merged 3 commits into from Dec 9, 2017

Conversation

gpawlik
Copy link
Contributor

@gpawlik gpawlik commented Dec 8, 2017

Introduced an option to declare the alias property as an array, which would allow the correct enumeration order of the aliases. The current implementation is preserved, so both ways are going to work:

"alias": {
  "foo": "A",
  "bar": "B",
  "baz": "C"
}

and:

"alias": [
  {
    "foo": "A",
    "bar": "B",
  },
  { "baz": "C" }
]

Reference: #238

@codecov
Copy link

codecov bot commented Dec 8, 2017

Codecov Report

Merging #243 into master will not change coverage.
The diff coverage is 100%.

Impacted Files Coverage Δ
src/normalizeOptions.js 100% <100%> (ø) ⬆️

Copy link
Owner

@tleunen tleunen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Thank you @gpawlik !
@fatfisz Anything to add?

Maybe adding a test like in the initial issue where we can "try" to make sure the first item of the array is applied first?

@fatfisz
Copy link
Contributor

fatfisz commented Dec 8, 2017

Looking good! And yes, the regression test that ensures the order of alias application would be great.

@gpawlik
Copy link
Contributor Author

gpawlik commented Dec 9, 2017

Thanks guys! I have just added an extra test: 64e3ab4

@tleunen tleunen merged commit d03715d into tleunen:master Dec 9, 2017
@tleunen
Copy link
Owner

tleunen commented Dec 9, 2017

Thank you @gpawlik :)

@gpawlik
Copy link
Contributor Author

gpawlik commented Dec 9, 2017

You're welcome @tleunen ! 👍

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

Successfully merging this pull request may close these issues.

None yet

3 participants