-
-
Notifications
You must be signed in to change notification settings - Fork 52
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: support Object
as model value type
#263
Conversation
StanleySathler
commented
Feb 2, 2023
•
edited by kettanaito
Loading
edited by kettanaito
- Fixes Can we store a literal object to an entity's field? #262
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, @StanleySathler! Thank you so much for proposing this. I really appreciate your feedback and ideas on the library, it's simply fantastic.
I left a few comments around this change, mainly about reusing existing utilities. Please let me know what you think about that.
Object
constructor to a field definition - useful for JSON columns
Hi! I think this feature has been asked for a while and some people are looking forward to it, if this pr makes it work it doesn't seem like a very big change. @kettanaito is it possible to inlcude this in a further release (before the all rewrite I think it is being done)? We, as well as other people, are blocked by this feature and would be so great to have it supported. Thanks! |
Hey @MarcLopezAvila 👋 I believe all changes Artem suggested should be pretty straightforward, which I'll take some time today to address. Then @kettanaito can decide the best way to release this. 🚀 |
Sounds great, thank you so much! |
1439c73
to
c0ce51c
Compare
@kettanaito your feedback should be addressed now 🚀 Can you recheck? |
src/utils/isModelValueType.ts
Outdated
@@ -1,10 +1,13 @@ | |||
import isObjectLike from 'lodash/isObjectLike' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unused import here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch - turns out we had a test set as .only
too, which is also fixed now 🚀
Hi @kettanaito, could you check if we can merge this change pls? Thank you very much! |
can we have an update about this please ? |
Hello, we are using msw-data, but we really need this feature, can you please update us ? |
Slow as they are, the tests seem passing.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this, @StanleySathler 👏
Object
as model value type
Released: v0.16.2 🎉This has been released in v0.16.2! Make sure to always update to the latest version ( Predictable release automation by @ossjs/release. |