-
Notifications
You must be signed in to change notification settings - Fork 392
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
feat(wire-service): rfc implementation #166
Merged
Merged
Changes from all commits
Commits
Show all changes
54 commits
Select commit
Hold shift + click to select a range
d286bee
WIP
8b1dfc2
- Fix wire adapter callback names
9000634
- Add logic for prop change -> wire adapter updatedCallback
f5ae6e9
WIP - working on updated() callback hookup
7fee5b4
fix tslint errors
yungcheng f6aea16
wip: hook up updated
yungcheng 4be7d46
delete wiring.ts
yungcheng 551fbd2
only hook updated to bound props and clean up ServiceContext
yungcheng 8ecb303
now everything in ServiceUpdateContext make sense
yungcheng 873a280
fix playground setup
yungcheng 05833f4
fix lifecycle hooks
yungcheng eef11f0
update todo-api
yungcheng 2a13a36
fix single-wire-method and multiple wires in playground
yungcheng d4279f8
delete todo-legacy-api
yungcheng 303f6a2
delete modules as they should be under lwc-integration
yungcheng df5356f
delete old jest tests
yungcheng 1b50bfa
fix wire lwc-integration tests
yungcheng 8a84e55
optimize building context
yungcheng c15dd48
refactor to buildContext
yungcheng 18603ca
update type for buildContext
yungcheng ae06763
export unregister for non prod
yungcheng 07a327c
add unit test
yungcheng 83f6e98
refactor wiring internals
yungcheng 112c99e
feat(wire-service): optimize serviceUpdateContext to have a prop to U…
yungcheng fab305d
fix(wire-service): lint error
yungcheng 986a70c
build(wire-service): update file name to wire*.js and generate umd pr…
yungcheng b517417
chore(all): typo
yungcheng bba3915
feat(wire-service): address feedbacks
yungcheng 25c519a
feat(wire-service): update impl based on latest proposal to use wired…
yungcheng 2606fa7
fix(wire-service): update integration test
yungcheng da52252
refactor(wire): review feedback
caridy baf5daa
fix(wire-service): incorporate PR feedback
e249b23
WIP - rename vars for new terminology
458b307
refactor(wire-service): create a class for wiredEventTarget
yungcheng d1e0f67
refactor(wire-service): get rid off circular dependency
yungcheng 218ac44
refactor(wire-service): Fix type bug between set and array
36f1682
refactor(wire-service): Extract engine-derived types into separate file
24878bb
fix(wire-service): Invoke wire adapter change handler once regardless…
7cf9db4
refactor(wire-service): move updatedFuture after updated
yungcheng a26ed12
fix(wire-service): update integration test
yungcheng b201fc1
refactor(wire-service): Move prop change tracking to property-trap. A…
81a3016
refactor(wire-service): rename callback to listener
yungcheng 0e5dbd1
feat(wire-service): check for WireContextEvent
yungcheng 6767eb1
feat(wire-service): add wiring jest tests
yungcheng d7623ff
refactor(wire-service): use jest mock fn for mockInstallTrap
yungcheng 4812f30
feat(wire-service): add jest test for register
yungcheng 1ee0796
test(wire-service): property-trap test cases
a42f70a
refactor(wire-service): use jest.fn() instead of handroll function
yungcheng d922d93
refactor(wire-service): use forEach instead of for...of for better co…
yungcheng d2ee1c6
feat(wire-service): add a test case to capture multiple components (c…
yungcheng bd00213
Merge branch 'wire-rfc-impl' of github.com:salesforce/lwc into releas…
yungcheng abc8aca
refactor(wire-service): fix lint errors
yungcheng d234b6a
feat(wire-service): merge master in
yungcheng f85f8c9
build(wire-service): update module artifact name
yungcheng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 3 additions & 3 deletions
6
...lwc-integration/src/components/wired/test-wired-method-suite/wired-method/wired-method.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
import { Element, api, track, wire } from 'engine'; | ||
import { serviceTodo } from 'todo'; | ||
import { getTodo } from 'todo'; | ||
|
||
export default class WiredMethod extends Element { | ||
@api todoId; | ||
@track state = { error: undefined, todo: undefined }; | ||
|
||
@wire(serviceTodo, { id: '$todoId' }) | ||
function(error, data) { | ||
@wire(getTodo, { id: '$todoId' }) | ||
function({error, data}) { | ||
this.state = { error: error, todo: data }; | ||
} | ||
} |
4 changes: 2 additions & 2 deletions
4
packages/lwc-integration/src/components/wired/test-wired-prop-suite/wired-prop/wired-prop.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
packages/lwc-wire-service/playground/x/single-wire-method/single-wire-method.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What's this point to?
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.
See comment below about file name of
wire.js
vswire-service.js
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.
it'll be a copy from the
lwc-wire-service
dist, I changed the filename fromwire-service.js
towire.js
for easier release through Aura. That's why I need to change it here.