-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
WIP: Mobx4 #1321
Merged
Merged
WIP: Mobx4 #1321
Changes from 17 commits
Commits
Show all changes
204 commits
Select commit
Hold shift + click to select a range
6d71f48
Don't try/catch errors when globalstate.disableErrorBoundaries is on.
NaridaL 2f32c15
Allow autorunAsync to take a debouncing function in addition to a delay
TrentHouliston 7510b81
Add unit test for autorunAsync scheduling function
TrentHouliston 787bf5a
Make types more explicit
TrentHouliston 4077755
Increase time to execute the test for travis
TrentHouliston 9be342e
Update changelog
TrentHouliston e805559
killed old modifiers
mweststrate 31744bb
Dropped bower support. Fixes #1263
mweststrate 49514b1
Implemented #1089: throw if there are multiple mobx instances
mweststrate 4bcdb97
Fixed exports
mweststrate 53edb5c
Dropped `.extras` namespace
mweststrate cef553b
Fixing tests
mweststrate cc5ccd4
Fixed tests :)
mweststrate df6d17c
`observable(value)` no longer accepts primitives. Use `observable.bo…
mweststrate b0ce8bc
introduced `isObservableProp` and `isComputedProp`
mweststrate dd21bc1
Jest cleanup: don't log errors as side effects
mweststrate 15d6a1e
Removed all remaining leaking console logs
mweststrate dad19a2
Snapshotted whyrun test
mweststrate 78df300
Fixed newline issues
mweststrate 208390f
Whyrun will now print why a computed value / reaction is re-running
mweststrate b0f37df
fixed state sharing tests
mweststrate 0d4e0a7
Merged in master
mweststrate 3c55d85
Killed whyRun
mweststrate 350efdc
Created a MobX4 todo list
mweststrate 967c557
Improved error messages
mweststrate 53a3d31
upgraded to TS 2.7
mweststrate 6f1829e
cleaned up reaction api
mweststrate 60507a4
Merge branch 'master' of https://github.com/TrentHouliston/mobx into …
mweststrate 6abdb58
Merged #1305 into mobx4, added scheduler support for reactions as well
mweststrate 8390609
Made decorators work with Babel 7 (loose mode only)
mweststrate 9f5eda9
Disabled TS / Babel perf tests by default
mweststrate 51ded3a
Fixed performance tests
mweststrate 1e95ad4
fixed dependency issue with decorators
mweststrate f5cae00
extendObservable now extends objects in a single batch
mweststrate 26a8b55
Introduced `keys`. Observable objects now have an observable keyset
mweststrate 8b1ae86
Fixed a regression in toJS
mweststrate e510603
Fixed bug in `extendObservable`; values were not assigned to compute…
mweststrate aac6729
WIP `values` / `set` / `remove`
mweststrate 5292254
Added tests for `set`, `remove`, `values` and `keys` with several da…
mweststrate 8b4b650
Removed a todo
mweststrate bbc31c8
Introduced `decorate`
mweststrate d96e0e0
Removed debugger statement
mweststrate 51d6f74
Added typings & type test for decorate
mweststrate 0cb3568
Migrated spy tests to use snapshots
mweststrate 7f04ff5
spy events now report the name of the observable they are invoked upon.
mweststrate 2c88f33
decorate now supports plain objects as well
mweststrate c0d4e8f
fixed error handling tests, many were broken...
mweststrate 5135530
WIP improving onbecome(un)observed
mweststrate 701102c
onBecome(Un)Observed are now only triggered for observables that are …
mweststrate 65ef22a
Introduced `createAtom`, little cleanup
mweststrate 8f8cb22
Finished cleanup of createTransformer
mweststrate c79f843
Map / array api's now properly return iterator objects, instead of co…
mweststrate f758123
Fixed circular dependency problem with Atoms
mweststrate 1b4863a
Fixed bug in hook disposal
mweststrate bf7cca8
Fixed incorrect test
mweststrate 8e52f9f
Slightly faster object initialization
mweststrate a040981
Set up envify for conditional compilation
mweststrate fd8ab30
Introduced non-production only code for smaller / faster prod bundles
mweststrate 3fcb72d
Cleaned up unused stuff
mweststrate 1ab5ac5
Removed `expr`, now part of mobx-utils
mweststrate b55c7c0
Added prettier config file
mweststrate 1a74a29
Moved `createTransformer` to mobx-utils package
mweststrate e79f794
Cleaned a bunch of TODO's
mweststrate 65a0b98
More cleanup!
mweststrate 856aa26
Replaces `useStrict` with `configure`
mweststrate db3ff5b
Introduced `mobx.configure({ warnOnUnsafeComputationReads: true })`, …
mweststrate 1a4defd
isolateGlobalState has now become a configuration option
mweststrate 8c2f648
Added test to reproduce #1122
mweststrate ea8f603
Added test to confirm #1148 is fixed
mweststrate 1cde211
Merged changes
mweststrate 8691169
Added unit tests to verify #1241
mweststrate 56a1dcd
Little rename
mweststrate 71f702f
Fixed unnecessary warning when reading map entries
mweststrate f4601a2
Fixed some typings in typescript tests
mweststrate 1e7539e
Simplified the way computed values are constructed
mweststrate 3fc851c
Added jsconfig file to supress warnings on decorators in babel
mweststrate 54269bb
introduced `@computed(options)`. also introduced `requiresReaction`
mweststrate 601f93d
removing some dead code
mweststrate a857dca
Implemented #1301: specify onError handler on reactions as option
mweststrate 4e5c6cf
Merge remote-tracking branch 'origin/master' into mobx4
mweststrate 0344e90
Fixed a potential bug in `when`
mweststrate f111eba
Merge branch 'master' into mobx4
mweststrate 0fa557d
Fixed some compile errors
mweststrate 1b2d947
Fixed regression tests after merging master
mweststrate b157f41
alpha 1
mweststrate 7931d3b
extendObservable only accepts one arg
mweststrate e953595
extendObservable now takes an options object
mweststrate ef4bc3f
Fixed regression performance drop
mweststrate 515e4fc
Fixed compilation error
mweststrate 5833fe3
Merge remote-tracking branch 'origin/master' into mobx4
mweststrate 9443b69
Stop exposing `deepEqual` to outside world. Use `comparer.structural`…
mweststrate 9b70833
Merged #817
mweststrate 04d3fe6
Merged #800
mweststrate e3e4907
Fixed tests
mweststrate 32caff5
Fixed compilation error
mweststrate 458f32e
More tests
mweststrate 259e87c
Map definition is now based on es2015.collection
mweststrate be4ad7f
Enabled toJS to return Maps
mweststrate 2dba343
Merge branch 'maps' into mobx4
mweststrate 3bde5bc
fixed performance tests
mweststrate ac73be4
Simplified computed api
mweststrate 1d5250e
naive extendObservable implementation
mweststrate 0bf1c41
Made extendObservable stricter
mweststrate e4ff32d
observables test now passes
mweststrate 6c41659
Added unit test for decorate
mweststrate 5e31c81
Fixed some tests
mweststrate 7695f97
`set` can now take a bag of arguments
mweststrate 33023e8
extend now supports decorators
mweststrate f1b09ab
`observable.object` now accepts decorators
mweststrate 4dabbee
Fixed most tests
mweststrate 9fd1366
Structure etc works again
mweststrate bb5edeb
Killed modifiers :)
mweststrate ccfec38
test cleanup
mweststrate ea85186
Tiny improvements
mweststrate 73bf899
Deprecated shallow api
mweststrate 820286a
alpha 2
mweststrate f5a1892
todo's
mweststrate aaf71bd
WIP: optimizing initialization by skipping decorator
mweststrate 21a1880
more notes
mweststrate be049dc
some cleanup
mweststrate d632313
Little restructuring
mweststrate b4dee43
some fancy tests
mweststrate 42320c8
better decorators underway(?)
mweststrate 7ab27b2
Improved typings of object api
mweststrate c62631e
Make inheritance work
mweststrate c8938eb
Fixed auto property initialization
mweststrate 85f7c1c
Improve error on illegal property access
mweststrate 2e9e709
Updated tests for illegal access
mweststrate bde7707
all observable decorators now use decorators2
mweststrate 9e3877a
All observable decorators now use decorators2
mweststrate bc936bd
Rewriting computed
mweststrate 36d81fa
Computed now goes through decorators2
mweststrate 2c6c4a4
Cleaner property creation
mweststrate b7cf088
Support for non-enumerable props
mweststrate 3408d99
Made sure computed props are declared on proto
mweststrate e5eda2d
Actions on new decorator system part 1
mweststrate 75ecfa5
More efficient action instantiation
mweststrate 4c90629
Added bound action decorator
mweststrate e73e1c7
Simplifications
mweststrate 92d4e37
fixed compilation errors
mweststrate 8b7e847
make mobx.observable also accept options
mweststrate 78446a5
simplified extendObservable / property creation short-circuiting
mweststrate 3bbfcb5
added support for action short-circuiting
mweststrate 0613553
Cleanup
mweststrate f8008bb
cleanup
mweststrate 390a852
Merge branch 'better-decorators' into improved-observable-api
mweststrate 5014fbe
Merge branch 'improved-observable-api' into mobx4
mweststrate ec7a543
bugfix in bound actions
mweststrate eab222e
Cleanup in actions
mweststrate f80fd49
Processing TODO's
mweststrate c4a997a
Clean up decrators
mweststrate 20d8dbf
cleanup in observable decorator typings
mweststrate 5f87cdf
Setting new props now preserves existing enhancer
mweststrate 66af4e9
object key additions and removals are now interceptable and observable
mweststrate cce1468
More todos' processed
mweststrate 4c30db4
processing more todo's!
mweststrate 8c63aad
Merged #1361
mweststrate 9271180
Fixed compile errors
mweststrate afb3cc1
Added some environment checks
mweststrate b5f1155
Cleaned up api a bit further
mweststrate 441a315
Throw when using old apis
mweststrate c6e3088
cleaned up public api
mweststrate e5f4cf3
Todo's, fixed issues with actions
mweststrate f539f60
All todo's processed now :)
mweststrate eaa7f33
Fixed typings issue
mweststrate 6ec78b7
Added `timeout` option to `when`
mweststrate 51a3b88
When will now return a promise if invoked without effect function
mweststrate 168997e
Introduced `flow`
mweststrate 4a522fd
Fixes in typings
mweststrate f17a983
Little cleanups
mweststrate ab8680b
Updated flow typings
mweststrate 16b658d
Introduced `has`, `get`
mweststrate 1e81a9f
Release notes stuff
mweststrate 9644470
Updated changelog
mweststrate a301b71
Fix: computed properties are not considered part of the `keys` collec…
mweststrate 0c59f95
Typing fixes
mweststrate 95c20ec
Typing fix
mweststrate 9125e61
Added vs code config to repo, so others can debug with vscode
mweststrate 3e45406
Fixed module initialization issue
mweststrate b51c642
code cleanup
mweststrate bc677c2
Fixed module initialization
mweststrate 8a94211
Beta 2
mweststrate 4e6f084
Changelog fixes
mweststrate 9ce985f
Reproduced and fixed #1376
mweststrate 207c814
Removed unused function
mweststrate 9747018
Removed `dom` stdlib. Fixed some typing issues
mweststrate c47a05a
Beta 3
mweststrate d899917
Fixed #1379, CRA refusing to compile mobx.module.js
mweststrate a65d5f5
Fixed additional compilation issues
mweststrate 565be8a
introduced canceellable flows
mweststrate 9984b12
Additional test
mweststrate a8354cd
Deprecated array.move and findIndex arguments
mweststrate ac3f948
Updated readme to MobX 4
mweststrate 5525473
Better error handling setup for reactions
mweststrate de6c018
Cleaned up `ref.struct` / `deep.struct` decorators
mweststrate 12c7c6f
Merge branch 'master' into mobx4
mweststrate ac5fe77
Modifiers cleanup
mweststrate 36d690c
Iterator cleanup
mweststrate b0dbe24
Removed `@flow` decorator; as it's type signature is misleading
mweststrate 9e805b5
Use `generator.return` rather than `throw` for cancellation
mweststrate fe8131c
Promises cancel recursively
mweststrate 5ab68b1
Anything can now be yielded from flows
mweststrate cbfbbca
Added support for async iterators
mweststrate 298ce84
Merge branch 'cancellable-flows' into mobx4
mweststrate 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 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
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
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.
Does this mean that
@observable foo = 5
won't work anymore and we'd need to@observable.box foo = 5
?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.
afaik this is just for the function API
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.
Good, I think
@observable.box foo = 5
would be tedious to do every time since it's a pretty common use case for me to have observable value properties.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.
@benjamingr correct, it is only for the function version, to make the result more predicatable (previously you would 'suddenly' get a box around your value if the value itself could not be made observable)
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.
Thanks @mweststrate, any update on using proxies for arrays? :D
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.
@benjamingr yes, after cleaning up everything in mobx 4, I will try to publish mobx 5, which is the same but with proxies in a foreseeable time