Skip to content

Add the shardSplitThreshold option to this library#92

Open
obo20 wants to merge 7 commits intostoracha:mainfrom
obo20:main
Open

Add the shardSplitThreshold option to this library#92
obo20 wants to merge 7 commits intostoracha:mainfrom
obo20:main

Conversation

@obo20
Copy link
Copy Markdown

@obo20 obo20 commented Sep 17, 2021

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

Copy link
Copy Markdown
Contributor

@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

Comment thread src/pack/index.ts
maxChildrenPerNode: maxChildrenPerNode || unixfsImporterOptionsDefault.maxChildrenPerNode,
wrapWithDirectory: wrapWithDirectory === false ? false : unixfsImporterOptionsDefault.wrapWithDirectory
wrapWithDirectory: wrapWithDirectory === false ? false : unixfsImporterOptionsDefault.wrapWithDirectory,
...(shardSplitThreshold) && { shardSplitThreshold : shardSplitThreshold }
Copy link
Copy Markdown
Contributor

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 }

Comment thread src/pack/stream.ts
maxChildrenPerNode: maxChildrenPerNode || unixfsImporterOptionsDefault.maxChildrenPerNode,
wrapWithDirectory: wrapWithDirectory === false ? false : unixfsImporterOptionsDefault.wrapWithDirectory
wrapWithDirectory: wrapWithDirectory === false ? false : unixfsImporterOptionsDefault.wrapWithDirectory,
...(shardSplitThreshold) && { shardSplitThreshold : shardSplitThreshold }
Copy link
Copy Markdown
Contributor

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 }

Comment thread src/pack/index.ts
wrapWithDirectory?: boolean,
hasher?: MultihashHasher
hasher?: MultihashHasher,
shardSplitThreshold?: number
Copy link
Copy Markdown
Contributor

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