Skip to content

Release - v2.3.0 #3016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
May 10, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/notify-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Notify release

on:
push:
tags: ['v*']

jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Send workflow dispatch to docs
run: gh --repo MithrilJS/docs workflow run package-update.yml -f package=mithril
env:
GH_TOKEN: ${{ secrets.DOCS_UPDATE_TOKEN }}
27 changes: 27 additions & 0 deletions .github/workflows/publish-prerelease.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish prerelease and update PR

on:
workflow_call:
workflow_dispatch:

jobs:
update-pr:
concurrency: prr:pre-release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
- run: npm ci
- run: npm run build
- run: npx pr-release pr --verbose --target release --source main --compact --verbose --minimize-semver-change
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
# The following will publish a prerelease to npm
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" > ~/.npmrc
name: Setup NPM Auth
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npx pr-release infer-prerelease --preid=next --target release --source main --verbose --publish --minimize-semver-change
name: Publish
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[![npm Version](https://img.shields.io/npm/v/mithril.svg)](https://www.npmjs.com/package/mithril)  
[![License](https://img.shields.io/npm/l/mithril.svg)](https://github.com/MithrilJS/mithril.js/blob/main/LICENSE)  
[![npm Downloads](https://img.shields.io/npm/dm/mithril.svg)](https://www.npmjs.com/package/mithril)  
[![Build Status](https://img.shields.io/github/actions/workflow/status/MithrilJS/mithril.js/.github%2Fworkflows%2Ftest-main-push.yml)](https://www.npmjs.com/package/mithril)  
[![Build Status](https://img.shields.io/github/actions/workflow/status/MithrilJS/mithril.js/.github%2Fworkflows%2Ftest.yml?branch=main&event=push)](https://www.npmjs.com/package/mithril)  
[![Donate at OpenCollective](https://img.shields.io/opencollective/all/mithriljs.svg?colorB=brightgreen)](https://opencollective.com/mithriljs)  
[![Zulip, join chat](https://img.shields.io/badge/zulip-join_chat-brightgreen.svg)](https://mithril.zulipchat.com/)

Expand Down
13 changes: 7 additions & 6 deletions package-lock.json

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

11 changes: 10 additions & 1 deletion render/render.js
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ module.exports = function() {
if (typeof vnode.tag !== "string") {
if (vnode.instance != null) onremove(vnode.instance)
} else {
if (vnode.events != null) vnode.events._ = null
var children = vnode.children
if (Array.isArray(children)) {
for (var i = 0; i < children.length; i++) {
Expand Down Expand Up @@ -810,7 +811,15 @@ module.exports = function() {
var result
if (typeof handler === "function") result = handler.call(ev.currentTarget, ev)
else if (typeof handler.handleEvent === "function") handler.handleEvent(ev)
if (this._ && ev.redraw !== false) (0, this._)()
var self = this
if (self._ != null) {
if (ev.redraw !== false) (0, self._)()
if (result != null && typeof result.then === "function") {
Promise.resolve(result).then(function () {
if (self._ != null && ev.redraw !== false) (0, self._)()
})
}
}
if (result === false) {
ev.preventDefault()
ev.stopPropagation()
Expand Down
16 changes: 16 additions & 0 deletions render/tests/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
"use strict"

module.exports = {
"extends": "../../.eslintrc.js",
"env": {
"browser": null,
"node": true,
"es2022": true,
},
"parserOptions": {
"ecmaVersion": 2022,
},
"rules": {
"no-process-env": "off",
},
};
Loading