Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: MithrilJS/mithril.js
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.2.14
Choose a base ref
...
head repository: MithrilJS/mithril.js
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.2.15
Choose a head ref
  • 4 commits
  • 8 files changed
  • 2 contributors

Commits on Feb 15, 2025

  1. test-perf: Load Benckmark.js first in Node.js

    Since Node21, global.navigator has been implemented, and together with browserMock, Benchmark.js incorrectly identifies the execution environment as a browser. If Benchmark.js is loaded before browserMock, the misidentification will be avoided.
    kfule authored and dead-claudia committed Feb 15, 2025
    Copy the full SHA
    5608a71 View commit details

Commits on Mar 23, 2025

  1. [refactor] Limit the condition of the option tag to "selected" attrib…

    …ute in isFormAttribute()
    
    The condition of the option tag is intended to fix #1916 and should be evaluated in conjunction with the "selected" attribute.
    This commit will improve code readability a bit, reduce the number of times to evaluate tags and also reduce the number of times to set the same attribute in option elements redundantly.
    kfule authored and dead-claudia committed Mar 23, 2025
    Copy the full SHA
    8c91b89 View commit details
  2. fix test for #1916

    kfule authored and dead-claudia committed Mar 23, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    7cae24f View commit details
  3. Release Artifacts for v2.2.15

     [skip ci]
    JAForbes committed Mar 23, 2025

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    a79b0f4 View commit details
Showing with 76 additions and 19 deletions.
  1. +11 −0 docs/recent-changes.md
  2. +1 −1 mithril.js
  3. +1 −1 mithril.min.js
  4. +2 −2 package-lock.json
  5. +1 −1 package.json
  6. +1 −1 performance/test-perf.js
  7. +1 −1 render/render.js
  8. +58 −12 render/tests/test-attributes.js
11 changes: 11 additions & 0 deletions docs/recent-changes.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,15 @@

# Release v2.2.15

### Patch Changes

#### [[refactor] Limit the condition of the option tag to `selected` attribute in isFormAttribute() (@kfule)](https://github.com/MithrilJS/mithril.js/pull/3011)

This PR limits the evaluation of whether a tag is `option` to only when setting the `selected` attribute.
#### [test-perf: Load Benckmark.js first in Node.js (@kfule)](https://github.com/MithrilJS/mithril.js/pull/3008)

Since Node21, global.navigator has been implemented, and together with browserMock, Benchmark.js incorrectly identifies the execution environment as a browser.

# Release v2.2.14

### Patch Changes
2 changes: 1 addition & 1 deletion mithril.js
Original file line number Diff line number Diff line change
@@ -875,7 +875,7 @@ var _11 = function() {
}
}
function isFormAttribute(vnode3, attr) {
return attr === "value" || attr === "checked" || attr === "selectedIndex" || attr === "selected" && vnode3.dom === activeElement(vnode3.dom) || vnode3.tag === "option" && vnode3.dom.parentNode === activeElement(vnode3.dom)
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"
Loading