From dacde9285fc5acf6cc850680f4f7cfa609d3c682 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 16 Dec 2025 15:44:58 +0100 Subject: [PATCH 1/2] chore(deps): update `@nextcloud/paths` to v3.0.0 Signed-off-by: Ferdinand Thiessen --- package-lock.json | 18 ++++++++++++++---- package.json | 2 +- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index b16336e23..56f69dd87 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,7 @@ "@nextcloud/capabilities": "^1.2.1", "@nextcloud/l10n": "^3.4.1", "@nextcloud/logger": "^3.0.3", - "@nextcloud/paths": "^2.4.0", + "@nextcloud/paths": "^3.0.0", "@nextcloud/router": "^3.1.0", "@nextcloud/sharing": "^0.3.0", "cancelable-promise": "^4.3.1", @@ -1613,6 +1613,16 @@ "node": "^20.0.0 || ^22.0.0 || ^24.0.0" } }, + "node_modules/@nextcloud/files/node_modules/@nextcloud/paths": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@nextcloud/paths/-/paths-2.4.0.tgz", + "integrity": "sha512-35hykjqzaJCw8pBYWuKbLLw2wyKMuf9+T8K8GoYiS84AIi8SO16nuEu0fyl/gwCuiDqX5tCCup4wqljf0hdvaw==", + "license": "GPL-3.0-or-later", + "optional": true, + "engines": { + "node": "^20.0.0 || ^22.0.0 || ^24.0.0" + } + }, "node_modules/@nextcloud/files/node_modules/@nextcloud/sharing": { "version": "0.2.5", "resolved": "https://registry.npmjs.org/@nextcloud/sharing/-/sharing-0.2.5.tgz", @@ -1665,9 +1675,9 @@ } }, "node_modules/@nextcloud/paths": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/@nextcloud/paths/-/paths-2.4.0.tgz", - "integrity": "sha512-35hykjqzaJCw8pBYWuKbLLw2wyKMuf9+T8K8GoYiS84AIi8SO16nuEu0fyl/gwCuiDqX5tCCup4wqljf0hdvaw==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@nextcloud/paths/-/paths-3.0.0.tgz", + "integrity": "sha512-+sTfTkIbVUa2Ue3bkz3R7F1mhddvHPOWUxkSNg7Q5dAsimVFBaTRgiBAJmsAag3JPsxyuS8kUgeb0zdEssRdTA==", "license": "GPL-3.0-or-later", "engines": { "node": "^20.0.0 || ^22.0.0 || ^24.0.0" diff --git a/package.json b/package.json index c169b2b2d..7c9627773 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@nextcloud/capabilities": "^1.2.1", "@nextcloud/l10n": "^3.4.1", "@nextcloud/logger": "^3.0.3", - "@nextcloud/paths": "^2.4.0", + "@nextcloud/paths": "^3.0.0", "@nextcloud/router": "^3.1.0", "@nextcloud/sharing": "^0.3.0", "cancelable-promise": "^4.3.1", From 68faf2abf850bdb150852130d93be24710e83711 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Tue, 16 Dec 2025 15:46:20 +0100 Subject: [PATCH 2/2] refactor: migrate from Node `path` to `@nextcloud/paths` Signed-off-by: Ferdinand Thiessen --- lib/node/node.ts | 3 +-- lib/node/nodeData.ts | 2 +- lib/utils/filename.ts | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/node/node.ts b/lib/node/node.ts index 12e2b3831..31e2c0fff 100644 --- a/lib/node/node.ts +++ b/lib/node/node.ts @@ -2,9 +2,8 @@ * SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors * SPDX-License-Identifier: AGPL-3.0-or-later */ -import { basename, extname, dirname } from 'path' -import { encodePath } from '@nextcloud/paths' +import { basename, dirname, encodePath, extname } from '@nextcloud/paths' import { Permission } from '../permissions' import { FileType } from './fileType' import { Attribute, isDavResource, NodeData, validateData } from './nodeData' diff --git a/lib/node/nodeData.ts b/lib/node/nodeData.ts index c387ba202..62696885e 100644 --- a/lib/node/nodeData.ts +++ b/lib/node/nodeData.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ -import { join } from 'path' +import { join } from '@nextcloud/paths' import { Permission } from '../permissions' import { NodeStatus } from './node' diff --git a/lib/utils/filename.ts b/lib/utils/filename.ts index 67969c4c2..3f5d2a550 100644 --- a/lib/utils/filename.ts +++ b/lib/utils/filename.ts @@ -3,7 +3,7 @@ * SPDX-License-Identifier: AGPL-3.0-or-later or LGPL-3.0-or-later */ -import { basename, extname } from 'path' +import { basename, extname } from '@nextcloud/paths' interface UniqueNameOptions { /**