Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
52 commits
Select commit Hold shift + click to select a range
b2656c8
Preparing for v5.4.0
Jermolene Aug 7, 2025
38462d4
Merge branch 'tiddlywiki-com'
Jermolene Aug 7, 2025
373eec4
Add final batch of survey responses
Jermolene Aug 19, 2025
617394f
Merge branch 'tiddlywiki-com'
Jermolene Aug 21, 2025
dba34f3
Merge branch 'tiddlywiki-com'
Jermolene Aug 26, 2025
2246ffd
Merge branch 'tiddlywiki-com'
Jermolene Aug 29, 2025
e38d796
Merge branch 'tiddlywiki-com'
Jermolene Sep 1, 2025
ae970fd
Merge branch 'tiddlywiki-com'
Jermolene Sep 1, 2025
1a81f8e
Merge branch 'tiddlywiki-com'
Jermolene Sep 1, 2025
3c45c17
Merge branch 'tiddlywiki-com'
Jermolene Sep 2, 2025
3592a0b
Merge branch 'tiddlywiki-com'
Jermolene Sep 9, 2025
c5a80a1
[v5.4.0] New release note architecture (#9287)
Jermolene Sep 12, 2025
ffb0a2f
Merge branch 'tiddlywiki-com'
Jermolene Sep 12, 2025
578c09e
Remove change note for #9183 until it is merged
Jermolene Sep 12, 2025
7944f42
[v5.4.0] Offload server components from browser builds of TiddlyWiki …
Jermolene Sep 12, 2025
e4fb47e
Add change note for #9183
Jermolene Sep 12, 2025
af63a3b
Further improvements for offloading server components (#9288)
Leilei332 Sep 14, 2025
e956bb3
Extend release note mechanism to allow multiple github commits/prs fo…
Jermolene Sep 14, 2025
88d3f69
Merge branch 'tiddlywiki-com'
Jermolene Sep 14, 2025
810ac42
Release notes: show current banner for the current release
Jermolene Sep 14, 2025
5389dc0
Merge branch 'tiddlywiki-com'
Jermolene Sep 25, 2025
f8170cd
[5.4.0] Update eslint target to 2017 and do initial fixes (#9135)
Arlen22 Oct 1, 2025
619bdfc
Reimplement regexp sticky flag (#9119)
Leilei332 Oct 2, 2025
87ba87b
Set AES strength to 256 bit (#8249)
pmario Oct 2, 2025
6791f0f
Create eslint.yml (#9315)
saqimtiaz Oct 2, 2025
afe2ac4
Fix: Update eslint.yml to not run on push
saqimtiaz Oct 2, 2025
cae3d0f
Switch to native support for base64 utf8 (#9253)
Leilei332 Oct 6, 2025
e753851
Add output directory to eslint ignore configuration (#9317)
pmario Oct 6, 2025
ee23097
Set modal's mask-closable attribute to yes by default (#9313)
Leilei332 Oct 6, 2025
a36356a
Adds info tiddlers for viewport dimensions (#9260)
saqimtiaz Oct 6, 2025
865f36a
Removes deprecated attributes from $eventcatcher (#9259)
saqimtiaz Oct 6, 2025
2405e65
Remove support for IE in range widget (#9275)
Leilei332 Oct 6, 2025
15ba415
Use s instead of strike (#9131)
Leilei332 Oct 6, 2025
7e91bac
Merge branch 'tiddlywiki-com'
Jermolene Oct 7, 2025
dc7f2a5
Use currentColor to style svg (#9316)
Leilei332 Oct 7, 2025
4552c11
Add th-debug-element hook and data-debug-element minimal useful info …
pmario Oct 7, 2025
b462aaa
Modules in draft tidders should not be executed (#9293)
pmario Oct 7, 2025
94673a1
Allow button widget to use all ARIA attibutes (#9154)
Leilei332 Oct 7, 2025
34737f4
Improve ARIA support for link widget (#9167)
Leilei332 Oct 7, 2025
3889a2a
Fix nested `span.tc-keyboard` element in core (#9235)
Leilei332 Oct 8, 2025
5a4ff56
Fix markup not included in external core edition (#9218)
Leilei332 Oct 8, 2025
64fce62
[v5.4.0] Update configuration defaults (#9107)
Jermolene Oct 8, 2025
6e49375
Add support for commands and startups which return promises (#9103)
Arlen22 Oct 9, 2025
97824cc
Feature: extend server route exports to allow ordering (#9206)
saqimtiaz Oct 10, 2025
58e41ee
Feature: extend server routes to support multiple methods (#9207)
saqimtiaz Oct 10, 2025
186d1b0
Migrate most deprecated eslint rules (#9328)
Leilei332 Oct 10, 2025
5143da9
Fix CTRL-alt-right shortcut not working (#9325)
Leilei332 Oct 10, 2025
91871d2
Markdown: Fix missing inline support and macrocall args parsing error…
cdruan Oct 10, 2025
fbf110e
Merge branch 'tiddlywiki-com'
Jermolene Oct 10, 2025
6bdd51d
Fix (eslint): removes unneeded dependencies (#9332)
linonetwo Oct 11, 2025
61e638c
Merge branch 'tiddlywiki-com'
Jermolene Oct 11, 2025
34ffb23
chore: sign cla
josephyi Oct 14, 2025
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
40 changes: 40 additions & 0 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: ESLint

on:
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:

concurrency:
group: lint-${{ github.event.pull_request.number || github.ref_name }}
cancel-in-progress: true

permissions:
contents: read
# Needed for GitHub Checks API
checks: write

jobs:
eslint:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm install --include=dev

- name: Run ESLint with reviewdog (GitHub Checks)
uses: reviewdog/action-eslint@v1
with:
eslint_flags: '.'
reporter: github-pr-check
fail_level: error
level: error
tool_name: ESLint PR code
2 changes: 1 addition & 1 deletion bin/build-site.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Default to the current version number for building the plugin library

if [ -z "$TW5_BUILD_VERSION" ]; then
TW5_BUILD_VERSION=v5.3.8
TW5_BUILD_VERSION=v5.4.0
fi

echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
Expand Down
30 changes: 21 additions & 9 deletions boot/boot.js

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

12 changes: 8 additions & 4 deletions core/modules/commander.js → core-server/commander.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,16 +99,18 @@ Commander.prototype.executeNextCommand = function() {
}
}
if(command.info.synchronous) {
// Synchronous command
// Synchronous command (await thenables)
c = new command.Command(params,this);
err = c.execute();
if(err) {
if(err && typeof err.then === "function") {
err.then(e => { e ? this.callback(e) : this.executeNextCommand(); });
} else if(err) {
this.callback(err);
} else {
this.executeNextCommand();
}
} else {
// Asynchronous command
// Asynchronous command (await thenables)
c = new command.Command(params,this,function(err) {
if(err) {
self.callback(err);
Expand All @@ -117,7 +119,9 @@ Commander.prototype.executeNextCommand = function() {
}
});
err = c.execute();
if(err) {
if(err && typeof err.then === "function") {
err.then(e => { if(e) this.callback(e); });
} else if(err) {
this.callback(err);
}
}
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ WikiFolderMaker.prototype.tiddlersToIgnore = [
"$:/boot/boot.js",
"$:/boot/bootprefix.js",
"$:/core",
"$:/core-server",
"$:/library/sjcl.js",
"$:/temp/info-plugin"
];
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
11 changes: 11 additions & 0 deletions core-server/plugin.info
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"title": "$:/core-server",
"name": "Core Server Components",
"description": "TiddlyWiki5 core server components",
"author": "JeremyRuston",
"core-version": ">=5.0.0",
"platform": "server",
"plugin-priority": "0",
"list": "readme",
"stability": "STABILITY_2_STABLE"
}
7 changes: 7 additions & 0 deletions core-server/readme.tid
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: $:/core-server/readme

This plugin contains TiddlyWiki's core components that are only needed on the server, comprising:

* Commands
* HTTP server code
* Utility functions for server
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ DELETE /recipes/default/tiddlers/:title
\*/
"use strict";

exports.method = "DELETE";
exports.methods = ["DELETE"];

exports.path = /^\/bags\/default\/tiddlers\/(.+)$/;

exports.info = {
priority: 100
};

exports.handler = function(request,response,state) {
var title = $tw.utils.decodeURIComponentSafe(state.params[0]);
state.wiki.deleteTiddler(title);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ GET /favicon.ico
\*/
"use strict";

exports.method = "GET";
exports.methods = ["GET"];

exports.path = /^\/favicon.ico$/;

exports.info = {
priority: 100
};

exports.handler = function(request,response,state) {
var buffer = state.wiki.getTiddlerText("$:/favicon.ico","");
state.sendResponse(200,{"Content-Type": "image/x-icon"},buffer,"base64");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ GET /files/:filepath
\*/
"use strict";

exports.method = "GET";
exports.methods = ["GET"];

exports.path = /^\/files\/(.+)$/;

exports.info = {
priority: 100
};

exports.handler = function(request,response,state) {
var path = require("path"),
fs = require("fs"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ GET /
\*/
"use strict";

exports.method = "GET";
exports.methods = ["GET"];

exports.path = /^\/$/;

exports.info = {
priority: 100
};

exports.handler = function(request,response,state) {
var text = state.wiki.renderTiddler(state.server.get("root-render-type"),state.server.get("root-tiddler")),
responseHeaders = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ GET /login-basic -- force a Basic Authentication challenge
\*/
"use strict";

exports.method = "GET";
exports.methods = ["GET"];

exports.path = /^\/login-basic$/;

exports.info = {
priority: 100
};

exports.handler = function(request,response,state) {
if(!state.authenticatedUsername) {
// Challenge if there's no username
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ GET /status
\*/
"use strict";

exports.method = "GET";
exports.methods = ["GET"];

exports.path = /^\/status$/;

exports.info = {
priority: 100
};

exports.handler = function(request,response,state) {
var text = JSON.stringify({
username: state.authenticatedUsername || state.server.get("anon-username") || "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ GET /:title
\*/
"use strict";

exports.method = "GET";
exports.methods = ["GET"];

exports.path = /^\/([^\/]+)$/;

exports.info = {
priority: 100
};

exports.handler = function(request,response,state) {
var title = $tw.utils.decodeURIComponentSafe(state.params[0]),
tiddler = state.wiki.getTiddler(title);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ GET /recipes/default/tiddlers/:title
\*/
"use strict";

exports.method = "GET";
exports.methods = ["GET"];

exports.path = /^\/recipes\/default\/tiddlers\/(.+)$/;

exports.info = {
priority: 100
};

exports.handler = function(request,response,state) {
var title = $tw.utils.decodeURIComponentSafe(state.params[0]),
tiddler = state.wiki.getTiddler(title),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,14 @@ GET /recipes/default/tiddlers.json?filter=<filter>

var DEFAULT_FILTER = "[all[tiddlers]!is[system]sort[title]]";

exports.method = "GET";
exports.methods = ["GET"];

exports.path = /^\/recipes\/default\/tiddlers.json$/;

exports.info = {
priority: 100
};

exports.handler = function(request,response,state) {
var filter = state.queryParameters.filter || DEFAULT_FILTER;
if(state.wiki.getTiddlerText("$:/config/Server/AllowAllExternalFilters") !== "yes") {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,14 @@ PUT /recipes/default/tiddlers/:title
\*/
"use strict";

exports.method = "PUT";
exports.methods = ["PUT"];

exports.path = /^\/recipes\/default\/tiddlers\/(.+)$/;

exports.info = {
priority: 100
};

exports.handler = function(request,response,state) {
var title = $tw.utils.decodeURIComponentSafe(state.params[0]),
fields = $tw.utils.parseJSONSafe(state.data);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,11 @@ function Server(options) {
// console.log("Loading server route " + title);
self.addRoute(routeDefinition);
});
this.routes.sort((a, b) => {
const priorityA = a.info?.priority ?? 100,
priorityB = b.info?.priority ?? 100;
return priorityB - priorityA;
});
// Initialise the http vs https
this.listenOptions = null;
this.protocol = "http";
Expand Down Expand Up @@ -217,7 +222,7 @@ Server.prototype.findMatchingRoute = function(request,state) {
} else {
match = potentialRoute.path.exec(pathname);
}
if(match && request.method === potentialRoute.method) {
if(match && (potentialRoute.methods?.includes(request.method) || potentialRoute.method === request.method)) {
state.params = [];
for(var p=1; p<match.length; p++) {
state.params.push(match[p]);
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading
Loading