From 0220eae86a358ca59481cb2e782708a5c0a09869 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Sun, 21 Sep 2025 11:30:33 +0200 Subject: [PATCH 01/11] v16-dev Signed-off-by: Marcel Klehr --- CHANGELOG.md | 2 +- appinfo/info.xml | 4 ++-- composer.json | 2 +- package.json | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb4d974f8..bd7244527 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,7 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Fixed * fix(FolderService): Always make sure description is set -* chore: Update nextcloud/vue Marcel Klehr 2 minutes ago +* chore: Update nextcloud/vue * fix(UNDELETE_FOLDER): Make sure to reload childrenOrder of -1 * fix(BookmarkMapper): Fix duplicated filter * fix(CopyDialog): Fix onSubmit action diff --git a/appinfo/info.xml b/appinfo/info.xml index 47bc51d3a..aa78b2718 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -23,7 +23,7 @@ Requirements: - mbstring: * - when using MySQL, use at least v8.0 ]]> - 15.2.0 + 16.0.0-dev.0 agpl Marcel Klehr Arthur Schiwon @@ -42,7 +42,7 @@ Requirements: pgsql intl mbstring - + OCA\Bookmarks\BackgroundJobs\CrawlJob diff --git a/composer.json b/composer.json index b2b7c3e5e..518ee66d6 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ }, "require-dev": { "phpunit/phpunit": "^9.5.26", - "nextcloud/coding-standard": "^1.0.0", + "nextcloud/coding-standard": "1.x", "vimeo/psalm": "6.x", "nextcloud/ocp": "dev-master" }, diff --git a/package.json b/package.json index af0f73246..30d5e6006 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bookmarks", - "version": "15.2.0", + "version": "16.0.0", "main": "js/index.js", "scripts": { "build": "webpack --node-env production --progress --config webpack.js", From a64bb6df9c061e65f54ebdb0f50d3ca4051f13a0 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Thu, 2 Oct 2025 09:59:51 +0200 Subject: [PATCH 02/11] enh: Support nextcloud 32 Signed-off-by: Marcel Klehr --- .github/workflows/floccus.yml | 2 +- .github/workflows/repair.yml | 2 +- .github/workflows/upgrade.yml | 2 +- appinfo/info.xml | 4 +- lib/Db/TreeMapper.php | 4 +- package-lock.json | 128 +++++++++++++++++++++++++--------- tests/bootstrap.php | 27 ++++--- 7 files changed, 113 insertions(+), 56 deletions(-) diff --git a/.github/workflows/floccus.yml b/.github/workflows/floccus.yml index a2d19204c..22b2faffb 100644 --- a/.github/workflows/floccus.yml +++ b/.github/workflows/floccus.yml @@ -87,7 +87,7 @@ jobs: matrix: node-version: [20.x] npm-version: [10.x] - server-version: ['30'] + server-version: ['32'] floccus-branch: ['master', 'develop'] floccus-adapter: - nextcloud-bookmarks diff --git a/.github/workflows/repair.yml b/.github/workflows/repair.yml index 48c2f2206..39cfdda07 100644 --- a/.github/workflows/repair.yml +++ b/.github/workflows/repair.yml @@ -26,7 +26,7 @@ jobs: matrix: php-versions: ['8.1'] databases: ['sqlite', 'mysql', 'pgsql'] - server-versions: ['master', 'stable31', 'stable30'] + server-versions: ['master', 'stable32', 'stable31', 'stable30'] name: Repair step on ${{ matrix.databases }}-${{ matrix.server-versions }} diff --git a/.github/workflows/upgrade.yml b/.github/workflows/upgrade.yml index 95a9cc45c..139bc168e 100644 --- a/.github/workflows/upgrade.yml +++ b/.github/workflows/upgrade.yml @@ -26,7 +26,7 @@ jobs: matrix: php-versions: ['8.1'] databases: ['sqlite', 'mysql', 'pgsql'] - server-versions: ['stable30', 'stable31', 'master'] + server-versions: ['stable30', 'stable31', 'stable32', 'master'] prev-version: ['stable14', 'stable'] name: Update from ${{ matrix.prev-version }} on ${{ matrix.databases }}-${{ matrix.server-versions }} diff --git a/appinfo/info.xml b/appinfo/info.xml index aa78b2718..76231ac87 100644 --- a/appinfo/info.xml +++ b/appinfo/info.xml @@ -23,7 +23,7 @@ Requirements: - mbstring: * - when using MySQL, use at least v8.0 ]]> - 16.0.0-dev.0 + 15.3.0-dev.0 agpl Marcel Klehr Arthur Schiwon @@ -42,7 +42,7 @@ Requirements: pgsql intl mbstring - + OCA\Bookmarks\BackgroundJobs\CrawlJob diff --git a/lib/Db/TreeMapper.php b/lib/Db/TreeMapper.php index 5d6d11b25..befcc7219 100644 --- a/lib/Db/TreeMapper.php +++ b/lib/Db/TreeMapper.php @@ -1065,13 +1065,13 @@ public function countBookmarksInFolder(int $folderId): int { */ public function getChildren(int $folderId, int $layers = 0): array { $children = $this->treeCache->get(TreeCacheManager::CATEGORY_CHILDREN, TreeMapper::TYPE_FOLDER, $folderId); - if ($children !== null) { + if ($children !== null && is_array($children)) { return $children; } $children = $this->treeCache->get(TreeCacheManager::CATEGORY_CHILDREN_LAYER, TreeMapper::TYPE_FOLDER, $folderId); - if ($children === null) { + if ($children === null && is_array($children)) { $qb = $this->getChildrenQuery[TreeMapper::TYPE_BOOKMARK]; $this->selectFromType(TreeMapper::TYPE_BOOKMARK, ['t.index', 't.type'], $qb); $qb->setParameter('parent_folder', $folderId); diff --git a/package-lock.json b/package-lock.json index bd721e892..730f671ef 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,20 @@ { "name": "bookmarks", +<<<<<<< HEAD "version": "15.2.0", +======= + "version": "16.0.0", +>>>>>>> 1493a1ee (enh: Support nextcloud 32) "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "bookmarks", +<<<<<<< HEAD "version": "15.2.0", +======= + "version": "16.0.0", +>>>>>>> 1493a1ee (enh: Support nextcloud 32) "license": "AGPL-3.0-or-later", "dependencies": { "@nextcloud/auth": "^2.1.0", @@ -1939,6 +1947,7 @@ "version": "0.4.4", "resolved": "https://registry.npmjs.org/@file-type/xml/-/xml-0.4.4.tgz", "integrity": "sha512-NhCyXoHlVZ8TqM476hyzwGJ24+D5IPSaZhmrPj7qXnEVb3q6jrFzA3mM9TBpknKSI9EuQeGTKRg2DXGUwvBBoQ==", +<<<<<<< HEAD "license": "MIT", "dependencies": { "sax": "^1.4.1", @@ -1949,25 +1958,37 @@ "version": "1.6.9", "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.9.tgz", "integrity": "sha512-uMXCuQ3BItDUbAMhIXw7UPXRfAlOAvZzdK9BWpE60MCn+Svt3aLn9jsPTi/WNGlRUu2uI0v5S7JiIUsbsvh3fw==", +======= +>>>>>>> 1493a1ee (enh: Support nextcloud 32) "license": "MIT", "dependencies": { - "@floating-ui/utils": "^0.2.9" + "sax": "^1.4.1", + "strtok3": "^10.3.4" + } + }, + "node_modules/@floating-ui/core": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.7.3.tgz", + "integrity": "sha512-sGnvb5dmrJaKEZ+LDIpguvdX3bDlEllmv4/ClQ9awcmCZrlx5jQyyMWFM5kBI+EyNOCDDiKk8il0zeuX3Zlg/w==", + "license": "MIT", + "dependencies": { + "@floating-ui/utils": "^0.2.10" } }, "node_modules/@floating-ui/dom": { - "version": "1.6.13", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.13.tgz", - "integrity": "sha512-umqzocjDgNRGTuO7Q8CU32dkHkECqI8ZdMZ5Swb6QAM0t5rnlrN3lGo1hdpscRd3WS8T6DKYK4ephgIH9iRh3w==", + "version": "1.7.4", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.7.4.tgz", + "integrity": "sha512-OOchDgh4F2CchOX94cRVqhvy7b3AFb+/rQXyswmzmGakRfkMgoWVjfnLWkRirfLEfuD4ysVW16eXzwt3jHIzKA==", "license": "MIT", "dependencies": { - "@floating-ui/core": "^1.6.0", - "@floating-ui/utils": "^0.2.9" + "@floating-ui/core": "^1.7.3", + "@floating-ui/utils": "^0.2.10" } }, "node_modules/@floating-ui/utils": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.9.tgz", - "integrity": "sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==", + "version": "0.2.10", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.10.tgz", + "integrity": "sha512-aGTxbpbg8/b5JfU1HXSrbH3wXZuLPJcNEcZQFMxLs3oSzgtVu6nFPkbbGGUvBcUjKV2YyB9Wxxabo+HEH9tcRQ==", "license": "MIT" }, "node_modules/@humanwhocodes/config-array": { @@ -2705,14 +2726,14 @@ } }, "node_modules/@nextcloud/vue": { - "version": "8.28.0", - "resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-8.28.0.tgz", - "integrity": "sha512-m0Ei6LpySq5OBb2zNqOx5vasDsmmiDTYtCoWb20ZBCT3+uk3D2m02US9g+1dS4v/Gb4BcwFLYm5mwlRH9zNERw==", + "version": "8.31.0", + "resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-8.31.0.tgz", + "integrity": "sha512-P5m3Odfw4m0siu7qs88WJutu2C8mEknqMS1ijlqYtQvc8qZwmpQshgCV5GhyyBTTK9Baicthm+ULglIf/Eq/sg==", "license": "AGPL-3.0-or-later", "dependencies": { - "@floating-ui/dom": "^1.1.0", + "@floating-ui/dom": "^1.7.4", "@linusborg/vue-simple-portal": "^0.1.5", - "@nextcloud/auth": "^2.4.0", + "@nextcloud/auth": "^2.5.2", "@nextcloud/axios": "^2.5.0", "@nextcloud/browser-storage": "^0.4.0", "@nextcloud/capabilities": "^1.2.0", @@ -2721,22 +2742,22 @@ "@nextcloud/l10n": "^3.4.0", "@nextcloud/logger": "^3.0.2", "@nextcloud/router": "^3.0.1", - "@nextcloud/sharing": "^0.2.3", + "@nextcloud/sharing": "^0.3.0", "@nextcloud/timezones": "^0.2.0", - "@nextcloud/vue-select": "^3.25.1", + "@nextcloud/vue-select": "^3.26.0", "@vueuse/components": "^11.0.0", "@vueuse/core": "^11.0.0", "blurhash": "^2.0.5", "clone": "^2.1.2", "debounce": "^2.2.0", "dompurify": "^3.2.4", - "emoji-mart-vue-fast": "^15.0.4", + "emoji-mart-vue-fast": "^15.0.5", "escape-html": "^1.0.3", "floating-vue": "^1.0.0-beta.19", "focus-trap": "^7.4.3", - "linkify-string": "^4.0.0", + "linkify-string": "^4.3.2", "md5": "^2.3.0", - "p-queue": "^8.1.0", + "p-queue": "^8.1.1", "rehype-external-links": "^3.0.0", "rehype-highlight": "^7.0.2", "rehype-react": "^7.1.2", @@ -2759,17 +2780,16 @@ "vue2-datepicker": "^3.11.0" }, "engines": { - "node": "^20.0.0", - "npm": "^10.0.0" + "node": "^20.0.0 || ^22.0.0 || ^24.0.0" } }, "node_modules/@nextcloud/vue-select": { - "version": "3.25.1", - "resolved": "https://registry.npmjs.org/@nextcloud/vue-select/-/vue-select-3.25.1.tgz", - "integrity": "sha512-jqCi4G+Q0H6+Hm8wSN3vRX2+eXG2jXR2bwBX/sErVEsH5UaxT4Nb7KqgdeIjVfeF7ccIdRqpmIb4Pkf0lao67w==", + "version": "3.26.0", + "resolved": "https://registry.npmjs.org/@nextcloud/vue-select/-/vue-select-3.26.0.tgz", + "integrity": "sha512-UvJExrxzx5pP3lv7j6zrv2yj6B1dXph7sh3lLNPnbJPjPoH/yg58mHNFBcPJrRYMbpy2t3hlC6F7s33KCTr9FA==", "license": "MIT", "engines": { - "node": "^20.0.0" + "node": "^20.0.0 || ^22.0.0 || ^24.0.0" }, "peerDependencies": { "vue": "2.x" @@ -2804,6 +2824,46 @@ "npm": "^10.0.0" } }, + "node_modules/@nextcloud/vue/node_modules/@nextcloud/sharing": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/@nextcloud/sharing/-/sharing-0.3.0.tgz", + "integrity": "sha512-kV7qeUZvd1fTKeFyH+W5Qq5rNOqG9rLATZM3U9MBxWXHJs3OxMqYQb8UQ3NYONzsX3zDGJmdQECIGHm1ei2sCA==", + "license": "GPL-3.0-or-later", + "dependencies": { + "@nextcloud/initial-state": "^3.0.0", + "is-svg": "^6.1.0" + }, + "engines": { + "node": "^20.0.0 || ^22.0.0 || ^24.0.0" + }, + "optionalDependencies": { + "@nextcloud/files": "^3.12.0" + } + }, + "node_modules/@nextcloud/vue/node_modules/@nextcloud/sharing/node_modules/@nextcloud/initial-state": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@nextcloud/initial-state/-/initial-state-3.0.0.tgz", + "integrity": "sha512-cV+HBdkQJGm8FxkBI5rFT/FbMNWNBvpbj6OPrg4Ae4YOOsQ15CL8InPOAw1t4XkOkQK2NEdUGQLVUz/19wXbdQ==", + "license": "GPL-3.0-or-later", + "engines": { + "node": "^20.0.0 || ^22.0.0 || ^24.0.0" + } + }, + "node_modules/@nextcloud/vue/node_modules/is-svg": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/is-svg/-/is-svg-6.1.0.tgz", + "integrity": "sha512-i7YPdvYuSCYcaLQrKwt8cvKTlwHcdA6Hp8N9SO3Q5jIzo8x6kH3N47W0BvPP7NdxVBmIHx7X9DK36czYYW7lHg==", + "license": "MIT", + "dependencies": { + "@file-type/xml": "^0.4.3" + }, + "engines": { + "node": ">=20" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/@nextcloud/webpack-vue-config": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/@nextcloud/webpack-vue-config/-/webpack-vue-config-6.2.0.tgz", @@ -6773,9 +6833,9 @@ "license": "MIT" }, "node_modules/emoji-mart-vue-fast": { - "version": "15.0.4", - "resolved": "https://registry.npmjs.org/emoji-mart-vue-fast/-/emoji-mart-vue-fast-15.0.4.tgz", - "integrity": "sha512-OjuxqoMJRTTG7Vevz0mR1ZnqY1DI8gGnmoskuuC8qL8VwwTjrGdwAO4WRWtAUN8P6Di7kxvY6cUgNETNFmbP4A==", + "version": "15.0.5", + "resolved": "https://registry.npmjs.org/emoji-mart-vue-fast/-/emoji-mart-vue-fast-15.0.5.tgz", + "integrity": "sha512-wnxLor8ggpqshoOPwIc33MdOC3A1XFeDLgUwYLPtNPL8VeAtXJAVrnFq1CN5PeCYAFoLo4IufHQZ9CfHD4IZiw==", "license": "BSD-3-Clause", "dependencies": { "@babel/runtime": "^7.18.6", @@ -10459,9 +10519,9 @@ } }, "node_modules/linkify-string": { - "version": "4.2.0", - "resolved": "https://registry.npmjs.org/linkify-string/-/linkify-string-4.2.0.tgz", - "integrity": "sha512-LqOKk0+RlqibFkxjPAGOL7Mfssqj6/SdG9QWGvzeVDpoWXhaw9OXxseCtFanjIl7C6UyTTZizhyGr4IWLfijiw==", + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/linkify-string/-/linkify-string-4.3.2.tgz", + "integrity": "sha512-JqBuQpSa+CSj2tskIII70SKOjPfjXwDFyjRRNFTrlg76gp2nap36xeRj/cWaXxukqBNrxM+L07XyKRsUtH/DpQ==", "license": "MIT", "peerDependencies": { "linkifyjs": "^4.0.0" @@ -13280,9 +13340,9 @@ } }, "node_modules/p-queue": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-8.1.0.tgz", - "integrity": "sha512-mxLDbbGIBEXTJL0zEx8JIylaj3xQ7Z/7eEVjcF9fJX4DBiH9oqe+oahYnlKKxm0Ci9TlWTyhSHgygxMxjIB2jw==", + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/p-queue/-/p-queue-8.1.1.tgz", + "integrity": "sha512-aNZ+VfjobsWryoiPnEApGGmf5WmNsCo9xu8dfaYamG5qaLP7ClhLN6NgsFe6SwJ2UbLEBK5dv9x8Mn5+RVhMWQ==", "license": "MIT", "dependencies": { "eventemitter3": "^5.0.1", diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 2d3dcbdd7..779a0fc13 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,23 +1,20 @@ = 9.1 Tests? -$dummyClass = \OC::$SERVERROOT . '/tests/lib/Util/User/Dummy.php'; -if (file_exists($dummyClass)) { - require_once($dummyClass); +if (!defined('PHPUNIT_RUN')) { + define('PHPUNIT_RUN', 1); } +require_once __DIR__ . '/../../../../lib/base.php'; +require_once __DIR__ . '/../../../../tests/autoload.php'; -OC_Hook::clear(); +Server::get(IAppManager::class)->loadApp('bookmarks'); \ No newline at end of file From c2716ec66e18691613e771b7b15a1c76e363aad1 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Thu, 2 Oct 2025 10:02:38 +0200 Subject: [PATCH 03/11] fix: Fix paths in bootstrap.php Signed-off-by: Marcel Klehr --- tests/bootstrap.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 779a0fc13..8c617f897 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -14,7 +14,7 @@ define('PHPUNIT_RUN', 1); } -require_once __DIR__ . '/../../../../lib/base.php'; -require_once __DIR__ . '/../../../../tests/autoload.php'; +require_once __DIR__ . '/../../../lib/base.php'; +require_once __DIR__ . '/../../../tests/autoload.php'; -Server::get(IAppManager::class)->loadApp('bookmarks'); \ No newline at end of file +Server::get(IAppManager::class)->loadApp('bookmarks'); From e4ea638d2928681226d62088e58d3eae05d31ff6 Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Thu, 2 Oct 2025 10:10:28 +0200 Subject: [PATCH 04/11] fix(TreeMapper): FIx cache check Signed-off-by: Marcel Klehr --- lib/Db/TreeMapper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Db/TreeMapper.php b/lib/Db/TreeMapper.php index befcc7219..d8296424a 100644 --- a/lib/Db/TreeMapper.php +++ b/lib/Db/TreeMapper.php @@ -1071,7 +1071,7 @@ public function getChildren(int $folderId, int $layers = 0): array { $children = $this->treeCache->get(TreeCacheManager::CATEGORY_CHILDREN_LAYER, TreeMapper::TYPE_FOLDER, $folderId); - if ($children === null && is_array($children)) { + if ($children === null || !is_array($children)) { $qb = $this->getChildrenQuery[TreeMapper::TYPE_BOOKMARK]; $this->selectFromType(TreeMapper::TYPE_BOOKMARK, ['t.index', 't.type'], $qb); $qb->setParameter('parent_folder', $folderId); From 9d30437eeaf88fb07283624518684d7cc5684aba Mon Sep 17 00:00:00 2001 From: Marcel Klehr Date: Thu, 2 Oct 2025 10:26:48 +0200 Subject: [PATCH 05/11] fix: Fix temporary errors on load fixes #2331 Signed-off-by: Marcel Klehr --- src/components/Controls.vue | 4 +++- src/components/Navigation.vue | 14 ++++++++------ 2 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/components/Controls.vue b/src/components/Controls.vue index af9e967ac..d0df29f4e 100644 --- a/src/components/Controls.vue +++ b/src/components/Controls.vue @@ -20,7 +20,7 @@