Skip to content

Commit

Permalink
Release Artifacts for v2.2.4
Browse files Browse the repository at this point in the history
 [skip ci]
  • Loading branch information
JAForbes committed Sep 25, 2024
1 parent 30d84f9 commit 455cccb
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 26 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

## What is Mithril.js?

A modern client-side JavaScript framework for building Single Page Applications. It's small (<!-- size -->9.14 KB<!-- /size --> gzipped), fast and provides routing and XHR utilities out of the box.
A modern client-side JavaScript framework for building Single Page Applications. It's small (<!-- size -->9.15 KB<!-- /size --> gzipped), fast and provides routing and XHR utilities out of the box.

Mithril.js is used by companies like Vimeo and Nike, and open source platforms like Lichess 👍.

Expand Down
92 changes: 92 additions & 0 deletions docs/recent-changes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,96 @@

# Release v2.2.4

### Patch Changes

#### [Bump gh-pages from 2.1.1 to 5.0.0 (@dependabot[bot])](https://github.com/MithrilJS/mithril.js/pull/2890)

Bumps [gh-pages](https://github.com/tschaub/gh-pages) from 2.1.1 to 5.0.0. Release notes. Sourced from gh-pages's releases. v5.0.0.
#### [Bump @babel/parser from 7.7.5 to 7.25.6 (@dependabot[bot])](https://github.com/MithrilJS/mithril.js/pull/2959)

Bumps [@babel/parser](https://github.com/babel/babel/tree/HEAD/packages/babel-parser) from 7.7.5 to 7.25.6. Release notes. Sourced from @​babel/parser's releases.
#### [Bump minimatch from 3.0.4 to 3.1.2 (@dependabot[bot])](https://github.com/MithrilJS/mithril.js/pull/2816)

Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2. Commits. 699c459 3.1.2. 2f2b5ff fix: trim pattern. 25d7c0d 3.1.1.
#### [Bump yaml and lint-staged (@dependabot[bot])](https://github.com/MithrilJS/mithril.js/pull/2830)

Bumps [yaml](https://github.com/eemeli/yaml) to 2.2.2 and updates ancestor dependency [lint-staged](https://github.com/okonet/lint-staged).
#### [Bump gh-pages from 5.0.0 to 6.1.1 (@dependabot[bot])](https://github.com/MithrilJS/mithril.js/pull/2958)

Bumps [gh-pages](https://github.com/tschaub/gh-pages) from 5.0.0 to 6.1.1. Release notes. Sourced from gh-pages's releases. v6.1.1. Fixes.
#### [Bump glob from 7.1.4 to 11.0.0 (@dependabot[bot])](https://github.com/MithrilJS/mithril.js/pull/2957)

Bumps [glob](https://github.com/isaacs/node-glob) from 7.1.4 to 11.0.0. Changelog. Sourced from glob's changelog. changeglob. 11.0. Drop support for node before v20.
#### [Bump rimraf from 3.0.2 to 6.0.1 (@dependabot[bot])](https://github.com/MithrilJS/mithril.js/pull/2960)

Bumps [rimraf](https://github.com/isaacs/rimraf) from 3.0.2 to 6.0.1. Changelog. Sourced from rimraf's changelog. 6.0. Drop support for nodes before v20.
#### [Bump lint-staged from 13.2.1 to 15.2.10 (@dependabot[bot])](https://github.com/MithrilJS/mithril.js/pull/2961)

[//]: # (dependabot-start). ⚠️ **Dependabot is rebasing this PR** ⚠️. Rebasing might not happen immediately, so don't worry if this takes some time.
#### [Revise issue templates (@dead-claudia)](https://github.com/MithrilJS/mithril.js/pull/2955)


#### [Update ospec and a few other dependencies (@dead-claudia)](https://github.com/MithrilJS/mithril.js/pull/2907)

1. Update ospec to the version I just published. 2.
#### [Fix some outstanding bugs in the docs linter. (@dead-claudia)](https://github.com/MithrilJS/mithril.js/pull/2906)

Missed an edge case in the task queue, and I also wanted to fully dedupe network requests. Locally it passes.
#### [Rewrite docs linter, ease JSFiddle request debugging (@dead-claudia)](https://github.com/MithrilJS/mithril.js/pull/2904)

I'll defer to the commit descriptions. They're self-descriptive. The first diff is quite large.
#### [Update vnodes.md (@dead-claudia)](https://github.com/MithrilJS/mithril.js/pull/2903)

Fix a broken link. Did some further digging (it's been a while since I've played with the scripts) and found that the JSFiddle errors are just warnings.
#### [Migrate to Node 20, clean up workflows (@dead-claudia)](https://github.com/MithrilJS/mithril.js/pull/2902)

**Note: ignore the commits. It's a mess. Just read the combined diff - the PR itself is the standalone unit. I plan to squash this as I merge anyways.**.
#### [Remove dependance on global window and document (@KoryNunn)](https://github.com/MithrilJS/mithril.js/pull/2897)

Use window and document from render target instead of using globals. This makes unit and intergration testing much easier.
#### [Bump braces from 3.0.2 to 3.0.3 (@dependabot[bot])](https://github.com/MithrilJS/mithril.js/pull/2896)

Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3. Commits. 74b2db2 3.0.3. 88f1429 update eslint. lint, fix unit tests.
#### [Tweak docs with warning to fix #2508 (@dead-claudia)](https://github.com/MithrilJS/mithril.js/pull/2895)

[z] Documentation change. [z] My change requires a change to the documentation. [z] I have updated the documentation accordingly.
#### [Bump qs from 6.5.2 to 6.5.3 (@dependabot[bot])](https://github.com/MithrilJS/mithril.js/pull/2807)

Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3. Changelog. Sourced from qs's changelog. 6.5.3. [Fix] parse: ignore __proto__ keys (#428).
#### [Temporarily host REM on fly to fix the docs (@JAForbes)](https://github.com/MithrilJS/mithril.js/pull/2893)

Fixes REM examples in the docs. The documentation currently has a dead link as REM is no longer hosted on heroku.
#### [Move from individual code owners to just pinging all collaborators (@dead-claudia)](https://github.com/MithrilJS/mithril.js/pull/2844)

Most collaborators have commit access, and it'd make it a little easier (and more likely) for pull requests to get reviewed.
#### [docs: absolute url in version selector to avoid 404 errors (2 of 2) (@tbreuss)](https://github.com/MithrilJS/mithril.js/pull/2839)

Fixes #2832 (2 of 2 pull requests). See my comment at https://github.com/MithrilJS/mithril.js/pull/2835#issuecomment-1535657892.
#### [fix markdown editor example, bump marked.js version up (@tbreuss)](https://github.com/MithrilJS/mithril.js/pull/2848)

Fixes the strange behavior of markdown editor example. Using newest version of marked.js, fixed strange behavior of markdown editor example. See #2845.
#### [Bump word-wrap from 1.2.3 to 1.2.4 (@dependabot[bot])](https://github.com/MithrilJS/mithril.js/pull/2856)

Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4. Release notes. Sourced from word-wrap's releases. 1.2.4. What's Changed.
#### [Add missing `m.censor` to API navigation (@dead-claudia)](https://github.com/MithrilJS/mithril.js/pull/2843)

Not sure how I forgot about this when I added the method.
#### [docs: fix regex for parsing page title (@tbreuss)](https://github.com/MithrilJS/mithril.js/pull/2837)

Fixes https://github.com/MithrilJS/mithril.js/issues/2833. I tested the generated documentation on my dev machine successfully.
#### [docs: fix broken anchor link on github/npm (@tbreuss)](https://github.com/MithrilJS/mithril.js/pull/2838)

Fixed a not working anchor link on github and npm by removing the question mark.
#### [hyperscript: handles shared empty attrs, fixes #2821 (@kfule)](https://github.com/MithrilJS/mithril.js/pull/2822)

Whenever there are selector-derived attrs, the attrs object will be regenerated and not shared.
#### [Fix typos in `stream()` docs (@mtsknn)](https://github.com/MithrilJS/mithril.js/pull/2825)

Noticed these typos while reading through the page.
#### [Bump async from 2.6.3 to 2.6.4 (@dependabot[bot])](https://github.com/MithrilJS/mithril.js/pull/2815)

Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4. Changelog. Sourced from async's changelog. v2.6.4.

# Release v2.2.3

### Patch Changes
Expand Down
36 changes: 19 additions & 17 deletions mithril.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function execSelector(state, vnode) {
var className = hasClass ? attrs.class : attrs.className
vnode.tag = state.tag
vnode.attrs = {}
if (!isEmpty(state.attrs) && !isEmpty(attrs)) {
if (!isEmpty(state.attrs)) {
var newAttrs = {}
for (var key in attrs) {
if (hasOwn.call(attrs, key)) newAttrs[key] = attrs[key]
Expand Down Expand Up @@ -177,14 +177,16 @@ var df = {
}
var delayedRemoval = df.delayedRemoval
var domFor0 = df.domFor
var _11 = function($window) {
var $doc = $window && $window.document
var _11 = function() {
var nameSpace = {
svg: "http://www.w3.org/2000/svg",
math: "http://www.w3.org/1998/Math/MathML"
}
var currentRedraw
var currentRender
function getDocument(dom) {
return dom.ownerDocument;
}
function getNameSpace(vnode3) {
return vnode3.attrs && vnode3.attrs.xmlns || nameSpace[vnode3.tag]
}
Expand All @@ -206,9 +208,9 @@ var _11 = function($window) {
}
// IE11 (at least) throws an UnspecifiedError when accessing document.activeElement when
// inside an iframe. Catch and swallow this error, and heavy-handidly return null.
function activeElement() {
function activeElement(dom) {
try {
return $doc.activeElement
return getDocument(dom).activeElement
} catch (e) {
return null
}
Expand Down Expand Up @@ -237,7 +239,7 @@ var _11 = function($window) {
else createComponent(parent, vnode3, hooks, ns, nextSibling)
}
function createText(parent, vnode3, nextSibling) {
vnode3.dom = $doc.createTextNode(vnode3.children)
vnode3.dom = getDocument(parent).createTextNode(vnode3.children)
insertDOM(parent, vnode3.dom, nextSibling)
}
var possibleParents = {caption: "table", thead: "table", tbody: "table", tfoot: "table", tr: "tbody", th: "tr", td: "tr", colgroup: "table", col: "colgroup"}
Expand All @@ -248,7 +250,7 @@ var _11 = function($window) {
// div.innerHTML = "<td>i</td><td>j</td>"
// console.log(div.innerHTML)
// --> "ij", no <td> in sight.
var temp = $doc.createElement(possibleParents[match0[1]] || "div")
var temp = getDocument(parent).createElement(possibleParents[match0[1]] || "div")
if (ns === "http://www.w3.org/2000/svg") {
temp.innerHTML = "<svg xmlns=\"http://www.w3.org/2000/svg\">" + vnode3.children + "</svg>"
temp = temp.firstChild
Expand All @@ -258,15 +260,15 @@ var _11 = function($window) {
vnode3.dom = temp.firstChild
vnode3.domSize = temp.childNodes.length
// Capture nodes to remove, so we don't confuse them.
var fragment = $doc.createDocumentFragment()
var fragment = getDocument(parent).createDocumentFragment()
var child
while (child = temp.firstChild) {
fragment.appendChild(child)
}
insertDOM(parent, fragment, nextSibling)
}
function createFragment(parent, vnode3, hooks, ns, nextSibling) {
var fragment = $doc.createDocumentFragment()
var fragment = getDocument(parent).createDocumentFragment()
if (vnode3.children != null) {
var children2 = vnode3.children
createNodes(fragment, children2, 0, children2.length, hooks, null, ns)
Expand All @@ -281,8 +283,8 @@ var _11 = function($window) {
var is = attrs2 && attrs2.is
ns = getNameSpace(vnode3) || ns
var element = ns ?
is ? $doc.createElementNS(ns, tag, {is: is}) : $doc.createElementNS(ns, tag) :
is ? $doc.createElement(tag, {is: is}) : $doc.createElement(tag)
is ? getDocument(parent).createElementNS(ns, tag, {is: is}) : getDocument(parent).createElementNS(ns, tag) :
is ? getDocument(parent).createElement(tag, {is: is}) : getDocument(parent).createElement(tag)
vnode3.dom = element
if (attrs2 != null) {
setAttrs(vnode3, attrs2, ns)
Expand Down Expand Up @@ -704,7 +706,7 @@ var _11 = function($window) {
// don't allocate for the common case
target = vnode3.dom
} else {
target = $doc.createDocumentFragment()
target = getDocument(parent).createDocumentFragment()
for (var dom of domFor0(vnode3)) target.appendChild(dom)
}
insertDOM(parent, target, nextSibling)
Expand Down Expand Up @@ -839,7 +841,7 @@ var _11 = function($window) {
/* eslint-disable no-implicit-coercion */
//setting input[value] to same value by typing on focused element moves cursor to end in Chrome
//setting input[type0=file][value] to same value causes an error to be generated if it's non-empty
if ((vnode3.tag === "input" || vnode3.tag === "textarea") && vnode3.dom.value === "" + value && (isFileInput || vnode3.dom === activeElement())) return
if ((vnode3.tag === "input" || vnode3.tag === "textarea") && vnode3.dom.value === "" + value && (isFileInput || vnode3.dom === activeElement(vnode3.dom))) return
//setting select[value] to same value while having select open blinks select dropdown in Chrome
if (vnode3.tag === "select" && old !== null && vnode3.dom.value === "" + value) return
//setting option[value] to same value while having select open blinks select dropdown in Chrome
Expand Down Expand Up @@ -868,7 +870,7 @@ var _11 = function($window) {
&& key !== "title" // creates "null" as title
&& !(key === "value" && (
vnode3.tag === "option"
|| vnode3.tag === "select" && vnode3.dom.selectedIndex === -1 && vnode3.dom === activeElement()
|| vnode3.tag === "select" && vnode3.dom.selectedIndex === -1 && vnode3.dom === activeElement(vnode3.dom)
))
&& !(vnode3.tag === "input" && key === "type")
) {
Expand Down Expand Up @@ -917,7 +919,7 @@ var _11 = function($window) {
}
}
function isFormAttribute(vnode3, attr) {
return attr === "value" || attr === "checked" || attr === "selectedIndex" || attr === "selected" && vnode3.dom === activeElement() || vnode3.tag === "option" && vnode3.dom.parentNode === $doc.activeElement
return attr === "value" || attr === "checked" || attr === "selectedIndex" || attr === "selected" && vnode3.dom === activeElement(vnode3.dom) || vnode3.tag === "option" && vnode3.dom.parentNode === activeElement(vnode3.dom)
}
function isLifecycleMethod(attr) {
return attr === "oninit" || attr === "oncreate" || attr === "onupdate" || attr === "onremove" || attr === "onbeforeremove" || attr === "onbeforeupdate"
Expand Down Expand Up @@ -1063,7 +1065,7 @@ var _11 = function($window) {
var prevRedraw = currentRedraw
var prevDOM = currentDOM
var hooks = []
var active = activeElement()
var active = activeElement(dom)
var namespace = dom.namespaceURI
currentDOM = dom
currentRedraw = typeof redraw === "function" ? redraw : undefined
Expand All @@ -1075,7 +1077,7 @@ var _11 = function($window) {
updateNodes(dom, dom.vnodes, vnodes, hooks, null, namespace === "http://www.w3.org/1999/xhtml" ? undefined : namespace)
dom.vnodes = vnodes
// `document.activeElement` can return null: https://html.spec.whatwg.org/multipage/interaction.html#dom-document-activeelement
if (active != null && activeElement() !== active && typeof active.focus === "function") active.focus()
if (active != null && activeElement(dom) !== active && typeof active.focus === "function") active.focus()
for (var i = 0; i < hooks.length; i++) hooks[i]()
} finally {
currentRedraw = prevRedraw
Expand Down
2 changes: 1 addition & 1 deletion mithril.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 11 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mithril",
"version": "2.2.3",
"version": "2.2.4",
"description": "A framework for building brilliant applications",
"author": "Leo Horie",
"license": "MIT",
Expand All @@ -9,24 +9,30 @@
"repository": "github:MithrilJS/mithril.js",
"scripts": {
"precommit": "lint-staged",
"watch": "chokidar-cli -c 'run-s build:browser test' '**' -i 'node_modules' -i '.*' -i ",
"watch": "run-p watch:**",
"watch:js": "node scripts/bundler browser.js -output mithril.js -watch",
"watch:docs": "node scripts/generate-docs --watch",
"watch:docs-lint": "node scripts/lint-docs --watch",
"build": "run-p build:browser build:min build:stream-min",
"build:browser": "node scripts/bundler browser.js -output mithril.js",
"build:docs": "node scripts/generate-docs",
"build:min": "node scripts/bundler browser.js -output mithril.min.js -minify -save",
"build:stream-min": "node scripts/minify-stream",
"cleanup:lint": "rimraf .eslintcache",
"lint": "eslint . --cache",
"lint": "run-s -cn lint:**",
"lint:js": "eslint . --cache",
"lint:docs": "node scripts/lint-docs",
"perf": "node performance/test-perf.js",
"pretest": "npm run lint",
"test": "ospec",
"test": "run-s test:js",
"test:js": "ospec",
"cover": "istanbul cover --print both ospec"
},
"devDependencies": {
"@alrra/travis-scripts": "^3.0.1",
"@babel/parser": "^7.7.5",
"benchmark": "^2.1.4",
"chokidar": "^3.2.1",
"chokidar-cli": "^3.0.0",
"escape-string-regexp": "^2.0.0",
"eslint": "^8.9.0",
"gh-pages": "^6.1.1",
Expand Down

0 comments on commit 455cccb

Please sign in to comment.