473 Commits

Author SHA1 Message Date
Elian Doran
2cd69cc57a
chore(docs): remove old documentation 2025-04-12 01:38:51 +03:00
Panagiotis Papadopoulos
22ac83f443 chore(build-server): add unix EOL to trilium.sh 2025-04-10 23:22:52 +02:00
Jin
6ea3d5fb17 feat: 🎸 add yearPattern 2025-04-03 00:20:41 +02:00
Jin
68d41f1de5 feat: 🎸 add quarter note support 2025-04-01 18:45:09 +02:00
Jin
1313003bdb feat: 🎸 add create week note func 2025-04-01 16:57:52 +02:00
Jin
bead99a85d fix: 🐛 add missing builtin monthPattern label 2025-04-01 14:52:04 +02:00
Panagiotis Papadopoulos
6336699618 build(server): improve "node" folder cleanup
* remove useless symlinks to non-existing files (npm, npx -> the actual file gets deleted by "rm -r $BUILD_DIR/node/lib/node_modules/npm"
=> fixes #1499
(this time fully ;-))

* remove unused corepack

* remove useless CHANGELOG.md (LICENSE and README.md should of course still remain)
2025-03-27 21:06:35 +01:00
Panagiotis Papadopoulos
75431ca634 build: make running of npm ci in build scripts configurable
* moved the running of npm ci from copy-dist to cleanupNodeModules
* added flag to disable it (necessary for electron-forge)
2025-03-27 00:00:41 +01:00
Panagiotis Papadopoulos
0b428035ae build(cleanupNodeModules): move removal of elements to its own function
also added a logging function for debugging purposes
2025-03-26 09:48:06 +01:00
Panagiotis Papadopoulos
51f2e23c2f build(cleanupNodeModules): delete .bin folder
this is only needed for executing package scripts -> which we don't do in production

fixes #1499
2025-03-26 09:28:50 +01:00
Panagiotis Papadopoulos
1528703ed9 build(cleanupNodeModules): add some minimalistic logging 2025-03-26 09:26:22 +01:00
Panagiotis Papadopoulos
1150f78b15 build(cleanupNodeModules): use path.join and basePath for extraFoldersDelete 2025-03-26 09:18:16 +01:00
Panagiotis Papadopoulos
6fe23f9a13 chore(cleanupNodeModules): remove commented out paths
extra note on mermaid: that should be packed by webpack now, so we just need to move it to devDeps and and we should be good
2025-03-26 09:15:33 +01:00
Panagiotis Papadopoulos
b457fa2e87 chore(cleanupNodeModules): rename nodeDir to nodeModulesContent 2025-03-26 09:12:22 +01:00
Panagiotis Papadopoulos
57ee61938d build(copy-trilium): delete now unused script
all of its functionality has been "absorbed" by the cross-platform copy-dist and cleanupNodeModules scripts, that can be used for all of our builds now
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
f79b925e49 build(server): use cleanupNodeModules script 2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
1ceaafa1e8 build: move cleanupNodeModules to its own file
this is necessary, since for Docker and electron-forge, we need to run this as an extra step after copy-dist

for electron-forge: after it is done with its own "pruning", as we otherwise would need to also take care of certain electron related pruning

