From e9fb63affc53fabe158408d3a269af959034797b Mon Sep 17 00:00:00 2001 From: Galen Huntington Date: Tue, 21 Jan 2025 06:43:36 -0800 Subject: [PATCH 1/4] Sign CLA. (#8899) --- licenses/cla-individual.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/licenses/cla-individual.md b/licenses/cla-individual.md index 6f16cad99..e6c177766 100644 --- a/licenses/cla-individual.md +++ b/licenses/cla-individual.md @@ -605,3 +605,5 @@ Thomas E Tuoti, @well-noted, 2024/12/16 @opn, 2025/01/04 J. Ryan Stinnett, @jryans, 2025/01/04 + +Galen Huntington, @galenhuntington, 2025/01/19 From b04af8bf7ae04dc371d9c29d4c69bea2b23a9557 Mon Sep 17 00:00:00 2001 From: Galen Huntington Date: Thu, 23 Jan 2025 10:18:02 -0800 Subject: [PATCH 2/4] Bug fix: TTF extension was wrong. update font types, add OTF type. (#8898) * Bug fix: TTF extension was wrong. * Update font MIME types throughout; add font/otf. --- boot/boot.js | 7 ++++--- plugins/tiddlywiki/katex/files/tiddlywiki.files | 4 ++-- themes/tiddlywiki/starlight/arvo.woff.meta | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/boot/boot.js b/boot/boot.js index ab403aa5a..7570dade5 100644 --- a/boot/boot.js +++ b/boot/boot.js @@ -2467,9 +2467,10 @@ $tw.boot.initStartup = function(options) { $tw.utils.registerFileType("image/vnd.microsoft.icon","base64",".ico",{flags:["image"]}); $tw.utils.registerFileType("image/x-icon","base64",".ico",{flags:["image"]}); $tw.utils.registerFileType("application/wasm","base64",".wasm"); - $tw.utils.registerFileType("application/font-woff","base64",".woff"); - $tw.utils.registerFileType("application/x-font-ttf","base64",".woff"); - $tw.utils.registerFileType("application/font-woff2","base64",".woff2"); + $tw.utils.registerFileType("font/woff","base64",".woff"); + $tw.utils.registerFileType("font/woff2","base64",".woff2"); + $tw.utils.registerFileType("font/ttf","base64",".ttf"); + $tw.utils.registerFileType("font/otf","base64",".otf"); $tw.utils.registerFileType("audio/ogg","base64",".ogg"); $tw.utils.registerFileType("audio/mp4","base64",[".mp4",".m4a"]); $tw.utils.registerFileType("video/ogg","base64",[".ogm",".ogv",".ogg"]); diff --git a/plugins/tiddlywiki/katex/files/tiddlywiki.files b/plugins/tiddlywiki/katex/files/tiddlywiki.files index 6dd868a10..506a0f448 100644 --- a/plugins/tiddlywiki/katex/files/tiddlywiki.files +++ b/plugins/tiddlywiki/katex/files/tiddlywiki.files @@ -6,7 +6,7 @@ "isTiddlerFile": false, "fields": { "title": {"source": "filename", "prefix": "$:/plugins/tiddlywiki/katex/fonts/"}, - "type": "application/font-woff" + "type": "font/woff" } } ], @@ -37,4 +37,4 @@ "suffix": "})(require);\n" } ] -} \ No newline at end of file +} diff --git a/themes/tiddlywiki/starlight/arvo.woff.meta b/themes/tiddlywiki/starlight/arvo.woff.meta index 19b089408..97732f909 100644 --- a/themes/tiddlywiki/starlight/arvo.woff.meta +++ b/themes/tiddlywiki/starlight/arvo.woff.meta @@ -1,2 +1,2 @@ title: $:/themes/tiddlywiki/starlight/arvo.woff -type: application/font-woff +type: font/woff From 903d0fb8e12c5ef361dc816da3fa9d464de91e6a Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 23 Jan 2025 21:47:22 +0000 Subject: [PATCH 3/4] Update CI due to deprecation of actions/upload-artifact@v3 See https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/ --- .github/workflows/ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 75c3bb8d3..ed16d707d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,12 +10,12 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "${{ env.NODE_VERSION }}" - run: "./bin/ci-test.sh" - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: playwright-report @@ -30,8 +30,8 @@ jobs: TW5_BUILD_MAIN_EDITION: "./editions/prerelease" TW5_BUILD_OUTPUT: "./output/prerelease" steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "${{ env.NODE_VERSION }}" - run: "./bin/ci-pre-build.sh" @@ -62,8 +62,8 @@ jobs: TW5_BUILD_OUTPUT: "./output" TW5_BUILD_ARCHIVE: "./output" steps: - - uses: actions/checkout@v2 - - uses: actions/setup-node@v1 + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 with: node-version: "${{ env.NODE_VERSION }}" - run: "./bin/ci-pre-build.sh" From 94b325f41f778238fbbd550873723571801f43a4 Mon Sep 17 00:00:00 2001 From: Rhys-T <108157737+Rhys-T@users.noreply.github.com> Date: Sat, 25 Jan 2025 05:59:51 -0500 Subject: [PATCH 4/4] Fix: Don't set dirty flag when shadow tiddler changes (#8903) Adds `shadow` and `normal` flags to each entry in `changedTiddlers`, indicating whether the corresponding version of the tiddler has changed. Makes the saver handler ignore any changes that aren't flagged `normal`. Fixes #8902. --- core/modules/saver-handler.js | 6 ++++-- core/modules/startup/plugins.js | 2 +- core/modules/wiki.js | 5 ++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/core/modules/saver-handler.js b/core/modules/saver-handler.js index 23056bcc2..612613140 100644 --- a/core/modules/saver-handler.js +++ b/core/modules/saver-handler.js @@ -46,8 +46,10 @@ function SaverHandler(options) { // Filter the changes so that we only count changes to tiddlers that we care about var filteredChanges = self.filterFn.call(self.wiki,function(iterator) { $tw.utils.each(changes,function(change,title) { - var tiddler = self.wiki.getTiddler(title); - iterator(tiddler,title); + if(change.normal) { + var tiddler = self.wiki.getTiddler(title); + iterator(tiddler,title); + } }); }); // Adjust the number of changes diff --git a/core/modules/startup/plugins.js b/core/modules/startup/plugins.js index fc8ba9589..af354c38e 100644 --- a/core/modules/startup/plugins.js +++ b/core/modules/startup/plugins.js @@ -75,7 +75,7 @@ exports.startup = function() { $tw.wiki.unpackPluginTiddlers(); // Queue change events for the changed shadow tiddlers $tw.utils.each(Object.keys(changedShadowTiddlers),function(title) { - $tw.wiki.enqueueTiddlerEvent(title,changedShadowTiddlers[title]); + $tw.wiki.enqueueTiddlerEvent(title,changedShadowTiddlers[title], true); }); } } diff --git a/core/modules/wiki.js b/core/modules/wiki.js index 620f4eccf..928a2e847 100755 --- a/core/modules/wiki.js +++ b/core/modules/wiki.js @@ -141,12 +141,15 @@ This method should be called after the changes it describes have been made to th title: Title of tiddler isDeleted: defaults to false (meaning the tiddler has been created or modified), true if the tiddler has been deleted + isShadow: defaults to false (meaning the change applies to the normal tiddler), + true if the tiddler being changed is a shadow tiddler */ -exports.enqueueTiddlerEvent = function(title,isDeleted) { +exports.enqueueTiddlerEvent = function(title,isDeleted,isShadow) { // Record the touch in the list of changed tiddlers this.changedTiddlers = this.changedTiddlers || Object.create(null); this.changedTiddlers[title] = this.changedTiddlers[title] || Object.create(null); this.changedTiddlers[title][isDeleted ? "deleted" : "modified"] = true; + this.changedTiddlers[title][isShadow ? "shadow" : "normal"] = true; // Increment the change count this.changeCount = this.changeCount || Object.create(null); if($tw.utils.hop(this.changeCount,title)) {