-
Notifications
You must be signed in to change notification settings - Fork 12
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
fix: Node imports paths #1141
base: main
Are you sure you want to change the base?
fix: Node imports paths #1141
Conversation
Signed-off-by: skjnldsv <[email protected]>
Bundle ReportChanges will increase total bundle size by 1.92kB (0.39%) ⬆️. This is within the configured threshold ✅ Detailed changes
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1141 +/- ##
=======================================
Coverage 91.62% 91.62%
=======================================
Files 23 23
Lines 633 633
Branches 166 166
=======================================
Hits 580 580
Misses 46 46
Partials 7 7 ☔ View full report in Codecov by Sentry. |
@@ -73,7 +73,7 @@ export interface IFileListFilter extends TypedEventTarget<IFileListFilterEvents> | |||
* @param nodes Nodes to filter | |||
* @return Subset of the `nodes` parameter to show | |||
*/ | |||
filter(nodes: INode[]): INode[] | |||
filter(nodes: Node[]): Node[] |
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.
This is a breaking change and I do not see how it would help.
(I requires the exact implementation with privat methods instead of the only required interface)
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.
Shall we use INode everywhere then? I find the multiple types confusing.
Which are we supposed to use now ?
import { Folder } from './files/folder.ts' | ||
import { View } from './navigation/view.ts' | ||
import logger from './utils/logger.ts' | ||
import type { Node } from './files/node' |
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.
Why removing the extensions?
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.
Consistency
import { CancelablePromise } from 'cancelable-promise' | ||
import { createClient, getPatcher } from 'webdav' | ||
import { generateRemoteUrl } from '@nextcloud/router' |
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.
Why sorting down? @...
should be before c...
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.
I sort the lines, not the libraries, have been doing this everywhere here for... Years 😂
Funny you're only noticing this now 🤭
@@ -42,7 +42,7 @@ export interface FilesSortingOptions { | |||
* @param nodes Nodes to sort | |||
* @param options Sorting options | |||
*/ | |||
export function sortNodes(nodes: readonly INode[], options: FilesSortingOptions = {}): INode[] { | |||
export function sortNodes(nodes: readonly Node[], options: FilesSortingOptions = {}): Node[] { |
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.
Same here, breaking and not needed.
We only need the interface (public) not the private implementation.
@@ -7,7 +7,7 @@ | |||
import type { IFileListFilter, Navigation } from './lib' | |||
import type { DavProperty } from './lib/dav/davProperties' | |||
import type { FileAction } from './lib/fileAction' | |||
import type { FileListAction } from './lib/fileListAction.ts' | |||
import type { FileListAction } from './lib/fileListAction' |
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.
Extension?
Might fix #1127
lib/index.ts