Skip to content

Conversation

@obo20
Copy link

@obo20 obo20 commented Sep 17, 2021

This adds support for the shardSplitThreshold option to be passed in to js-ipfs-unixfs

Copy link
Member

@vasco-santos vasco-santos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @obo20
Left some inline suggestions to fix the linting job

maxChildrenPerNode: maxChildrenPerNode || unixfsImporterOptionsDefault.maxChildrenPerNode,
wrapWithDirectory: wrapWithDirectory === false ? false : unixfsImporterOptionsDefault.wrapWithDirectory
wrapWithDirectory: wrapWithDirectory === false ? false : unixfsImporterOptionsDefault.wrapWithDirectory,
...(shardSplitThreshold) && { shardSplitThreshold : shardSplitThreshold }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tslint job is failing here with:

src/pack/index.ts:24:31
ERROR: 43:37  object-literal-shorthand  Expected property shorthand in object literal ('{shardSplitThreshold}').
Suggested change
...(shardSplitThreshold) && { shardSplitThreshold : shardSplitThreshold }
...(shardSplitThreshold) && { shardSplitThreshold }

maxChildrenPerNode: maxChildrenPerNode || unixfsImporterOptionsDefault.maxChildrenPerNode,
wrapWithDirectory: wrapWithDirectory === false ? false : unixfsImporterOptionsDefault.wrapWithDirectory
wrapWithDirectory: wrapWithDirectory === false ? false : unixfsImporterOptionsDefault.wrapWithDirectory,
...(shardSplitThreshold) && { shardSplitThreshold : shardSplitThreshold }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
...(shardSplitThreshold) && { shardSplitThreshold : shardSplitThreshold }
...(shardSplitThreshold) && { shardSplitThreshold }

wrapWithDirectory?: boolean,
hasher?: MultihashHasher
hasher?: MultihashHasher,
shardSplitThreshold?: number
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

linter failing here with:

src/pack/index.ts:24:31
ERROR: 24:31  no-trailing-whitespace    trailing whitespace
Suggested change
shardSplitThreshold?: number
shardSplitThreshold?: number

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants