-
Notifications
You must be signed in to change notification settings - Fork 24
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
[Bug] Objects exported with '* as' export aren't merged recursively #119
Comments
@AndrewBogdanovTSS any chance you could provide a defu-only repro? |
@manniL I can do it a bit later, but I think you can also just remove skip from unit tests that check this behavior and see that they are failing. We use defu in nuxt free environment and it fails there as well, that's how I found it out initially. Also, reverting to 6.1.2 fixes an issue, so it's 100% related to that newly added code |
@AndrewBogdanovTSS FYI: only the |
It's because a test for merging objects imported with default as * were never written 😂 |
That's true. I just did and it fails 🙈 |
Thanks for reporting this issue dear @AndrewBogdanovTSS and thanks for all help @manniL to investigate and fix this regression. The fix should be available shortly in the next release.
Although it is something unnecessary to discuss here, answering only to not keep as unanswered since honestly hearing it is super frustrating for me while I am taking my Friday evening to stay home and spend time on it! The fact that you are knowingly saying it was a regression and then asking to release a fix as a breaking change is strange. The main issue was The initial fix was made by me after doing enough tests AND trusting the code base of is-plain-obj with 22M weekly downloads. Of course, you can call any of us stupid or careless but the fact is-plain-plain-ob was tested and used enough to be trusted, and this issue was never reported to any of the libs should be enough I guess. Your report got fixed in less than 9 hours even though you didn't provide a minimal reproduction. Wish you the best! |
@pi0 first of all I want to apologize if the way I logged an issue hurt your feelings in any way, that wasn't my intention. I would like to clarify couple of things here
The only thing I was saying is that things that change main functionality should be released as a significant change that is not easely inherited by a dependency change during lock file update, and again, this is just my opinion, a suggestion that is not a form of blame or anything like it.
Initially this issue was reported more than 3 weeks ago in the Nuxt repo (since it was discovered in the Nuxt based project), with a minimal reproduction which is also attached to this bug report. Although I sencerely appreciate your swift reaction in defu repo, I wasn't demanding immidiate attention to it, wasn't locking you in a room with a demand to fix it within a specific timeframe.
I didn't call anyone stupid, I only expressed a personal feeling. I think things you build are one of the best among open source projects I've seen for years and of course I have a high expectations from the codebase, but by no means I wanted to stress you out with it, sorry if it felt that way. |
Environment
Operating System: Linux
Node Version: v18.18.0
Nuxt Version: 3.8.2
CLI Version: 3.10.0
Nitro Version: 2.8.1
Package Manager: [email protected]
Builder: -
User Config: devtools, extends
Runtime Modules: -
Build Modules: -
Reproduction
https://stackblitz.com/edit/github-bcxfrv?file=README.md
Describe the bug
merge app.config from different layers using namespace imports to combine different parts of the config, e.g:
Check the console:
Expected:
{ nuxt: { buildId: 'dev' }, pages: { foo: { nested: 1 }, bar: 2 } }
Actual:
{ nuxt: { buildId: 'dev' }, pages: { bar: 2 } }
Additional context
This is a regression that was introduced with 6.1.3 release, specifically with this PR #111
@pi0 I'm quite dissapointed with the overall workflow this change was merged with. Test coverage was very small for such fundamental change, but even those tests that were written were skipped, there was no code review. Was it some kind of pre-holiday accident? 🥲
IMO, any changes like this deserves at least minor (not a patch) and better - major version bump because it's a fundamental change to how objects are merged and this is a main goal of this lib.
Logs
No response
The text was updated successfully, but these errors were encountered: