Skip to content

0.4.0

Compare
Choose a tag to compare
@Jack-Works Jack-Works released this 12 Jul 13:25
· 322 commits to master since this release

You can install it on npm now.

πŸ’₯ Breaking Changes

Import path changes

  • For UMD version. We changed import url (0b414cf)
+/umd/index.js
-/dist/out.js
+es/util/ValueRef
-es/DOM/Watcher/Watchers/ValueRef
  • AsyncCall has move from src/Extension/Async-Call to src/util/AsyncCall
+es/util/AsyncCall
-es/Extension/Async-Call

AsyncCall breaking changes

  • option.dontThrowOnNotImplemented has changed to option.strict.methodNotFound (1e7af22)
  • option.MessageCenter has changed to option.messageChannel, and it's type has changed too (fc0e5cb)
  • option.writeToConsole has changed to option.log and have more options you can modify (1e7af22)
  • JSONSerialization's replacer and receiver parameter has fixed and its type has changed (cb886da)

DomProxy breaking changes

  • .weakAfter and .weakBefore has changed to .has('before') and .has('after')

Watcher breaking changes

  • Both event name and data structure emitted by Watcher has changed (bc999fd)
  • .assignKeys has splitted into 2 apis .assignKeys and .setComparer (3a1e6fe)
  • Remove .once() and Watcher implements PromiseLike<T>, so you can just await watcher to get the result (options still supported) (d763ebd)
  • Change .useNodeForeach() to .useForeach() and any type of Watcher can use this API now (bc999fd)

πŸ†• New Feature

AsyncCall

Now AsyncCall is a JSONRPC 2.0 compatible server and client!

  • New option option.log, you can control what to log to the console (1e7af22)
  • New option option.parameterStructures to let AsyncCall behavior send by-name parameters if possible (cb886da)
  • New option option.strict to disable AsyncCall's non-standard JSONRPC behaviors (1e7af22)

AutomatedTabTask

  • New option option.needRedirect and option.runAtTabID let you run tasks on existing tab instead of open a new one (9eb4db0)

Watchers

  • All watcher now have a .enableSingleMode() which can improve the performance of the watcher when you only have 1 element emitted from the LiveSelector (bc999fd)

LiveSelector

  • LiveSelector now has a .enableSingleMode() which can improve performance when you only have 1 element to emit (bc999fd)
  • .map now have 2nd and 3rd parameter just like Array (20d3775)

MessageCenter

  • MessageCenter now has a alias .emit to .send (fc0e5cb)
  • MessageCenter now extends EventTarget (fc0e5cb)

πŸ› Bug Fixes

  • d761c17 - Fix Watcher.firstVirtualNode not responding to setDomOption
  • 5cdabb1 - Fix "this" error on requestIdleCallback on Firefox
  • 03073dc - Widen Element to Node in DomProxy and Watcher. Fix when undefined emitted, watcher will not clear the old realCurrent
  • 424f302 - fix(Watcher): fix warning

πŸ‘©β€πŸ’» Miscellaneous

  • 0b414cf - ci: update project config
  • bc1efe1 - doc: tutorial up to date