fix(deps): update dependency @nextcloud/files to v4 (main)#8274
Open
renovate[bot] wants to merge 1 commit intomainfrom
Open
fix(deps): update dependency @nextcloud/files to v4 (main)#8274renovate[bot] wants to merge 1 commit intomainfrom
renovate[bot] wants to merge 1 commit intomainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^3.12.2→^4.0.0Release Notes
nextcloud-libraries/nextcloud-files (@nextcloud/files)
v4.0.0Compare Source
ℹ️ The release does not contain any breaking changes compared to v4.0.0-rc.3.
📝 Notes
the files app of Nextcloud 33 or later.
rootproperty of any node,including
FileorFolder, is now required.meaning instead of accepting
Viewthey accept the more genericIViewinterface. This allows better integration with frameworksand 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/daventry point.For example:
File Actions API changes
The
FileActionAPI has been changed to provide a more consistentset 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.WRITEis set for files where the content can be changed(whereas
Permission.UPDATEonly indicates the file can be updates as in renamed or moved).This is similar to the
Permission.CREATEfor 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
FileActionof app A would not satisfyinstanceof FileActionin app B.So with v4 of this library those classes have been removed,
instead just make sure to implement the provided interfaces.
💥 Breaking changes
Node.roota required attribute #1388idof view tosetActive#1418isDavRessource#1390NewMenuEntry.iconClass#1385🚀 Enhancements
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
Other changes
View.emptyView#1290corepackblocking dependency updates #1292To 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.
Configuration
📅 Schedule: Branch creation - "every weekend" in timezone Europe/Berlin, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.