mirror of
https://github.com/laurent22/joplin.git
synced 2025-01-11 18:24:43 +02:00
Fixed CI
This commit is contained in:
parent
cc5ead7474
commit
97e88d7983
@ -37,17 +37,8 @@ class Command extends BaseCommand {
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
static lockFile(filePath: string): Promise<Function> {
|
static async lockFile(filePath: string): Promise<Function> {
|
||||||
return new Promise((resolve, reject) => {
|
return locker.lock(filePath, { stale: 1000 * 60 * 5 });
|
||||||
locker.lock(filePath, { stale: 1000 * 60 * 5 }, (error: any, release: any) => {
|
|
||||||
if (error) {
|
|
||||||
reject(error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
resolve(release);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static isLocked(filePath: string) {
|
static isLocked(filePath: string) {
|
||||||
|
@ -157,7 +157,7 @@
|
|||||||
"node-fetch": "1.7.3",
|
"node-fetch": "1.7.3",
|
||||||
"node-notifier": "10.0.1",
|
"node-notifier": "10.0.1",
|
||||||
"node-rsa": "1.1.1",
|
"node-rsa": "1.1.1",
|
||||||
"pretty-bytes": "6.0.0",
|
"pretty-bytes": "5.6.0",
|
||||||
"re-resizable": "6.9.9",
|
"re-resizable": "6.9.9",
|
||||||
"react": "16.14.0",
|
"react": "16.14.0",
|
||||||
"react-datetime": "3.2.0",
|
"react-datetime": "3.2.0",
|
||||||
|
@ -114,7 +114,7 @@ class NoteTagsDialogComponent extends React.Component {
|
|||||||
});
|
});
|
||||||
|
|
||||||
tagListData.sort((a, b) => {
|
tagListData.sort((a, b) => {
|
||||||
if (a.selected === b.selected) return naturalCompare.caseInsensitive(a.title, b.title);
|
if (a.selected === b.selected) return naturalCompare(a.title, b.title, { caseInsensitive: true });
|
||||||
else if (b.selected === true) return 1;
|
else if (b.selected === true) return 1;
|
||||||
else return -1;
|
else return -1;
|
||||||
});
|
});
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { resolve as nodeResolve } from 'path';
|
import { resolve as nodeResolve } from 'path';
|
||||||
import FsDriverBase, { Stat } from './fs-driver-base';
|
import FsDriverBase, { Stat } from './fs-driver-base';
|
||||||
import time from './time';
|
import time from './time';
|
||||||
const md5File = require('md5-file/promise');
|
const md5File = require('md5-file');
|
||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
|
|
||||||
export default class FsDriverNode extends FsDriverBase {
|
export default class FsDriverNode extends FsDriverBase {
|
||||||
|
@ -82,19 +82,6 @@ async function decodeBase64File(sourceFilePath: string, destFilePath: string) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
async function md5FileAsync(filePath: string): Promise<string> {
|
|
||||||
return new Promise((resolve, reject) => {
|
|
||||||
md5File(filePath, (error: any, hash: string) => {
|
|
||||||
if (error) {
|
|
||||||
reject(error);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
resolve(hash);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
function removeUndefinedProperties(note: NoteEntity) {
|
function removeUndefinedProperties(note: NoteEntity) {
|
||||||
const output: any = {};
|
const output: any = {};
|
||||||
for (const n in note) {
|
for (const n in note) {
|
||||||
@ -184,7 +171,7 @@ async function processNoteResource(resource: ExtractedResource) {
|
|||||||
// If no resource ID is present, the resource ID is actually the MD5 of the data.
|
// If no resource ID is present, the resource ID is actually the MD5 of the data.
|
||||||
// This ID will match the "hash" attribute of the corresponding <en-media> tag.
|
// This ID will match the "hash" attribute of the corresponding <en-media> tag.
|
||||||
// resourceId = md5(decodedData);
|
// resourceId = md5(decodedData);
|
||||||
resource.id = await md5FileAsync(resource.dataFilePath);
|
resource.id = await md5File(resource.dataFilePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!resource.id || !resource.size) {
|
if (!resource.id || !resource.size) {
|
||||||
|
@ -46,7 +46,7 @@
|
|||||||
"nodemailer": "6.8.0",
|
"nodemailer": "6.8.0",
|
||||||
"nodemon": "2.0.20",
|
"nodemon": "2.0.20",
|
||||||
"pg": "8.8.0",
|
"pg": "8.8.0",
|
||||||
"pretty-bytes": "6.0.0",
|
"pretty-bytes": "5.6.0",
|
||||||
"prettycron": "0.10.0",
|
"prettycron": "0.10.0",
|
||||||
"query-string": "7.1.1",
|
"query-string": "7.1.1",
|
||||||
"rate-limiter-flexible": "2.4.1",
|
"rate-limiter-flexible": "2.4.1",
|
||||||
|
@ -295,10 +295,14 @@ export async function migrateList(db: DbConnection, asString: boolean = true) {
|
|||||||
// ]
|
// ]
|
||||||
// ]
|
// ]
|
||||||
|
|
||||||
const formatName = (migrationInfo: any) => {
|
const getMigrationName = (migrationInfo: any) => {
|
||||||
const name = migrationInfo.file ? migrationInfo.file : migrationInfo;
|
if (migrationInfo && migrationInfo.name) return migrationInfo.name;
|
||||||
|
if (migrationInfo && migrationInfo.file) return migrationInfo.file;
|
||||||
|
return migrationInfo;
|
||||||
|
};
|
||||||
|
|
||||||
const s = name.split('.');
|
const formatName = (migrationInfo: any) => {
|
||||||
|
const s = getMigrationName(migrationInfo).split('.');
|
||||||
s.pop();
|
s.pop();
|
||||||
return s.join('.');
|
return s.join('.');
|
||||||
};
|
};
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
const fs = require('fs-extra');
|
const fs = require('fs-extra');
|
||||||
const { execCommand, rootDir } = require('./tool-utils.js');
|
const { execCommand, rootDir } = require('./tool-utils.js');
|
||||||
const md5File = require('md5-file/promise');
|
const md5File = require('md5-file');
|
||||||
const glob = require('glob');
|
const glob = require('glob');
|
||||||
|
|
||||||
const clipperDir = `${rootDir}/packages/app-clipper`;
|
const clipperDir = `${rootDir}/packages/app-clipper`;
|
||||||
|
@ -21,7 +21,7 @@ const buildConfig = readCredentialFileJson<BuildConfig>('website-build.json', {
|
|||||||
|
|
||||||
const glob = require('glob');
|
const glob = require('glob');
|
||||||
const path = require('path');
|
const path = require('path');
|
||||||
const md5File = require('md5-file/promise');
|
const md5File = require('md5-file');
|
||||||
const docDir = `${dirname(dirname(dirname(dirname(__dirname))))}/joplin-website/docs`;
|
const docDir = `${dirname(dirname(dirname(dirname(__dirname))))}/joplin-website/docs`;
|
||||||
|
|
||||||
if (!pathExistsSync(docDir)) throw new Error(`Doc directory does not exist: ${docDir}`);
|
if (!pathExistsSync(docDir)) throw new Error(`Doc directory does not exist: ${docDir}`);
|
||||||
|
19
yarn.lock
19
yarn.lock
@ -4149,7 +4149,7 @@ __metadata:
|
|||||||
node-fetch: 1.7.3
|
node-fetch: 1.7.3
|
||||||
node-notifier: 10.0.1
|
node-notifier: 10.0.1
|
||||||
node-rsa: 1.1.1
|
node-rsa: 1.1.1
|
||||||
pretty-bytes: 6.0.0
|
pretty-bytes: 5.6.0
|
||||||
re-resizable: 6.9.9
|
re-resizable: 6.9.9
|
||||||
react: 16.14.0
|
react: 16.14.0
|
||||||
react-datetime: 3.2.0
|
react-datetime: 3.2.0
|
||||||
@ -4565,7 +4565,7 @@ __metadata:
|
|||||||
nodemailer: 6.8.0
|
nodemailer: 6.8.0
|
||||||
nodemon: 2.0.20
|
nodemon: 2.0.20
|
||||||
pg: 8.8.0
|
pg: 8.8.0
|
||||||
pretty-bytes: 6.0.0
|
pretty-bytes: 5.6.0
|
||||||
prettycron: 0.10.0
|
prettycron: 0.10.0
|
||||||
query-string: 7.1.1
|
query-string: 7.1.1
|
||||||
rate-limiter-flexible: 2.4.1
|
rate-limiter-flexible: 2.4.1
|
||||||
@ -26453,10 +26453,10 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"pretty-bytes@npm:6.0.0":
|
"pretty-bytes@npm:5.6.0, pretty-bytes@npm:^5.2.0":
|
||||||
version: 6.0.0
|
version: 5.6.0
|
||||||
resolution: "pretty-bytes@npm:6.0.0"
|
resolution: "pretty-bytes@npm:5.6.0"
|
||||||
checksum: 0bb9f95e617236404b29a8392c6efd82d65805f622f5e809ecd70068102be857d4e3276c86d2a32fa2ef851cc29472e380945dab7bec83ec79bd57a19a10faf7
|
checksum: 9c082500d1e93434b5b291bd651662936b8bd6204ec9fa17d563116a192d6d86b98f6d328526b4e8d783c07d5499e2614a807520249692da9ec81564b2f439cd
|
||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
@ -26467,13 +26467,6 @@ __metadata:
|
|||||||
languageName: node
|
languageName: node
|
||||||
linkType: hard
|
linkType: hard
|
||||||
|
|
||||||
"pretty-bytes@npm:^5.2.0":
|
|
||||||
version: 5.6.0
|
|
||||||
resolution: "pretty-bytes@npm:5.6.0"
|
|
||||||
checksum: 9c082500d1e93434b5b291bd651662936b8bd6204ec9fa17d563116a192d6d86b98f6d328526b4e8d783c07d5499e2614a807520249692da9ec81564b2f439cd
|
|
||||||
languageName: node
|
|
||||||
linkType: hard
|
|
||||||
|
|
||||||
"pretty-format@npm:^25.2.1, pretty-format@npm:^25.5.0":
|
"pretty-format@npm:^25.2.1, pretty-format@npm:^25.5.0":
|
||||||
version: 25.5.0
|
version: 25.5.0
|
||||||
resolution: "pretty-format@npm:25.5.0"
|
resolution: "pretty-format@npm:25.5.0"
|
||||||
|
Loading…
Reference in New Issue
Block a user