Skip to content

Releases: nextcloud-libraries/nextcloud-files

v4.0.0 - Nextcloud 33+

10 Feb 17:18
bd65425

Choose a tag to compare

4.0.0 - 2026-02-10

ℹ️ The release does not contain any breaking changes compared to v4.0.0-rc.3.

📝 Notes

  • This package now is a pure ES module.
  • Due to breaking changes this major version is only compatible with
    the files app of Nextcloud 33 or later.
  • The Node API was changed, the root property of any node,
    including File or Folder, is now required.
  • All methods now also accept the interface of the provided classes,
    meaning instead of accepting View they accept the more generic
    IView interface. This allows better integration with frameworks
    and custom implementations of the interface where needed.

DAV related export

The DAV related exports from the main entry point were deprecated
for a long time and are now removed from it.
Instead you have to use the @nextcloud/files/dav entry point.

For example:

- import { davRemoteURL } from '@nextcloud/files'
+ import { defaultRemoteURL } from '@nextcloud/files/dav'

File Actions API changes

The FileAction API has been changed to provide a more consistent
set of context to the action handlers.
We're now using destructuring objects for the context parameters.
For example:

type ActionContext = {
  nodes: INode[],
  view: IView,
  folder: IFolder,
  contents: INode[],
}

- action.exec(view: View, folder: Folder, dir: string): Promise<boolean>
+ action.exec({ nodes, view, folder, contents }): Promise<boolean>

Node permissions

To make work with nodes easier a new constant has been introduced:

Permission.WRITE is set for files where the content can be changed
(whereas Permission.UPDATE only indicates the file can be updates as in renamed or moved).
This is similar to the Permission.CREATE for folders.

Note that this is only valid for WebDAV nodes, for other APIs that are using the permissions
it depends how they interpret them.

Interfaces

Where feasible this library now only requires using objects
matching a given interface and not instantiating a class.
The reason here is that this allows for easier extending,
which can be used to keep track of some internal state.

Moreover classes could never be verified because
the prototypes were not globally shared thus every applicaton would create different class instances.
Meaning e.g. a FileAction of app A would not satisfy instanceof FileAction in app B.

So with v4 of this library those classes have been removed,
instead just make sure to implement the provided interfaces.

- import { FileAction } from '@nextcloud/files'
+ import type { IFileAction } from '@nextcloud/files'
 
- const action = new FileAction({ ... })
+ const action: IFileAction = { ... }
- import { FileAction, registerFileAction } from '@nextcloud/files'
+ import { registerFileAction } from '@nextcloud/files'
 
- registerFileAction(new FileAction({ ... }))
+ registerFileAction({ ... })

💥 Breaking changes

  • feat(actions): standardize contexts #1124
  • fix(node): cloning #1348
  • refactor(Node)!: make Node.root a required attribute #1388
  • refactor!(navigation): pass id of view to setActive #1418
  • refactor!: migrate from cancelable promise to AbortSignal #1428
  • refactor(actions)!: rename content to contents #1386
  • refactor!: use interfaces where possible instead of instances #1417
  • refactor!: More classes are replaces with interfaces where real class instances are not needed #1475
  • refactor(column)!: use interfaces rather than instances #1443
  • refactor(headers)!: use interfaces where possible #1484
  • chore(Node)!: remove deprecated isDavRessource #1390
  • chore!: drop deprecated DAV exports from main entry point #1384
  • chore!: remove deprecated filename validation fallbacks for Nextcloud 29 and below #1383
  • chore!: remove deprecated NewMenuEntry.iconClass #1385
  • chore!: remove commonjs entry point #1420

🚀 Enhancements

  • feat: allow file list filers with display names #1456
  • feat: add separate permission to check for writable files #1455
  • feat(node): allow to cast as JSON #1349
  • feat(sidebar): provide public API to register a sidebar tab with web components #1419
  • feat(sidebar): provide a proxy for the files sidebar #1306
  • feat(sidebar): properly implement sidebar Proxy for Nextcloud 33+ #1447
  • feat(sidebar): allow to postpone definition of sidebar tabs #1459
  • feat(navigation): allow to register multiple views in one batch #1476
  • feat(node): add support for string based snowflake ids #1495
  • feat(registry): Add new registry to listen for registration events #1483
    This allows to listen for changes on registered objects (views, filters, etc).
    So you can react when something new was registered.
    This allows to creates a reactive state with any framework (e.g. Vue 3).

🐛 Fixed bugs

  • fix(actions): add type exports #1381
  • fix(actions): only pass a single node to renderInline #1391
  • fix(actions): add back nodes contents to view action params #1392
  • fix(sortNodes): do not trim "extension" of folder names #1291
  • fix(node): better special character encoding and detection #1398
  • fix(column): validate interface rather than the instance type #1442
  • fix(view): ensure all optional properties are validated #1438
  • fix: properly export all public API #1485

