Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@keyv/redis

Package Overview
Dependencies
Maintainers
2
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@keyv/redis - npm Package Compare versions

Comparing version 2.8.1 to 2.8.2

23

dist/index.d.ts
/// <reference types="node" />
import EventEmitter from 'events';
import { type KeyvStoreAdapter, type StoredData } from 'keyv';
import { type KeyvRedisOptions, type KeyvUriOptions } from './types';
declare class KeyvRedis extends EventEmitter implements KeyvStoreAdapter {
import { type ClearOutput, type DeleteOutput, type DisconnectOutput, type GetManyOutput, type GetOutput, type HasOutput, type IteratorOutput, type KeyvRedisOptions, type KeyvUriOptions, type SetOutput } from './types';
declare class KeyvRedis<Value = any> extends EventEmitter {
ttlSupport: boolean;

@@ -13,12 +12,12 @@ namespace?: string;

_getKeyName: (key: string) => string;
get<Value>(key: string): Promise<StoredData<Value> | undefined>;
getMany<Value>(keys: string[]): Promise<Array<StoredData<Value | undefined>>>;
set(key: string, value: any, ttl?: number): Promise<undefined>;
delete(key: string): Promise<boolean>;
deleteMany(keys: string[]): Promise<boolean>;
clear(): Promise<void>;
iterator(namespace?: string): AsyncGenerator<any[], void, unknown>;
has(key: string): Promise<boolean>;
disconnect(): Promise<any>;
get(key: string): GetOutput<Value>;
getMany(keys: string[]): GetManyOutput<Value>;
set(key: string, value: Value, ttl?: number): SetOutput;
delete(key: string): DeleteOutput;
deleteMany(keys: string[]): DeleteOutput;
clear(): ClearOutput;
iterator(namespace?: string): IteratorOutput;
has(key: string): HasOutput;
disconnect(): DisconnectOutput;
}
export = KeyvRedis;

@@ -13,3 +13,3 @@ "use strict";

if (!this.opts.useRedisSets) {
return `sets:${this._getNamespace()}:${key}`;
return `sets:${key}`;
}

@@ -105,3 +105,3 @@ return key;

else {
const pattern = `sets:${this._getNamespace()}:*`;
const pattern = 'sets:*';
const keys = await this.redis.keys(pattern);

@@ -108,0 +108,0 @@ await this.redis.unlink(keys);

@@ -0,1 +1,2 @@

import type { StoredData } from 'keyv';
import { type Redis, type Cluster } from 'ioredis';

@@ -10,1 +11,10 @@ export type KeyvRedisOptions = {

export type KeyvUriOptions = string | KeyvRedisOptions | Redis | Cluster;
export type IteratorOutput = AsyncGenerator<any, void, any>;
export type GetOutput<Value> = Promise<Value | undefined>;
export type GetManyOutput<Value> = Promise<Array<StoredData<Value | undefined>>>;
export type SetOutput = Promise<any>;
export type DeleteOutput = Promise<boolean>;
export type DeleteManyOutput = Promise<boolean>;
export type ClearOutput = Promise<void>;
export type HasOutput = Promise<boolean>;
export type DisconnectOutput = Promise<void>;
{
"name": "@keyv/redis",
"version": "2.8.1",
"version": "2.8.2",
"description": "Redis storage adapter for Keyv",

@@ -10,3 +10,3 @@ "main": "dist/index.js",

"prepare": "yarn build",
"test": "xo --fix && c8 ava --serial",
"test": "xo && c8 ava --serial",
"test:ci": "xo && ava --serial",

@@ -77,3 +77,3 @@ "clean": "rm -rf node_modules && rm -rf ./coverage"

"timekeeper": "^2.3.1",
"tsd": "^0.29.0"
"tsd": "^0.30.3"
},

@@ -80,0 +80,0 @@ "tsd": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc