v1.1.2 change log
This commit is contained in:
parent
fbcefe3180
commit
868372ac54
1 changed files with 76 additions and 48 deletions
|
|
@ -1,5 +1,6 @@
|
||||||
# Change log
|
# Change log
|
||||||
|
|
||||||
|
- [v1.1.2](#v112)
|
||||||
- [v1.1.1](#v111)
|
- [v1.1.1](#v111)
|
||||||
- [v1.1.0](#v110)
|
- [v1.1.0](#v110)
|
||||||
- [v1.0.1](#v101)
|
- [v1.0.1](#v101)
|
||||||
|
|
@ -8,6 +9,33 @@
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
### v1.1.2
|
||||||
|
|
||||||
|
#### Bug fixes:
|
||||||
|
|
||||||
|
- core: Namespace fixes [#1819](https://github.com/MithrilJS/mithril.js/issues/1819), ([#1825](https://github.com/MithrilJS/mithril.js/pull/1825) [@SamuelTilly](https://github.com/SamuelTilly)), [#1820](https://github.com/MithrilJS/mithril.js/issues/1820) ([#1864](https://github.com/MithrilJS/mithril.js/pull/1864)), [#1872](https://github.com/MithrilJS/mithril.js/issues/1872) ([#1873](https://github.com/MithrilJS/mithril.js/pull/1873))
|
||||||
|
- core: Fix select option to allow empty string value [#1814](https://github.com/MithrilJS/mithril.js/issues/1814) ([#1828](https://github.com/MithrilJS/mithril.js/pull/1828) [@spacejack](https://github.com/spacejack))
|
||||||
|
- core: Reset e.redraw when it was set to `false` [#1850](https://github.com/MithrilJS/mithril.js/issues/1850) ([#1890](https://github.com/MithrilJS/mithril.js/pull/1890))
|
||||||
|
- core: differentiate between `{ value: "" }` and `{ value: 0 }` for form elements [#1595 comment](https://github.com/MithrilJS/mithril.js/pull/1595#issuecomment-304071453) ([#1862](https://github.com/MithrilJS/mithril.js/pull/1862))
|
||||||
|
- core: Don't reset the cursor of textareas in IE10 when setting an identical `value` [#1870](https://github.com/MithrilJS/mithril.js/issues/1870) (([#1871](https://github.com/MithrilJS/mithril.js/pull/1871)))
|
||||||
|
- hypertext: Correct handling of `[value=""]` ([#1843](https://github.com/MithrilJS/mithril.js/issues/1843), [@CreaturesInUnitards](https://github.com/CreaturesInUnitards))
|
||||||
|
- router: Don't overwrite the options object when redirecting from `onmatch with m.route.set()` [#1857](https://github.com/MithrilJS/mithril.js/issues/1857) ([#1889](https://github.com/MithrilJS/mithril.js/pull/1889))
|
||||||
|
- stream: Move the "use strict" directive inside the IIFE [#1831](https://github.com/MithrilJS/mithril.js/issues/1831) ([#1893](https://github.com/MithrilJS/mithril.js/pull/1893))
|
||||||
|
|
||||||
|
#### Ospec improvements:
|
||||||
|
|
||||||
|
- Shell command: Ignore hidden directories and files ([#1855](https://github.com/MithrilJS/mithril.js/pull/1855) [@pdfernhout)](https://github.com/pdfernhout))
|
||||||
|
- Library: Add the possibility to name new test suites ([#1529](https://github.com/MithrilJS/mithril.js/pull/1529))
|
||||||
|
|
||||||
|
#### Docs / Repo maintenance:
|
||||||
|
|
||||||
|
Our thanks to [@0joshuaolson1](https://github.com/0joshuaolson1), [@ACXgit](https://github.com/ACXgit), [@cavemansspa](https://github.com/cavemansspa), [@CreaturesInUnitards](https://github.com/CreaturesInUnitards), [@dlepaux](https://github.com/dlepaux), [@isaaclyman](https://github.com/isaaclyman), [@kevinkace](https://github.com/kevinkace), [@micellius](https://github.com/micellius), [@spacejack](https://github.com/spacejack) and [@yurivish](https://github.com/yurivish)
|
||||||
|
|
||||||
|
#### Other:
|
||||||
|
|
||||||
|
- Addition of a performance regression test suite (#)
|
||||||
|
|
||||||
|
|
||||||
### v1.1.1
|
### v1.1.1
|
||||||
|
|
||||||
#### Bug fixes
|
#### Bug fixes
|
||||||
|
|
@ -155,7 +183,7 @@ m("div", {
|
||||||
// Called after the node is updated
|
// Called after the node is updated
|
||||||
onupdate : function(vnode) { /*...*/ },
|
onupdate : function(vnode) { /*...*/ },
|
||||||
// Called before the node is removed, return a Promise that resolves when
|
// Called before the node is removed, return a Promise that resolves when
|
||||||
// ready for the node to be removed from the DOM
|
// ready for the node to be removed from the DOM
|
||||||
onbeforeremove : function(vnode) { /*...*/ },
|
onbeforeremove : function(vnode) { /*...*/ },
|
||||||
// Called before the node is removed, but after onbeforeremove calls done()
|
// Called before the node is removed, but after onbeforeremove calls done()
|
||||||
onremove : function(vnode) { /*...*/ }
|
onremove : function(vnode) { /*...*/ }
|
||||||
|
|
@ -472,9 +500,9 @@ In `v0.2.x` reading route params was entirely handled through `m.route.param()`.
|
||||||
```javascript
|
```javascript
|
||||||
m.route(document.body, "/booga", {
|
m.route(document.body, "/booga", {
|
||||||
"/:attr" : {
|
"/:attr" : {
|
||||||
controller : function() {
|
controller : function() {
|
||||||
m.route.param("attr") // "booga"
|
m.route.param("attr") // "booga"
|
||||||
},
|
},
|
||||||
view : function() {
|
view : function() {
|
||||||
m.route.param("attr") // "booga"
|
m.route.param("attr") // "booga"
|
||||||
}
|
}
|
||||||
|
|
@ -489,11 +517,11 @@ m.route(document.body, "/booga", {
|
||||||
"/:attr" : {
|
"/:attr" : {
|
||||||
oninit : function(vnode) {
|
oninit : function(vnode) {
|
||||||
vnode.attrs.attr // "booga"
|
vnode.attrs.attr // "booga"
|
||||||
m.route.param("attr") // "booga"
|
m.route.param("attr") // "booga"
|
||||||
},
|
},
|
||||||
view : function(vnode) {
|
view : function(vnode) {
|
||||||
vnode.attrs.attr // "booga"
|
vnode.attrs.attr // "booga"
|
||||||
m.route.param("attr") // "booga"
|
m.route.param("attr") // "booga"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
@ -531,14 +559,14 @@ It is no longer possible to prevent unmounting via `onunload`'s `e.preventDefaul
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var Component = {
|
var Component = {
|
||||||
controller: function() {
|
controller: function() {
|
||||||
this.onunload = function(e) {
|
this.onunload = function(e) {
|
||||||
if (condition) e.preventDefault()
|
if (condition) e.preventDefault()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
view: function() {
|
view: function() {
|
||||||
return m("a[href=/]", {config: m.route})
|
return m("a[href=/]", {config: m.route})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -546,9 +574,9 @@ var Component = {
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var Component = {
|
var Component = {
|
||||||
view: function() {
|
view: function() {
|
||||||
return m("a", {onclick: function() {if (!condition) m.route.set("/")}})
|
return m("a", {onclick: function() {if (!condition) m.route.set("/")}})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -562,14 +590,14 @@ Components no longer call `this.onunload` when they are being removed. They now
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var Component = {
|
var Component = {
|
||||||
controller: function() {
|
controller: function() {
|
||||||
this.onunload = function(e) {
|
this.onunload = function(e) {
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
view: function() {
|
view: function() {
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -577,12 +605,12 @@ var Component = {
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var Component = {
|
var Component = {
|
||||||
onremove : function() {
|
onremove : function() {
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
view: function() {
|
view: function() {
|
||||||
// ...
|
// ...
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -598,13 +626,13 @@ In addition, requests no longer have `m.startComputation`/`m.endComputation` sem
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var data = m.request({
|
var data = m.request({
|
||||||
method: "GET",
|
method: "GET",
|
||||||
url: "https://api.github.com/",
|
url: "https://api.github.com/",
|
||||||
initialValue: [],
|
initialValue: [],
|
||||||
})
|
})
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
console.log(data())
|
console.log(data())
|
||||||
}, 1000)
|
}, 1000)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -613,15 +641,15 @@ setTimeout(function() {
|
||||||
```javascript
|
```javascript
|
||||||
var data = []
|
var data = []
|
||||||
m.request({
|
m.request({
|
||||||
method: "GET",
|
method: "GET",
|
||||||
url: "https://api.github.com/",
|
url: "https://api.github.com/",
|
||||||
})
|
})
|
||||||
.then(function (responseBody) {
|
.then(function (responseBody) {
|
||||||
data = responseBody
|
data = responseBody
|
||||||
})
|
})
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
console.log(data) // note: not a getter-setter
|
console.log(data) // note: not a getter-setter
|
||||||
}, 1000)
|
}, 1000)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -653,11 +681,11 @@ greetAsync()
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
var greetAsync = function() {
|
var greetAsync = function() {
|
||||||
return new Promise(function(resolve){
|
return new Promise(function(resolve){
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
resolve("hello")
|
resolve("hello")
|
||||||
}, 1000)
|
}, 1000)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
greetAsync()
|
greetAsync()
|
||||||
|
|
@ -679,7 +707,7 @@ m.sync([
|
||||||
m.request({ method: 'GET', url: 'https://api.github.com/users/isiahmeadows' }),
|
m.request({ method: 'GET', url: 'https://api.github.com/users/isiahmeadows' }),
|
||||||
])
|
])
|
||||||
.then(function (users) {
|
.then(function (users) {
|
||||||
console.log("Contributors:", users[0].name, "and", users[1].name)
|
console.log("Contributors:", users[0].name, "and", users[1].name)
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -691,7 +719,7 @@ Promise.all([
|
||||||
m.request({ method: 'GET', url: 'https://api.github.com/users/isiahmeadows' }),
|
m.request({ method: 'GET', url: 'https://api.github.com/users/isiahmeadows' }),
|
||||||
])
|
])
|
||||||
.then(function (users) {
|
.then(function (users) {
|
||||||
console.log("Contributors:", users[0].name, "and", users[1].name)
|
console.log("Contributors:", users[0].name, "and", users[1].name)
|
||||||
})
|
})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -706,7 +734,7 @@ In `v0.2.x`, the `xlink` namespace was the only supported attribute namespace, a
|
||||||
```javascript
|
```javascript
|
||||||
m("svg",
|
m("svg",
|
||||||
// the `href` attribute is namespaced automatically
|
// the `href` attribute is namespaced automatically
|
||||||
m("image[href='image.gif']")
|
m("image[href='image.gif']")
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
@ -715,7 +743,7 @@ m("svg",
|
||||||
```javascript
|
```javascript
|
||||||
m("svg",
|
m("svg",
|
||||||
// User-specified namespace on the `href` attribute
|
// User-specified namespace on the `href` attribute
|
||||||
m("image[xlink:href='image.gif']")
|
m("image[xlink:href='image.gif']")
|
||||||
)
|
)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue