diff --git a/packages/etcd/package.json b/packages/etcd/package.json index de12993d2..57b4b566e 100644 --- a/packages/etcd/package.json +++ b/packages/etcd/package.json @@ -56,7 +56,6 @@ }, "homepage": "https://github.com/jaredwray/keyv", "dependencies": { - "cockatiel": "^3.1.1", "etcd3": "^1.1.0" }, "devDependencies": { diff --git a/packages/etcd/src/index.ts b/packages/etcd/src/index.ts index 5f60196c5..98152f25c 100644 --- a/packages/etcd/src/index.ts +++ b/packages/etcd/src/index.ts @@ -1,7 +1,5 @@ import {EventEmitter} from 'events'; -import type {Lease} from 'etcd3'; -import {Etcd3} from 'etcd3'; -import {ExponentialBackoff, handleAll, retry} from 'cockatiel'; +import {Etcd3, type Lease} from 'etcd3'; import type {StoredData} from 'keyv'; import type {ClearOutput, DeleteManyOutput, DeleteOutput, GetOutput, HasOutput, SetOutput} from './types'; @@ -46,19 +44,8 @@ class KeyvEtcd extends EventEmitter { this.opts.url = this.opts.url!.replace(/^etcd:\/\//, ''); - const policy = retry(handleAll, {backoff: new ExponentialBackoff()}); - policy.onFailure(error => { - this.emit('error', error.reason); - }); - this.client = new Etcd3({ hosts: this.opts.url, - faultHandling: { - // @ts-expect-error - iPolicy - host: () => policy, - // @ts-expect-error - iPolicy - global: policy, - }, }); // Https://github.com/microsoft/etcd3/issues/105 diff --git a/packages/redis/src/types.ts b/packages/redis/src/types.ts index d85aeb690..8de86270f 100644 --- a/packages/redis/src/types.ts +++ b/packages/redis/src/types.ts @@ -1,6 +1,5 @@ -import type{StoredData} from 'keyv'; -import {type Cluster} from 'ioredis'; -import type Redis from 'ioredis'; +import type {StoredData} from 'keyv'; +import {type Redis, type Cluster} from 'ioredis'; export type KeyvRedisOptions = { [K in keyof Redis]?: Redis[K]; diff --git a/packages/test-suite/src/values.ts b/packages/test-suite/src/values.ts index 97dddbdb7..7961ccd64 100644 --- a/packages/test-suite/src/values.ts +++ b/packages/test-suite/src/values.ts @@ -1,7 +1,6 @@ import {Buffer} from 'buffer'; import type {TestFn} from 'ava'; import type KeyvModule from 'keyv'; -import type bigNumber from 'bignumber.js'; import JSONbig from 'json-bigint'; import {BigNumber} from 'bignumber.js'; import type {KeyvStoreFn} from './types'; @@ -88,7 +87,7 @@ const keyvValueTests = (test: TestFn, Keyv: typeof KeyvModule, store: KeyvStoreF const keyv = new Keyv({store: store(), serialize: JSONbig.stringify, deserialize: JSONbig.parse}); - const value = BigInt('9223372036854775807') as unknown as bigNumber.Value; + const value = BigInt('9223372036854775807') as unknown as BigNumber.Value; await keyv.set('foo', value); // eslint-disable-next-line new-cap t.deepEqual(await keyv.get('foo'), BigNumber(value));