Skip to content

Commit a4845cb

Browse files
committed
refactor: drop dependency on Node modules
This removes and usage of Node modules, as this library is intended for the browser not Node.JS Otherwise you always had to polyfill the node modules. Signed-off-by: Ferdinand Thiessen <[email protected]>
1 parent 0286c52 commit a4845cb

File tree

5 files changed

+9
-10
lines changed

5 files changed

+9
-10
lines changed

lib/node/node.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,8 @@
22
* SPDX-FileCopyrightText: 2022 Nextcloud GmbH and Nextcloud contributors
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
5-
import { basename, extname, dirname } from 'path'
6-
import { encodePath } from '@nextcloud/paths'
75

6+
import { basename, dirname, encodePath, extname } from '@nextcloud/paths'
87
import { Permission } from '../permissions'
98
import { FileType } from './fileType'
109
import { Attribute, fixDates, fixRegExp, isDavResource, NodeData, validateData } from './nodeData'

lib/node/nodeData.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
55

6-
import { join } from 'path'
6+
import { join } from '@nextcloud/paths'
77

88
import { Permission } from '../permissions'
99
import { NodeStatus } from './node'

lib/utils/filename.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/**
2-
* SPDX-FileCopyrightText: Ferdinand Thiessen <[email protected]>
2+
* SPDX-FileCopyrightText: Nextcloud GmbH and Nextcloud contributors
33
* SPDX-License-Identifier: AGPL-3.0-or-later or LGPL-3.0-or-later
44
*/
55

6-
import { basename, extname } from 'path'
6+
import { basename, extname } from '@nextcloud/paths'
77

88
interface UniqueNameOptions {
99
/**

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@
5757
"@nextcloud/capabilities": "^1.2.1",
5858
"@nextcloud/l10n": "^3.4.1",
5959
"@nextcloud/logger": "^3.0.3",
60-
"@nextcloud/paths": "^2.3.0",
60+
"@nextcloud/paths": "^2.4.0",
6161
"@nextcloud/router": "^3.1.0",
6262
"@nextcloud/sharing": "^0.3.0",
6363
"cancelable-promise": "^4.3.1",

0 commit comments

Comments
 (0)