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 <[email protected]>
1 parent af703f9 commit 7e46b84

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
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
/**

0 commit comments

Comments
 (0)