build
build copied to clipboard
feat(build-info): pass feature flags as json and change plugins to an object
BREAKING CHANGE: Plugin build settings now use an object array, not string lists, allowing extra details like install source and if always needed at runtime.
๐ Thanks for submitting a pull request! ๐
Summary
Fixes https://linear.app/netlify/issue/FRA-139/update-build-info-to-include-netlifynext-runtime
Currently, we have a lot of hardcoded instances of the next runtime inside the react UI and the CLI, where we determine if it needs to be auto-installed:
- https://github.com/netlify/netlify-react-ui/blob/main/apps/netlify-react-ui/src/actions/repos.ts#L219-L239
- https://github.com/netlify/cli/blob/main/src/utils/init/utils.ts#L19-L43
This makes it hard to roll out the new runtime over a central place. Therefore, I've introduced a breaking change here, making the plugins an array of objects that contains the additional information that the next runtime should always be automatically installed.
Based on the feature flag, we can now roll out the new or old runtime seamlessly with this change.
Therefore we had to change the featureflags to be a JSON of key value objects to retrieve the value of the string flag.
For us to review and ship your PR efficiently, please perform the following steps:
- [ ] Open a bug/issue before writing your code ๐งโ๐ป. This ensures we can discuss the changes and get feedback from everyone that should be involved. If you`re fixing a typo or something that`s on fire ๐ฅ (e.g. incident related), you can skip this step.
- [ ] Read the contribution guidelines ๐. This ensures your code follows our style guide and passes our tests.
- [ ] Update or add tests (if any source code was changed or added) ๐งช
- [ ] Update or add documentation (if features were changed or added) ๐
- [ ] Make sure the status checks below are successful โ
A picture of a cute animal (not mandatory, but encouraged)
I'm going to cut a pre-release before merging this and trying to prepare the breaking changes already upfront on the repositories.
Latest RC version is on
@netlify/[email protected]