Drop m.version (#2466)
* Drop `m.version` It's caused way too much grief over the years, and I've finally decided it's worth pitching. For those who need it, it's easy to get, especially if you use it through Node or a build system. And for those who are just loading it globally, you have to explicitly specify the version anyways, so you'd be just as golden if you followed it up with a simple inline script that does `m.version = "the version you loaded"`. Oh, and also, you shouldn't be coding specifically for version numbers, either - it's a known anti-pattern. Instead, you should prefer feature detection and just do the right thing. * Update changelog [skip ci]
This commit is contained in:
parent
02a91356c0
commit
904b63b2aa
7 changed files with 2 additions and 47 deletions
|
|
@ -60,6 +60,7 @@
|
|||
- redraw: `mithril/redraw` now just exposes the `m.redraw` callback ([#2458](https://github.com/MithrilJS/mithril.js/pull/2458) [@isiahmeadows](https://github.com/isiahmeadows))
|
||||
- The `.schedule`, `.unschedule`, and `.render` properties of the former `redrawService` are all removed.
|
||||
- If you want to know how to work around it, look at the call to `mount` in Mithril's source for `m.route`. That should help you in finding ways around the removed feature. (It doesn't take that much more code.)
|
||||
- api: `m.version` has been removed. If you really need the version for whatever reason, just read the `version` field of `mithril/package.json` directly. ([#2466](https://github.com/MithrilJS/mithril.js/pull/2466) [@isiahmeadows](https://github.com/isiahmeadows))
|
||||
|
||||
|
||||
#### News
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue