Commit graph

352 commits

Author SHA1 Message Date
Arlen Beiler
ab2b60ea49 add spaces before and after else 2026-01-07 17:01:16 +00:00
Arlen Beiler
7868187aa9 fix change note typo and eslint 2026-01-07 16:59:06 +00:00
Arlen Beiler
1365bd6738
Merge branch 'master' into data-tiddler-modules 2026-01-07 11:51:03 -05:00
Arlen Beiler
7914a1a10c change preloadHooks items to an object instead of args array 2026-01-07 16:10:28 +00:00
XLBilly
48eeb4603a
Deprecate and simplify some utility functions (#9251)
* Deprecate some utility functions

* Drop IE support

* Update two function

* Update comment

* Further simplify with arrow function

* Fix node error

* Deprecate logTable

* Deprecate class functions

* Attempt to fix error

* Deprecate two functions

* Remove deprecation for getLocationPath

* Deprecate stringifyNumber, domContains, domMatchesSelector

* Deprecate $tw.utils.each

* Revert "Deprecate $tw.utils.each"

This reverts commit 650df1d575.

* Simplify getFullScreenApis

* Replace LLMap with Map

* Revert "Replace LLMap with Map"

This reverts commit 4410ac194a.

* Move some deprecated functions to deprecated.js

* Remove Opera & MS prefix

* Deprecate getLocationPath

* Fix code style

* Revert "Remove Opera & MS prefix"

This reverts commit e5771c00be.

* Revert "Simplify getFullScreenApis"

This reverts commit 894cb479ea.

* Further simplify toggleClass

* Second attempt to simplify $tw.utils.each

* Revert "Second attempt to simplify $tw.utils.each"

This reverts commit 74cb4f766e.

* Third attempt to simplify $tw.utils.each

* Add missing comma

* Update comments

* Deprecate hopArray

Since it is easy to implement it with some method

* Update change notes

* Deprecate tagToCssSelector

Since tc-tagged-* classes are deprecated
2025-12-17 14:40:47 +00:00
XLBilly
65edda224b
Further update eslint configuration (#9474)
* Add comment to disable indent rule

* Enable no-eval rule

And only disable it in evalGlobal

* Diable indent rule in bootprefix

* Update change note

* 更新 boot.js

Co-authored-by: Mario Pietsch <pmariojo@gmail.com>

---------

Co-authored-by: Mario Pietsch <pmariojo@gmail.com>
2025-12-13 10:14:18 +00:00
yaisog
0b38ced43a
Preserve the module insertion order in forEachModuleOfType (#9305)
* Initial commit

* Update testcase

* Revert "Update testcase"

This reverts commit 0d24c4233f.

* Revert initial commit and swap definition order
2025-10-21 11:37:55 +01:00
cdruan
d7e48207b9
Fix crash when processing large files from tiddlywiki.files (#9341)
* skip reading file content when _canonical_uri is present

* skip loading file when file size is too large
2025-10-21 11:30:39 +01:00
Arlen Beiler
fdaf9f6d92 add preloadHooks and data tiddler serializer and isPlugin support
- trying to find as many uses of plugins as I can
2025-10-11 22:51:33 +00:00
Arlen Beiler
6e493755be
Add support for commands and startups which return promises (#9103) 2025-10-09 16:06:03 +01:00
Mario Pietsch
b462aaa9a3
Modules in draft tidders should not be executed (#9293)
* modules in draft tiddlers should not be defined

* improve warning message and use console.warn
2025-10-07 12:03:11 +01:00
Mario Pietsch
87ba87bdd2
Set AES strength to 256 bit (#8249)
* Set AES strength to 256 bit

* Update Encryption tiddler to AES 256
2025-10-02 11:49:45 +01:00
Jeremy Ruston
7944f42467
[v5.4.0] Offload server components from browser builds of TiddlyWiki (#9183)
* Move Node.js specific files out of the core plugin

* Package server files as new $:/core-server plugin

* Missed commander.js

* Fix crash in browser

* Extend server-only mechanism to be usable by other plugins

* in

* Revert "Extend server-only mechanism to be usable by other plugins"

This reverts commit 3faf503073.

* Revert "in"

This reverts commit b80213128f.

* Reapply "Extend server-only mechanism to be usable by other plugins"

This reverts commit c6c83bc18b.

* Fix test failure

* Move filesystem utilities into core-server

* Move old-style release notes out of the way

* Move the 5.4.0 release note into the right place

* Revert "Move the 5.4.0 release note into the right place"

This reverts commit 3f5c2bfba3.

* Revert "Move old-style release notes out of the way"

This reverts commit ee16e48a43.
2025-09-12 15:21:34 +01:00
Rob Hoelz
866e55954f
Stringify derived fields for tiddlywiki.files (#9025)
Otherwise, when serializing the tiddlers as JSON when loading plugins,
derived values may end up with the incorrect values.

Take the `modified` field for example - without stringification, it ends
up as something like `new Date(2025, 3, 12, 6, 56, 23)`, which then gets
serialized as `"2025-04-12T11:56:23.000Z"` (in my timezone), rather than
`"20250412115623000"`.  The string `"2025-04-12T11:56:23.000Z"` trips up
TiddlyWiki's date parser upon load, and it gets parsed as
`20250101000000000` instead.

Fixes GH #9021
2025-04-14 18:33:18 +01:00
Jeremy Ruston
55dbce10f4 Fix crash loading large files
Attempts to load large files are neutered with a warning message

Is 100MB the right limit?
2025-03-21 14:48:01 +00:00
Leilei332
fbe5a2f908
Fix incorrect downloaded file extension (#8928)
* Fix incorrect downloaded file extension

* Update docs
2025-02-14 18:17:00 +00:00
Saq Imtiaz
f02c9ebba3
feat: support for avif images (#8911) 2025-01-26 12:25:01 +00:00
Galen Huntington
b04af8bf7a
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.
2025-01-23 18:18:02 +00:00
lin onetwo
673a0f5605
Fix: allow overwrite plugin that don't have plugin-priority (#8800)
* fix: allow overwrite plugin that don't have plugin-priority

* Update boot.js

* Update boot.js
2024-12-05 12:37:37 +00:00
Mario Pietsch
014f302af3
Fix whitespace in boot.js (#8318) 2024-08-20 16:31:17 +01:00
Val Packett
886514aa52
bootprefix: Tighten browser check to include the document global (#8423)
Deno's node emulation can run TiddlyWiki now that it supports the VM isolates API, but the window global exists in that environment, so both browser and node were being detected, causing the autoboot to trip up on nonexistent argv, as the boot was happening in the constructor right before argv was set.

Ref: https://github.com/denoland/deno/issues/19286
Ref: https://github.com/flexdinesh/browser-or-node
2024-07-26 08:54:02 +01:00
Jeremy Ruston
da8d4ecfae Tweak #8214 by avoiding renaming boot.css
Improves the continuity of our GitHub history
2024-05-30 17:29:12 +01:00
lin onetwo
dbe912ba5d
Fix boot.css bug from #8099 (#8214) 2024-05-27 12:45:29 +01:00
lin onetwo
a463783283
Fix/sjcl variable (#8099)
* refactor: use files to add prefix

* fix: always use $tw.sjcl

* refactor: move sjcl to lib/sjcl

* fix: require sjcl in lib/

* refactor: move sjcl.js back into /boot
2024-05-26 15:56:25 +01:00
Mario Pietsch
074d35c388
Make the linter happy (#8210) 2024-05-23 18:13:52 +01:00
Jeremy Ruston
18d23048da Improve plugin test implementation 2024-05-23 16:47:28 +01:00
Jeremy Ruston
3543fe53ff
RSOE: Add emergency tiddlers download button (#7966) 2024-02-28 11:29:32 +00:00
Robin Munn
984863065e
Fix "sjcl not found" errors in TiddlyDesktop (#8007) 2024-02-26 11:36:46 +00:00
lin onetwo
111f71bcf5
Add doc xls ppt file type information (#7927)
* fix: add doc xls ppt type

* Add application/vnd.ms-excel
2024-02-05 17:02:10 +00:00
lin onetwo
2b1efac6ee
Fix: on Windows, tiddlywiki.files title source shoud use / instead of \ (#7949)
* fix: on Windows, tiddlywiki.files title source shoud use / instead of \

* fix: split path.sep instead of /
2024-02-05 17:00:09 +00:00
lin onetwo
207720cb30
Add WASM content type info (#7948)
Allows WASM modules to be loaded
2024-01-27 14:25:30 +00:00
lin onetwo
773c1f83f2
API for deleting core hooks (#7751)
* feat: Delete hooks from the hashmap

* fix: not using findIndex in the core

* Update HookMechanism.tid
2023-09-24 21:54:52 +01:00
lin onetwo
b8a235697f
Improve boot kernel error reporting to include original error message (#7645) 2023-07-31 12:19:10 +01:00
Jeremy Ruston
d0da1ef9d9
Fix error "Global assignment is not allowed within modules on node" (#7648) 2023-07-31 11:50:58 +01:00
Cameron Fischer
98ff6b67fd
Fixed boot so module line numbers are correct again (#7618) 2023-07-20 16:13:36 +01:00
Jeremy Ruston
a6779efb1c Use locale sort for shadows
For consistency and compatibility with non-shadow ordering
2023-07-14 12:41:04 +01:00
Jeremy Ruston
08bad90e51 Ensure shadow tiddler listings are always sorted
Currently shadow tiddler ordering depends upon the order in which the shadows appear in the plugin JSON
2023-07-13 19:27:50 +01:00
jeremy@jermolene.com
48b22abdaa Add a warning for tiddlywiki.info or plugin.info having json errors 2023-06-02 10:41:42 +01:00
Arlen22
90f0ff8067
Polyfill is not needed, only globalCheck (#7492) 2023-05-27 18:24:25 +02:00
Arlen22
2b95daf59b
Change evalSandboxed to use only one context for all modules (#4624)
* Run modules in one new context

* Fix polyfill running on require

* Add code to check for global assignments

* Allow globals in separate context

This lets the caller request a separate context which may be polluted.

* Jasmine needs to pollute the global

* Formatting

* Add polyfill and cleanup code

* Convert to ES5

* One bug fix

* Some formatting

* Remove console.log line!

* Cleanup

* revert css-escape-polyfill.js to hopefully remove it from the PR

* Remove JSDOC directives
2023-05-06 12:11:18 +01:00
donmor
4e96a012f6
Add missing extensions for audio/mpeg (#7378)
Add missing extensions for audio/mpeg
2023-05-06 11:55:41 +01:00
Michelle Saad
4e641f4fc0
Add 'filepath' source attribute to tiddlywiki.files (#7253)
* Add 'filepath' source attribute to tiddlywiki.files

Adds a new source attribute to facilitate importing subdirectories with
the `searchSubdirectories` attribute.

The `filepath` atttribute is like `filename` except it includes the full
pathname relative to the directory path. Consequently it only works with
`directories` sections (not `tiddlers`).

* Add `subdirectories` source attribute to tiddlywiki.files

Adds another new source attribute to facilitate importing subdirectories
with the `searchSubdirectories` attribute.

The `subdirectories` source attribute is only usable with `directories`
sections (not `tiddlers`). It resolves to an array containing all the
directories in the file's path relative to the directory path. Eg, if
the directory path is `files`, `{ source: 'subdirectories' }` for a file
in  `files/images/photos` would resolve to `['images', 'photos'].

This commit also adds an example to the "tiddlywiki.files Files"
documentation tiddler that demonstrates using the `filepath` and
`subdirectories` source attributes to import and auto-tag image files
as external-image tiddlers.
2023-05-06 11:26:40 +01:00
jeremy@jermolene.com
4e5c957e97 Further fix to whitespace handling in $tw.utils.stringifyList
Fixes typo in 3d0ec5b1bd

See 3d0ec5b1bd (commitcomment-97804850)
2023-01-23 19:36:13 +00:00
jeremy@jermolene.com
3d0ec5b1bd Fix handling of whitespace in $tw.utils.stringifyList
Fixes #7226
2023-01-23 17:16:51 +00:00
jeremy@jermolene.com
8f7441f296 Share plugin: Further fixes to c39ef398bf
See https://talk.tiddlywiki.org/t/revived-share-plugin/5887/14

Thanks @btheado
2023-01-17 14:34:06 +00:00
jeremy@jermolene.com
0b39e47ce8 Browsers import MP3 files as audio/mpeg, not audio/mp3
Chrome changed in v81 to match Firefox and Safari - https://stackoverflow.com/questions/61363934/chrome-81-mimetype-change-to-file-upload-of-audio-mp3

Fixes #7157
2022-12-30 09:34:38 +00:00
Mario Pietsch
9f69161709
Add ignore .github, .vscode to regexp (#7148) 2022-12-24 15:58:50 +00:00
jeremy@jermolene.com
344110e289 Rearrange ordering of MP4 extension so that it defaults to video not audio
Previously using the --load command to import an MP4 file would cause it to be recognised as autio/mp4 instead of video/mp4
2022-11-09 13:56:28 +00:00
jeremy@jermolene.com
53d229592d Optimise wiki.getTiddler() 2022-09-23 18:09:16 +01:00
jeremy@jermolene.com
c5d3d4c26e Disable wiki indexers in safe mode 2022-09-23 18:07:46 +01:00