Skip to content

Releases: MithrilJS/mithril.js

v2.0.0-rc.1

07 Nov 17:48
Compare
Choose a tag to compare
v2.0.0-rc.1 Pre-release
Pre-release

Breaking changes

  • API: Component vnode children are not normalized into vnodes on ingestion; normalization only happens if and when they are ingested by the view (#2155 (thanks to @magikstm for related optimization #2064))
  • API: m.redraw() is always asynchronous (#1592)
  • API: m.mount() will only render its own root when called, it will not trigger a redraw() (#1592)
  • API: Assigning to vnode.state (as in vnode.state = ...) is no longer supported. Instead, an error is thrown if vnode.state changes upon the invocation of a lifecycle hook.
  • API: m.request will no longer reject the Promise on server errors (eg. status >= 400) if the caller supplies an extract callback. This gives applications more control over handling server responses.
  • hyperscript: when attributes have a null or undefined value, they are treated as if they were absent. #1773 (#2174)
  • hyperscript: when an attribute is defined on both the first and second argument (as a CSS selector and an attrs field, respectively), the latter takes precedence, except for class attributes that are still added together. #2172 (#2174)
  • stream: when a stream conditionally returns HALT, dependant stream will also end (#2200)
  • render: remove some redundancy within the component initialization code (#2213)
  • render: Align custom elements to work like normal elements, minus all the HTML-specific magic. (#2221)
  • render: simplify component removal (#2214)

News

  • API: Introduction of m.redraw.sync() (#1592)
  • API: Event handlers may also be objects with handleEvent methods (#1949, #2222).
  • API: m.route.link accepts an optional options object (#1930)
  • API: m.request better error message on JSON parse error - (#2195, @codeclown)
  • API: m.request supports timeout as attr - (#1966)
  • API: m.request supports responseType as attr - (#2193)
  • Mocks: add limited support for the DOMParser API (#2097)
  • API: add support for raw SVG in m.trust() string (#2097)
  • render/core: remove the DOM nodes recycling pool (#2122)
  • render/core: revamp the core diff engine, and introduce a longest-increasing-subsequence-based logic to minimize DOM operations when re-ordering keyed nodes.
  • API: Introduction of m.prop() (#2268)

Bug fixes

  • API: m.route.set() causes all mount points to be redrawn (#1592)
  • render/attrs: Using style objects in hyperscript calls will now properly diff style properties from one render to another as opposed to re-writing all element style properties every render.
  • render/attrs All vnodes attributes are properly removed when absent or set to null or undefined #1804 #2082 (#1865, #2130)
  • render/core: Render state correctly on select change event #1916 (#1918 @robinchew, #2052)
  • render/core: fix various updateNodes/removeNodes issues when the pool and fragments are involved #1990, #1991, #2003, #2021
  • render/core: fix crashes when the keyed vnodes with the same key had different tag values #2128 @JacksonJN (#2130)
  • render/core: fix cached nodes behavior in some keyed diff scenarios #2132 (#2130)
  • render/events: addEventListener and removeEventListener are always used to manage event subscriptions, preventing external interference.
  • render/events: Event listeners allocate less memory, swap at low cost, and are properly diffed now when rendered via m.mount()/m.redraw().
  • render/events: Object.prototype properties can no longer interfere with event listener calls.
  • render/events: Event handlers, when set to literally undefined (or any non-function), are now correctly removed.
  • render/hooks: fixed an ommission that caused oninit to be called unnecessarily in some cases #1992
  • docs: tweaks: (#2104 @mikeyb, #2205, @cavemansspa, #2265, @isiahmeadows)
  • render/core: avoid touching Object.prototype.__proto__ setter with key: "__proto__" in certain situations (#2251)
  • render/core: Vnodes stored in the dom node supplied to m.render() are now normalized #2266

v2.0.0-rc.0

25 Oct 18:58
Compare
Choose a tag to compare
v2.0.0-rc.0 Pre-release
Pre-release

Breaking changes

  • API: Component vnode children are not normalized into vnodes on ingestion; normalization only happens if and when they are ingested by the view (#2155 (thanks to @magikstm for related optimization #2064))
  • API: m.redraw() is always asynchronous (#1592)
  • API: m.mount() will only render its own root when called, it will not trigger a redraw() (#1592)
  • API: Assigning to vnode.state (as in vnode.state = ...) is no longer supported. Instead, an error is thrown if vnode.state changes upon the invocation of a lifecycle hook.
  • API: m.request will no longer reject the Promise on server errors (eg. status >= 400) if the caller supplies an extract callback. This gives applications more control over handling server responses.
  • hyperscript: when attributes have a null or undefined value, they are treated as if they were absent. #1773 (#2174)
  • hyperscript: when an attribute is defined on both the first and second argument (as a CSS selector and an attrs field, respectively), the latter takes precedence, except for class attributes that are still added together. #2172 (#2174)
  • stream: when a stream conditionally returns HALT, dependant stream will also end (#2200)
  • render: remove some redundancy within the component initialization code (#2213)
  • render: Align custom elements to work like normal elements, minus all the HTML-specific magic. (#2221)
  • render: simplify component removal (#2214)

News

  • API: Introduction of m.redraw.sync() (#1592)
  • API: Event handlers may also be objects with handleEvent methods (#1949, #2222).
  • API: m.route.link accepts an optional options object (#1930)
  • API: m.request better error message on JSON parse error - (#2195, @codeclown)
  • API: m.request supports timeout as attr - (#1966)
  • API: m.request supports responseType as attr - (#2193)
  • Mocks: add limited support for the DOMParser API (#2097)
  • API: add support for raw SVG in m.trust() string (#2097)
  • render/core: remove the DOM nodes recycling pool (#2122)
  • render/core: revamp the core diff engine, and introduce a longest-increasing-subsequence-based logic to minimize DOM operations when re-ordering keyed nodes.

Bug fixes

  • API: m.route.set() causes all mount points to be redrawn (#1592)
  • render/attrs: Using style objects in hyperscript calls will now properly diff style properties from one render to another as opposed to re-writing all element style properties every render.
  • render/attrs All vnodes attributes are properly removed when absent or set to null or undefined #1804 #2082 (#1865, #2130)
  • render/core: Render state correctly on select change event #1916 (#1918 @robinchew, #2052)
  • render/core: fix various updateNodes/removeNodes issues when the pool and fragments are involved #1990, #1991, #2003, #2021
  • render/core: fix crashes when the keyed vnodes with the same key had different tag values #2128 @JacksonJN (#2130)
  • render/core: fix cached nodes behavior in some keyed diff scenarios #2132 (#2130)
  • render/events: addEventListener and removeEventListener are always used to manage event subscriptions, preventing external interference.
  • render/events: Event listeners allocate less memory, swap at low cost, and are properly diffed now when rendered via m.mount()/m.redraw().
  • render/events: Object.prototype properties can no longer interfere with event listener calls.
  • render/events: Event handlers, when set to literally undefined (or any non-function), are now correctly removed.
  • render/hooks: fixed an ommission that caused oninit to be called unnecessarily in some cases #1992
  • docs: tweaks: (#2104 @mikeyb, #2205, @cavemansspa)
  • render/core: avoid touching Object.prototype.__proto__ setter with key: "__proto__" in certain situations (#2251)

ospec-v3.0.1

30 Jun 18:31
Compare
Choose a tag to compare
[ospec] v3.0.1

ospec-v3.0.0

26 Jun 10:05
Compare
Choose a tag to compare
[opec] v3.0.0

ospec-v2.1.0

25 May 15:24
64b1e47
Compare
Choose a tag to compare
Change log cleanup

ospec-v2_0_0

09 May 19:07
Compare
Choose a tag to compare
[ospec] v2.0.0

v1.1.6

01 Dec 13:37
Compare
Choose a tag to compare
v1.1.6

v1.1.5

13 Oct 23:09
Compare
Choose a tag to compare
  • API: If a user sets the Content-Type header within a request's options, that value will be the entire header value rather than being appended to the default value (#1924)

v1.1.4

26 Sep 20:20
Compare
Choose a tag to compare

Bug fixes:

  • core: don't call onremove on the children of components that return null from the view #1921 octavore (#1922)
  • hypertext: correct handling of shared attributes object passed to m(). Will copy attributes when it's necessary #1941 s-ilya (#1942)
  • Fix IE bug where active element is null causing render function to throw error. (1943)

Ospec improvements:

  • Log using util.inspect to show object content instead of "[object Object]" (#1661, @porsager)

v1.1.3

11 Jul 10:32
Compare
Choose a tag to compare

Bug fixes:

  • move out npm dependencies added by mistake