Skip to content
This repository was archived by the owner on Oct 20, 2022. It is now read-only.

Conversation

ehmicky
Copy link
Contributor

@ehmicky ehmicky commented Jun 10, 2021

This PR removes the normalization + validation steps from the parsing logic.

Breaking change: this means consumers will now need to first use parseFileRedirects() or parseConfigRedirects(), then use normalizeRedirects() (which is now exported). This change is needed to integrate with @netlify/config.

For convenience, an upcoming PR will add a new method parseAllRedirects() which will perform all of: parseFileRedirects(), parseConfigRedirects(), mergeRedirects(), normalizeRedirects(). This method will be used by Netlify CLI. However, I would like to separate this from this PR, so that we can patch CLI incrementally and make this PR a clear major release / breaking changes.

Also, this renames:

  • parseRedirectsFormat() -> parseFileRedirects()
  • parseNetlifyConfig() -> parseConfigRedirects()

@ehmicky ehmicky added the type: feature code contributing to the implementation of a feature and/or user facing functionality label Jun 10, 2021
@ehmicky ehmicky requested a review from erezrokah June 10, 2021 16:11
@ehmicky ehmicky self-assigned this Jun 10, 2021
@ehmicky ehmicky merged commit 3e35c53 into main Jun 10, 2021
@ehmicky ehmicky deleted the feat/break-down-methods branch June 10, 2021 17:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
type: feature code contributing to the implementation of a feature and/or user facing functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants