-
Notifications
You must be signed in to change notification settings - Fork 8
feat: refMap #6
feat: refMap #6
Conversation
doesn’t do much, not needed
|
Ugh, my local git was setup with the wrong commit signer - fixed for future. |
XVincentX
left a comment
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.
Ok, thanks a lot. This PR has clarified some important things on the library as well as adding the feature I was looking for. 🚀
| // } | ||
| // } | ||
| // } | ||
| // ==> result is the original object, with local refs resolved and replaced |
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.
I get what you mean here, however I'd say "it's a new object with local refs resolved and replaced"
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.
Not a new object though, it's better than that :). Added a few new test assertions to demonstrate the immutability principles, check them out: https://github.com/stoplightio/json-ref-resolver/blob/feat/ref-map/src/__tests__/resolver.spec.ts#L139-L147
Structural sharing is particularly important for frontend applications like react, that can take advantage of it to re-render less parts of the screen since === will remain true for much of the object (anything that was not a ref).
|
I can't merge this PR — I'm afraid you'll have to do it. Feel free to address the comments; or just merge it. |
|
🎉 This PR is included in version 1.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |

refMapproperty to resolve result. Description in types file.