Skip to content
This repository was archived by the owner on Mar 23, 2023. It is now read-only.

chore: update deps #29

Merged
merged 3 commits into from
Apr 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@
},
"homepage": "https://github.com/ipfs/js-datastore-fs#readme",
"dependencies": {
"datastore-core": "~0.7.0",
"datastore-core": "^1.0.0",
"fast-write-atomic": "~0.2.0",
"glob": "^7.1.3",
"interface-datastore": "~0.7.0",
"interface-datastore": "~0.8.3",
"mkdirp": "~0.5.1"
},
"devDependencies": {
"aegir": "^19.0.3",
"aegir": "^21.9.0",
"async-iterator-all": "^1.0.0",
"chai": "^4.2.0",
"cids": "~0.7.1",
"cids": "~0.8.0",
"detect-node": "^2.0.4",
"dirty-chai": "^2.0.1",
"memdown": "^4.0.0",
Expand Down
6 changes: 3 additions & 3 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,12 +288,12 @@ class FsDatastore {
*/
query (q) {
// glob expects a POSIX path
let prefix = q.prefix || '**'
let pattern = path
const prefix = q.prefix || '**'
const pattern = path
.join(this.path, prefix, '*' + this.opts.extension)
.split(path.sep)
.join('/')
let files = glob.sync(pattern)
const files = glob.sync(pattern)
let it
if (!q.keysOnly) {
it = map(files, async (f) => {
Expand Down
8 changes: 4 additions & 4 deletions test/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ describe('FsDatastore', () => {

it('query', async () => {
const fs = new FsStore(path.join(__dirname, 'test-repo', 'blocks'))
let res = []
const res = []
for await (const q of fs.query({})) {
res.push(q)
}
Expand All @@ -138,9 +138,9 @@ describe('FsDatastore', () => {
const key = new Key('CIQGFTQ7FSI2COUXWWLOQ45VUM2GUZCGAXLWCTOKKPGTUWPXHBNIVOY')
const expected = fs.readFileSync(path.join(repodir, 'VO', key.toString() + '.data'))
const flatfs = await ShardingStore.open(fstore)
let res = await flatfs.get(key)
let queryResult = flatfs.query({})
let results = []
const res = await flatfs.get(key)
const queryResult = flatfs.query({})
const results = []
for await (const result of queryResult) results.push(result)
expect(results).to.have.length(23)
expect(res).to.be.eql(expected)
Expand Down