for Docker: as a last step in the build stage
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
cd8401089d build(copy-trilium): update list of useless deps paths
* image-q/demo -> doesn't exist anymore (and even if it did - previous cleanup step, would've removed this anyways)
* @excalidraw/excalidraw/dist/* -> updated to point to the dev folder
* boxicons -> only fonts and css folders are used, so remove the other ones
* jimp -> updated paths and removed non-existent path

fixing here for historical reasons, next step is to move these over to copy-dist.ts
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
6749d8084b build(copy-dist): add further cleanupNodeModules functionality
deleting of ts and map files from node_modules folder,
adapted from copy-trilium.sh.
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
8275f3c867 build(copy-dist): execute filterableDirs cleanup in one chain 2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
a9643174cc build(copy-dist): add further folders to list of filterableDirs
same as before, but some of the modules use singular/plural, so just check for both
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
6260ea1532 build(copy-dist): add initial cleanupNodeModules functionality
adapted from copy-trilium.sh
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
bee7793d32 build(copy-trilium): remove now unnecessary package.json patching
this is not needed anymore since commit 6b9d8f0d677763f29d29abd0816b1a5d40e858c8
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
6fb270e4f8 build(copy-dist): copy over existing node_modules
helps avoiding downloading the packages a 2nd time during our prune stage
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
8977492981 build(copy-dist): move "pruning" to copy-dist from copy-trilium.sh 2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
1640000291 build(build-server): move "build:prepare-dist" call to build-server from copy-trilium
in preparation to get rid of the file altogether - rest of the functionality will be merged into copy-dist.ts
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
17d5fdb4b0 build(copy-dist): get rid of manual node_module copying
this is useless at the moment, as all build processes are running "npm ci --omit=dev" anyways, i.e. they will just install everything remaining again
2025-03-26 08:12:48 +01:00
Panagiotis Papadopoulos
1e713469e7 build(server): bump to latest node v22.14.0 -> fixes EBADENGINE warning
npm warn EBADENGINE Unsupported engine {
npm warn EBADENGINE   package: 'node-abi@4.2.0',
npm warn EBADENGINE   required: { node: '>=22.12.0' },
npm warn EBADENGINE   current: { node: 'v20.18.1', npm: '10.8.2' }
npm warn EBADENGINE }
2025-03-26 08:12:22 +01:00
Elian Doran
34043a8a70
feat(signing): use environment variables for the executable path 2025-03-24 17:00:37 +02:00
Elian Doran
6f54ac7446
chore(ci): change signing log 2025-03-24 12:05:46 +02:00
Elian Doran
40f4fdab47
feat(ci): set up signing hook 2025-03-23 23:22:22 +02:00
Elian Doran
a709f68af9
chore(ci): set up node modules 2025-03-23 22:47:59 +02:00
Elian Doran
28c51cb38a
refactor(client): use webpack for mermaid 2025-03-22 02:15:09 +02:00
Elian Doran
b44bb4053c
refactor(deps): use webpack for jsplumb & panzoom 2025-03-20 21:51:03 +02:00
Panagiotis Papadopoulos
feb9fa03c3 chore(deps): move mind-elixir related packages to devDependencies
webpack takes care of bundling these, so we don't need the modules at runtime anymore
2025-03-19 20:03:24 +01:00
Elian Doran
a4ae0ba628
chore(build): add turndown-plugin-gfm to copy-dist 2025-03-19 19:23:43 +02:00
Elian Doran
e9a0c68a28
Merge branch 'develop' into build_improve-electron-forge_v3 2025-03-15 17:00:53 +02:00
Elian Doran
103b29d3de
Revert "fix(flatpak): try setting different bin to avoid sandbox issue"
This reverts commit a778ec617f2aa00cf763a0c5ca0387743bc5f6f0.
2025-03-15 13:44:30 +02:00
Panagiotis Papadopoulos
3b8c645cca Merge branch 'develop' into build_improve-electron-forge_v3 2025-03-15 12:09:52 +01:00
Elian Doran
a778ec617f
fix(flatpak): try setting different bin to avoid sandbox issue 2025-03-15 13:01:28 +02:00
PChemGuy
df9a413ef8 Strip trailing backslash
%~dp0 always contains a trailing backslash. The way %DIR% is used in the following line, the trailing slash should be stripped. Alternatively, `%DIR%\\` may be replaced with `%DIR%`, but I would advice against. It is ok to have `%~dp0trilium-data`, which is a conventional pattern. Once %~dp0 is replaced with %DIR% (which is not really warranted here), stripping the trailing slash right after assignment is preferable.
2025-03-14 14:29:37 +03:00
PChemGuy
4971619b69 Missing quotes 2025-03-14 14:19:11 +03:00
Panagiotis Papadopoulos
b48fbbe583 build(copy-dist): copy over desktop.ejs for electron-forge as well
it is required for Flatpak/Deb/RPM Linux packages
2025-03-13 07:59:12 +01:00
Panagiotis Papadopoulos
4ce2c10d72 build(copy-dist): copy over the start scripts for now 2025-03-13 07:59:12 +01:00
Panagiotis Papadopoulos
6b9d8f0d67 build(electron-forge): execute electron-forge commands in our "build" output context
since we build TS and webpack ourselves and are not using any electron-forge plugins (at least at the moment) -> we should use the "build" folder as build context for electron-forge:

in comparison to running electron-forge in the root folder of the project, this avoids electron-forge from packing the source code multiple times (e.g. once as uncompiled TS, then as compiled JS, and then (partially) a third time as webpack bundled JS files), same as some of the assets.

to achieve this, we run our usual TS/Webpack build process, but then install the npm dependencies *inside* the build folder (as otherwise electron-forge would choke on the missing node_modules it and abort building).

In theory we could avoid cd-ing into the build folder, by providing the "dir" as argument to electron-forge's CLI -- BUT that wouldn't play well with our CI, where we are passing --arch and --platform options to it, which need to come *before* the dir argument.

since we now cd into the "build" folder, we also need to adjust the path in package.json "main" again
2025-03-13 07:59:12 +01:00
Panagiotis Papadopoulos
d7aedfbd36 build(copy-dist): exit on any caught error to make sure copy-dist fails during CI if any error occurs
if we don't exit, it will just log the issue - however we *want* it to fail it there is an error, so that it doesn't continue in the CI

alternative would be to rethrow the error, but then we'd print the error into the logs twice :-)

closes https://github.com/TriliumNext/Notes/issues/1413
2025-03-12 09:52:42 +01:00
Panagiotis Papadopoulos
d088c8e5b2 build(copy-dist): fix path to excalidraw fonts 2025-03-12 08:57:05 +01:00
Elian Doran
cf76358dd7
fix(canvas): font loading 2025-03-11 23:03:34 +02:00
Panagiotis Papadopoulos
afe4fc2d1a build(build-server): add more detail to status "echo"s 2025-03-09 18:59:54 +01:00
Panagiotis Papadopoulos
3450066214 build(build.sh): remove unused build script
this is not used anymore at all, it was replaced by GitHub CI Actions

it even mentions several other scripts, that got removed in the meantime as well
2025-03-09 18:59:54 +01:00