mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-29 19:12:27 +08:00
fix(build): type errors due to new development
This commit is contained in:
parent
66ccc5fe2f
commit
483b543272
42
package-lock.json
generated
42
package-lock.json
generated
@ -16,6 +16,7 @@
|
|||||||
"@mermaid-js/layout-elk": "0.1.7",
|
"@mermaid-js/layout-elk": "0.1.7",
|
||||||
"@mind-elixir/node-menu": "1.0.3",
|
"@mind-elixir/node-menu": "1.0.3",
|
||||||
"@triliumnext/express-partial-content": "1.0.1",
|
"@triliumnext/express-partial-content": "1.0.1",
|
||||||
|
"@types/bootstrap": "5.2.10",
|
||||||
"archiver": "7.0.1",
|
"archiver": "7.0.1",
|
||||||
"async-mutex": "0.5.0",
|
"async-mutex": "0.5.0",
|
||||||
"autocomplete.js": "0.38.1",
|
"autocomplete.js": "0.38.1",
|
||||||
@ -124,6 +125,7 @@
|
|||||||
"@types/escape-html": "1.0.4",
|
"@types/escape-html": "1.0.4",
|
||||||
"@types/express": "5.0.0",
|
"@types/express": "5.0.0",
|
||||||
"@types/express-session": "1.18.1",
|
"@types/express-session": "1.18.1",
|
||||||
|
"@types/fs-extra": "11.0.4",
|
||||||
"@types/html": "1.0.4",
|
"@types/html": "1.0.4",
|
||||||
"@types/ini": "4.1.1",
|
"@types/ini": "4.1.1",
|
||||||
"@types/jasmine": "5.1.5",
|
"@types/jasmine": "5.1.5",
|
||||||
@ -3106,6 +3108,16 @@
|
|||||||
"node": ">=18"
|
"node": ">=18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@popperjs/core": {
|
||||||
|
"version": "2.11.8",
|
||||||
|
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.8.tgz",
|
||||||
|
"integrity": "sha512-P1st0aksCrn9sGZhp8GMYwBnQsbvAWsZAX44oXNNvLHGqAOcoVxmjZiohstwQ7SqKnbR47akdNi+uleWD8+g6A==",
|
||||||
|
"license": "MIT",
|
||||||
|
"funding": {
|
||||||
|
"type": "opencollective",
|
||||||
|
"url": "https://opencollective.com/popperjs"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@shikijs/engine-oniguruma": {
|
"node_modules/@shikijs/engine-oniguruma": {
|
||||||
"version": "1.24.2",
|
"version": "1.24.2",
|
||||||
"resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.24.2.tgz",
|
"resolved": "https://registry.npmjs.org/@shikijs/engine-oniguruma/-/engine-oniguruma-1.24.2.tgz",
|
||||||
@ -3247,6 +3259,15 @@
|
|||||||
"@types/node": "*"
|
"@types/node": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/bootstrap": {
|
||||||
|
"version": "5.2.10",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/bootstrap/-/bootstrap-5.2.10.tgz",
|
||||||
|
"integrity": "sha512-F2X+cd6551tep0MvVZ6nM8v7XgGN/twpdNDjqS1TUM7YFNEtQYWk+dKAnH+T1gr6QgCoGMPl487xw/9hXooa2g==",
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@popperjs/core": "^2.9.2"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/cacheable-request": {
|
"node_modules/@types/cacheable-request": {
|
||||||
"version": "6.0.2",
|
"version": "6.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/@types/cacheable-request/-/cacheable-request-6.0.2.tgz",
|
||||||
@ -3620,6 +3641,17 @@
|
|||||||
"@types/express": "*"
|
"@types/express": "*"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/fs-extra": {
|
||||||
|
"version": "11.0.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/fs-extra/-/fs-extra-11.0.4.tgz",
|
||||||
|
"integrity": "sha512-yTbItCNreRooED33qjunPthRcSjERP1r4MqCZc7wv0u2sUkzTFp45tgUfS5+r7FrZPdmCCNflLhVSP/o+SemsQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/jsonfile": "*",
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/geojson": {
|
"node_modules/@types/geojson": {
|
||||||
"version": "7946.0.14",
|
"version": "7946.0.14",
|
||||||
"resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.14.tgz",
|
"resolved": "https://registry.npmjs.org/@types/geojson/-/geojson-7946.0.14.tgz",
|
||||||
@ -3701,6 +3733,16 @@
|
|||||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
|
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",
|
||||||
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="
|
"integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA=="
|
||||||
},
|
},
|
||||||
|
"node_modules/@types/jsonfile": {
|
||||||
|
"version": "6.1.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@types/jsonfile/-/jsonfile-6.1.4.tgz",
|
||||||
|
"integrity": "sha512-D5qGUYwjvnNNextdU59/+fI+spnwtTFmyQP0h+PfIOSkNfpU6AOICUOkm4i0OnSk+NyjdPJrxCDro0sJsWlRpQ==",
|
||||||
|
"dev": true,
|
||||||
|
"license": "MIT",
|
||||||
|
"dependencies": {
|
||||||
|
"@types/node": "*"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@types/keyv": {
|
"node_modules/@types/keyv": {
|
||||||
"version": "3.1.3",
|
"version": "3.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@types/keyv/-/keyv-3.1.3.tgz",
|
||||||
|
@ -59,6 +59,7 @@
|
|||||||
"@mermaid-js/layout-elk": "0.1.7",
|
"@mermaid-js/layout-elk": "0.1.7",
|
||||||
"@mind-elixir/node-menu": "1.0.3",
|
"@mind-elixir/node-menu": "1.0.3",
|
||||||
"@triliumnext/express-partial-content": "1.0.1",
|
"@triliumnext/express-partial-content": "1.0.1",
|
||||||
|
"@types/bootstrap": "5.2.10",
|
||||||
"archiver": "7.0.1",
|
"archiver": "7.0.1",
|
||||||
"async-mutex": "0.5.0",
|
"async-mutex": "0.5.0",
|
||||||
"autocomplete.js": "0.38.1",
|
"autocomplete.js": "0.38.1",
|
||||||
@ -164,6 +165,7 @@
|
|||||||
"@types/escape-html": "1.0.4",
|
"@types/escape-html": "1.0.4",
|
||||||
"@types/express": "5.0.0",
|
"@types/express": "5.0.0",
|
||||||
"@types/express-session": "1.18.1",
|
"@types/express-session": "1.18.1",
|
||||||
|
"@types/fs-extra": "11.0.4",
|
||||||
"@types/html": "1.0.4",
|
"@types/html": "1.0.4",
|
||||||
"@types/ini": "4.1.1",
|
"@types/ini": "4.1.1",
|
||||||
"@types/jasmine": "5.1.5",
|
"@types/jasmine": "5.1.5",
|
||||||
|
@ -293,7 +293,7 @@ async function getNoteTitleWithPathAsSuffix(notePath: string) {
|
|||||||
return $titleWithPath;
|
return $titleWithPath;
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatNotePath(path) {
|
function formatNotePath(path: string[]) {
|
||||||
const $notePath = $('<span class="note-path">');
|
const $notePath = $('<span class="note-path">');
|
||||||
|
|
||||||
if (path.length > 0) {
|
if (path.length > 0) {
|
||||||
|
@ -205,7 +205,7 @@ function getMimeTypeClass(mime: string) {
|
|||||||
|
|
||||||
function closeActiveDialog() {
|
function closeActiveDialog() {
|
||||||
if (glob.activeDialog) {
|
if (glob.activeDialog) {
|
||||||
bootstrap.Modal.getOrCreateInstance(glob.activeDialog).hide();
|
bootstrap.Modal.getOrCreateInstance(glob.activeDialog[0]).hide();
|
||||||
glob.activeDialog = null;
|
glob.activeDialog = null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -249,7 +249,7 @@ async function openDialog($dialog: JQuery<HTMLElement>, closeActDialog = true) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
saveFocusedElement();
|
saveFocusedElement();
|
||||||
bootstrap.Modal.getOrCreateInstance($dialog).show();
|
bootstrap.Modal.getOrCreateInstance($dialog[0]).show();
|
||||||
|
|
||||||
$dialog.on('hidden.bs.modal', () => {
|
$dialog.on('hidden.bs.modal', () => {
|
||||||
$(".aa-input").autocomplete("close");
|
$(".aa-input").autocomplete("close");
|
||||||
@ -542,11 +542,11 @@ function downloadSvg(nameWithoutExtension: string, svgContent: string) {
|
|||||||
* 0 if v1 is equal to v2
|
* 0 if v1 is equal to v2
|
||||||
* -1 if v1 is less than v2
|
* -1 if v1 is less than v2
|
||||||
*
|
*
|
||||||
* @param {string} v1 First version string
|
* @param v1 First version string
|
||||||
* @param {string} v2 Second version string
|
* @param v2 Second version string
|
||||||
* @returns {number}
|
* @returns
|
||||||
*/
|
*/
|
||||||
function compareVersions(v1, v2) {
|
function compareVersions(v1: string, v2: string): number {
|
||||||
|
|
||||||
// Remove 'v' prefix and everything after dash if present
|
// Remove 'v' prefix and everything after dash if present
|
||||||
v1 = v1.replace(/^v/, '').split('-')[0];
|
v1 = v1.replace(/^v/, '').split('-')[0];
|
||||||
@ -579,11 +579,8 @@ function compareVersions(v1, v2) {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Compares two semantic version strings and returns `true` if the latest version is greater than the current version.
|
* Compares two semantic version strings and returns `true` if the latest version is greater than the current version.
|
||||||
* @param {string} latestVersion
|
|
||||||
* @param {string} currentVersion
|
|
||||||
* @returns {boolean}
|
|
||||||
*/
|
*/
|
||||||
function isUpdateAvailable(latestVersion, currentVersion) {
|
function isUpdateAvailable(latestVersion: string, currentVersion: string): boolean {
|
||||||
return compareVersions(latestVersion, currentVersion) > 0;
|
return compareVersions(latestVersion, currentVersion) > 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user