Skip to content

Commit 7e46b84

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 <opensource@fthiessen.de>
1 parent af703f9 commit 7e46b84

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

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 <opensource@fthiessen.de>
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
/**

0 commit comments

Comments
 (0)