salesforce / lightning-labs

MIT License
3 stars 4 forks source link

feat: support wire decorator #18

Closed cardoso closed 2 months ago

cardoso commented 3 months ago

When attempting to implement #6 , I noticed the wire decorator was not available yet, so this PR aims to make @wire available.

I included a test component and a few wire adapters:

Screenshot 2024-06-11 at 02 50 01

There's also a test, but no mocking functionality for wire adapters yet. I think it can be done in a separate PR.

divmain commented 3 months ago

At first glance, this looks good to me. However, we are currently working on adding wire-mocking functionality to the test side of things. I'd like to see the final shape of that before merging your PR, in case there is anything foundational we need to change that impacts this PR.

divmain commented 3 months ago

We will have the wire-mocking functionality ready soon. It'll also include a similar alternative to the patchedMeta change that you introduced here, along with a lot of wire mocking functionality for the test runner. After that is merged, I'd like to merge the example you added to show how non-mocked wires can also work, if the wire adapter is compatible. I'll come back and merge this once the other PR is inmain.

cardoso commented 3 months ago

Hi @divmain , I just synced with main. Only some extra spacing was removed from resolve-engine.js by my editor I guess.