1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-12-14 23:26:58 +02:00

Compare commits

..

45 Commits

Author SHA1 Message Date
palerdot
357277cda0 pass handleEscape as false in splitCommand for bundleDefaultPlugins 2023-04-11 15:27:02 +05:30
palerdot
8c1568ae81 pass options to splitCommand for bundleDefaultPlugins 2023-04-11 15:07:47 +05:30
palerdot
66e479d13d Revert "fix path separator in windows for default plugins"
This reverts commit 700c1410fa.
2023-04-11 15:05:51 +05:30
palerdot
700c1410fa fix path separator in windows for default plugins 2023-04-11 13:05:11 +05:30
palerdot
3873e15a21 fix __dirname in windows for default plugins 2023-04-11 12:27:43 +05:30
palerdot
72ec2d3b1e desktop: add jest types for tsconfig 2023-04-11 11:48:57 +05:30
palerdot
7eddbc7002 CI: run tsc task before build task in workspaces 2023-04-11 11:35:18 +05:30
palerdot
d593ed130e fix(CI): --topological-dev for building the project
ref: https://yarnpkg.com/cli/workspaces/foreach#options-topological-dev
@joplin/tools is a devDependency for lots of packages including
app-desktop. The build fails since this dev dependency was not
built as a required dependency in node_modules of desktop
2023-04-11 11:11:02 +05:30
palerdot
b2eabb3836 running updateIgnored at root 2023-04-11 10:54:44 +05:30
palerdot
5e1c789926 chore(desktop): move gulpfile to typescript 2023-04-10 17:46:37 +05:30
palerdot
4f552b396c fix(ci): bundleDefaultPlugins task fixes 2023-04-10 15:15:59 +05:30
palerdot
132bcbd477 chore: auto newline insert for package json 2023-04-10 12:46:50 +05:30
palerdot
8f6192464b Merge remote-tracking branch 'origin/dev' into mac-binary-signing-osxsign-upgrade 2023-04-10 11:24:44 +05:30
palerdot
897addec4e gulp: bundleDefaultPlugins task for desktop 2023-04-10 10:45:17 +05:30
github-actions[bot]
f3eea43d24 @tbjers has signed the CLA in laurent22/joplin#8036 2023-04-10 02:35:07 +00:00
Joplin Bot
8babaddbcb Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-04-09 12:21:18 +00:00
Laurent Cozic
13cdaabb17 Android 2.11.2 2023-04-09 14:07:14 +02:00
renovate[bot]
a94aa21088 Update dependency slugify to v1.6.6 (#8019)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Laurent Cozic <laurent22@users.noreply.github.com>
2023-04-09 12:56:05 +01:00
Henry Heino
6116bed4e3 Mobile: Resolve #8022: Editor syntax highlighting was broken (#8023) 2023-04-09 12:55:47 +01:00
Arun Kumar
fabd0b4dda Desktop, Mobile: Fixes #7940: Removed MasterKey from Sync Status report (#8026) 2023-04-09 12:54:48 +01:00
Laurent Cozic
6b72f86e7b Mobile: Security: Prevent bypassing fingerprint lock on certain devices 2023-04-09 11:29:33 +02:00
Joplin Bot
02cf546124 Doc: Auto-update documentation
Auto-updated using release-website.sh
2023-04-09 06:17:13 +00:00
renovate[bot]
eecb012d64 Update dependency @react-native-community/netinfo to v9.3.8 (#8033)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-04-09 03:02:24 +00:00
palerdot
51e865c467 change back to desktop directory after bundleDefaultPlugins 2023-04-07 15:50:22 +05:30
palerdot
ac8b3ae0cc Merge remote-tracking branch 'origin/mac-binary-signing-osxsign-upgrade' into mac-binary-signing-osxsign-upgrade 2023-04-07 15:04:21 +05:30
palerdot
0b3919fd62 desktop: bundleDefaultPlugins task added to dist 2023-04-07 15:02:28 +05:30
Laurent Cozic
db69125e8f Merge branch 'dev' into mac-binary-signing-osxsign-upgrade 2023-04-06 14:03:08 +02:00
Laurent Cozic
ccabc778f6 Merge branch 'dev' into mac-binary-signing-osxsign-upgrade 2023-04-06 12:13:35 +02:00
Laurent Cozic
56b9c9fbc9 Merge branch 'dev' into mac-binary-signing-osxsign-upgrade 2023-04-06 10:03:12 +02:00
Laurent Cozic
c68d196baa Merge branch 'dev' into mac-binary-signing-osxsign-upgrade 2023-04-06 09:46:37 +02:00
palerdot
897fd0f727 trying binary signing with plugin jpl path 2023-04-05 16:16:25 +05:30
palerdot
9edb402b18 fix mac app binary signing not a directory error 2023-04-05 15:38:02 +05:30
palerdot
36ae58ffe1 fix mac app binary signing by giving the directory path 2023-04-05 15:02:18 +05:30
palerdot
5ef8b86957 fix(ci): provide extraResources path for mac binary signing 2023-04-05 13:11:39 +05:30
palerdot
c7228cfcd6 fix(ci): desktop package directory navigation fix
correctly navigate to desktop directory for CI building after
building default plugins for CI
2023-04-05 12:40:02 +05:30
palerdot
7a791dbf98 Merge remote-tracking branch 'origin/dev' into mac-binary-signing-osxsign-upgrade 2023-04-05 12:23:28 +05:30
palerdot
a543588527 fix(ci): raw binary path before copying as extraResources 2023-04-05 11:39:58 +05:30
palerdot
998ad142a6 Revert "fix(ci): checking with binary path before copying as extraResources"
This reverts commit b6a53f96f7.
2023-04-05 11:39:08 +05:30
palerdot
b6a53f96f7 fix(ci): checking with binary path before copying as extraResources 2023-04-05 11:38:24 +05:30
palerdot
841a9c6e09 fix(ci): build default plugins for CI check and mac app signing 2023-04-05 11:34:35 +05:30
palerdot
d25c078ef0 fix: mac app correct extraResources path for binaries 2023-04-05 10:53:12 +05:30
palerdot
ff69ac17be include default plugins and binary path for mac signing 2023-04-04 13:17:10 +05:30
palerdot
b44945b3a0 chore: electron-builder v24 update for @electron/osx-sign 2023-04-04 12:37:25 +05:30
palerdot
2584224026 chore: upgrade to @electron/notarize namespace 2023-04-04 12:29:44 +05:30
palerdot
46136871bf chore: upgrade to @electron/rebuild namespace 2023-04-04 11:44:02 +05:30
26 changed files with 539 additions and 540 deletions

View File

@@ -330,6 +330,7 @@ packages/app-desktop/gui/style/StyledTextInput.js
packages/app-desktop/gui/utils/NoteListUtils.js
packages/app-desktop/gui/utils/convertToScreenCoordinates.js
packages/app-desktop/gui/utils/loadScript.js
packages/app-desktop/gulpfile.js
packages/app-desktop/plugins/GotoAnything.js
packages/app-desktop/services/bridge.js
packages/app-desktop/services/commands/stateToWhenClauseContext.js
@@ -405,6 +406,7 @@ packages/app-mobile/components/SideMenu.js
packages/app-mobile/components/TextInput.js
packages/app-mobile/components/app-nav.js
packages/app-mobile/components/biometrics/BiometricPopup.js
packages/app-mobile/components/biometrics/biometricAuthenticate.js
packages/app-mobile/components/biometrics/sensorInfo.js
packages/app-mobile/components/getResponsiveValue.js
packages/app-mobile/components/getResponsiveValue.test.js

View File

@@ -180,9 +180,6 @@ cd "$ROOT_DIR/packages/app-desktop"
if [[ $GIT_TAG_NAME = v* ]]; then
echo "Step: Building and publishing desktop application..."
# cd "$ROOT_DIR/packages/tools"
# node bundleDefaultPlugins.js
cd "$ROOT_DIR/packages/app-desktop"
USE_HARD_LINKS=false yarn run dist
elif [[ $IS_LINUX = 1 ]] && [[ $GIT_TAG_NAME = $SERVER_TAG_PREFIX-* ]]; then
echo "Step: Building Docker Image..."

2
.gitignore vendored
View File

@@ -317,6 +317,7 @@ packages/app-desktop/gui/style/StyledTextInput.js
packages/app-desktop/gui/utils/NoteListUtils.js
packages/app-desktop/gui/utils/convertToScreenCoordinates.js
packages/app-desktop/gui/utils/loadScript.js
packages/app-desktop/gulpfile.js
packages/app-desktop/plugins/GotoAnything.js
packages/app-desktop/services/bridge.js
packages/app-desktop/services/commands/stateToWhenClauseContext.js
@@ -392,6 +393,7 @@ packages/app-mobile/components/SideMenu.js
packages/app-mobile/components/TextInput.js
packages/app-mobile/components/app-nav.js
packages/app-mobile/components/biometrics/BiometricPopup.js
packages/app-mobile/components/biometrics/biometricAuthenticate.js
packages/app-mobile/components/biometrics/sensorInfo.js
packages/app-mobile/components/getResponsiveValue.js
packages/app-mobile/components/getResponsiveValue.test.js

View File

@@ -13,7 +13,7 @@
},
"scripts": {
"buildParallel": "yarn workspaces foreach --verbose --interlaced --parallel --jobs 2 --topological run build && yarn run tsc",
"buildSequential": "yarn workspaces foreach --verbose --interlaced --topological run build && yarn run tsc",
"buildSequential": "yarn run tsc && yarn workspaces foreach --verbose --interlaced --topological-dev run build",
"buildApiDoc": "yarn workspace joplin start apidoc ../../readme/api/references/rest_api.md",
"buildCommandIndex": "node packages/tools/gulp/tasks/buildCommandIndexRun.js",
"buildPluginDoc": "typedoc --name 'Joplin Plugin API Documentation' --mode file -theme './Assets/PluginDocTheme/' --readme './Assets/PluginDocTheme/index.md' --excludeNotExported --excludeExternals --excludePrivate --excludeProtected --out ../joplin-website/docs/api/references/plugin_api packages/lib/services/plugins/api/",

View File

@@ -2,6 +2,7 @@ const gulp = require('gulp');
const utils = require('@joplin/tools/gulp/utils');
const compileSass = require('@joplin/tools/compileSass');
const compilePackageInfo = require('@joplin/tools/compilePackageInfo');
const bundleDefaultPlugins = require('@joplin/tools/bundleDefaultPlugins');
const tasks = {
compileScripts: {
@@ -35,6 +36,11 @@ const tasks = {
);
},
},
bundleDefaultPlugins: {
fn: async () => {
await bundleDefaultPlugins();
},
},
};
utils.registerGulpTasks(gulp, tasks);

View File

@@ -5,7 +5,8 @@
"main": "main.js",
"private": true,
"scripts": {
"dist": "yarn run electronRebuild && npx electron-builder",
"dist": "yarn run bundleDefaultPlugins && yarn run electronRebuild && npx electron-builder",
"bundleDefaultPlugins": "gulp bundleDefaultPlugins",
"build": "gulp build",
"postinstall": "yarn run build",
"electronBuilder": "gulp electronBuilder",
@@ -90,7 +91,10 @@
"CFBundleURLName": "org.joplinapp.x-callback-url"
}
]
}
},
"binaries": [
"Contents/Resources/build/defaultPlugins/io.github.jackgruber.backup/plugin.jpl"
]
},
"linux": {
"icon": "../../Assets/LinuxIcons",
@@ -107,6 +111,8 @@
},
"homepage": "https://github.com/laurent22/joplin#readme",
"devDependencies": {
"@electron/notarize": "1.2.3",
"@electron/rebuild": "3.2.10",
"@joplin/tools": "~2.11",
"@testing-library/react-hooks": "8.0.1",
"@types/jest": "29.2.6",
@@ -115,9 +121,7 @@
"@types/react-redux": "7.1.25",
"@types/styled-components": "5.1.26",
"electron": "19.1.4",
"electron-builder": "23.6.0",
"electron-notarize": "1.2.2",
"electron-rebuild": "3.2.9",
"electron-builder": "24.1.2",
"glob": "8.1.0",
"gulp": "4.0.2",
"jest": "29.4.3",
@@ -125,6 +129,7 @@
"js-sha512": "0.8.0",
"nan": "2.17.0",
"react-test-renderer": "18.2.0",
"ts-node": "^10.9.1",
"typescript": "4.9.4"
},
"optionalDependencies": {

View File

@@ -1,6 +1,6 @@
const fs = require('fs');
const path = require('path');
const electron_notarize = require('electron-notarize');
const electron_notarize = require('@electron/notarize');
const execCommand = require('./execCommand');
function isDesktopAppTag(tagName) {

View File

@@ -7,5 +7,12 @@
"exclude": [
"**/node_modules",
"**/dist",
"gulpfile.ts",
],
"compilerOptions": {
"types": [
"jest",
"node"
]
}
}

View File

@@ -150,8 +150,8 @@ android {
applicationId "net.cozic.joplin"
minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 2097686
versionName "2.11.1"
versionCode 2097687
versionName "2.11.2"
// ndk {
// abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
// }

View File

@@ -3,62 +3,57 @@
*/
import { EditorSettings } from '../types';
import { initCodeMirror } from './CodeMirror';
import { themeStyle } from '@joplin/lib/theme';
import Setting from '@joplin/lib/models/Setting';
import { forceParsing } from '@codemirror/language';
import loadLangauges from './testUtil/loadLanguages';
// Randomly fails on:
//
// > 42 | expect(headerLineContent.textContent).toBe(headerLineText);
//
import { expect, describe, it } from '@jest/globals';
const createEditorSettings = (themeId: number) => {
const themeData = themeStyle(themeId);
const editorSettings: EditorSettings = {
katexEnabled: true,
spellcheckEnabled: true,
themeId,
themeData,
};
return editorSettings;
};
describe('CodeMirror', () => {
it('should succeed', async () => {
expect(1).toBe(1);
// This checks for a regression -- occasionally, when updating packages,
// syntax highlighting in the CodeMirror editor stops working. This is usually
// fixed by
// 1. removing all `@codemirror/` and `@lezer/` dependencies from yarn.lock,
// 2. upgrading all CodeMirror packages to the latest versions in package.json, and
// 3. re-running `yarn install`.
//
// See https://github.com/laurent22/joplin/issues/7253
it('should give headings a different style', async () => {
const headerLineText = '# Testing...';
const initialText = `${headerLineText}\nThis is a test.`;
const editorSettings = createEditorSettings(Setting.THEME_LIGHT);
await loadLangauges();
const editor = initCodeMirror(document.body, initialText, editorSettings);
// Force the generation of the syntax tree now.
forceParsing(editor.editor);
// CodeMirror nests the tag that styles the header within .cm-headerLine:
// <div class='cm-headerLine'><span class='someclass'>Testing...</span></div>
const headerLineContent = document.body.querySelector('.cm-headerLine > span')!;
expect(headerLineContent.textContent).toBe(headerLineText);
const style = getComputedStyle(headerLineContent);
expect(style.borderBottom).not.toBe('');
expect(style.fontSize).toBe('1.6em');
});
});
// import { EditorSettings } from '../types';
// import { initCodeMirror } from './CodeMirror';
// import { themeStyle } from '@joplin/lib/theme';
// import Setting from '@joplin/lib/models/Setting';
// import { forceParsing } from '@codemirror/language';
// import loadLangauges from './testUtil/loadLanguages';
// const createEditorSettings = (themeId: number) => {
// const themeData = themeStyle(themeId);
// const editorSettings: EditorSettings = {
// katexEnabled: true,
// spellcheckEnabled: true,
// themeId,
// themeData,
// };
// return editorSettings;
// };
// describe('CodeMirror', () => {
// it('should give headings a different style', async () => {
// const headerLineText = '# Testing...';
// const initialText = `${headerLineText}\nThis is a test.`;
// const editorSettings = createEditorSettings(Setting.THEME_LIGHT);
// await loadLangauges();
// const editor = initCodeMirror(document.body, initialText, editorSettings);
// // Force the generation of the syntax tree now.
// forceParsing(editor.editor);
// // CodeMirror nests the tag that styles the header within .cm-headerLine:
// // <div class='cm-headerLine'><span class='someclass'>Testing...</span></div>
// const headerLineContent = document.body.querySelector('.cm-headerLine > span')!;
// expect(headerLineContent.textContent).toBe(headerLineText);
// const style = getComputedStyle(headerLineContent);
// expect(style.borderBottom).not.toBe('');
// expect(style.fontSize).toBe('1.6em');
// });
// });

View File

@@ -2,10 +2,10 @@ const React = require('react');
import Setting from '@joplin/lib/models/Setting';
import { useEffect, useMemo, useState } from 'react';
import { View, Dimensions, Alert, Button } from 'react-native';
import FingerprintScanner from 'react-native-fingerprint-scanner';
import { SensorInfo } from './sensorInfo';
import { _ } from '@joplin/lib/locale';
import Logger from '@joplin/lib/Logger';
import biometricAuthenticate from './biometricAuthenticate';
const logger = Logger.create('BiometricPopup');
@@ -21,7 +21,7 @@ export default (props: Props) => {
// doesn't work properly, we disable it. We only want the user to enable the
// feature after they've read the description in the config screen.
const [initialPromptDone, setInitialPromptDone] = useState(true); // useState(Setting.value('security.biometricsInitialPromptDone'));
const [display, setDisplay] = useState(!!props.sensorInfo.supportedSensors && (props.sensorInfo.enabled || !initialPromptDone));
const [display, setDisplay] = useState(props.sensorInfo.enabled || !initialPromptDone);
const [tryBiometricsCheck, setTryBiometricsCheck] = useState(initialPromptDone);
logger.info('Render start');
@@ -37,18 +37,14 @@ export default (props: Props) => {
logger.info('biometricsCheck: start');
try {
logger.info('biometricsCheck: authenticate...');
await FingerprintScanner.authenticate({ description: _('Verify your identity') });
logger.info('biometricsCheck: authenticate done');
setTryBiometricsCheck(false);
await biometricAuthenticate();
setDisplay(false);
} catch (error) {
Alert.alert(_('Could not verify your identify'), error.message);
setTryBiometricsCheck(false);
} finally {
FingerprintScanner.release();
Alert.alert(error.message);
}
setTryBiometricsCheck(false);
logger.info('biometricsCheck: end');
};
@@ -97,7 +93,7 @@ export default (props: Props) => {
},
]
);
}, [initialPromptDone, props.sensorInfo.supportedSensors, display, props.dispatch]);
}, [initialPromptDone, display, props.dispatch]);
const windowSize = useMemo(() => {
return {

View File

@@ -0,0 +1,28 @@
import Logger from '@joplin/lib/Logger';
import FingerprintScanner, { Errors } from 'react-native-fingerprint-scanner';
import { _ } from '@joplin/lib/locale';
const logger = Logger.create('biometricAuthenticate');
export default async () => {
try {
logger.info('Authenticate...');
await FingerprintScanner.authenticate({ description: _('Verify your identity') });
logger.info('Authenticate done');
} catch (error) {
const errorName = (error as Errors).name;
let errorMessage = error.message;
if (errorName === 'FingerprintScannerNotEnrolled' || errorName === 'FingerprintScannerNotAvailable') {
errorMessage = _('Biometric unlock is not setup on the device. Please set it up in order to unlock Joplin. If the device is on lockout, consider switching it off and on to reset biometrics scanning.');
}
error.message = _('Could not verify your identify: %s', errorMessage);
logger.warn(error);
throw error;
} finally {
FingerprintScanner.release();
}
};

View File

@@ -30,6 +30,18 @@ export default async (): Promise<SensorInfo> => {
try {
logger.info('Getting isSensorAvailable...');
// Note: If `isSensorAvailable()` doesn't return anything, it seems we
// could assume that biometrics are not setup on the device, and thus we
// can unlock the app. However that's not always correct - on some
// devices (eg Galaxy S22), `isSensorAvailable()` will return nothing if
// the device is on lockout - i.e. if the user gave the wrong
// fingerprint multiple times.
//
// So we definitely can't unlock the app in that case, and it means
// `isSensorAvailable()` is pretty much useless. Instead we ask for
// fingerprint when the user turns on the feature and at that point we
// know if the device supports biometrics or not.
const result = await FingerprintScanner.isSensorAvailable();
logger.info('isSensorAvailable result', result);
supportedSensors = result;

View File

@@ -23,6 +23,7 @@ const { themeStyle } = require('../global-style.js');
const shared = require('@joplin/lib/components/shared/config-shared.js');
import SyncTargetRegistry from '@joplin/lib/SyncTargetRegistry';
import { openDocumentTree } from '@joplin/react-native-saf-x';
import biometricAuthenticate from '../biometrics/biometricAuthenticate';
class ConfigScreenComponent extends BaseScreenComponent {
public static navigationOptions(): any {
@@ -463,7 +464,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
<Text key="label" style={this.styles().switchSettingText}>
{label}
</Text>
<Switch key="control" style={this.styles().switchSettingControl} trackColor={{ false: theme.dividerColor }} value={value} onValueChange={(value: any) => updateSettingValue(key, value)} />
<Switch key="control" style={this.styles().switchSettingControl} trackColor={{ false: theme.dividerColor }} value={value} onValueChange={(value: any) => void updateSettingValue(key, value)} />
</View>
{descriptionComp}
</View>
@@ -474,13 +475,39 @@ class ConfigScreenComponent extends BaseScreenComponent {
return !hasDescription ? this.styles().settingContainer : this.styles().settingContainerNoBottomBorder;
}
private async handleSetting(key: string, value: any): Promise<boolean> {
// When the user tries to enable biometrics unlock, we ask for the
// fingerprint or Face ID, and if it's correct we save immediately. If
// it's not, we don't turn on the setting.
if (key === 'security.biometricsEnabled' && !!value) {
try {
await biometricAuthenticate();
shared.updateSettingValue(this, key, value);
await this.saveButton_press();
} catch (error) {
shared.updateSettingValue(this, key, false);
Alert.alert(error.message);
}
return true;
}
if (key === 'security.biometricsEnabled' && !value) {
shared.updateSettingValue(this, key, value);
await this.saveButton_press();
return true;
}
return false;
}
public settingToComponent(key: string, value: any) {
const themeId = this.props.themeId;
const theme = themeStyle(themeId);
const output: any = null;
const updateSettingValue = (key: string, value: any) => {
return shared.updateSettingValue(this, key, value);
const updateSettingValue = async (key: string, value: any) => {
const handled = await this.handleSetting(key, value);
if (!handled) shared.updateSettingValue(this, key, value);
};
const md = Setting.settingMetadata(key);
@@ -517,7 +544,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
fontSize: theme.fontSize,
}}
onValueChange={(itemValue: string) => {
updateSettingValue(key, itemValue);
void updateSettingValue(key, itemValue);
}}
/>
</View>
@@ -553,7 +580,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
</Text>
<View style={{ display: 'flex', flexDirection: 'row', alignItems: 'center', flex: 1 }}>
<Text style={this.styles().sliderUnits}>{unitLabel}</Text>
<Slider key="control" style={{ flex: 1 }} step={md.step} minimumValue={minimum} maximumValue={maximum} value={value} onValueChange={value => updateSettingValue(key, value)} />
<Slider key="control" style={{ flex: 1 }} step={md.step} minimumValue={minimum} maximumValue={maximum} value={value} onValueChange={value => void updateSettingValue(key, value)} />
</View>
</View>
);
@@ -577,7 +604,7 @@ class ConfigScreenComponent extends BaseScreenComponent {
<Text key="label" style={this.styles().settingText}>
{md.label()}
</Text>
<TextInput autoCorrect={false} autoComplete="off" selectionColor={theme.textSelectionColor} keyboardAppearance={theme.keyboardAppearance} autoCapitalize="none" key="control" style={this.styles().settingControl} value={value} onChangeText={(value: any) => updateSettingValue(key, value)} secureTextEntry={!!md.secure} />
<TextInput autoCorrect={false} autoComplete="off" selectionColor={theme.textSelectionColor} keyboardAppearance={theme.keyboardAppearance} autoCapitalize="none" key="control" style={this.styles().settingControl} value={value} onChangeText={(value: any) => void updateSettingValue(key, value)} secureTextEntry={!!md.secure} />
</View>
);
} else {

View File

@@ -328,7 +328,7 @@ PODS:
- React-Core
- react-native-image-resizer (1.4.5):
- React-Core
- react-native-netinfo (9.3.7):
- react-native-netinfo (9.3.8):
- React-Core
- react-native-rsa-native (2.0.5):
- React
@@ -722,7 +722,7 @@ SPEC CHECKSUMS:
react-native-get-random-values: a6ea6a8a65dc93e96e24a11105b1a9c8cfe1d72a
react-native-image-picker: ec9b713e248760bfa0f879f0715391de4651a7cb
react-native-image-resizer: d9fb629a867335bdc13230ac2a58702bb8c8828f
react-native-netinfo: 2517ad504b3d303e90d7a431b0fcaef76d207983
react-native-netinfo: fbc23bc2fe217155d85f2f7e0644b1654df8029b
react-native-rsa-native: 12132eb627797529fdb1f0d22fd0f8f9678df64a
react-native-saf-x: 9bd5238d3b43d76bbec64aa82c173ac20a4bce9f
react-native-safe-area-context: 39c2d8be3328df5d437ac1700f4f3a4f75716acc

View File

@@ -25,7 +25,7 @@
"@react-native-community/clipboard": "1.5.1",
"@react-native-community/datetimepicker": "6.7.5",
"@react-native-community/geolocation": "2.1.0",
"@react-native-community/netinfo": "9.3.7",
"@react-native-community/netinfo": "9.3.8",
"@react-native-community/push-notification-ios": "1.10.1",
"@react-native-community/slider": "4.4.2",
"assert-browserify": "2.0.0",
@@ -79,19 +79,19 @@
"devDependencies": {
"@babel/core": "7.16.0",
"@babel/runtime": "7.16.3",
"@codemirror/commands": "6.1.2",
"@codemirror/commands": "6.2.2",
"@codemirror/lang-cpp": "6.0.2",
"@codemirror/lang-html": "6.4.0",
"@codemirror/lang-html": "6.4.3",
"@codemirror/lang-java": "6.0.1",
"@codemirror/lang-javascript": "6.1.1",
"@codemirror/lang-markdown": "6.0.5",
"@codemirror/lang-javascript": "6.1.5",
"@codemirror/lang-markdown": "6.1.0",
"@codemirror/lang-php": "6.0.1",
"@codemirror/lang-rust": "6.0.1",
"@codemirror/language": "6.3.2",
"@codemirror/legacy-modes": "6.3.1",
"@codemirror/search": "6.2.3",
"@codemirror/state": "6.1.4",
"@codemirror/view": "6.7.1",
"@codemirror/language": "6.6.0",
"@codemirror/legacy-modes": "6.3.2",
"@codemirror/search": "6.3.0",
"@codemirror/state": "6.2.0",
"@codemirror/view": "6.9.3",
"@joplin/tools": "~2.11",
"@lezer/highlight": "1.1.4",
"@types/fs-extra": "9.0.13",

View File

@@ -501,7 +501,7 @@ async function initialize(dispatch: Function) {
if (Setting.value('env') === 'prod') {
await db.open({ name: getDatabaseName(currentProfile, isSubProfile) });
} else {
await db.open({ name: getDatabaseName(currentProfile, isSubProfile, '-1') });
await db.open({ name: getDatabaseName(currentProfile, isSubProfile, '-3') });
// await db.clearForTesting();
}

View File

@@ -24,7 +24,7 @@
},
"dependencies": {
"chalk": "2.4.2",
"slugify": "1.6.5",
"slugify": "1.6.6",
"yeoman-generator": "5.8.0",
"yosay": "2.0.2"
},

View File

@@ -110,6 +110,8 @@ export default class ReportService {
let syncedCount = 0;
for (let i = 0; i < BaseItem.syncItemDefinitions_.length; i++) {
const d = BaseItem.syncItemDefinitions_[i];
// ref: https://github.com/laurent22/joplin/issues/7940#issuecomment-1473709148
if (d.className === 'MasterKey') continue;
const ItemClass = BaseItem.getClass(d.className);
const o = {
total: await ItemClass.count(),

View File

@@ -1,4 +1,4 @@
import { join } from 'path';
import { join, normalize } from 'path';
import { pathExists, mkdir, readFile, move, remove, writeFile } from 'fs-extra';
import { DefaultPluginsInfo } from '@joplin/lib/services/plugins/PluginService';
import getDefaultPluginsInfo from '@joplin/lib/services/plugins/defaultPlugins/desktopDefaultPluginsInfo';
@@ -41,7 +41,7 @@ async function downloadFile(url: string, outputPath: string) {
export async function extractPlugins(currentDir: string, defaultPluginDir: string, downloadedPluginsNames: PluginIdAndName): Promise<void> {
for (const pluginId of Object.keys(downloadedPluginsNames)) {
await execCommand(`tar xzf ${currentDir}/${downloadedPluginsNames[pluginId]}`, { quiet: true });
await execCommand(`tar xzf ${currentDir}/${downloadedPluginsNames[pluginId]}`, { quiet: true, splitCommandOptions: { handleEscape: false } });
await move(`package/publish/${pluginId}.jpl`, `${defaultPluginDir}/${pluginId}/plugin.jpl`, { overwrite: true });
await move(`package/publish/${pluginId}.json`, `${defaultPluginDir}/${pluginId}/manifest.json`, { overwrite: true });
await remove(`${downloadedPluginsNames[pluginId]}`);
@@ -74,7 +74,10 @@ export const downloadPlugins = async (localPluginsVersions: PluginAndVersion, de
};
async function start(): Promise<void> {
const defaultPluginDir = join(__dirname, '..', '..', 'packages', 'app-desktop', 'build', 'defaultPlugins');
// windows CI fix: normalizing __dirname for windows
const cwd = normalize(__dirname);
process.chdir(cwd);
const defaultPluginDir = join(cwd, '..', '..', 'packages', 'app-desktop', 'build', 'defaultPlugins');
const defaultPluginsInfo = getDefaultPluginsInfo();
const manifestData = await fetch('https://raw.githubusercontent.com/joplin/plugins/master/manifests.json');
@@ -83,7 +86,7 @@ async function start(): Promise<void> {
const localPluginsVersions = await localPluginsVersion(defaultPluginDir, defaultPluginsInfo);
const downloadedPluginNames: PluginIdAndName = await downloadPlugins(localPluginsVersions, defaultPluginsInfo, manifests);
await extractPlugins(__dirname, defaultPluginDir, downloadedPluginNames);
await extractPlugins(cwd, defaultPluginDir, downloadedPluginNames);
}
if (require.main === module) {
@@ -94,3 +97,7 @@ if (require.main === module) {
process.exit(1);
});
}
module.exports = async () => {
await start();
};

View File

@@ -1,6 +1,6 @@
import * as execa from 'execa';
import commandToString from './commandToString';
import splitCommandString from './splitCommandString';
import splitCommandString, { SplitCommandOptions } from './splitCommandString';
import { stdout } from 'process';
interface ExecCommandOptions {
@@ -8,6 +8,7 @@ interface ExecCommandOptions {
showStdout?: boolean;
showStderr?: boolean;
quiet?: boolean;
splitCommandOptions?: SplitCommandOptions | null;
}
export default async (command: string | string[], options: ExecCommandOptions | null = null): Promise<string> => {
@@ -33,7 +34,7 @@ export default async (command: string | string[], options: ExecCommandOptions |
}
}
const args: string[] = typeof command === 'string' ? splitCommandString(command) : command as string[];
const args: string[] = typeof command === 'string' ? splitCommandString(command, options.splitCommandOptions || null) : command as string[];
const executableName = args[0];
args.splice(0, 1);
const promise = execa(executableName, args);

View File

@@ -1,3 +1,7 @@
export interface SplitCommandOptions {
handleEscape?: boolean;
}
export default (command: string, options: any = null) => {
options = options || {};
if (!('handleEscape' in options)) {

View File

@@ -1,5 +1,12 @@
# Joplin Android app changelog
## [android-v2.11.2](https://github.com/laurent22/joplin/releases/tag/android-v2.11.2) (Pre-release) - 2023-04-09T12:04:06Z
- Improved: Resolve #8022: Editor syntax highlighting was broken (#8023) (#8022 by Henry Heino)
- Improved: Updated packages @react-native-community/netinfo (v9.3.8)
- Fixed: Removed `MasterKey` from Sync Status report (#8026) (#7940 by Arun Kumar)
- Security: Prevent bypassing fingerprint lock on certain devices (6b72f86)
## [android-v2.11.1](https://github.com/laurent22/joplin/releases/tag/android-v2.11.1) (Pre-release) - 2023-04-08T08:49:19Z
- New: Add log info for biometrics feature (efdbaeb)

View File

@@ -431,6 +431,14 @@
"created_at": "2023-04-07T10:04:51Z",
"repoId": 79162682,
"pullRequestNo": 8029
},
{
"name": "tbjers",
"id": 1117052,
"comment_id": 1501316440,
"created_at": "2023-04-10T02:33:42Z",
"repoId": 79162682,
"pullRequestNo": 8036
}
]
}

View File

@@ -38,6 +38,7 @@
"@codemirror/search",
"@codemirror/state",
"@codemirror/view",
"@lezer/highlight",
"@fortawesome/fontawesome-svg-core",
"@fortawesome/free-solid-svg-icons",
"@svgr/webpack",

762
yarn.lock

File diff suppressed because it is too large Load Diff