upgrade electron to 25 and node to 18

This commit is contained in:
zadam 2023-05-04 21:01:25 +02:00
parent 9b32d86f78
commit c0cf319521
8 changed files with 67 additions and 663 deletions

View file

@ -2,7 +2,7 @@ image:
file: .gitpod.dockerfile
tasks:
- before: nvm install 16.19.1 && nvm use 16.19.1
- before: nvm install 18.16.0 && nvm use 18.16.0
init: npm install
command: npm run start-server

View file

@ -1,5 +1,5 @@
# !!! Don't try to build this Dockerfile directly, run it through bin/build-docker.sh script !!!
FROM node:16.19.1-alpine
FROM node:18.16.0-alpine
# Create app directory
WORKDIR /usr/src/app

View file

@ -1,7 +1,7 @@
#!/usr/bin/env bash
PKG_DIR=dist/trilium-linux-x64-server
NODE_VERSION=16.19.1
NODE_VERSION=18.16.0
if [ "$1" != "DONTCOPY" ]
then

View file

@ -5,7 +5,7 @@ if [[ $# -eq 0 ]] ; then
exit 1
fi
n exec 16.19.1 npm run webpack
n exec 18.16.0 npm run webpack
DIR=$1
@ -27,7 +27,7 @@ cp -r electron.js $DIR/
cp webpack-* $DIR/
# run in subshell (so we return to original dir)
(cd $DIR && n exec 16.19.1 npm install --only=prod)
(cd $DIR && n exec 18.16.0 npm install --only=prod)
# cleanup of useless files in dependencies
rm -r $DIR/node_modules/image-q/demo

709
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -37,7 +37,7 @@
"archiver": "5.3.1",
"async-mutex": "0.4.0",
"axios": "1.4.0",
"better-sqlite3": "7.4.5",
"better-sqlite3": "8.3.0",
"chokidar": "3.5.3",
"cls-hooked": "4.2.2",
"commonmark": "0.30.0",
@ -97,7 +97,7 @@
},
"devDependencies": {
"cross-env": "7.0.3",
"electron": "16.2.8",
"electron": "25.0.0-beta.1",
"electron-builder": "23.6.0",
"electron-packager": "17.1.1",
"electron-rebuild": "3.2.9",

View file

@ -60,8 +60,6 @@ export default class WatchedFileUpdateStatusWidget extends NoteContextAwareWidge
const { entityType, entityId } = this.getEntity();
const status = fileWatcher.getFileModificationStatus(entityType, entityId);
console.log("status", status);
this.$filePath.text(status.filePath);
this.$fileLastModified.text(dayjs.unix(status.lastModifiedMs / 1000).format("HH:mm:ss"));
}

View file

@ -883,7 +883,10 @@ function eraseUnusedBlobs() {
FROM blobs
LEFT JOIN notes ON notes.blobId = blobs.blobId
LEFT JOIN attachments ON attachments.blobId = blobs.blobId
WHERE notes.noteId IS NULL AND attachments.attachmentId IS NULL`);
LEFT JOIN note_revisions ON attachments.blobId = blobs.blobId
WHERE notes.noteId IS NULL
AND attachments.attachmentId IS NULL
AND note_revisions.noteRevisionId IS NULL`);
sql.executeMany(`DELETE FROM blobs WHERE blobId IN (???)`, unusedBlobIds);