GithubHelp home page GithubHelp logo

Comments (10)

TehShrike avatar TehShrike commented on May 18, 2024 1

Yeah, that intuitively seems like a change that would bite some people.

I'd be more worried about it, except nobody seems to have ever been bothered by the root object always being freshly created every time, which seems like the case that would matter most. ¯\_(ツ)_/¯

from deepmerge.

TehShrike avatar TehShrike commented on May 18, 2024 1

If there aren't any reviews, I'll merge/release next week.

from deepmerge.

TehShrike avatar TehShrike commented on May 18, 2024 1

Version 2.0.0 has been published! Open new issues for anything you notice that seems off.

from deepmerge.

macdja38 avatar macdja38 commented on May 18, 2024

So long as we clearly document the change at the top of the npm page + provide an example of how users can easily switch back to the old behavior I don't see too much of a problem. obviously cloning would be a bad way of dealing with certain things because people may not expect it... for example a user using a object based module system probably does not want their modules cloned as calling methods from the cloned vs uncloned objects would have different internal state...

from deepmerge.

macdja38 avatar macdja38 commented on May 18, 2024

I could see a lot more people using the library on objects that contain classes vs on classes themselves, but I definitely agree that cloning everything is probably a better way to avoid unexpected behavior in the majority of cases. Along with clear documentation on how to reverse the behavior I see no problem with it.

from deepmerge.

z0al avatar z0al commented on May 18, 2024

+1
But, we should of course document the changes

from deepmerge.

NoxWings avatar NoxWings commented on May 18, 2024

I think clone should default to true

Exactly this

from deepmerge.

nrkn avatar nrkn commented on May 18, 2024

Agree strongly with all of your suggestions, they would make it much better

from deepmerge.

TehShrike avatar TehShrike commented on May 18, 2024

I've opened a pull request - reviews of #77 would be appreciated!

from deepmerge.

nrkn avatar nrkn commented on May 18, 2024

I'll have the opportunity to put it through its paces pretty intensively soon, merging multiple nodes with complex models from a graph

from deepmerge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.