This repository has been archived by the owner on Dec 20, 2023. It is now read-only.
Update dependency mithril to v2 (master) - autoclosed #331
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.
This PR contains the following updates:
~0.2.0
->~2.2.0
Release Notes
MithrilJS/mithril.js
v2.2.2
Compare Source
Release v2.2.2
Changelog
Patch Changes
Use markdown for the README badges (@pygy)
Use markdown for the README badges.
v2.2.1
Compare Source
Release v2.2.1
Changelog
Patch Changes
Move the chat to Zulip (@pygy)
This updates the documentation to link to the new Zulip chat room.
v2.2.0
Compare Source
Release v2.2.0
Changelog
Minor Changes
m.censor: work around a bunder bug (@kfule)
The internal bundler sometimes mangles the words in RegExp literals incorrectly. Please see below.
Warn about reusing mutated attrs object - fixes #2719 (@StephanHoyer)
Send URLSearchParams as request body without extra configuration (@Coteh)
This PR fixes an oddity I noticed in the way
m.request
handlesURLSearchParams
object. It now handles it in the same sort of way XHR and Fetch do it.Add
params:
tom.route.Link
, fix docs (@dead-claudia)Add
params:
tom.route.Link
. Minor fix to docs to reflect reality withm.route.Link
'sdisabled:
attribute.Allow Mithril to be loaded in non-browser environments without modification (@dead-claudia)
Recast the global reads to all be guarded with
typeof
, so that if they aren't defined, they're justnull
.Add a
m.Fragment = "["
utility for JSX users. (@dead-claudia)The title says it all, and the diff's obvious. Resolves MithrilJS/mithril.js#2640 and probably others.
Patch Changes
Enable --minimize-semver-change for pr-release (@JAForbes)
Minimizes semver changes on release to the minimum required version bump to satisfy major/minor/patch semver ranges. Minimizes the semver change so that.
Clean up m.route.Link (@barneycarroll)
An attempt at better demonstrating
m.route.Link
with less text. Fixes #2767.Runtime-deprecate ospec, change
change-log
tochangelog
, fix a few assorted bugs (@dead-claudia)This PR is in two parts: 1. Revise the build system and some of the local dev setup. Fully split ospec from the repo, and add it as a dependency.
Add meta description to docs (@StephanHoyer)
rework of #2149. added a meta description parser and meta descriptions to all docs pages. because google. built the docs, inspected the output manually.
Fixed badges, consistent naming of Mithril.js (@tbreuss)
use consistent naming of Mithril.js. fix badges in README. Fixes issue #2749.
Catch malformed URI Components (@jdiderik)
Fix for error thrown when a value contains non-valid / malformed URI Component. Example: test=%c5%a1%e8ZM%80%82H. will throw "URI malformed".
Correctly handle invalid escapes in routes based on 0a5ead31c9fbd7b153c521c7f9d3df7bf826ce6c (@StephanHoyer)
fixes #2061. @dead-claudia I just redid your change but slightly different in order to handle a mix of wrong and right encodings properly.
Standardise vnode text representation (@barneycarroll)
This addresses the crucial feature of #2669: text is always represented as virtual text nodes, never as a
vnode.text
.Issue 2624 no content 204 parse (@Evoke-PHP)
Added guard so that JSON.parse does not fail on IE11 with no content empty string being parsed. Fixes MithrilJS/mithril.js#2624.
[m.request] work around a bundler bug, fix #2647 (@pygy)
The bundler mangles identifier-like strings within RegExps, this works around the problem by not using such RegExps.
Reject request on XHR timeout (@kevinfiol)
Derived from PR #2581. Allows requests to properly reject on event of a timeout.
Remove extra isLifecycleMethod call from removeAttr (@ZeikJT)
Removing an extra isLifecycleMethod in the removeAttr method, it isn't needed since it's already checked on the previous line.
Fix #2601 (@dead-claudia)
Fix issue where ending a stream in the middle of a stream callback would result in erroneous parent stream state for the rest of that emit. Fixes #2601.
Add streams to releases again, include minified bundle, drop internal stuff from npm (@dead-claudia)
Add
stream/stream.js
to releases again. Addstream/stream.min.js
now that the process is remotely sane now.Make errors and their messages more accurate and helpful (@dead-claudia)
I updated error messages to be much more helpful.
Fix assertion descriptions (@soulofmischief)
I moved the return statement to the end of define() so that it returns even if the comparison fails.
Fix branch target (@dead-claudia)
https://github.com/MithrilJS/mithril.js/runs/6199543939?check_suite_focus=true.
Automate mithril's release workflow (@JAForbes)
Automated releases, pre-releases, (code) rollbacks and recovery, npm publishing, change log management just by using normal github flow.
rework jsx docs (@StephanHoyer)
Add Simple Application Flems Supporting v2.0.4 and up (@tbreuss)
Added Flems for Simple Application supporting v2.0.4 of Mithril.js. Fixes Issue #2710.
Make example work with webpack v5.69.1 (@StephanHoyer)
fixes #2634.
2604: correct and move text about statements in view method (@kevinfiol)
Addresses #2604.
Fix lint errors (@StephanHoyer)
WIP: Update modularisation details in Installation docs (@orbitbot)
added link to flems.io as an easier way to just try out the framework. -. Documentation has grown a bit stale.
Added power support for the travis.yml file with ppc64le (@sreekanth370)
Added power support for the travis.yml file with ppc64le. This is part of the Ubuntu distribution for ppc64le.
Updated babel/webpack docs to work with latest versions (@pereriksson)
As a developer I tried setting up Mithril with Babel and Webpack but failed because of a variety of errors.
[docs] route redirection using the history API (@pygy)
This is an attempt at fixing #1759, but there may be more to be added. Feedback welcome. ping @dontwork.
Bump path-parse from 1.0.6 to 1.0.7 (@dependabot[bot])
Bumps path-parse from 1.0.6 to 1.0.7. Commits. See full diff in compare view.
Bump glob-parent from 5.1.0 to 5.1.2 (@dependabot[bot])
Bumps glob-parent from 5.1.0 to 5.1.2. Release notes. Sourced from glob-parent's releases. v5.1.2. Bug Fixes.
Bump ajv from 6.10.2 to 6.12.6 (@dependabot[bot])
Bumps ajv from 6.10.2 to 6.12.6. Release notes. Sourced from ajv's releases. v6.12.6. Fix performance issue of "url" format.
Update standalone usage (@ghost)
Avoid double encoding of function signatures - fixes #2720 (@StephanHoyer)
Show previous versions (@mike-ward)
Add Dropdown that shows links to archived versions of the documentation.
docs: improve m.request return value description (@GAumala)
In the m.request return value description, add a line informing that error status codes cause the promise to reject.
A note on JSX events (@pereriksson)
Naming JSX events according to their documentation produces unexpected results with incorrectly named events when using JSX with Mithril.
Document route resolution cancellation, fixes #1759 (@barneycarroll)
Also fixes a broken internal link.
Bump marked from 0.7.0 to 4.0.10 (@dependabot[bot])
Bumps marked from 0.7.0 to 4.0.10. Release notes. Sourced from marked's releases. v4.0.10. 4.0.10 (2022-01-13). Bug Fixes.
Flems in docs (#2348) [skip ci] (@porsager)
Added flems instead of the current codepen samples.
Remove old TOC link (@ArthurClemens)
Content was moved some time ago and linked section no longer exists.
Cavemansspa patch 1 (@cavemansspa)
Documentation update.
Bump hosted-git-info from 2.8.4 to 2.8.9 (@dependabot[bot])
Bumps hosted-git-info from 2.8.4 to 2.8.9. Changelog. Sourced from hosted-git-info's changelog. 2.8.9 (2021-04-07).
Bump lodash from 4.17.20 to 4.17.21 (@dependabot[bot])
Bumps lodash from 4.17.20 to 4.17.21. Commits.
f299b52
Bump to v4.17.21.Bump handlebars from 4.7.6 to 4.7.7 (@dependabot[bot])
Bumps handlebars from 4.7.6 to 4.7.7. Changelog. Sourced from handlebars's changelog. v4.7.7 - February 15th, 2021.
Remove unreachable keyed node logic, fixes #2597 (@barneycarroll)
Delete test-utils/README.md (@dead-claudia)
We don't expose this publicly anymore, so there's literally no justification for this file's existence.
simple-application.md: consistent use of type=submit (@danbst)
When following tutorial and typing everything in, I was confused that Save button didn't work.
Fix inconsistent capitalizations of "JavaScript" (@mtsknn)
"Javascript"/"javascript" → "JavaScript". Fixes #2398, or at least I can't find any more incorrect capitalizations.
fix some typos (@osban)
Found some typos. Mainly unescaped
|
in tables, but also a few other irregularities. Not all problems are visible in the website docs.Replace mocha by ospec in testing page (@gamtiq)
Fixed a typo in testing doc page. Currently there is reference to
mocha
in the page whereasopsec
is used.Bump acorn from 7.1.0 to 7.4.0 (@dependabot[bot])
Bumps acorn from 7.1.0 to 7.4.0. Commits.
54efb62
Mark version 7.4.0.Bump handlebars from 4.4.2 to 4.7.6 (@dependabot[bot])
Bumps handlebars from 4.4.2 to 4.7.6. Changelog. Sourced from handlebars's changelog. v4.7.6 - April 3rd, 2020.
Bump lodash from 4.17.15 to 4.17.20 (@dependabot[bot])
Bumps lodash from 4.17.15 to 4.17.20. Commits.
ded9bc6
Bump to v4.17.20.63150ef
Documentation fixes.Bump minimist from 1.2.0 to 1.2.3 (@dependabot[bot])
Bumps minimist from 1.2.0 to 1.2.3. Commits.
6457d74
1.2.3.38a4d1c
even more aggressive checks for protocol pollution.Update installation.md (@purefan)
Offer to install mithril as a webpack plugin. Just makes my life easier by not having to include mithril in every one of my js files.
replace slave label with replica (@stephanos)
One of the example is using the antiquated word "slave" for a database replica. I updated the language and tested the change.
ES6 and m.trust docs patch (@kczx3)
While reading through some of the documentation I saw some issues with both the ES6 and
m.trust
pages.docs: Fix simple typo, subsequece -> subsequence (@timgates42)
There is a small typo in mithril.js, render/render.js. Should read
subsequence
rather thansubsequece
.change link to go to ospec instead of mocha (@akessner)
Change the link to point to ospec docs in github. ospec link went to mochajs. issue 2575. N/A. N/A. N/A.
updated to the Vimeo showcase (@CreaturesInUnitards)
The scrimba version of Mithril 0-60 was built on their beta platform, and doesn't really even work anymore.
adding more community examples (@boazblake)
Exclude archive of previous docs (@cztomsik)
update .npmignore so that archives are not included in the resulting package. space/bandwidth savings. fix #2552.
Pimp the docs linter (and assorted changes) (@pygy)
Add an optional cache for faster runs. Add a final report. Don't return anything from
exec()
. Cover more files. Look for a "--cache" option.Recast key docs to be much clearer and more accurate (@dead-claudia)
Recast key docs to be much clearer and more accurate, including a few Flems examples to help intuitively explain things.
Add
m.censor
, adjustm.route.Link
to use it (@dead-claudia)Add
m.censor
. Adjustm.route.Link
to use it. Restructure a few things for better code reuse. Fixes #2472.Update fetch() browser support in docs (@qgustavor)
As Can I use shows
fetch()
supported since Safari 10.1 and iOS Safari 10.3.docs: Add release dates to all change-log files (@maranomynet)
I'd like to introduce release dates to the change log files. Release dates are human-friendly and add a bit of historical perspective to change-log files.
v2.0.4
Compare Source
contenteditable
elements (#2516 @isiahmeadows)m.trust
updating (#2516 @isiahmeadows)v2.0.3
Compare Source
onbeforeremove
resolving after new nodes are added (#2492 @isiahmeadows)m.parseQueryString
(#2494 @isiahmeadows)v2.0.2 was skipped as it had a critical flaw and was immediately unpublished.
v2.0.1
Compare Source
This is really what v2.0.0 was supposed to be, but the npm upload got botched the first time around.
Breaking changes
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))m.redraw()
is always asynchronous (#1592)m.mount()
will only render its own root when called, it will not trigger aredraw()
(#1592)vnode.state
(as invnode.state = ...
) is no longer supported. Instead, an error is thrown ifvnode.state
changes upon the invocation of a lifecycle hook.m.request
will no longer reject the Promise on server errors (eg. status >= 400) if the caller supplies anextract
callback. This gives applications more control over handling server responses.null
orundefined
value, they are treated as if they were absent. #1773 (#2174)m.request
errors no longer copy response fields to the error, but instead assign the parsed JSON response toerror.response
and the HTTP status codeerror.code
.attrs
field, respectively), the latter takes precedence, except forclass
attributes that are still added together. #2172 (#2174)onbeforeupdate
to allow attrs to block components from even diffing (#2297)m.withAttr
removed. (#2317)data
has now been split toparams
andbody
anduseBody
has been removed in favor of just usingbody
. (#2361)/asset/:path.../view
. This was previously only available inm.route
route definitions, but it's now usable in both that and where paths are accepted. (#2361)m.request({url: "/api/user/:id/get", params: {id: user.id}})
would result in a request likeGET /api/user/1/get
, not one likeGET /api/user/1/get?id=1
. If you really need it in both places, pass the same value via two separate parameters with the non-query-string parameter renamed, like inm.request({url: "/api/user/:urlID/get", params: {id: user.id, urlID: user.id}})
. (#2361)m.route.set
,m.request
, andm.jsonp
all use the same path template syntax now, and vary only in how they receive their parameters. Furthermore, declared routes inm.route
shares the same syntax and semantics, but acts in reverse as if via pattern matching. (#2361)options.responseType
now defaults to"json"
ifextract
is absent, anddeserialize
receives the parsed response, not the raw string. If you want the old behavior, useresponseType: "text"
. (#2335)Content-Type: application/json; charset=utf-8
for all XHR methods by default, provided they have a body that's!= null
(#2361, #2421)GET
with bodies, but you can address them through configuring CORS appropriately.GET
methods and only whenuseBody: true
was passed (the default), and it was always set for them. Now it's automatically omitted when no body is present, so the hole is slightly broadened.null
/undefined
/booleans as strictly unkeyed (#2452 @isiahmeadows)null
/undefined
at the vnode level, always stringify non-object children that aren't holes (#2452 @isiahmeadows)true
was equivalent to"true"
andfalse
was equivalent to""
.key
parameter for routes now only works globally for components (#2458 @isiahmeadows)render
still render by diff.mithril/redraw
now just exposes them.redraw
callback (#2458 @isiahmeadows).schedule
,.unschedule
, and.render
properties of the formerredrawService
are all removed.mount
in Mithril's source form.route
. That should help you in finding ways around the removed feature. (It doesn't take that much more code.)m.version
has been removed. If you really need the version for whatever reason, just read theversion
field ofmithril/package.json
directly. (#2466 @isiahmeadows)m.route.prefix(...)
is nowm.route.prefix = ...
. (#2469 @isiahmeadows)m.route.link
function removed in favor ofm.route.Link
component. (#2469 @isiahmeadows)options
object is accepted as an attribute. This was initially targeting the oldm.route.link
function and was transferred to this. (#1930)News
m.redraw.sync()
(#1592)handleEvent
methods (#1949, #2222).m.request
better error message on JSON parse error - (#2195, @codeclown)m.request
supportstimeout
as attr - (#1966)m.request
supportsresponseType
as attr - (#2193)m.trust()
string (#2097)mithril
andmithril/stream
(#2194 @porsager).m.*
properties frommithril
are re-exported as named exports in addition to being attached tom
.m()
itself frommithril
is exported as the default export.mithril/stream
's primary export is exported as the default export.m.route
now support-
and.
as delimiters for path segments. This means you can have a route like"/edit/:file.:ext"
. (#2361)m.route.set
,m.request
, andm.jsonp
, but it was wholly untested for and also undocumented.m.buildPathname
andm.parsePathname
added. (#2361)m.mount(root, null)
to unsubscribe and clean up after am.route(root, ...)
call. (#2453)redraw
parameter exposed any time a child event handler is used (#2458 @isiahmeadows)m.route.SKIP
can be returned from route resolvers to skip to the next route (#2469 @isiahmeadows)require("mithril")
. You just need to set the necessary globals to something, even ifnull
orundefined
, so they can be properly used. (#2469 @isiahmeadows)m.route.Link
andm.route.prefix
.m.request
, provided thebackground: true
option is set and that anXMLHttpRequest
polyfill is included as necessary.m.render(...)
,m.redraw()
, andm.route(...)
.Bug fixes
m.route.set()
causes all mount points to be redrawn (#1592)null
orundefined
#1804 #2082 (#1865, #2130)key
had differenttag
values #2128 @JacksonJN (#2130)addEventListener
andremoveEventListener
are always used to manage event subscriptions, preventing external interference.m.mount()
/m.redraw()
.Object.prototype
properties can no longer interfere with event listener calls.undefined
(or any non-function), are now correctly removed.oninit
to be called unnecessarily in some cases #1992Object.prototype.__proto__
setter withkey: "__proto__"
in certain situations (#2251)m.render()
are now normalized #2266{style}
attributes (#2192 @barneycarroll), (#2311 @porsager), (#2312 @isiahmeadows)extract
/serialize
/deserialize
with correctthis
value (#2288)mithril
loadsmithril/index.js
, not the bundle, so users ofmithril/hyperscript
,mithril/render
, and similar see the same Mithril instance as those just usingmithril
itself.https://unpkg.com/mithril
is configured to receive the minified bundle, not the development bundle.mithril.js
, and is not browser-wrapped.async
/await
in Chrome (#2428 @isiahmeadows)onbeforeupdate
returning false, then remaining the same on next redraw (#2447 @isiahmeadows)onbeforeupdate
returns false and then true with new child tree (#2447 @isiahmeadows)?#
and invalid prefixes like#foo#bar
(#2448 @isiahmeadows)contenteditable
check to also check forcontentEditable
property name (#2450 @isiahmeadows)v1.1.7
Compare Source
Ordinarily, I would not have released this, but it includes a backport of a security fix from v2.0.3. If you're stuck on v1.x, you should really update to this ASAP.
Bug fixes
m.parseQueryString
(#2523 @isiahmeadows @Hunter-Dolan)v1.1.6
Compare Source
v1.1.5
Compare Source
v1.1.4
Compare Source
Bug fixes:
onremove
on the children of components that return null from the view #1921 octavore (#1922)m()
. Will copy attributes when it's necessary #1941 s-ilya (#1942)Ospec improvements:
v1.1.3
Compare Source
Bug fixes:
v1.1.2
Compare Source
Bug fixes:
false
#1850 (#1890){ value: "" }
and{ value: 0 }
for form elements #1595 comment (#1862)value
#1870 (#1871)[value=""]
(#1843, @CreaturesInUnitards)onmatch with m.route.set()
#1857 (#1889)Ospec improvements:
Docs / Repo maintenance:
Our thanks to @0joshuaolson1, @ACXgit, @cavemansspa, @CreaturesInUnitards, @dlepaux, @isaaclyman, @kevinkace, @micellius, @spacejack and @yurivish
Other:
v1.1.1
Compare Source
Bug fixes
0
as the second argument tom()
- #1752 / #1753 @StephanHoyerattrs.class
handling to what it was in v1.0.1 - #1764 / #1769v1.1.0
Compare Source
New
Bug fixes
v1.0.1
Compare Source
v1.0.0
Compare Source
Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.