From 23617c940902564047d88c9fd98b2672f483bdb4 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Thu, 16 Dec 2021 10:34:49 +0100 Subject: [PATCH 01/15] Desktop release v2.6.7 --- packages/app-desktop/package-lock.json | 4 ++-- packages/app-desktop/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/app-desktop/package-lock.json b/packages/app-desktop/package-lock.json index fa49fb5df..1fb9dd18a 100644 --- a/packages/app-desktop/package-lock.json +++ b/packages/app-desktop/package-lock.json @@ -1,12 +1,12 @@ { "name": "@joplin/app-desktop", - "version": "2.6.6", + "version": "2.6.7", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@joplin/app-desktop", - "version": "2.6.6", + "version": "2.6.7", "license": "MIT", "dependencies": { "@electron/remote": "^2.0.1", diff --git a/packages/app-desktop/package.json b/packages/app-desktop/package.json index 9cff42820..a47e63398 100644 --- a/packages/app-desktop/package.json +++ b/packages/app-desktop/package.json @@ -1,6 +1,6 @@ { "name": "@joplin/app-desktop", - "version": "2.6.6", + "version": "2.6.7", "description": "Joplin for Desktop", "main": "main.js", "private": true, From bda4c3a667d3d801c048d173547ac43cf2fe3ffd Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Thu, 16 Dec 2021 11:08:08 +0100 Subject: [PATCH 02/15] Android 2.6.7 --- packages/app-mobile/android/app/build.gradle | 4 ++-- readme/changelog_android.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/app-mobile/android/app/build.gradle b/packages/app-mobile/android/app/build.gradle index 788a2468c..126fd62ca 100644 --- a/packages/app-mobile/android/app/build.gradle +++ b/packages/app-mobile/android/app/build.gradle @@ -146,8 +146,8 @@ android { applicationId "net.cozic.joplin" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 2097662 - versionName "2.6.6" + versionCode 2097663 + versionName "2.6.7" ndk { abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64" } diff --git a/readme/changelog_android.md b/readme/changelog_android.md index 7299a80f3..bfd71c47c 100644 --- a/readme/changelog_android.md +++ b/readme/changelog_android.md @@ -1,6 +1,6 @@ # Joplin Android app changelog -## [android-v2.6.6](https://github.com/laurent22/joplin/releases/tag/android-v2.6.6) (Pre-release) - 2021-12-13T10:59:30Z +## [android-v2.6.7](https://github.com/laurent22/joplin/releases/tag/android-v2.6.7) - 2021-12-16T09:48:05Z - Improved: Update Mermaid: 8.12.1 -> 8.13.5 (#5831 by Helmut K. C. Tessarek) - Fixed: Links in flowchart Mermaid diagrams (#5830) (#5801 by Helmut K. C. Tessarek) From 198287f86a18677aed8c82c7e34273abf96f215f Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Thu, 16 Dec 2021 13:55:54 +0100 Subject: [PATCH 03/15] ios-v12.6.1 --- .../ios/Joplin.xcodeproj/project.pbxproj | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj b/packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj index 075254637..d9463f4b5 100644 --- a/packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj +++ b/packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj @@ -492,13 +492,13 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Joplin/Joplin.entitlements; - CURRENT_PROJECT_VERSION = 77; + CURRENT_PROJECT_VERSION = 78; DEVELOPMENT_TEAM = A9BXAFS6CT; ENABLE_BITCODE = NO; INFOPLIST_FILE = Joplin/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 12.6.0; + MARKETING_VERSION = 12.6.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -521,12 +521,12 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Joplin/Joplin.entitlements; - CURRENT_PROJECT_VERSION = 77; + CURRENT_PROJECT_VERSION = 78; DEVELOPMENT_TEAM = A9BXAFS6CT; INFOPLIST_FILE = Joplin/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 12.6.0; + MARKETING_VERSION = 12.6.1; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -667,14 +667,14 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_ENTITLEMENTS = ShareExtension/ShareExtension.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 77; + CURRENT_PROJECT_VERSION = 78; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = A9BXAFS6CT; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = ShareExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 12.6.0; + MARKETING_VERSION = 12.6.1; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = net.cozic.joplin.ShareExtension; @@ -698,14 +698,14 @@ CODE_SIGN_ENTITLEMENTS = ShareExtension/ShareExtension.entitlements; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 77; + CURRENT_PROJECT_VERSION = 78; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = A9BXAFS6CT; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = ShareExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 12.6.0; + MARKETING_VERSION = 12.6.1; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = net.cozic.joplin.ShareExtension; PRODUCT_NAME = "$(TARGET_NAME)"; From 864b3c710cd8150b79f95cd4d6c78680e0c474df Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Thu, 16 Dec 2021 14:02:19 +0100 Subject: [PATCH 04/15] lock file --- packages/app-mobile/ios/Podfile.lock | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/app-mobile/ios/Podfile.lock b/packages/app-mobile/ios/Podfile.lock index a68ae345f..c06d3e554 100644 --- a/packages/app-mobile/ios/Podfile.lock +++ b/packages/app-mobile/ios/Podfile.lock @@ -213,7 +213,7 @@ PODS: - React-jsinspector (0.66.1) - React-logger (0.66.1): - glog - - react-native-alarm-notification (1.0.3): + - react-native-alarm-notification (1.0.5): - React - react-native-camera (3.40.0): - React-Core @@ -509,11 +509,11 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: a7c83b31436843459a1961bfd74b96033dc77234 - DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 + DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de FBLazyVector: 500821d196c3d1bd10e7e828bc93ce075234080f FBReactNativeSpec: 74c869e2cffa2ffec685cd1bac6788c021da6005 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 - glog: 5337263514dd6f09803962437687240c5dc39aa4 + glog: 73c2498ac6884b13ede40eda8228cb1eee9d9d62 JoplinCommonShareExtension: 270b4f8eb4e22828eeda433a04ed689fc1fd09b5 JoplinRNShareExtension: cb790ce4c0692367acd1a06c56330c9a440f8b58 RCT-Folly: a21c126816d8025b547704b777a2ba552f3d9fa9 @@ -528,7 +528,7 @@ SPEC CHECKSUMS: React-jsiexecutor: db2f6e22a534d466fc0e34e622df47d9d20bab2f React-jsinspector: 8c0517dee5e8c70cd6c3066f20213ff7ce54f176 React-logger: bfddd3418dc1d45b77b822958f3e31422e2c179b - react-native-alarm-notification: 466e4ad56fbd948ecac26e657f292dca8bf483d5 + react-native-alarm-notification: 4817a2a0d7cc2ed2acc97337ebcdf9ae2a69c9d5 react-native-camera: 35854c4f764a4a6cf61c1c3525888b92f0fe4b31 react-native-document-picker: 0bba80cc56caab1f67dbaa81ff557e3a9b7f2b9f react-native-geolocation: c956aeb136625c23e0dce0467664af2c437888c9 From fb5ffa562fe0e3e017f42fd7e730c8eb8f217473 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Fri, 17 Dec 2021 01:18:08 +0100 Subject: [PATCH 05/15] fix iOS build --- packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj | 8 ++++---- packages/app-mobile/ios/Podfile.lock | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj b/packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj index d9463f4b5..42dc38a5a 100644 --- a/packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj +++ b/packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj @@ -496,7 +496,7 @@ DEVELOPMENT_TEAM = A9BXAFS6CT; ENABLE_BITCODE = NO; INFOPLIST_FILE = Joplin/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 12.6.1; OTHER_LDFLAGS = ( @@ -524,7 +524,7 @@ CURRENT_PROJECT_VERSION = 78; DEVELOPMENT_TEAM = A9BXAFS6CT; INFOPLIST_FILE = Joplin/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 12.6.1; OTHER_LDFLAGS = ( @@ -672,7 +672,7 @@ DEVELOPMENT_TEAM = A9BXAFS6CT; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = ShareExtension/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; MARKETING_VERSION = 12.6.1; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; @@ -703,7 +703,7 @@ DEVELOPMENT_TEAM = A9BXAFS6CT; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = ShareExtension/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; MARKETING_VERSION = 12.6.1; MTL_FAST_MATH = YES; diff --git a/packages/app-mobile/ios/Podfile.lock b/packages/app-mobile/ios/Podfile.lock index c06d3e554..a35d05695 100644 --- a/packages/app-mobile/ios/Podfile.lock +++ b/packages/app-mobile/ios/Podfile.lock @@ -509,11 +509,11 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: boost: a7c83b31436843459a1961bfd74b96033dc77234 - DoubleConversion: cf9b38bf0b2d048436d9a82ad2abe1404f11e7de + DoubleConversion: 831926d9b8bf8166fd87886c4abab286c2422662 FBLazyVector: 500821d196c3d1bd10e7e828bc93ce075234080f FBReactNativeSpec: 74c869e2cffa2ffec685cd1bac6788c021da6005 fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9 - glog: 73c2498ac6884b13ede40eda8228cb1eee9d9d62 + glog: 5337263514dd6f09803962437687240c5dc39aa4 JoplinCommonShareExtension: 270b4f8eb4e22828eeda433a04ed689fc1fd09b5 JoplinRNShareExtension: cb790ce4c0692367acd1a06c56330c9a440f8b58 RCT-Folly: a21c126816d8025b547704b777a2ba552f3d9fa9 From 97c5493bc1816e95ef21dce3b2601c97555e4521 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Fri, 17 Dec 2021 01:21:04 +0100 Subject: [PATCH 06/15] Desktop release v2.6.8 --- packages/app-desktop/package-lock.json | 4 ++-- packages/app-desktop/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/app-desktop/package-lock.json b/packages/app-desktop/package-lock.json index 1fb9dd18a..5bff23fbc 100644 --- a/packages/app-desktop/package-lock.json +++ b/packages/app-desktop/package-lock.json @@ -1,12 +1,12 @@ { "name": "@joplin/app-desktop", - "version": "2.6.7", + "version": "2.6.8", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@joplin/app-desktop", - "version": "2.6.7", + "version": "2.6.8", "license": "MIT", "dependencies": { "@electron/remote": "^2.0.1", diff --git a/packages/app-desktop/package.json b/packages/app-desktop/package.json index a47e63398..fdf015e28 100644 --- a/packages/app-desktop/package.json +++ b/packages/app-desktop/package.json @@ -1,6 +1,6 @@ { "name": "@joplin/app-desktop", - "version": "2.6.7", + "version": "2.6.8", "description": "Joplin for Desktop", "main": "main.js", "private": true, From 9eacb6eb1b5af5c8a303d948e923cd5f3226e3ad Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Fri, 17 Dec 2021 10:59:07 +0100 Subject: [PATCH 07/15] Set iOS min supported version to 11.0 --- .../app-mobile/ios/Joplin.xcodeproj/project.pbxproj | 12 ++++++------ packages/app-mobile/ios/Podfile | 5 ++++- packages/app-mobile/ios/Podfile.lock | 2 +- 3 files changed, 11 insertions(+), 8 deletions(-) diff --git a/packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj b/packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj index 42dc38a5a..f64c5c5e9 100644 --- a/packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj +++ b/packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj @@ -496,7 +496,7 @@ DEVELOPMENT_TEAM = A9BXAFS6CT; ENABLE_BITCODE = NO; INFOPLIST_FILE = Joplin/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 12.6.1; OTHER_LDFLAGS = ( @@ -524,7 +524,7 @@ CURRENT_PROJECT_VERSION = 78; DEVELOPMENT_TEAM = A9BXAFS6CT; INFOPLIST_FILE = Joplin/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MARKETING_VERSION = 12.6.1; OTHER_LDFLAGS = ( @@ -588,7 +588,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; LIBRARY_SEARCH_PATHS = ( "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", @@ -641,7 +641,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "/usr/lib/swift $(inherited)"; LIBRARY_SEARCH_PATHS = ( "\"$(TOOLCHAIN_DIR)/usr/lib/swift/$(PLATFORM_NAME)\"", @@ -672,7 +672,7 @@ DEVELOPMENT_TEAM = A9BXAFS6CT; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = ShareExtension/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; MARKETING_VERSION = 12.6.1; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; @@ -703,7 +703,7 @@ DEVELOPMENT_TEAM = A9BXAFS6CT; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = ShareExtension/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; MARKETING_VERSION = 12.6.1; MTL_FAST_MATH = YES; diff --git a/packages/app-mobile/ios/Podfile b/packages/app-mobile/ios/Podfile index 21485de82..d225d4c47 100644 --- a/packages/app-mobile/ios/Podfile +++ b/packages/app-mobile/ios/Podfile @@ -6,7 +6,10 @@ require_relative '../node_modules/@react-native-community/cli-platform-ios/nativ # # 2021-11-04: Set to 13.0 because it crashes with 12.x # https://github.com/laurent22/joplin/issues/5671 -platform :ios, '13.0' +# +# 2021-12-17: Changed back to 11.0 because after the fix it works with at least +# 12.x, and probably 11.0 too, which is the version supported by React Native. +platform :ios, '11.0' target 'Joplin' do config = use_native_modules! diff --git a/packages/app-mobile/ios/Podfile.lock b/packages/app-mobile/ios/Podfile.lock index a35d05695..132a2b3a2 100644 --- a/packages/app-mobile/ios/Podfile.lock +++ b/packages/app-mobile/ios/Podfile.lock @@ -565,6 +565,6 @@ SPEC CHECKSUMS: RNVectorIcons: bc69e6a278b14842063605de32bec61f0b251a59 Yoga: 2b4a01651f42a32f82e6cef3830a3ba48088237f -PODFILE CHECKSUM: 3ccf11f600ddb42a825b2bb9a341a19f5c891f2b +PODFILE CHECKSUM: 3503e0565874e79261edc56dcddb35b3a49a2984 COCOAPODS: 1.10.2 From 9e0bbdf9120f8c1c01c7bfbd891df781bafa0a49 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Fri, 17 Dec 2021 10:59:27 +0100 Subject: [PATCH 08/15] iOS 12.6.2 --- .../ios/Joplin.xcodeproj/project.pbxproj | 16 +++++++------- readme/changelog_ios.md | 22 +++++++++++++++++++ 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj b/packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj index f64c5c5e9..cfee3342e 100644 --- a/packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj +++ b/packages/app-mobile/ios/Joplin.xcodeproj/project.pbxproj @@ -492,13 +492,13 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Joplin/Joplin.entitlements; - CURRENT_PROJECT_VERSION = 78; + CURRENT_PROJECT_VERSION = 79; DEVELOPMENT_TEAM = A9BXAFS6CT; ENABLE_BITCODE = NO; INFOPLIST_FILE = Joplin/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 12.6.1; + MARKETING_VERSION = 12.6.2; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -521,12 +521,12 @@ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; CODE_SIGN_ENTITLEMENTS = Joplin/Joplin.entitlements; - CURRENT_PROJECT_VERSION = 78; + CURRENT_PROJECT_VERSION = 79; DEVELOPMENT_TEAM = A9BXAFS6CT; INFOPLIST_FILE = Joplin/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; - MARKETING_VERSION = 12.6.1; + MARKETING_VERSION = 12.6.2; OTHER_LDFLAGS = ( "$(inherited)", "-ObjC", @@ -667,14 +667,14 @@ CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CODE_SIGN_ENTITLEMENTS = ShareExtension/ShareExtension.entitlements; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 78; + CURRENT_PROJECT_VERSION = 79; DEBUG_INFORMATION_FORMAT = dwarf; DEVELOPMENT_TEAM = A9BXAFS6CT; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = ShareExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 12.6.1; + MARKETING_VERSION = 12.6.2; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = net.cozic.joplin.ShareExtension; @@ -698,14 +698,14 @@ CODE_SIGN_ENTITLEMENTS = ShareExtension/ShareExtension.entitlements; CODE_SIGN_STYLE = Automatic; COPY_PHASE_STRIP = NO; - CURRENT_PROJECT_VERSION = 78; + CURRENT_PROJECT_VERSION = 79; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_TEAM = A9BXAFS6CT; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = ShareExtension/Info.plist; IPHONEOS_DEPLOYMENT_TARGET = 11.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @executable_path/../../Frameworks"; - MARKETING_VERSION = 12.6.1; + MARKETING_VERSION = 12.6.2; MTL_FAST_MATH = YES; PRODUCT_BUNDLE_IDENTIFIER = net.cozic.joplin.ShareExtension; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/readme/changelog_ios.md b/readme/changelog_ios.md index 8570bdc2e..5ac328667 100644 --- a/readme/changelog_ios.md +++ b/readme/changelog_ios.md @@ -1 +1,23 @@ # Joplin iOS app changelog + +## [ios-v12.6.2](https://github.com/laurent22/joplin/releases/tag/ios-v12.6.2) - 2021-12-17T09:59:16Z + +- New: Add date format YYYY/MM/DD (#5759 by Helmut K. C. Tessarek) +- New: Add support for faster built-in sync locks (#5662) +- New: Add support for sharing notes when E2EE is enabled (#5529) +- New: Added support for notebook icons (e97bb78) +- Improved: Also duplicate resources when duplicating a note (c0a8c33) +- Improved: Improved S3 sync error handling and reliability, and upgraded S3 SDK (#5312 by Lee Matos) +- Improved: Improved error message when synchronising with Joplin Server (#5754) +- Improved: Ping joplinapp.org domain instead of Google when doing the WiFi connection check (#5705) +- Improved: Set min supported iOS version to 13.0 (298e85f) +- Improved: Update Mermaid: 8.12.1 -> 8.13.5 (#5831 by Helmut K. C. Tessarek) +- Improved: Upgraded React Native from 0.64 to 0.66 (66e79cc) +- Fixed: Alarm setting buttons were no longer visible (#5777) +- Fixed: Fixed "Invalid lock client type" error when migrating sync target (e0e93c4) +- Fixed: Fixed iOS 12 crash that prevents the app from starting (#5671) +- Fixed: Fixed issue that could cause application to needlessly lock the sync target (0de6e9e) +- Fixed: Fixed issue with parts of HTML notes not being displayed in some cases (#5687) +- Fixed: Handle duplicate attachments when the parent notebook is shared (#5796) +- Fixed: Links in flowchart Mermaid diagrams (#5830) (#5801 by Helmut K. C. Tessarek) +- Fixed: Sharing multiple notebooks via Joplin Server with the same user results in an error (#5721) From 14bef046f98c99847ae4fc1c7c01f695867fbc73 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Fri, 17 Dec 2021 12:11:45 +0100 Subject: [PATCH 09/15] timesteamp --- packages/app-desktop/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/app-desktop/package.json b/packages/app-desktop/package.json index fdf015e28..b5d906e12 100644 --- a/packages/app-desktop/package.json +++ b/packages/app-desktop/package.json @@ -37,7 +37,7 @@ "asar": true, "asarUnpack": "./node_modules/node-notifier/vendor/**", "win": { - "rfc3161TimeStampServer": "http://sha256timestamp.ws.symantec.com/sha256/timestamp", + "rfc3161TimeStampServer": "http://timestamp.digicert.com", "icon": "../../Assets/ImageSources/Joplin.ico", "target": [ { From 58654d35a27a6a51b8100750decae20fc4989122 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Fri, 17 Dec 2021 12:11:59 +0100 Subject: [PATCH 10/15] Desktop release v2.6.9 --- packages/app-desktop/package-lock.json | 4 ++-- packages/app-desktop/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/app-desktop/package-lock.json b/packages/app-desktop/package-lock.json index 5bff23fbc..4b37b05ef 100644 --- a/packages/app-desktop/package-lock.json +++ b/packages/app-desktop/package-lock.json @@ -1,12 +1,12 @@ { "name": "@joplin/app-desktop", - "version": "2.6.8", + "version": "2.6.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@joplin/app-desktop", - "version": "2.6.8", + "version": "2.6.9", "license": "MIT", "dependencies": { "@electron/remote": "^2.0.1", diff --git a/packages/app-desktop/package.json b/packages/app-desktop/package.json index b5d906e12..41e046f7e 100644 --- a/packages/app-desktop/package.json +++ b/packages/app-desktop/package.json @@ -1,6 +1,6 @@ { "name": "@joplin/app-desktop", - "version": "2.6.8", + "version": "2.6.9", "description": "Joplin for Desktop", "main": "main.js", "private": true, From 95e79d5dc05467733a471789e62b389e0a190537 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Fri, 17 Dec 2021 12:17:21 +0100 Subject: [PATCH 11/15] Releasing sub-packages --- packages/fork-htmlparser2/package-lock.json | 2 +- packages/fork-htmlparser2/package.json | 2 +- packages/fork-sax/package-lock.json | 2 +- packages/fork-sax/package.json | 2 +- packages/htmlpack/package-lock.json | 2 +- packages/htmlpack/package.json | 4 ++-- packages/lib/package-lock.json | 2 +- packages/lib/package.json | 16 ++++++++-------- packages/plugin-repo-cli/package-lock.json | 2 +- packages/plugin-repo-cli/package.json | 6 +++--- packages/renderer/package-lock.json | 2 +- packages/renderer/package.json | 4 ++-- packages/tools/package-lock.json | 2 +- packages/tools/package.json | 6 +++--- packages/turndown-plugin-gfm/package-lock.json | 2 +- packages/turndown-plugin-gfm/package.json | 2 +- packages/turndown/package-lock.json | 2 +- packages/turndown/package.json | 2 +- 18 files changed, 31 insertions(+), 31 deletions(-) diff --git a/packages/fork-htmlparser2/package-lock.json b/packages/fork-htmlparser2/package-lock.json index 2fb34e4ef..8d0e5544d 100644 --- a/packages/fork-htmlparser2/package-lock.json +++ b/packages/fork-htmlparser2/package-lock.json @@ -1,6 +1,6 @@ { "name": "@joplin/fork-htmlparser2", - "version": "4.1.38", + "version": "4.1.39", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/fork-htmlparser2/package.json b/packages/fork-htmlparser2/package.json index 6d82644c8..f67090d79 100644 --- a/packages/fork-htmlparser2/package.json +++ b/packages/fork-htmlparser2/package.json @@ -1,7 +1,7 @@ { "name": "@joplin/fork-htmlparser2", "description": "Fast & forgiving HTML/XML/RSS parser", - "version": "4.1.38", + "version": "4.1.39", "author": "Felix Boehm ", "publishConfig": { "access": "public" diff --git a/packages/fork-sax/package-lock.json b/packages/fork-sax/package-lock.json index d3a657987..1008fc242 100644 --- a/packages/fork-sax/package-lock.json +++ b/packages/fork-sax/package-lock.json @@ -1,6 +1,6 @@ { "name": "@joplin/fork-sax", - "version": "1.2.42", + "version": "1.2.43", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/fork-sax/package.json b/packages/fork-sax/package.json index 09d30bc16..858ba912c 100644 --- a/packages/fork-sax/package.json +++ b/packages/fork-sax/package.json @@ -2,7 +2,7 @@ "name": "@joplin/fork-sax", "description": "An evented streaming XML parser in JavaScript", "author": "Isaac Z. Schlueter (http://blog.izs.me/)", - "version": "1.2.42", + "version": "1.2.43", "main": "lib/sax.js", "publishConfig": { "access": "public" diff --git a/packages/htmlpack/package-lock.json b/packages/htmlpack/package-lock.json index c5bd69c24..e5801b4e2 100644 --- a/packages/htmlpack/package-lock.json +++ b/packages/htmlpack/package-lock.json @@ -1,6 +1,6 @@ { "name": "@joplin/htmlpack", - "version": "2.6", + "version": "2.6.1", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/htmlpack/package.json b/packages/htmlpack/package.json index ca015b6f5..8b7fd0473 100644 --- a/packages/htmlpack/package.json +++ b/packages/htmlpack/package.json @@ -1,6 +1,6 @@ { "name": "@joplin/htmlpack", - "version": "2.6.0", + "version": "2.6.1", "description": "Pack an HTML file and all its linked resources into a single HTML file", "main": "dist/index.js", "types": "src/index.ts", @@ -14,7 +14,7 @@ "author": "Laurent Cozic", "license": "MIT", "dependencies": { - "@joplin/fork-htmlparser2": "^4.1.35", + "@joplin/fork-htmlparser2": "^4.1.39", "css": "^3.0.0", "datauri": "^4.1.0", "fs-extra": "^10.0.0", diff --git a/packages/lib/package-lock.json b/packages/lib/package-lock.json index d36b0c2c7..cdf274ca7 100644 --- a/packages/lib/package-lock.json +++ b/packages/lib/package-lock.json @@ -1,6 +1,6 @@ { "name": "@joplin/lib", - "version": "2.6.2", + "version": "2.6.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/lib/package.json b/packages/lib/package.json index 129098265..88284e385 100644 --- a/packages/lib/package.json +++ b/packages/lib/package.json @@ -1,6 +1,6 @@ { "name": "@joplin/lib", - "version": "2.6.2", + "version": "2.6.3", "description": "Joplin Core library", "author": "Laurent Cozic", "homepage": "", @@ -28,15 +28,15 @@ "typescript": "^4.0.5" }, "dependencies": { - "@joplin/fork-htmlparser2": "^4.1.38", - "@joplin/fork-sax": "^1.2.42", - "@joplin/renderer": "~2.6", - "@joplin/htmlpack": "~2.6", - "@joplin/turndown": "^4.0.60", - "@joplin/turndown-plugin-gfm": "^1.0.42", - "async-mutex": "^0.1.3", "@aws-sdk/client-s3": "^3.34.0", "@aws-sdk/s3-request-presigner": "^3.34.0", + "@joplin/fork-htmlparser2": "^4.1.39", + "@joplin/fork-sax": "^1.2.43", + "@joplin/htmlpack": "^2.6.1", + "@joplin/renderer": "^2.6.3", + "@joplin/turndown": "^4.0.61", + "@joplin/turndown-plugin-gfm": "^1.0.43", + "async-mutex": "^0.1.3", "base-64": "^0.1.0", "base64-stream": "^1.0.0", "builtin-modules": "^3.1.0", diff --git a/packages/plugin-repo-cli/package-lock.json b/packages/plugin-repo-cli/package-lock.json index c3be95a46..ee38320f8 100644 --- a/packages/plugin-repo-cli/package-lock.json +++ b/packages/plugin-repo-cli/package-lock.json @@ -1,6 +1,6 @@ { "name": "@joplin/plugin-repo-cli", - "version": "2.6.2", + "version": "2.6.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/plugin-repo-cli/package.json b/packages/plugin-repo-cli/package.json index 94c145d75..792259e2e 100644 --- a/packages/plugin-repo-cli/package.json +++ b/packages/plugin-repo-cli/package.json @@ -1,6 +1,6 @@ { "name": "@joplin/plugin-repo-cli", - "version": "2.6.2", + "version": "2.6.3", "description": "", "main": "index.js", "bin": { @@ -19,8 +19,8 @@ "author": "", "license": "MIT", "dependencies": { - "@joplin/lib": "~2.6", - "@joplin/tools": "~2.6", + "@joplin/lib": "^2.6.3", + "@joplin/tools": "^2.6.3", "fs-extra": "^9.0.1", "gh-release-assets": "^2.0.0", "node-fetch": "^2.6.1", diff --git a/packages/renderer/package-lock.json b/packages/renderer/package-lock.json index 064c549e8..d517d56e1 100644 --- a/packages/renderer/package-lock.json +++ b/packages/renderer/package-lock.json @@ -1,6 +1,6 @@ { "name": "@joplin/renderer", - "version": "2.6.2", + "version": "2.6.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/renderer/package.json b/packages/renderer/package.json index 0612f90eb..99c0c2fe7 100644 --- a/packages/renderer/package.json +++ b/packages/renderer/package.json @@ -1,6 +1,6 @@ { "name": "@joplin/renderer", - "version": "2.6.2", + "version": "2.6.3", "description": "The Joplin note renderer, used the mobile and desktop application", "repository": "https://github.com/laurent22/joplin/tree/dev/packages/renderer", "main": "index.js", @@ -24,7 +24,7 @@ "typescript": "^4.0.5" }, "dependencies": { - "@joplin/fork-htmlparser2": "^4.1.38", + "@joplin/fork-htmlparser2": "^4.1.39", "font-awesome-filetypes": "^2.1.0", "fs-extra": "^8.1.0", "highlight.js": "^11.2.0", diff --git a/packages/tools/package-lock.json b/packages/tools/package-lock.json index 9ce3c7c39..e467d6a55 100644 --- a/packages/tools/package-lock.json +++ b/packages/tools/package-lock.json @@ -1,6 +1,6 @@ { "name": "@joplin/tools", - "version": "2.6.2", + "version": "2.6.3", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/tools/package.json b/packages/tools/package.json index c10a3e06d..f8120980a 100644 --- a/packages/tools/package.json +++ b/packages/tools/package.json @@ -1,6 +1,6 @@ { "name": "@joplin/tools", - "version": "2.6.2", + "version": "2.6.3", "description": "Various tools for Joplin", "main": "index.js", "author": "Laurent Cozic", @@ -20,8 +20,8 @@ }, "license": "MIT", "dependencies": { - "@joplin/lib": "~2.6", - "@joplin/renderer": "~2.6", + "@joplin/lib": "^2.6.3", + "@joplin/renderer": "^2.6.3", "execa": "^4.1.0", "fs-extra": "^4.0.3", "gettext-parser": "^1.3.0", diff --git a/packages/turndown-plugin-gfm/package-lock.json b/packages/turndown-plugin-gfm/package-lock.json index 31df90a0b..a20967784 100644 --- a/packages/turndown-plugin-gfm/package-lock.json +++ b/packages/turndown-plugin-gfm/package-lock.json @@ -1,6 +1,6 @@ { "name": "@joplin/turndown-plugin-gfm", - "version": "1.0.42", + "version": "1.0.43", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/turndown-plugin-gfm/package.json b/packages/turndown-plugin-gfm/package.json index 0d6c7578b..17e04daef 100644 --- a/packages/turndown-plugin-gfm/package.json +++ b/packages/turndown-plugin-gfm/package.json @@ -4,7 +4,7 @@ "publishConfig": { "access": "public" }, - "version": "1.0.42", + "version": "1.0.43", "author": "Dom Christie", "main": "lib/turndown-plugin-gfm.cjs.js", "devDependencies": { diff --git a/packages/turndown/package-lock.json b/packages/turndown/package-lock.json index 85a81d1a9..50ba4cbf1 100644 --- a/packages/turndown/package-lock.json +++ b/packages/turndown/package-lock.json @@ -1,6 +1,6 @@ { "name": "@joplin/turndown", - "version": "4.0.60", + "version": "4.0.61", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/packages/turndown/package.json b/packages/turndown/package.json index 88812d3fa..9f8cb798a 100644 --- a/packages/turndown/package.json +++ b/packages/turndown/package.json @@ -1,7 +1,7 @@ { "name": "@joplin/turndown", "description": "A library that converts HTML to Markdown", - "version": "4.0.60", + "version": "4.0.61", "author": "Dom Christie", "main": "lib/turndown.cjs.js", "publishConfig": { From c8f4c3f4eeb893864e8ac74acd1c2f6db1855e22 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Fri, 17 Dec 2021 12:20:13 +0100 Subject: [PATCH 12/15] CLI v2.6.2 --- packages/app-cli/package-lock.json | 4 ++-- packages/app-cli/package.json | 2 +- readme/changelog_cli.md | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/packages/app-cli/package-lock.json b/packages/app-cli/package-lock.json index f1d3d6ea0..a8170a234 100644 --- a/packages/app-cli/package-lock.json +++ b/packages/app-cli/package-lock.json @@ -1,12 +1,12 @@ { "name": "joplin", - "version": "2.6.1", + "version": "2.6.2", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "joplin", - "version": "2.6.1", + "version": "2.6.2", "license": "MIT", "dependencies": { "aws-sdk": "^2.588.0", diff --git a/packages/app-cli/package.json b/packages/app-cli/package.json index 00ed6d916..7aec7168d 100644 --- a/packages/app-cli/package.json +++ b/packages/app-cli/package.json @@ -33,7 +33,7 @@ ], "owner": "Laurent Cozic" }, - "version": "2.6.1", + "version": "2.6.2", "bin": { "joplin": "./main.js" }, diff --git a/readme/changelog_cli.md b/readme/changelog_cli.md index 42d2116c8..c90ff2a15 100644 --- a/readme/changelog_cli.md +++ b/readme/changelog_cli.md @@ -1,5 +1,24 @@ # Joplin terminal app changelog +## [cli-v2.6.2](https://github.com/laurent22/joplin/releases/tag/cli-v2.6.2) - 2021-12-17T11:19:45Z + +- New: Add date format YYYY/MM/DD (#5759 by Helmut K. C. Tessarek) +- New: Add support for faster built-in sync locks (#5662) +- New: Add support for more style of highlighted texts when importing ENEX files (89179c2) +- New: Add support for sharing notes when E2EE is enabled (#5529) +- Improved: Also duplicate resources when duplicating a note (c0a8c33) +- Improved: Ask for master password when encryption or decryption fails (c19e59f) +- Improved: Improved S3 sync error handling and reliability, and upgraded S3 SDK (#5312 by Lee Matos) +- Improved: Improved error message when synchronising with Joplin Server (#5754) +- Improved: Update Mermaid: 8.12.1 -> 8.13.5 (#5831 by Helmut K. C. Tessarek) +- Improved: When exporting as HTML, pack all images, styles and scripts inside the HTML file (98ed2be) +- Fixed: Fixed "Invalid lock client type" error when migrating sync target (e0e93c4) +- Fixed: Fixed issue that could cause application to needlessly lock the sync target (0de6e9e) +- Fixed: Handle duplicate attachments when the parent notebook is shared (#5796) +- Fixed: Links in flowchart Mermaid diagrams (#5830) (#5801 by Helmut K. C. Tessarek) +- Fixed: Long resource filenames were being incorrectly cut (#5653) +- Fixed: Sharing multiple notebooks via Joplin Server with the same user results in an error (#5721) + ## [cli-v2.6.1](https://github.com/laurent22/joplin/releases/tag/cli-v2.6.1) - 2021-11-03T11:33:18Z - New: Add support for public-private key pairs and improved master password support (#5438) From 98fba37cd3b1ada547f7910c792b79debda5c51d Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Sun, 19 Dec 2021 11:58:42 +0100 Subject: [PATCH 13/15] Desktop release v2.6.10 --- packages/app-desktop/package-lock.json | 4 ++-- packages/app-desktop/package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/app-desktop/package-lock.json b/packages/app-desktop/package-lock.json index 4b37b05ef..8d06f1fa3 100644 --- a/packages/app-desktop/package-lock.json +++ b/packages/app-desktop/package-lock.json @@ -1,12 +1,12 @@ { "name": "@joplin/app-desktop", - "version": "2.6.9", + "version": "2.6.10", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@joplin/app-desktop", - "version": "2.6.9", + "version": "2.6.10", "license": "MIT", "dependencies": { "@electron/remote": "^2.0.1", diff --git a/packages/app-desktop/package.json b/packages/app-desktop/package.json index 41e046f7e..b9e17ba4e 100644 --- a/packages/app-desktop/package.json +++ b/packages/app-desktop/package.json @@ -1,6 +1,6 @@ { "name": "@joplin/app-desktop", - "version": "2.6.9", + "version": "2.6.10", "description": "Joplin for Desktop", "main": "main.js", "private": true, From 667d6420f2a038173fb1471acaea251c83a03206 Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Mon, 20 Dec 2021 15:47:50 +0100 Subject: [PATCH 14/15] All: Fixed issue where synchroniser would try to update a shared folder that is not longer accessible --- .../MainScreen/commands/leaveSharedFolder.ts | 6 +-- packages/lib/Logger.ts | 4 +- packages/lib/Synchronizer.ts | 1 + packages/lib/models/Folder.ts | 2 +- .../lib/services/share/ShareService.test.ts | 31 ++++++++++++- packages/lib/services/share/ShareService.ts | 45 ++++++++++++++++++- 6 files changed, 79 insertions(+), 10 deletions(-) diff --git a/packages/app-desktop/gui/MainScreen/commands/leaveSharedFolder.ts b/packages/app-desktop/gui/MainScreen/commands/leaveSharedFolder.ts index 1ea03df0d..e0b23a9f7 100644 --- a/packages/app-desktop/gui/MainScreen/commands/leaveSharedFolder.ts +++ b/packages/app-desktop/gui/MainScreen/commands/leaveSharedFolder.ts @@ -1,7 +1,6 @@ import { CommandRuntime, CommandDeclaration, CommandContext } from '@joplin/lib/services/CommandService'; import { _ } from '@joplin/lib/locale'; import ShareService from '@joplin/lib/services/share/ShareService'; -import Setting from '@joplin/lib/models/Setting'; import Logger from '@joplin/lib/Logger'; const logger = Logger.create('leaveSharedFolder'); @@ -26,10 +25,7 @@ export const runtime = (): CommandRuntime => { const share = shares.find(s => s.folder_id === folderId); if (!share) throw new Error(_('Could not verify the share status of this notebook - aborting. Please try again when you are connected to the internet.')); - const userId = Setting.value('sync.userId'); - if (share.user.id === userId) throw new Error('Cannot leave own notebook'); - - await ShareService.instance().leaveSharedFolder(folderId); + await ShareService.instance().leaveSharedFolder(folderId, share.user.id); } catch (error) { logger.error(error); alert(_('Error: %s', error.message)); diff --git a/packages/lib/Logger.ts b/packages/lib/Logger.ts index b0f481125..b8226b0b3 100644 --- a/packages/lib/Logger.ts +++ b/packages/lib/Logger.ts @@ -94,8 +94,10 @@ class Logger { }; } - setLevel(level: LogLevel) { + public setLevel(level: LogLevel) { + const previous = this.level_; this.level_ = level; + return previous; } level() { diff --git a/packages/lib/Synchronizer.ts b/packages/lib/Synchronizer.ts index 12ee9170a..f04d0e7b7 100644 --- a/packages/lib/Synchronizer.ts +++ b/packages/lib/Synchronizer.ts @@ -424,6 +424,7 @@ export default class Synchronizer { // Before synchronising make sure all share_id properties are set // correctly so as to share/unshare the right items. await Folder.updateAllShareIds(this.resourceService()); + if (this.shareService_) await this.shareService_.checkShareConsistency(); const itemUploader = new ItemUploader(this.api(), this.apiCall); diff --git a/packages/lib/models/Folder.ts b/packages/lib/models/Folder.ts index b61601e46..ab0744d8f 100644 --- a/packages/lib/models/Folder.ts +++ b/packages/lib/models/Folder.ts @@ -282,7 +282,7 @@ export default class Folder extends BaseItem { return this.db().selectAll(sql, [folderId]); } - private static async rootSharedFolders(): Promise { + public static async rootSharedFolders(): Promise { return this.db().selectAll('SELECT id, share_id FROM folders WHERE parent_id = "" AND share_id != ""'); } diff --git a/packages/lib/services/share/ShareService.test.ts b/packages/lib/services/share/ShareService.test.ts index 7e565a515..0d55e8c23 100644 --- a/packages/lib/services/share/ShareService.test.ts +++ b/packages/lib/services/share/ShareService.test.ts @@ -1,7 +1,7 @@ import Note from '../../models/Note'; import { encryptionService, msleep, setupDatabaseAndSynchronizer, switchClient } from '../../testing/test-utils'; import ShareService from './ShareService'; -import reducer from '../../reducer'; +import reducer, { defaultState } from '../../reducer'; import { createStore } from 'redux'; import { FolderEntity, NoteEntity } from '../database/types'; import Folder from '../../models/Folder'; @@ -10,10 +10,15 @@ import { generateKeyPair } from '../e2ee/ppk'; import MasterKey from '../../models/MasterKey'; import { MasterKeyEntity } from '../e2ee/types'; import { updateMasterPassword } from '../e2ee/utils'; +import Logger, { LogLevel } from '../../Logger'; + +const testReducer = (state: any = defaultState, action: any) => { + return reducer(state, action); +}; function mockService(api: any) { const service = new ShareService(); - const store = createStore(reducer as any); + const store = createStore(testReducer as any); service.initialize(store, encryptionService(), api); return service; } @@ -149,4 +154,26 @@ describe('ShareService', function() { expect(content.ppkId).toBe(recipientPpk.id); }); + it('should leave folders that are no longer with the user', async () => { + // `checkShareConsistency` will emit a warning so we need to silent it + // in tests. + const previousLogLevel = Logger.globalLogger.setLevel(LogLevel.Error); + + const service = testShareFolderService({ + 'GET api/shares': async (_query: Record, _body: any): Promise => { + return { + items: [], + has_more: false, + }; + }, + }); + + const folder = await Folder.save({ share_id: 'nolongershared' }); + await service.checkShareConsistency(); + expect(await Folder.load(folder.id)).toBeFalsy(); + + Logger.globalLogger.setLevel(previousLogLevel); + }); + + }); diff --git a/packages/lib/services/share/ShareService.ts b/packages/lib/services/share/ShareService.ts index 791e92b99..c886a9fa8 100644 --- a/packages/lib/services/share/ShareService.ts +++ b/packages/lib/services/share/ShareService.ts @@ -181,10 +181,53 @@ export default class ShareService { // // We don't delete the children here because that would delete them for the // other share participants too. - public async leaveSharedFolder(folderId: string): Promise { + // + // If `folderShareUserId` is provided, the function will check that the user + // does not own the share. It would be an error to leave such a folder + // (instead "unshareFolder" should be called). + public async leaveSharedFolder(folderId: string, folderShareUserId: string = null): Promise { + if (folderShareUserId !== null) { + const userId = Setting.value('sync.userId'); + if (folderShareUserId === userId) throw new Error('Cannot leave own notebook'); + } + await Folder.delete(folderId, { deleteChildren: false }); } + // Finds any folder that is associated with a share, but the user no longer + // has access to the share, and remove these folders. This check is + // necessary otherwise sync will try to update items that are not longer + // accessible and will throw the error "Could not find share with ID: xxxx") + public async checkShareConsistency() { + const rootSharedFolders = await Folder.rootSharedFolders(); + let hasRefreshedShares = false; + let shares = this.shares; + + for (const folder of rootSharedFolders) { + let share = shares.find(s => s.id === folder.share_id); + + if (!share && !hasRefreshedShares) { + shares = await this.refreshShares(); + share = shares.find(s => s.id === folder.share_id); + hasRefreshedShares = true; + } + + if (!share) { + // This folder is a associated with a share, but the user no + // longer has access to this share. It can happen for two + // reasons: + // + // - It no longer exists + // - Or the user rejected that share from a different device, + // and the folder was not deleted as it should have been. + // + // In that case we need to leave the notebook. + logger.warn(`Found a folder that was associated with a share, but the user not longer has access to the share - leaving the folder. Folder: ${folder.title} (${folder.id}). Share: ${folder.share_id}`); + await this.leaveSharedFolder(folder.id); + } + } + } + public async shareNote(noteId: string): Promise { const note = await Note.load(noteId); if (!note) throw new Error(`No such note: ${noteId}`); From 51cc458e559ef2ac29b496459f00f5403eeca6da Mon Sep 17 00:00:00 2001 From: Laurent Cozic Date: Mon, 20 Dec 2021 15:59:32 +0100 Subject: [PATCH 15/15] Android 2.6.9 --- packages/app-mobile/android/app/build.gradle | 4 ++-- readme/changelog_android.md | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/app-mobile/android/app/build.gradle b/packages/app-mobile/android/app/build.gradle index 57978c0e4..aa58d89cc 100644 --- a/packages/app-mobile/android/app/build.gradle +++ b/packages/app-mobile/android/app/build.gradle @@ -146,8 +146,8 @@ android { applicationId "net.cozic.joplin" minSdkVersion rootProject.ext.minSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion - versionCode 2097664 - versionName "2.6.8" + versionCode 2097665 + versionName "2.6.9" ndk { abiFilters "armeabi-v7a", "x86", "arm64-v8a", "x86_64" } diff --git a/readme/changelog_android.md b/readme/changelog_android.md index 8e7e1825b..428caf935 100644 --- a/readme/changelog_android.md +++ b/readme/changelog_android.md @@ -1,5 +1,9 @@ # Joplin Android app changelog +## [android-v2.6.9](https://github.com/laurent22/joplin/releases/tag/android-v2.6.9) - 2021-12-20T14:58:42Z + +- Fixed: Fixed issue where synchroniser would try to update a shared folder that is not longer accessible (667d642) + ## [android-v2.6.8](https://github.com/laurent22/joplin/releases/tag/android-v2.6.8) - 2021-12-17T10:15:00Z - Improved: Update Mermaid: 8.12.1 -> 8.13.5 (#5831 by Helmut K. C. Tessarek)