Skip to content

Commit

Permalink
deps: bump aegir from 38.1.8 to 39.0.9 (#225)
Browse files Browse the repository at this point in the history
* deps: bump aegir from 38.1.8 to 39.0.9

Bumps [aegir](https://github.com/ipfs/aegir) from 38.1.8 to 39.0.9.
- [Release notes](https://github.com/ipfs/aegir/releases)
- [Changelog](https://github.com/ipfs/aegir/blob/master/CHANGELOG.md)
- [Commits](ipfs/aegir@v38.1.8...v39.0.9)

---
updated-dependencies:
- dependency-name: aegir
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* chore: fix deps and linting

* chore: linting

* chore: errors were moved

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: achingbrain <alex@achingbrain.net>
  • Loading branch information
dependabot[bot] and achingbrain authored Jun 3, 2023
1 parent 03c8959 commit d0f301b
Show file tree
Hide file tree
Showing 66 changed files with 192 additions and 193 deletions.
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@
"dep-check": "aegir run dep-check",
"release": "npm run docs:no-publish && aegir run release && npm run docs"
},
"dependencies": {
"aegir": "^38.1.0"
"devDependencies": {
"aegir": "^39.0.9"
},
"workspaces": [
"packages/*"
Expand Down
2 changes: 1 addition & 1 deletion packages/blockstore-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
"multiformats": "^11.0.2"
},
"devDependencies": {
"aegir": "^38.1.7",
"aegir": "^39.0.9",
"interface-blockstore-tests": "^6.0.0"
},
"typedoc": {
Expand Down
6 changes: 3 additions & 3 deletions packages/blockstore-core/src/memory.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { BaseBlockstore } from './base.js'
import { base32 } from 'multiformats/bases/base32'
import * as raw from 'multiformats/codecs/raw'
import { CID } from 'multiformats/cid'
import * as raw from 'multiformats/codecs/raw'
import * as Digest from 'multiformats/hashes/digest'
import { BaseBlockstore } from './base.js'
import * as Errors from './errors.js'
import type { Await, AwaitIterable } from 'interface-store'
import type { Pair } from 'interface-blockstore'
import type { Await, AwaitIterable } from 'interface-store'

export class MemoryBlockstore extends BaseBlockstore {
private readonly data: Map<string, Uint8Array>
Expand Down
8 changes: 4 additions & 4 deletions packages/blockstore-fs/benchmarks/encoding/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Bench } from 'tinybench'
import { CID } from 'multiformats/cid'
import { base8 } from 'multiformats/bases/base8'
import { base10 } from 'multiformats/bases/base10'
import { base16upper } from 'multiformats/bases/base16'
import { base256emoji } from 'multiformats/bases/base256emoji'
import { base32, base32upper, base32hexupper, base32z } from 'multiformats/bases/base32'
import { base36, base36upper } from 'multiformats/bases/base36'
import { base256emoji } from 'multiformats/bases/base256emoji'
import { base8 } from 'multiformats/bases/base8'
import { CID } from 'multiformats/cid'
import { Bench } from 'tinybench'

const RESULT_PRECISION = 2

Expand Down
2 changes: 1 addition & 1 deletion packages/blockstore-fs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@
"multiformats": "^11.0.2"
},
"devDependencies": {
"aegir": "^38.1.7",
"aegir": "^39.0.9",
"interface-blockstore-tests": "^6.0.0"
},
"typedoc": {
Expand Down
12 changes: 5 additions & 7 deletions packages/blockstore-fs/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
import fs from 'node:fs/promises'
import glob from 'it-glob'
import path from 'node:path'
import { promisify } from 'node:util'
import {
Errors
} from 'blockstore-core'
import map from 'it-map'
import parallelBatch from 'it-parallel-batch'
// @ts-expect-error no types
import fwa from 'fast-write-atomic'
import type { CID } from 'multiformats/cid'
import glob from 'it-glob'
import map from 'it-map'
import parallelBatch from 'it-parallel-batch'
import { NextToLast, type ShardingStrategy } from './sharding.js'
import type { Blockstore, Pair } from 'interface-blockstore'
import type { AwaitIterable } from 'interface-store'
import { NextToLast, ShardingStrategy } from './sharding.js'
import type { CID } from 'multiformats/cid'

const writeAtomic = promisify(fwa)

Expand Down Expand Up @@ -110,8 +110,6 @@ export class FsBlockstore implements Blockstore {
if (this.errorIfExists) {
throw Errors.openFailedError(new Error(`Blockstore directory: ${this.path} already exists`))
}

return
} catch (err: any) {
if (err.code === 'ENOENT') {
if (this.createIfMissing) {
Expand Down
2 changes: 1 addition & 1 deletion packages/blockstore-fs/src/sharding.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import path from 'node:path'
import { CID } from 'multiformats/cid'
import { base32upper } from 'multiformats/bases/base32'
import { CID } from 'multiformats/cid'
import type { MultibaseCodec } from 'multiformats/bases/interface'

export interface ShardingStrategy {
Expand Down
10 changes: 5 additions & 5 deletions packages/blockstore-fs/test/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/* eslint-env mocha */
import { expect } from 'aegir/chai'
import path from 'node:path'
import os from 'node:os'
import fs from 'node:fs/promises'
import { CID } from 'multiformats/cid'
import os from 'node:os'
import path from 'node:path'
import { expect } from 'aegir/chai'
import { interfaceBlockstoreTests } from 'interface-blockstore-tests'
import { base256emoji } from 'multiformats/bases/base256emoji'
import { CID } from 'multiformats/cid'
import { FsBlockstore } from '../src/index.js'
import { FlatDirectory, NextToLast } from '../src/sharding.js'
import { base256emoji } from 'multiformats/bases/base256emoji'

const utf8Encoder = new TextEncoder()

Expand Down
2 changes: 1 addition & 1 deletion packages/blockstore-fs/test/sharding.spec.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-env mocha */
import { expect } from 'aegir/chai'
import { base32upper } from 'multiformats/bases/base32'
import { CID } from 'multiformats/cid'
import { FlatDirectory, NextToLast } from '../src/sharding.js'
import { base32upper } from 'multiformats/bases/base32'

describe('flat', () => {
it('should encode', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/blockstore-idb/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@
"multiformats": "^11.0.2"
},
"devDependencies": {
"aegir": "^38.1.7",
"aegir": "^39.0.9",
"interface-blockstore-tests": "^6.0.0"
},
"typedoc": {
Expand Down
6 changes: 3 additions & 3 deletions packages/blockstore-idb/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { openDB, IDBPDatabase, deleteDB } from 'idb'
import {
BaseBlockstore,
Errors
} from 'blockstore-core'
import { CID } from 'multiformats/cid'
import type { MultibaseCodec } from 'multiformats/bases/interface'
import { openDB, type IDBPDatabase, deleteDB } from 'idb'
import { base32upper } from 'multiformats/bases/base32'
import { CID } from 'multiformats/cid'
import * as raw from 'multiformats/codecs/raw'
import * as Digest from 'multiformats/hashes/digest'
import type { Pair } from 'interface-blockstore'
import type { AbortOptions, AwaitIterable } from 'interface-store'
import type { MultibaseCodec } from 'multiformats/bases/interface'

export interface IDBDatastoreInit {
/**
Expand Down
4 changes: 2 additions & 2 deletions packages/blockstore-idb/test/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-env mocha */

import { expect } from 'aegir/chai'
import { IDBBlockstore } from '../src/index.js'
import { CID } from 'multiformats/cid'
import { interfaceBlockstoreTests } from 'interface-blockstore-tests'
import { CID } from 'multiformats/cid'
import { IDBBlockstore } from '../src/index.js'

describe('IndexedDB Blockstore', function () {
describe('interface-blockstore (idb)', () => {
Expand Down
2 changes: 1 addition & 1 deletion packages/blockstore-level/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
"multiformats": "^11.0.2"
},
"devDependencies": {
"aegir": "^38.1.7",
"aegir": "^39.0.9",
"interface-blockstore-tests": "^6.0.0",
"ipfs-utils": "^9.0.4",
"memory-level": "^1.0.0"
Expand Down
8 changes: 4 additions & 4 deletions packages/blockstore-level/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import type { Pair } from 'interface-blockstore'
import { BaseBlockstore, Errors } from 'blockstore-core'
import { Level } from 'level'
import { CID } from 'multiformats/cid'
import type { DatabaseOptions, OpenOptions, IteratorOptions } from 'level'
import type { MultibaseCodec } from 'multiformats/bases/interface'
import { base32upper } from 'multiformats/bases/base32'
import { CID } from 'multiformats/cid'
import * as raw from 'multiformats/codecs/raw'
import * as Digest from 'multiformats/hashes/digest'
import type { Pair } from 'interface-blockstore'
import type { AbortOptions, AwaitIterable } from 'interface-store'
import type { DatabaseOptions, OpenOptions, IteratorOptions } from 'level'
import type { MultibaseCodec } from 'multiformats/bases/interface'

export interface LevelBlockstoreInit extends DatabaseOptions<string, Uint8Array>, OpenOptions {
/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LevelBlockstore } from '../../src/index.js'
import tempdir from 'ipfs-utils/src/temp-dir.js'
import { CID } from 'multiformats/cid'
import { LevelBlockstore } from '../../src/index.js'

async function testLevelIteratorDestroy (): Promise<void> {
const store = new LevelBlockstore(tempdir())
Expand Down
6 changes: 3 additions & 3 deletions packages/blockstore-level/test/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* eslint-env mocha */

import { expect } from 'aegir/chai'
import { MemoryLevel } from 'memory-level'
import { interfaceBlockstoreTests } from 'interface-blockstore-tests'
import tempdir from 'ipfs-utils/src/temp-dir.js'
import { Level } from 'level'
import { MemoryLevel } from 'memory-level'
import { LevelBlockstore } from '../src/index.js'
import tempdir from 'ipfs-utils/src/temp-dir.js'
import { interfaceBlockstoreTests } from 'interface-blockstore-tests'

describe('LevelBlockstore', () => {
describe('initialization', () => {
Expand Down
6 changes: 3 additions & 3 deletions packages/blockstore-level/test/node.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
/* eslint-env mocha */

import { expect } from 'aegir/chai'
import path from 'path'
import childProcess from 'child_process'
import path from 'path'
import { expect } from 'aegir/chai'
import { interfaceBlockstoreTests } from 'interface-blockstore-tests'
import { LevelBlockstore } from '../src/index.js'
import tempdir from 'ipfs-utils/src/temp-dir.js'
import { LevelBlockstore } from '../src/index.js'

describe('LevelDatastore', () => {
describe('interface-blockstore (leveldown)', () => {
Expand Down
3 changes: 2 additions & 1 deletion packages/blockstore-s3/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,8 @@
"uint8arrays": "^4.0.2"
},
"devDependencies": {
"aegir": "^38.1.7",
"@types/sinon": "^10.0.15",
"aegir": "^39.0.9",
"interface-blockstore-tests": "^6.0.0",
"p-defer": "^4.0.0",
"sinon": "^15.0.2"
Expand Down
16 changes: 8 additions & 8 deletions packages/blockstore-s3/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
import type { Pair } from 'interface-blockstore'
import { BaseBlockstore } from 'blockstore-core/base'
import * as Errors from 'blockstore-core/errors'
import { fromString as unint8arrayFromString } from 'uint8arrays'
import toBuffer from 'it-to-buffer'
import type { S3 } from '@aws-sdk/client-s3'
import type { AbortOptions } from 'interface-store'
import {
PutObjectCommand,
CreateBucketCommand,
Expand All @@ -13,8 +6,15 @@ import {
DeleteObjectCommand,
ListObjectsV2Command
} from '@aws-sdk/client-s3'
import { BaseBlockstore } from 'blockstore-core/base'
import * as Errors from 'blockstore-core/errors'
import toBuffer from 'it-to-buffer'
import { fromString as unint8arrayFromString } from 'uint8arrays'
import { NextToLast, type ShardingStrategy } from './sharding.js'
import type { S3 } from '@aws-sdk/client-s3'
import type { Pair } from 'interface-blockstore'
import type { AbortOptions } from 'interface-store'
import type { CID } from 'multiformats/cid'
import { NextToLast, ShardingStrategy } from './sharding.js'

export interface S3BlockstoreInit {
/**
Expand Down
2 changes: 1 addition & 1 deletion packages/blockstore-s3/src/sharding.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { CID } from 'multiformats/cid'
import { base32upper } from 'multiformats/bases/base32'
import { CID } from 'multiformats/cid'
import type { MultibaseCodec } from 'multiformats/bases/interface'

export interface ShardingStrategy {
Expand Down
9 changes: 4 additions & 5 deletions packages/blockstore-s3/test/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
/* eslint-env mocha */

import { type CreateBucketCommand, type HeadObjectCommand, S3 } from '@aws-sdk/client-s3'
import { expect } from 'aegir/chai'
import sinon from 'sinon'
import { CreateBucketCommand, HeadObjectCommand, S3 } from '@aws-sdk/client-s3'
import defer from 'p-defer'
import { interfaceBlockstoreTests } from 'interface-blockstore-tests'
import { CID } from 'multiformats/cid'

import { s3Resolve, s3Reject, S3Error, s3Mock } from './utils/s3-mock.js'
import defer from 'p-defer'
import sinon from 'sinon'
import { S3Blockstore } from '../src/index.js'
import { s3Resolve, s3Reject, S3Error, s3Mock } from './utils/s3-mock.js'

const cid = CID.parse('QmeimKZyjcBnuXmAD9zMnSjM9JodTbgGT3gutofkTqz9rE')

Expand Down
4 changes: 2 additions & 2 deletions packages/blockstore-s3/test/utils/s3-mock.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ export const s3Reject = <T> (err: T): any => {
*/
export function s3Mock (s3: S3): S3 {
const mocks: any = {}
const storage: Map<string, any> = new Map()
const storage = new Map<string, any>()

mocks.send = sinon.replace(s3, 'send', (command) => {
mocks.send = sinon.replace(s3, 'send', (command: any) => {
const commandName = command.constructor.name
const input: any = command.input

Expand Down
2 changes: 1 addition & 1 deletion packages/datastore-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@
"uint8arrays": "^4.0.2"
},
"devDependencies": {
"aegir": "^38.1.7",
"aegir": "^39.0.9",
"interface-datastore": "^8.0.0",
"interface-datastore-tests": "^5.0.0"
},
Expand Down
2 changes: 1 addition & 1 deletion packages/datastore-core/src/base.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import sort from 'it-sort'
import drain from 'it-drain'
import filter from 'it-filter'
import sort from 'it-sort'
import take from 'it-take'
import type { Batch, Datastore, Key, KeyQuery, Pair, Query } from 'interface-datastore'
import type { AbortOptions, Await, AwaitIterable } from 'interface-store'
Expand Down
2 changes: 1 addition & 1 deletion packages/datastore-core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import type { Key } from 'interface-datastore'

import * as Errors from './errors.js'
import * as shard from './shard.js'
import type { Key } from 'interface-datastore'

export { BaseDatastore } from './base.js'
export { MemoryDatastore } from './memory.js'
Expand Down
6 changes: 3 additions & 3 deletions packages/datastore-core/src/keytransform.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { BaseDatastore } from './base.js'
import map from 'it-map'
import { pipe } from 'it-pipe'
import { BaseDatastore } from './base.js'
import type { KeyTransform } from './index.js'
import type { Batch, Datastore, Key, KeyQuery, Pair, Query } from 'interface-datastore'
import type { AbortOptions, AwaitIterable } from 'interface-store'
Expand Down Expand Up @@ -28,11 +28,11 @@ export class KeyTransformDatastore extends BaseDatastore {
}

async get (key: Key, options?: AbortOptions): Promise<Uint8Array> {
return await this.child.get(this.transform.convert(key), options)
return this.child.get(this.transform.convert(key), options)
}

async has (key: Key, options?: AbortOptions): Promise<boolean> {
return await this.child.has(this.transform.convert(key), options)
return this.child.has(this.transform.convert(key), options)
}

async delete (key: Key, options?: AbortOptions): Promise<void> {
Expand Down
2 changes: 1 addition & 1 deletion packages/datastore-core/src/memory.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { BaseDatastore } from './base.js'
import { Key } from 'interface-datastore/key'
import { BaseDatastore } from './base.js'
import * as Errors from './errors.js'
import type { Pair } from 'interface-datastore'
import type { Await, AwaitIterable } from 'interface-store'
Expand Down
10 changes: 5 additions & 5 deletions packages/datastore-core/src/mount.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import filter from 'it-filter'
import take from 'it-take'
import merge from 'it-merge'
import sort from 'it-sort'
import take from 'it-take'
import { BaseDatastore } from './base.js'
import * as Errors from './errors.js'
import sort from 'it-sort'
import type { Batch, Datastore, Key, KeyQuery, Pair, Query } from 'interface-datastore'
import type { AbortOptions } from 'interface-store'

Expand Down Expand Up @@ -54,15 +54,15 @@ export class MountDatastore extends BaseDatastore {
if (match == null) {
throw Errors.notFoundError(new Error('No datastore mounted for this key'))
}
return await match.datastore.get(key, options)
return match.datastore.get(key, options)
}

async has (key: Key, options?: AbortOptions): Promise<boolean> {
const match = this._lookup(key)
if (match == null) {
return await Promise.resolve(false)
return Promise.resolve(false)
}
return await match.datastore.has(key, options)
return match.datastore.has(key, options)
}

async delete (key: Key, options?: AbortOptions): Promise<void> {
Expand Down
Loading

0 comments on commit d0f301b

Please sign in to comment.