-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
refactor: Add type-hinting to Node-API #55622
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
CarlSchwan
wants to merge
7
commits into
master
Choose a base branch
from
carl/node-api-typing
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+1,187
−1,697
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
ce0b6ee to
4168379
Compare
23a6378 to
b5fce71
Compare
come-nc
reviewed
Oct 9, 2025
come-nc
reviewed
Oct 9, 2025
come-nc
reviewed
Oct 9, 2025
eb61c2c to
d5c729b
Compare
4527d3f to
75e6b3e
Compare
come-nc
reviewed
Oct 20, 2025
Contributor
come-nc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All in all there are way too much ?? -1 in this, and in a lot of cases it does not make sense.
Code should throw early if an id is needed but unknown, it should not try to store a -1 in pendingRename and stuff like that.
apps/federatedfilesharing/lib/OCM/CloudFederationProviderFiles.php
Outdated
Show resolved
Hide resolved
d285f6a to
8f28035
Compare
20555ed to
852ab03
Compare
0cecb7a to
506f73e
Compare
506f73e to
b69af83
Compare
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
Same for getETag Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
Instead of -1 Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
Instead of just ignoring it and possibly creating subtle bugs. Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
Signed-off-by: Carl Schwan <carl.schwan@nextcloud.com>
b69af83 to
56c4409
Compare
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.
Summary
Slight API changes:
FileInfo::getIdandNode::getIdnow both returns an int|null. PreviouslyNode::getIddid return -1, whileFileInfo::getIddid return null for invalid files. Since Node and FileInfo were used interchangeably in some places, this would potentially cause issues.FileInfo::getChecksumwas documented as returning a string but would from time to time returns null. Now it only return a string or an empty string. The places were we were checking for returning null or empty string, are now only checking for empty stringapps/dav/lib/Connector/Sabre/Directory.phpwhich was a valid usecase for passing a null mountpoint and storage, which is now using a DummyMountPoint (new) and a FailedStorageTODO
Checklist
3. to review, feature component)stable32)