hyperdrive
Advanced tools
Comparing version 11.0.0-alpha.6 to 11.0.0-alpha.7
@@ -304,3 +304,3 @@ const Hyperbee = require('hyperbee') | ||
function onblobs () { | ||
self.entry(name).then(onnode, cb) | ||
self.entry(normalizePath(name)).then(onnode, cb) | ||
} | ||
@@ -408,3 +408,3 @@ | ||
if (err) return cb(err) | ||
self.files.put(name, { executable, linkname: null, blob: ws.id, metadata }).then(() => cb(null), cb) | ||
self.files.put(normalizePath(name), { executable, linkname: null, blob: ws.id, metadata }).then(() => cb(null), cb) | ||
} | ||
@@ -411,0 +411,0 @@ |
{ | ||
"name": "hyperdrive", | ||
"version": "11.0.0-alpha.6", | ||
"version": "11.0.0-alpha.7", | ||
"description": "Hyperdrive is a secure, real-time distributed file system", | ||
@@ -20,3 +20,3 @@ "main": "index.js", | ||
"dependencies": { | ||
"hyperbee": "^2.0.0", | ||
"hyperbee": "^2.1.1", | ||
"hyperblobs": "^2.0.0", | ||
@@ -23,0 +23,0 @@ "is-options": "^1.0.2", |
15
test.js
@@ -383,4 +383,4 @@ const fs = require('fs') | ||
for await (const diff of drive.diff(drive.core.length - 2)) { | ||
if (diff.right) t.is(diff.right.key, relpath) | ||
if (diff.left) t.is(diff.left.key, relpath + '.old') | ||
if (diff.right) t.is(diff.right.key, relpath.replace(/\\/g, '/')) | ||
if (diff.left) t.is(diff.left.key, relpath.replace(/\\/g, '/') + '.old') | ||
} | ||
@@ -654,2 +654,13 @@ }) | ||
test('batch.list()', async (t) => { | ||
const { drive } = await testenv(t.teardown) | ||
const nil = Buffer.from('nil') | ||
await drive.put('/x', nil) | ||
const batch = drive.batch() | ||
for await (const entry of batch.list()) { | ||
t.is(entry.key, '/x') | ||
} | ||
await batch.flush() | ||
}) | ||
test('drive.close()', async (t) => { | ||
@@ -656,0 +667,0 @@ t.plan(2) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
44693
996
Updatedhyperbee@^2.1.1