Skip to content

[WIP] Implement reactive assignments #1839

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

Merged
merged 269 commits into from
Dec 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
269 commits
Select commit Hold shift + click to select a range
834e342
update/tidy up a few tests
Rich-Harris Nov 17, 2018
3e962b9
basic events
Rich-Harris Nov 17, 2018
e022b4b
update some event tests
Rich-Harris Nov 17, 2018
fa8fc25
process svelte:meta tags
Rich-Harris Nov 17, 2018
6e2eeeb
shorthand namespaces
Rich-Harris Nov 17, 2018
23dfe2b
update some tests, delete some no-longer-relevant tests
Rich-Harris Nov 17, 2018
fdf371e
_set --> $set
Rich-Harris Nov 17, 2018
dca04b8
remove unused src/shared directory
Rich-Harris Nov 17, 2018
22775d5
fix test
Rich-Harris Nov 17, 2018
3a5080b
remove some more unused stuff
Rich-Harris Nov 17, 2018
6948f9f
more unused stuff
Rich-Harris Nov 17, 2018
1f03456
instrument event handlers
Rich-Harris Nov 18, 2018
3da78c7
fix contextual references in events
Rich-Harris Nov 18, 2018
3f52b5a
remove redundant component.destroy calls, rename others to $destroy
Rich-Harris Nov 18, 2018
c75b739
remove obsolete tests
Rich-Harris Nov 18, 2018
1638aec
tweaks and fixes
Rich-Harris Nov 18, 2018
d704bac
remove obsolete validation code
Rich-Harris Nov 18, 2018
5c2e945
remove some more unused code
Rich-Harris Nov 18, 2018
eaed487
fix scoping around await blocks
Rich-Harris Nov 18, 2018
be8b971
huh
Rich-Harris Nov 18, 2018
2b15ae3
get a few transition tests passing
Rich-Harris Nov 18, 2018
b5a42e6
update binding syntax
Rich-Harris Nov 18, 2018
780c680
get a few binding tests passing
Rich-Harris Nov 18, 2018
48a0a91
update more tests
Rich-Harris Nov 19, 2018
e2f36d0
update a few more tests
Rich-Harris Nov 19, 2018
7a8e15e
contextual bindings
Rich-Harris Nov 19, 2018
681c1ac
update class directive tests
Rich-Harris Nov 19, 2018
ed83c00
fix some each block stuff
Rich-Harris Nov 19, 2018
4041f0e
update some event handler tests
Rich-Harris Nov 19, 2018
64387a2
fix a few more tests
Rich-Harris Nov 19, 2018
85dacdb
put intro stuff on scheduler, not root
Rich-Harris Nov 19, 2018
a68ccfd
remove root
Rich-Harris Nov 19, 2018
a023f2e
update some tests
Rich-Harris Nov 19, 2018
349aa0b
remove some more unused code
Rich-Harris Nov 19, 2018
65680bf
basic component bindings working, if a bit messy
Rich-Harris Nov 20, 2018
b58dad0
fix slot tests
Rich-Harris Nov 20, 2018
e835679
fix agadoo script
Rich-Harris Nov 20, 2018
15f22ca
fix a few tests
Rich-Harris Nov 20, 2018
cc2c786
fix most of the transition tests
Rich-Harris Nov 20, 2018
358d852
some component binding stuff
Rich-Harris Nov 20, 2018
32e142c
add some dev mode checking
Rich-Harris Nov 21, 2018
2fc7542
fix test
Rich-Harris Nov 21, 2018
eb6f7c3
bail out of change tracking on encountering function calls in templat…
Rich-Harris Nov 21, 2018
aceb3b7
fix test
Rich-Harris Nov 21, 2018
fecda03
rename onmount,ondestroy,onprops,onupdate to onMount,onDestroy,before…
Rich-Harris Nov 21, 2018
4ad548c
update test
Rich-Harris Nov 21, 2018
dbb11a5
update some tests
Rich-Harris Nov 21, 2018
e37cdd1
implement event shorthand
Rich-Harris Nov 21, 2018
c95ba68
delete/update tests
Rich-Harris Nov 21, 2018
3789c71
minor fixes
Rich-Harris Nov 21, 2018
73d269c
remove obsolete tests
Rich-Harris Nov 21, 2018
989cc6d
ignore globals
Rich-Harris Nov 21, 2018
0adadd9
contextual binding fix
Rich-Harris Nov 21, 2018
6c854a6
remove test - invalid identifiers will no longer work
Rich-Harris Nov 21, 2018
4c2fdcf
fix contextual component bindings
Rich-Harris Nov 21, 2018
f13c227
update tests
Rich-Harris Nov 21, 2018
880702d
fix event context
Rich-Harris Nov 21, 2018
b28f87a
remove obsolete tests
Rich-Harris Nov 21, 2018
35412a9
dynamic component events
Rich-Harris Nov 22, 2018
58e532f
component shorthand events
Rich-Harris Nov 22, 2018
de0830b
warn on missing data
Rich-Harris Nov 22, 2018
a561918
warn when trying to set read-only data
Rich-Harris Nov 22, 2018
3362c68
fix
Rich-Harris Nov 22, 2018
72f3fde
run afterRender after onMount
Rich-Harris Nov 22, 2018
e03f8d6
handle nightmarish infinite loop situation
Rich-Harris Nov 22, 2018
4d12065
fix lifecycle order, add CSS if necessary
Rich-Harris Nov 22, 2018
7610ee1
update estree-walker
Rich-Harris Nov 23, 2018
2a26afe
update some tests
Rich-Harris Nov 23, 2018
e5a5d89
unified approach to hoisted functions
Rich-Harris Nov 23, 2018
85a4b52
remove unused imports
Rich-Harris Nov 23, 2018
aaf7acc
use hoisting mechanism for components
Rich-Harris Nov 23, 2018
6786e1b
fix shorthand events
Rich-Harris Nov 23, 2018
f93a647
add component event declarations
Rich-Harris Nov 23, 2018
8f0a00d
oops
Rich-Harris Nov 23, 2018
b58d81b
fix a few tests
Rich-Harris Nov 23, 2018
2bd3ccc
indirect dependencies, ugh
Rich-Harris Nov 23, 2018
8e6084d
fix some binding tests
Rich-Harris Nov 23, 2018
ff0abb1
update some more tests
Rich-Harris Nov 23, 2018
c70707c
more sophisticated instrumentation
Rich-Harris Nov 24, 2018
b55ba7a
fix destructuring test
Rich-Harris Nov 24, 2018
d721544
prevent double declarations
Rich-Harris Nov 24, 2018
0fe16c8
remove some unused (and weird) code. honestly, all the binding stuff …
Rich-Harris Nov 24, 2018
ac1be5d
fix for contextual bindings
Rich-Harris Nov 24, 2018
8515129
fix test
Rich-Harris Nov 24, 2018
8ff75d7
remove console-group, no longer necessary
Rich-Harris Nov 24, 2018
5d267f7
only inject props and refs if necessary
Rich-Harris Nov 24, 2018
ed35cdb
remove unused superclass method
Rich-Harris Nov 24, 2018
7601658
fix test
Rich-Harris Nov 24, 2018
d5d854c
remove double condition
Rich-Harris Nov 24, 2018
fba0f58
fix tests
Rich-Harris Nov 24, 2018
a18ef98
functions in attributes
Rich-Harris Nov 24, 2018
4231c62
fix some more tests
Rich-Harris Nov 24, 2018
83318b6
window dimension bindings
Rich-Harris Nov 24, 2018
bc0f381
document events
Rich-Harris Nov 24, 2018
ed39c85
fix some more tests
Rich-Harris Nov 24, 2018
be59af9
update immutability test, though may need to be skipped for now
Rich-Harris Nov 24, 2018
1d72b6b
skip awkward test
Rich-Harris Nov 24, 2018
f765da2
allow missing slots
Rich-Harris Nov 24, 2018
fc89c0f
fix test
Rich-Harris Nov 24, 2018
e0faadb
hydration
Rich-Harris Nov 24, 2018
2f7bce4
fix hydration
Rich-Harris Nov 24, 2018
829a649
transition events
Rich-Harris Nov 24, 2018
a2498bb
remove v2 options
Rich-Harris Nov 24, 2018
ad064e9
remove unused helper
Rich-Harris Nov 24, 2018
8d38bf2
remove unused helper
Rich-Harris Nov 24, 2018
f60487d
fix transition test
Rich-Harris Nov 24, 2018
d9854c5
update some tests
Rich-Harris Nov 24, 2018
49a747f
skip-ssr -> skip_if_ssr
Rich-Harris Nov 24, 2018
a7fe669
update refs on outro
Rich-Harris Nov 24, 2018
8cc12b7
allow actions on <svelte:window>
Rich-Harris Nov 24, 2018
66fa88b
delete this.options test, sorry everyone
Rich-Harris Nov 24, 2018
abc39ee
spread props
Rich-Harris Nov 24, 2018
13def49
ondestroy before destroy
Rich-Harris Nov 24, 2018
366bf07
modify tests so we can add new things i.e. preload
Rich-Harris Nov 24, 2018
bcaf5e0
module context
Rich-Harris Nov 24, 2018
0ddfbed
remove format tests
Rich-Harris Nov 24, 2018
210173e
include module exports e.g. preload. remove AMD, UMD and IIFE output
Rich-Harris Nov 24, 2018
6fd8fbf
dont try to be clever with module interop
Rich-Harris Nov 24, 2018
b33f2d8
tidy up
Rich-Harris Nov 25, 2018
05a4f5d
trace dependencies where possible
Rich-Harris Nov 25, 2018
701af7f
only make component dirty if value has changed
Rich-Harris Nov 25, 2018
37fd164
hacky fix for missing target warning
Rich-Harris Nov 25, 2018
a653938
fix test
Rich-Harris Nov 25, 2018
040f0f0
handle export {...} in script, fix test
Rich-Harris Nov 25, 2018
cefd06d
skip unnecessary flushes
Rich-Harris Nov 25, 2018
cd805d6
remounting
Rich-Harris Nov 25, 2018
a9d2170
shuffle files around
Rich-Harris Nov 25, 2018
e6d738d
remount components correctly
Rich-Harris Nov 25, 2018
2936a7e
remove unnecessary indentation
Rich-Harris Nov 25, 2018
0142031
neater (but still broken) lock mechanism
Rich-Harris Nov 25, 2018
a1400eb
flush bindings in separate phase before render callbacks
Rich-Harris Nov 25, 2018
8be71c9
remove obsolete test
Rich-Harris Nov 25, 2018
b161f8d
fix external path for CLI
Rich-Harris Nov 25, 2018
85985a0
bump version to 3.0.0-alpha1, so we can npm publish this thing
Rich-Harris Nov 25, 2018
97b0fb6
partial fix for custom element tests
Rich-Harris Nov 25, 2018
0019873
neaten things up a bit (gets us closer to supporting custom elements …
Rich-Harris Nov 26, 2018
8d3fd4d
beforeRender/afterRender -> beforeUpdate/afterUpdate
Rich-Harris Nov 26, 2018
ae3a7dd
shuffle things around
Rich-Harris Nov 26, 2018
5ccba4b
fix beforeUpdate/afterUpdate exports
Conduitry Nov 26, 2018
5030385
custom elements sort of working
Rich-Harris Nov 26, 2018
749ad9b
custom element fixes
Rich-Harris Nov 26, 2018
3eb7ff7
Merge branch 'rfc-1' of github.com:sveltejs/svelte into rfc-1
Rich-Harris Nov 26, 2018
93110e9
skip this test; not sure we want this behaviour anyway
Rich-Harris Nov 26, 2018
db31d92
add dev mode missing prop check
Rich-Harris Nov 26, 2018
636787d
get most hydration tests passing
Rich-Harris Nov 26, 2018
cedbb28
fix debugging output
Rich-Harris Nov 26, 2018
30ae710
fix: remove chalk
lukeed Nov 26, 2018
862d52c
fix: update kleur
lukeed Nov 26, 2018
1c81f85
fix parser tests
Rich-Harris Nov 27, 2018
2123071
include sourcemap tests (and skip a tricky one, for now)
Rich-Harris Nov 27, 2018
d039bac
remove some unused validator tests
Rich-Harris Nov 27, 2018
dc787d3
update pkg.files
Rich-Harris Nov 27, 2018
6bb5c79
remove a bunch more validation tests
Rich-Harris Nov 27, 2018
75bb357
update/delete various validation tests
Rich-Harris Nov 27, 2018
f35edaf
more validation tests
Rich-Harris Nov 27, 2018
4ff67de
Merge pull request #1864 from sveltejs/fix-chalk
Rich-Harris Nov 27, 2018
d8d125b
Update src/compile/wrapModule.ts
Conduitry Dec 1, 2018
b551349
Update src/compile/nodes/InlineComponent.ts
Conduitry Dec 1, 2018
68464ca
get all remaining validator tests passing except the event modifier s…
Rich-Harris Dec 1, 2018
59e7786
expose stats.templateReferences
Conduitry Dec 1, 2018
39deda6
Merge pull request #1866 from sveltejs/rfc-1-template-properties
Rich-Harris Dec 1, 2018
aca79ac
get a few CSS tests passing. will need to do SSR before doing the rest
Rich-Harris Dec 1, 2018
0e87952
basic plumbing for SSR
Rich-Harris Dec 1, 2018
2f627b2
volte-face
Rich-Harris Dec 1, 2018
be806f5
remove some test output from repo
Rich-Harris Dec 1, 2018
f56aab6
Merge branch 'rfc-1' of github.com:sveltejs/svelte into rfc-1
Rich-Harris Dec 1, 2018
a23bf00
get some SSR tests passing
Rich-Harris Dec 1, 2018
72b9254
fix all runtime tests broken by SSR work
Rich-Harris Dec 1, 2018
4e5fd7f
rewrite imports from svelte when testing
Rich-Harris Dec 1, 2018
ceb37e0
fixes
Rich-Harris Dec 1, 2018
6060a30
do instrumentation in render-dom
Rich-Harris Dec 2, 2018
a09dc36
tidy up custom element options
Rich-Harris Dec 2, 2018
f33c5ee
more minor tidying
Rich-Harris Dec 2, 2018
ad653c5
more tidying up
Rich-Harris Dec 2, 2018
7407bcc
some aspirational compiler output
Rich-Harris Dec 2, 2018
b026f04
inject props at declaration site
Rich-Harris Dec 2, 2018
f648bb6
skip definition if unnecessary
Rich-Harris Dec 2, 2018
578a2bc
inject props
Rich-Harris Dec 2, 2018
ed23d7a
various tweaks
Rich-Harris Dec 2, 2018
a20bbc4
remove svelte.parse and svelte.create from public API. dont see a way…
Rich-Harris Dec 2, 2018
b38d8e9
css tests
Rich-Harris Dec 2, 2018
03af42f
fix all CSS tests
Rich-Harris Dec 2, 2018
1cd946e
SSR bindings work. now to fix the other stuff i just broke
Rich-Harris Dec 3, 2018
1e8d7af
all SSR tests passing bar preload/spread
Rich-Harris Dec 3, 2018
91d2d00
get hydration tests running
Rich-Harris Dec 3, 2018
ec40106
update some js tests
Rich-Harris Dec 3, 2018
0e4dd20
dont store props in temp variable unnecessarily
Rich-Harris Dec 3, 2018
8c73826
update test
Rich-Harris Dec 4, 2018
a2c6832
hoist declarations where possible
Rich-Harris Dec 4, 2018
8e32baf
various code generation tweaks and improvements
Rich-Harris Dec 5, 2018
b82ca07
fix prop concatenation
Rich-Harris Dec 5, 2018
5b7dc63
various fixes
Rich-Harris Dec 5, 2018
2598ce6
reënable all tests
Rich-Harris Dec 5, 2018
3ec39e6
minor fixes
Rich-Harris Dec 5, 2018
d31bd77
various fixes and test updates
Rich-Harris Dec 6, 2018
b331a40
remove stats.hooks
Rich-Harris Dec 6, 2018
f7f03dc
tweak output
Rich-Harris Dec 6, 2018
2f867be
inject spread props
Rich-Harris Dec 6, 2018
af99b4d
doh
Rich-Harris Dec 6, 2018
e9b2234
couple of fixes
Rich-Harris Dec 7, 2018
c7d4372
fix a test
Rich-Harris Dec 7, 2018
f452de4
partial fix for event modifier stuff
Rich-Harris Dec 7, 2018
5222a86
improve code generation for props corresponding to hoisted names
Rich-Harris Dec 8, 2018
9ead0e8
doh
Rich-Harris Dec 8, 2018
7e72b49
remove function invocation dependency tracking
Rich-Harris Dec 8, 2018
a390797
first crack at reactive declarations
Rich-Harris Dec 8, 2018
9b5589f
tweak code generation
Rich-Harris Dec 8, 2018
f288259
missing import
Rich-Harris Dec 8, 2018
5290988
avoid unnecessary if (changed.foo....) condiitons
Rich-Harris Dec 9, 2018
0e60a8c
use dynamic_dependencies instead of dependencies where possible
Rich-Harris Dec 9, 2018
e87ab18
hydration fix
Rich-Harris Dec 9, 2018
e394493
more efficient event listeners
Rich-Harris Dec 9, 2018
75bbd6b
implement event modifiers
Rich-Harris Dec 9, 2018
e38daf9
merge master -> rfc-1
Rich-Harris Dec 9, 2018
ab5e301
test on latest node
Rich-Harris Dec 9, 2018
1d2197a
reference store implementations
Rich-Harris Dec 9, 2018
951cbcd
fix dynamic title bug
Rich-Harris Dec 9, 2018
aa528e5
fix assignment to computed property
Rich-Harris Dec 9, 2018
a852760
fix instrumentation
Rich-Harris Dec 9, 2018
9112d10
try to fix appveyor config
Rich-Harris Dec 9, 2018
3b6d679
update deps, fix kleur usage
Rich-Harris Dec 9, 2018
20cab7b
bump alpha version
Rich-Harris Dec 12, 2018
2d24e62
see if this fixes windows tests
Rich-Harris Dec 12, 2018
8027551
update js tests
Rich-Harris Dec 12, 2018
5a8da5d
ugh try this
Rich-Harris Dec 12, 2018
d245a18
and this
Rich-Harris Dec 12, 2018
e78a525
remove unused code
Rich-Harris Dec 12, 2018
1eab084
instrument destructuring assignments
Rich-Harris Dec 12, 2018
a534c66
handle destructuring assignments in template
Rich-Harris Dec 12, 2018
9dfc89e
instrument update expressions
Rich-Harris Dec 12, 2018
f08f407
fix for loop scoping
Rich-Harris Dec 12, 2018
2451bf5
Update src/compile/Component.ts
Conduitry Dec 13, 2018
44b61b1
Update store.js
Conduitry Dec 13, 2018
fd773c2
fix test
Rich-Harris Dec 13, 2018
6e5d03c
allow reactive declarations to depend on themselves
Rich-Harris Dec 13, 2018
acb64e1
move some tests, add a failing test
Rich-Harris Dec 13, 2018
6028fca
more failing tests
Rich-Harris Dec 13, 2018
de3002b
Merge branch 'rfc-1' of github.com:sveltejs/svelte into rfc-1
Rich-Harris Dec 13, 2018
6ecf9e5
dont shadow module context
Rich-Harris Dec 13, 2018
43cdd94
prevent invalid scripts
Rich-Harris Dec 13, 2018
2f49125
dont run reactive declarations twice on init
Rich-Harris Dec 13, 2018
50c2b5b
add braces around instrumented block-less if statements etc
Rich-Harris Dec 13, 2018
9960780
add braces around instrumented if blocks in template
Rich-Harris Dec 15, 2018
e6eb10c
insert semicolons in the right place
Rich-Harris Dec 15, 2018
61e2896
warn on undefined values in template
Rich-Harris Dec 15, 2018
f4bee21
disallow non-expression directive values
Rich-Harris Dec 15, 2018
ba5c3ce
replace `x = x` altogether
Rich-Harris Dec 15, 2018
d92fb12
prevent cyclical dependency detection false positives
Rich-Harris Dec 15, 2018
e141ce2
replace x = x in template
Rich-Harris Dec 15, 2018
6619d40
merge master -> rfc-1
Rich-Harris Dec 16, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 5 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
.DS_Store
.nyc_output
node_modules
*.map
/cli/
/compiler/
/ssr/
/shared.js
/internal.js
/compiler.js
/scratch/
/coverage/
/coverage.lcov/
Expand All @@ -13,7 +15,7 @@ node_modules
/test/sourcemaps/samples/*/output.js.map
/test/sourcemaps/samples/*/output.css
/test/sourcemaps/samples/*/output.css.map
/src/compile/shared.ts
/store.umd.js
/yarn-error.log
_actual*.*
_actual*.*
_*/
1 change: 0 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
language: node_js
node_js:
- "6"
- "node"

env:
Expand Down
2 changes: 1 addition & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ init:
environment:
matrix:
# node.js
- nodejs_version: 6
- nodejs_version: 10

install:
- ps: Install-Product node $env:nodejs_version
Expand Down
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export {
onMount,
onDestroy,
beforeUpdate,
afterUpdate,
createEventDispatcher
} from './internal.js';
Loading