Other changes

  • docs(View): improve documentation of View.emptyView #1290
  • ci: update dependencies also on stable3 #1400
  • ci: drop npm token publishing and use trusted publisher #1416
  • ci: add workflow to check for Typescript issues #1439
  • chore: align devEngines with apps #1355
  • chore: remove legacy node attributes deprecation #1379
  • chore: work around bug in corepack blocking dependency updates #1292
  • chore(deps): align and update vitest dependencies #1389
  • chore: adjust types to only use interfaces if possible #1440
  • chore(deps): Bump typescript-event-target from 1.1.1 to 1.1.2 #1450
  • chore: update to ESLint v9 #1457
  • refactor: drop dependency on Node modules #1421
  • refactor: scope global state to major version of library #1492
    To prevent apps breaking the files app with outdated library versions, all registered actions, views etc are now scoped.
    Meaning you have to use a compatible library version, e.g. its required to use the @nextcloud/files library v4 for Nextcloud 33+.
    Otherwise the registered entities are not picked up by the files app.

v4.0.0-rc.3

09 Feb 16:46
983fe40

Choose a tag to compare

v4.0.0-rc.3 Pre-release
Pre-release

What's Changed

Other changes

  • refactor: scope global state to major version of library by @susnux in #1492
  • chore: prepare v4.0.0-rc.3 by @susnux in #1493

Full Changelog: v4.0.0-rc.2...v4.0.0-rc.3

v4.0.0-rc.2

07 Feb 12:45
b39e111

Choose a tag to compare

v4.0.0-rc.2 Pre-release
Pre-release

What's Changed

🐛 Fixed bugs

  • fix: properly export all public API, #1485

Other changes

  • refactor(headers): use interfaces where possible, #1484
  • chore(deps): Bump webdav from 5.8.0 to 5.9.0, #1489
  • chore: prepare v4.0.0-rc.2, #1486

Full Changelog: v4.0.0-rc.1...v4.0.0-rc.2

v4.0.0-rc.1

05 Feb 12:18
8b2be4f

Choose a tag to compare

v4.0.0-rc.1 Pre-release
Pre-release

What's Changed

🚀 Enhancements

  • feat(registry): add new registry to keep track of registration changes #1483
  • feat(Navigation): allow to register multiple views at once #1476

Other changes

  • refactor: migrate missing classes to interfaces #1475
  • chore: Bump version to 4.0.0-rc.1 #1477

Full Changelog: v4.0.0-rc.0...v4.0.0-rc.1

v4.0.0-rc.0

15 Jan 17:08
42846d6

Choose a tag to compare

v4.0.0-rc.0 Pre-release
Pre-release

What's Changed

🚀 Enhancements

  • feat(sidebar): allow to postpone definition of sidebar tabs by @susnux in #1459

Other changes

Full Changelog: v4.0.0-beta.9...v4.0.0-rc.0

v4.0.0-beta.9

13 Jan 17:49
ff2cffd

Choose a tag to compare

v4.0.0-beta.9 Pre-release
Pre-release

What's Changed

🚀 Enhancements

  • feat: add separate permission to check for writable files by @susnux in #1455
  • feat: allow file list filers with display names by @susnux in #1456

Other changes

Full Changelog: v4.0.0-beta.8...v4.0.0-beta.9

v4.0.0-beta.8

29 Dec 15:05
9febf8f

Choose a tag to compare

v4.0.0-beta.8 Pre-release
Pre-release

What's Changed

🚀 Enhancements

  • feat(sidebar): properly implement sidebar Proxy for Nextcloud 33+ by @susnux in #1447

Other changes

  • chore(deps-dev): Bump jsdom from 27.3.0 to 27.4.0 by @dependabot[bot] in #1445

Full Changelog: v4.0.0-beta.7...v4.0.0-beta.8

v4.0.0-beta.7

23 Dec 15:42
0301bba

Choose a tag to compare

v4.0.0-beta.7 Pre-release
Pre-release

4.0.0-beta.7 - 2025-12-23

🐛 Fixed bugs

  • fix(column): validate interface rather than the instance type #1442 (susnux)

Other changes

  • refactor(column): use interfaces rather than instances #1443 (susnux)

v4.0.0-beta.6

22 Dec 17:54
eaac8df

Choose a tag to compare

v4.0.0-beta.6 Pre-release
Pre-release

4.0.0-beta.6 - 2025-12-22

🐛 Fixed bugs

  • fix(view): ensure all optional properties are validated #1438 (susnux)

Other changes

  • chore: adjust types to only use interfaces if possible #1440 (susnux)
  • ci: add workflow to check for Typescript issues #1439 (susnux)

v4.0.0-beta.5

16 Dec 19:41
784c3ff

Choose a tag to compare

v4.0.0-beta.5 Pre-release
Pre-release

4.0.0-beta.5 - 2025-12-16

💥 Breaking changes

  • refactor!(navigation): pass id of view to setActive #1418 (susnux)
  • refactor!: migrate from cancelable promise to AbortSignal #1428 (susnux)
  • chore!: remove commonjs entry point #1420 (susnux)

🚀 Enhancements

  • feat(sidebar): provide public API to register a sidebar tab with web components #1419 (susnux)
  • feat(sidebar): provide a proxy for the files sidebar #1306 (susnux)

Other changes

  • refactor: use interfaces where possible instead of instances #1417 (susnux)
  • refactor: drop dependency on Node modules #1421 (susnux)
  • ci: update dependencies also on stable3 #1400 (susnux)
  • ci: drop npm token publishing and use trusted publisher #1416
  • Updated dependencies:
    • Bump @nextcloud/logger to 3.0.3
    • Bump @nextcloud/paths to 3.0.0