Skip to content

Ability to declare aliases in an array#243

Merged
tleunen merged 3 commits intotleunen:masterfrom
gpawlik:alias-array-option
Dec 9, 2017
Merged

Ability to declare aliases in an array#243
tleunen merged 3 commits intotleunen:masterfrom
gpawlik:alias-array-option

Conversation

@gpawlik
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Owner

tleunen commented Dec 9, 2017

Thank you @gpawlik :)

@gpawlik
Copy link
Copy Markdown
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.

3 participants