Skip to content

Conversation

@ehmicky
Copy link
Contributor

@ehmicky ehmicky commented Oct 1, 2019

This introduces a normalization step when loading the configuration.

Normalizing should make it easier to consume the configuration, whether being it for us or for users, because values that could have several shapes only have a single shape.

At the moment, the following normalizations are performed:

  • add default empty objects for build and build.lifecycle
  • lifecycles can either be arrays or newline-separated strings. This converts the former to arrays.
  • build.command is renamed to build.lifecycle.build

The configuration is in normalized form in:

  • @netlify/config consumers (such as the code of @netlify/build)
  • plugin hooks
  • the netlify.toml that we create for the BuildBot at the end of @netlify/build

The normalized form is not persisted back on the netlify.yml, so this is backward compatible.

@ehmicky ehmicky requested a review from DavidWells October 1, 2019 13:04
@ehmicky ehmicky force-pushed the feature/normalize-configuration branch 6 times, most recently from 501c8ba to 538239c Compare October 2, 2019 16:33
@ehmicky ehmicky force-pushed the feature/normalize-configuration branch from 538239c to ede3fa8 Compare October 2, 2019 16:43
@ehmicky ehmicky merged commit eb5e9f0 into master Oct 2, 2019
@ehmicky ehmicky deleted the feature/normalize-configuration branch October 2, 2019 16:44
Skn0tt pushed a commit that referenced this pull request May 21, 2024
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.

2 participants