Releases: nextcloud-libraries/nextcloud-files
v4.0.0 - Nextcloud 33+
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
rootproperty of any node,
includingFileorFolder, is now required. - All methods now also accept the interface of the provided classes,
meaning instead of acceptingViewthey accept the more generic
IViewinterface. 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.roota required attribute #1388 - refactor!(navigation): pass
idof view tosetActive#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
corepackblocking 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/fileslibrary v4 for Nextcloud 33+.
Otherwise the registered entities are not picked up by the files app.
v4.0.0-rc.3
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
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
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
Full Changelog: v4.0.0-rc.0...v4.0.0-rc.1
v4.0.0-rc.0
v4.0.0-beta.9
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
- chore(deps-dev): Bump qs from 6.14.0 to 6.14.1 by @dependabot[bot] in #1448
- chore(deps): Bump typescript-event-target from 1.1.1 to 1.1.2 by @dependabot[bot] in #1450
- chore(deps-dev): Bump @types/node from 25.0.3 to 25.0.5 by @dependabot[bot] in #1451
- chore(deps-dev): Bump vite from 7.3.0 to 7.3.1 by @dependabot[bot] in #1452
- chore: update to ESLint v9 by @susnux in #1457
- chore: prepare v4.0.0-beta.9 by @susnux in #1458
Full Changelog: v4.0.0-beta.8...v4.0.0-beta.9
v4.0.0-beta.8
What's Changed
🚀 Enhancements
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
v4.0.0-beta.6
v4.0.0-beta.5
4.0.0-beta.5 - 2025-12-16
💥 Breaking changes
- refactor!(navigation): pass
idof view tosetActive#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/loggerto 3.0.3 - Bump
@nextcloud/pathsto 3.0.0
- Bump