Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

feat: pull in new globSource #3889

Merged
merged 5 commits into from
Sep 23, 2021
Merged

feat: pull in new globSource #3889

merged 5 commits into from
Sep 23, 2021

Conversation

achingbrain
Copy link
Member

The new globSource module has a simpler api.

Old:

await ipfs.addAll(globSource('*', {
  recursive: true,
  cwd: './somedir'
})

New:

await ipfs.addAll(globSource('./somedir', '**/*'))

See the minimatch docs for
more on what the pattern supports.

BREAKING CHANGE: the globSource api has changed from globSource(dir, opts) to globSource(dir, pattern, opts)

The new globSource module has a simpler api.

Old:

```js
await ipfs.addAll(globSource('*', {
  recursive: true,
  cwd: './somedir'
})
```

New:

```js
await ipfs.addAll(globSource('./somedir', '**/*'))
```

See the [minimatch](https://www.npmjs.com/package/minimatch) docs for
more on what the pattern supports.

BREAKING CHANGE: the globSource api has changed from `globSource(dir, opts)` to `globSource(dir, pattern, opts)`
@achingbrain achingbrain merged commit be4a542 into master Sep 23, 2021
@achingbrain achingbrain deleted the chore/upgrade-ipfs-utils branch September 23, 2021 18:27
hacdias added a commit to ipfs/ipfs-desktop that referenced this pull request Feb 9, 2022
lidel pushed a commit to ipfs/ipfs-desktop that referenced this pull request Feb 11, 2022
* fix: use new glob source API

See ipfs/js-ipfs#3889

* feat: add tests and improve add-to-ipfs
SgtPooki referenced this pull request in ipfs/js-kubo-rpc-client Aug 18, 2022
* feat: pull in new globSource

The new globSource module has a simpler api.

Old:

```js
await ipfs.addAll(globSource('*', {
  recursive: true,
  cwd: './somedir'
})
```

New:

```js
await ipfs.addAll(globSource('./somedir', '**/*'))
```

See the [minimatch](https://www.npmjs.com/package/minimatch) docs for
more on what the pattern supports.

BREAKING CHANGE: the globSource api has changed from `globSource(dir, opts)` to `globSource(dir, pattern, opts)`
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant