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

fix: don't overwrite plugin origin if it exists #5793

Merged
merged 3 commits into from
Aug 19, 2024

Conversation

pieh
Copy link
Contributor

@pieh pieh commented Aug 6, 2024

🎉 Thanks for submitting a pull request! 🎉

Summary

Part of https://linear.app/netlify/issue/FRP-1218/plugin-netlifyplugin-nextjs-must-not-be-specified-twice-in-the-app

netlify/cli#6781 is related to this and does add default origin to plugins added to default config by framework detection and this change ensures that origin is not being overwritten and instead normalization prefers existing origin over argument provided to addConfigPluginOrigin which later allow validation to pass as it no longer has 2 plugins (one from default config provided by framework detection and one from bitballoon when runtime is set) from same origin (as those are 2 different origins really, not single one)


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)

Copy link
Contributor

github-actions bot commented Aug 6, 2024

This pull request adds or modifies JavaScript (.js, .cjs, .mjs) files.
Consider converting them to TypeScript.

@pieh pieh force-pushed the fix/dont-overwrite-plugin-origin-if-it-exists branch from db88e91 to a402e7e Compare August 6, 2024 14:30
@pieh pieh marked this pull request as ready for review August 19, 2024 13:55
@pieh pieh requested review from a team as code owners August 19, 2024 13:55
Copy link
Contributor

@lukasholzer lukasholzer left a comment

Choose a reason for hiding this comment

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

Great catch!

@pieh pieh merged commit d5ef407 into main Aug 19, 2024
37 checks passed
@pieh pieh deleted the fix/dont-overwrite-plugin-origin-if-it-exists branch August 19, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants