1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-04 15:02:09 +03:00

add node: to node "core modules" imports

This commit is contained in:
Leibale
2023-09-18 15:03:07 -04:00
parent 3fa54fef58
commit 266d635a60
495 changed files with 528 additions and 528 deletions

View File

@@ -1,10 +1,10 @@
import yargs from 'yargs'; import yargs from 'yargs';
import { hideBin } from 'yargs/helpers'; import { hideBin } from 'yargs/helpers';
import { promises as fs } from 'fs'; import { promises as fs } from 'node:fs';
import { fork } from 'child_process'; import { fork } from 'node:child_process';
import { URL, fileURLToPath } from 'url'; import { URL, fileURLToPath } from 'node:url';
import { once } from 'events'; import { once } from 'node:events';
import { extname } from 'path'; import { extname } from 'node:path';
async function getPathChoices() { async function getPathChoices() {
const dirents = await fs.readdir(new URL('.', import.meta.url), { const dirents = await fs.readdir(new URL('.', import.meta.url), {

View File

@@ -1,6 +1,6 @@
import { createClient } from 'redis-v3'; import { createClient } from 'redis-v3';
import { once } from 'events'; import { once } from 'node:events';
import { promisify } from 'util'; import { promisify } from 'node:util';
export default async (host) => { export default async (host) => {
const client = createClient({ host }), const client = createClient({ host }),

View File

@@ -1,7 +1,7 @@
import yargs from 'yargs'; import yargs from 'yargs';
import { hideBin } from 'yargs/helpers'; import { hideBin } from 'yargs/helpers';
import { basename } from 'path'; import { basename } from 'node:path';
import { promises as fs } from 'fs'; import { promises as fs } from 'node:fs';
import * as hdr from 'hdr-histogram-js'; import * as hdr from 'hdr-histogram-js';
hdr.initWebAssemblySync(); hdr.initWebAssemblySync();

View File

@@ -1,6 +1,6 @@
import yargs from 'yargs'; import yargs from 'yargs';
import { hideBin } from 'yargs/helpers'; import { hideBin } from 'yargs/helpers';
import { randomBytes } from 'crypto'; import { randomBytes } from 'node:crypto';
const { size } = yargs(hideBin(process.argv)) const { size } = yargs(hideBin(process.argv))
.option('size', { .option('size', {

View File

@@ -1,6 +1,6 @@
import { createClient } from 'redis-v3'; import { createClient } from 'redis-v3';
import { once } from 'events'; import { once } from 'node:events';
import { promisify } from 'util'; import { promisify } from 'node:util';
export default async (host, { randomString }) => { export default async (host, { randomString }) => {
const client = createClient({ host }), const client = createClient({ host }),

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import ADD from './ADD'; import ADD from './ADD';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import CARD from './CARD'; import CARD from './CARD';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import EXISTS from './EXISTS'; import EXISTS from './EXISTS';

View File

@@ -1,4 +1,4 @@
// import { strict as assert } from 'assert'; // import { strict as assert } from 'node:assert';
// import testUtils, { GLOBAL } from '../../test-utils'; // import testUtils, { GLOBAL } from '../../test-utils';
// import { transformArguments } from './INFO'; // import { transformArguments } from './INFO';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import INSERT from './INSERT'; import INSERT from './INSERT';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import LOADCHUNK from './LOADCHUNK'; import LOADCHUNK from './LOADCHUNK';
import { RESP_TYPES } from '@redis/client'; import { RESP_TYPES } from '@redis/client';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import MADD from './MADD'; import MADD from './MADD';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import MEXISTS from './MEXISTS'; import MEXISTS from './MEXISTS';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import RESERVE from './RESERVE'; import RESERVE from './RESERVE';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import SCANDUMP from './SCANDUMP'; import SCANDUMP from './SCANDUMP';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import INCRBY from './INCRBY'; import INCRBY from './INCRBY';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import INFO from './INFO'; import INFO from './INFO';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import INITBYDIM from './INITBYDIM'; import INITBYDIM from './INITBYDIM';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import INITBYPROB from './INITBYPROB'; import INITBYPROB from './INITBYPROB';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import MERGE from './MERGE'; import MERGE from './MERGE';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import QUERY from './QUERY'; import QUERY from './QUERY';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import ADD from './ADD'; import ADD from './ADD';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import ADDNX from './ADDNX'; import ADDNX from './ADDNX';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import COUNT from './COUNT'; import COUNT from './COUNT';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import DEL from './DEL'; import DEL from './DEL';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import EXISTS from './EXISTS'; import EXISTS from './EXISTS';

View File

@@ -1,4 +1,4 @@
// import { strict as assert } from 'assert'; // import { strict as assert } from 'node:assert';
// import testUtils, { GLOBAL } from '../../test-utils'; // import testUtils, { GLOBAL } from '../../test-utils';
// import { transformArguments } from './INFO'; // import { transformArguments } from './INFO';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import INSERT from './INSERT'; import INSERT from './INSERT';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import INSERTNX from './INSERTNX'; import INSERTNX from './INSERTNX';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import LOADCHUNK from './LOADCHUNK'; import LOADCHUNK from './LOADCHUNK';
import { RESP_TYPES } from '@redis/client'; import { RESP_TYPES } from '@redis/client';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import RESERVE from './RESERVE'; import RESERVE from './RESERVE';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import SCANDUMP from './SCANDUMP'; import SCANDUMP from './SCANDUMP';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import ADD from './ADD'; import ADD from './ADD';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import BYRANK from './BYRANK'; import BYRANK from './BYRANK';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import BYREVRANK from './BYREVRANK'; import BYREVRANK from './BYREVRANK';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import CDF from './CDF'; import CDF from './CDF';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import CREATE from './CREATE'; import CREATE from './CREATE';

View File

@@ -1,4 +1,4 @@
// import { strict as assert } from 'assert'; // import { strict as assert } from 'node:assert';
// import testUtils, { GLOBAL } from '../../test-utils'; // import testUtils, { GLOBAL } from '../../test-utils';
// import { transformArguments } from './INFO'; // import { transformArguments } from './INFO';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import MAX from './MAX'; import MAX from './MAX';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import MERGE from './MERGE'; import MERGE from './MERGE';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import MIN from './MIN'; import MIN from './MIN';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import QUANTILE from './QUANTILE'; import QUANTILE from './QUANTILE';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import RANK from './RANK'; import RANK from './RANK';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import RESET from './RESET'; import RESET from './RESET';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import REVRANK from './REVRANK'; import REVRANK from './REVRANK';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import TRIMMED_MEAN from './TRIMMED_MEAN'; import TRIMMED_MEAN from './TRIMMED_MEAN';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import ADD from './ADD'; import ADD from './ADD';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import COUNT from './COUNT'; import COUNT from './COUNT';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import INCRBY from './INCRBY'; import INCRBY from './INCRBY';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import INFO from './INFO'; import INFO from './INFO';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import LIST from './LIST'; import LIST from './LIST';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import LIST_WITHCOUNT from './LIST_WITHCOUNT'; import LIST_WITHCOUNT from './LIST_WITHCOUNT';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import QUERY from './QUERY'; import QUERY from './QUERY';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../../test-utils'; import testUtils, { GLOBAL } from '../../test-utils';
import RESERVE from './RESERVE'; import RESERVE from './RESERVE';

View File

@@ -1,4 +1,4 @@
// import { strict as assert } from 'assert'; // import { strict as assert } from 'node:assert';
// import { SinonSpy, spy } from 'sinon'; // import { SinonSpy, spy } from 'sinon';
// import { Decoder, RESP_TYPES } from './decoder'; // import { Decoder, RESP_TYPES } from './decoder';
// import { ErrorReply } from '../errors'; // import { ErrorReply } from '../errors';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import { describe } from 'mocha'; import { describe } from 'mocha';
import encodeCommand from './encoder'; import encodeCommand from './encoder';

View File

@@ -4,7 +4,7 @@ import { Decoder, PUSH_TYPE_MAPPING, RESP_TYPES } from '../RESP/decoder';
import { CommandArguments, TypeMapping, ReplyUnion, RespVersions } from '../RESP/types'; import { CommandArguments, TypeMapping, ReplyUnion, RespVersions } from '../RESP/types';
import { ChannelListeners, PubSub, PubSubCommand, PubSubListener, PubSubType, PubSubTypeListeners } from './pub-sub'; import { ChannelListeners, PubSub, PubSubCommand, PubSubListener, PubSubType, PubSubTypeListeners } from './pub-sub';
import { AbortError, ErrorReply } from '../errors'; import { AbortError, ErrorReply } from '../errors';
import { EventEmitter } from 'stream'; import { EventEmitter } from 'node:stream';
export interface CommandOptions<T = TypeMapping> { export interface CommandOptions<T = TypeMapping> {
chainId?: symbol; chainId?: symbol;

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL, waitTillBeenCalled } from '../test-utils'; import testUtils, { GLOBAL, waitTillBeenCalled } from '../test-utils';
import RedisClient, { RedisClientType } from '.'; import RedisClient, { RedisClientType } from '.';
// import { RedisClientMultiCommandType } from './multi-command'; // import { RedisClientMultiCommandType } from './multi-command';
@@ -6,9 +6,9 @@ import RedisClient, { RedisClientType } from '.';
import { AbortError, ClientClosedError, ClientOfflineError, ConnectionTimeoutError, DisconnectsClientError, SocketClosedUnexpectedlyError, WatchError } from '../errors'; import { AbortError, ClientClosedError, ClientOfflineError, ConnectionTimeoutError, DisconnectsClientError, SocketClosedUnexpectedlyError, WatchError } from '../errors';
import { defineScript } from '../lua-script'; import { defineScript } from '../lua-script';
// import { spy } from 'sinon'; // import { spy } from 'sinon';
import { once } from 'events'; import { once } from 'node:events';
// import { ClientKillFilters } from '../commands/CLIENT_KILL'; // import { ClientKillFilters } from '../commands/CLIENT_KILL';
// import { promisify } from 'util'; // import { promisify } from 'node:util';
import { MATH_FUNCTION, loadMathFunction } from '../commands/FUNCTION_LOAD.spec'; import { MATH_FUNCTION, loadMathFunction } from '../commands/FUNCTION_LOAD.spec';
import { RESP_TYPES } from '../RESP/decoder'; import { RESP_TYPES } from '../RESP/decoder';
import { SortedSetMember } from '../commands/generic-transformers'; import { SortedSetMember } from '../commands/generic-transformers';

View File

@@ -1,11 +1,11 @@
import COMMANDS from '../commands'; import COMMANDS from '../commands';
import RedisSocket, { RedisSocketOptions, RedisTlsSocketOptions } from './socket'; import RedisSocket, { RedisSocketOptions, RedisTlsSocketOptions } from './socket';
import RedisCommandsQueue, { CommandOptions } from './commands-queue'; import RedisCommandsQueue, { CommandOptions } from './commands-queue';
import { EventEmitter } from 'events'; import { EventEmitter } from 'node:events';
import { attachConfig, functionArgumentsPrefix, getTransformReply, scriptArgumentsPrefix } from '../commander'; import { attachConfig, functionArgumentsPrefix, getTransformReply, scriptArgumentsPrefix } from '../commander';
import { ClientClosedError, ClientOfflineError, DisconnectsClientError, WatchError } from '../errors'; import { ClientClosedError, ClientOfflineError, DisconnectsClientError, WatchError } from '../errors';
import { URL } from 'url'; import { URL } from 'node:url';
import { TcpSocketConnectOpts } from 'net'; import { TcpSocketConnectOpts } from 'node:net';
import { PubSubType, PubSubListener, PubSubTypeListeners, ChannelListeners } from './pub-sub'; import { PubSubType, PubSubListener, PubSubTypeListeners, ChannelListeners } from './pub-sub';
import { Command, CommandSignature, TypeMapping, CommanderConfig, RedisFunction, RedisFunctions, RedisModules, RedisScript, RedisScripts, ReplyUnion, RespVersions, RedisArgument } from '../RESP/types'; import { Command, CommandSignature, TypeMapping, CommanderConfig, RedisFunction, RedisFunctions, RedisModules, RedisScript, RedisScripts, ReplyUnion, RespVersions, RedisArgument } from '../RESP/types';
import RedisClientMultiCommand, { RedisClientMultiCommandType } from './multi-command'; import RedisClientMultiCommand, { RedisClientMultiCommandType } from './multi-command';

View File

@@ -1,10 +1,10 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils'; import testUtils, { GLOBAL } from '../test-utils';
import { promisify } from 'util'; import { promisify } from 'node:util';
import { RedisLegacyClientType } from './legacy-mode'; import { RedisLegacyClientType } from './legacy-mode';
import { ErrorReply } from '../errors'; import { ErrorReply } from '../errors';
import { RedisClientType } from '.'; import { RedisClientType } from '.';
import { once } from 'events'; import { once } from 'node:events';
function testWithLegacyClient(title: string, fn: (legacy: RedisLegacyClientType, client: RedisClientType) => Promise<unknown>) { function testWithLegacyClient(title: string, fn: (legacy: RedisLegacyClientType, client: RedisClientType) => Promise<unknown>) {
testUtils.testWithClient(title, client => fn(client.legacy(), client), GLOBAL.SERVERS.OPEN); testUtils.testWithClient(title, client => fn(client.legacy(), client), GLOBAL.SERVERS.OPEN);

View File

@@ -1,7 +1,7 @@
import COMMANDS from '../commands'; import COMMANDS from '../commands';
import { Command, RedisArgument, RedisFunction, RedisFunctions, RedisModules, RedisScript, RedisScripts, RespVersions, TypeMapping } from '../RESP/types'; import { Command, RedisArgument, RedisFunction, RedisFunctions, RedisModules, RedisScript, RedisScripts, RespVersions, TypeMapping } from '../RESP/types';
import RedisClient, { RedisClientType, RedisClientOptions, RedisClientExtensions } from '.'; import RedisClient, { RedisClientType, RedisClientOptions, RedisClientExtensions } from '.';
import { EventEmitter } from 'events'; import { EventEmitter } from 'node:events';
import { DoublyLinkedNode, DoublyLinkedList, SinglyLinkedList } from './linked-list'; import { DoublyLinkedNode, DoublyLinkedList, SinglyLinkedList } from './linked-list';
import { TimeoutError } from '../errors'; import { TimeoutError } from '../errors';
import { attachConfig, functionArgumentsPrefix, getTransformReply, scriptArgumentsPrefix } from '../commander'; import { attachConfig, functionArgumentsPrefix, getTransformReply, scriptArgumentsPrefix } from '../commander';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import { PubSub, PubSubType } from './pub-sub'; import { PubSub, PubSubType } from './pub-sub';
describe('PubSub', () => { describe('PubSub', () => {

View File

@@ -1,6 +1,6 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import { spy } from 'sinon'; import { spy } from 'sinon';
import { once } from 'events'; import { once } from 'node:events';
import RedisSocket, { RedisSocketOptions } from './socket'; import RedisSocket, { RedisSocketOptions } from './socket';
describe('Socket', () => { describe('Socket', () => {

View File

@@ -1,6 +1,6 @@
import { EventEmitter } from 'events'; import { EventEmitter } from 'node:events';
import * as net from 'net'; import * as net from 'node:net';
import * as tls from 'tls'; import * as tls from 'node:tls';
import { ConnectionTimeoutError, ClientClosedError, SocketClosedUnexpectedlyError, ReconnectStrategyError } from '../errors'; import { ConnectionTimeoutError, ClientClosedError, SocketClosedUnexpectedlyError, ReconnectStrategyError } from '../errors';
import { setTimeout } from 'timers/promises'; import { setTimeout } from 'timers/promises';
import { RedisArgument } from '../RESP/types'; import { RedisArgument } from '../RESP/types';

View File

@@ -1,8 +1,8 @@
import { RedisClusterClientOptions, RedisClusterOptions } from '.'; import { RedisClusterClientOptions, RedisClusterOptions } from '.';
import { RootNodesUnavailableError } from '../errors'; import { RootNodesUnavailableError } from '../errors';
import RedisClient, { RedisClientOptions, RedisClientType } from '../client'; import RedisClient, { RedisClientOptions, RedisClientType } from '../client';
import { types } from 'util'; import { types } from 'node:util';
import { EventEmitter } from 'stream'; import { EventEmitter } from 'node:stream';
import { ChannelListeners, PubSubType, PubSubTypeListeners } from '../client/pub-sub'; import { ChannelListeners, PubSubType, PubSubTypeListeners } from '../client/pub-sub';
import { RedisArgument, RedisFunctions, RedisModules, RedisScripts, RespVersions } from '../RESP/types'; import { RedisArgument, RedisFunctions, RedisModules, RedisScripts, RespVersions } from '../RESP/types';

View File

@@ -1,4 +1,4 @@
// import { strict as assert } from 'assert'; // import { strict as assert } from 'node:assert';
// import testUtils, { GLOBAL, waitTillBeenCalled } from '../test-utils'; // import testUtils, { GLOBAL, waitTillBeenCalled } from '../test-utils';
// import RedisCluster from '.'; // import RedisCluster from '.';
// import { ClusterSlotStates } from '../commands/CLUSTER_SETSLOT'; // import { ClusterSlotStates } from '../commands/CLUSTER_SETSLOT';

View File

@@ -2,7 +2,7 @@ import { RedisClientOptions, RedisClientType } from '../client';
import { CommandOptions } from '../client/commands-queue'; import { CommandOptions } from '../client/commands-queue';
import { Command, CommandArguments, CommanderConfig, CommandPolicies, CommandWithPoliciesSignature, TypeMapping, RedisArgument, RedisFunction, RedisFunctions, RedisModules, RedisScript, RedisScripts, ReplyUnion, RespVersions } from '../RESP/types'; import { Command, CommandArguments, CommanderConfig, CommandPolicies, CommandWithPoliciesSignature, TypeMapping, RedisArgument, RedisFunction, RedisFunctions, RedisModules, RedisScript, RedisScripts, ReplyUnion, RespVersions } from '../RESP/types';
import COMMANDS from '../commands'; import COMMANDS from '../commands';
import { EventEmitter } from 'events'; import { EventEmitter } from 'node:events';
import { attachConfig, functionArgumentsPrefix, getTransformReply, scriptArgumentsPrefix } from '../commander'; import { attachConfig, functionArgumentsPrefix, getTransformReply, scriptArgumentsPrefix } from '../commander';
import RedisClusterSlots, { NodeAddressMap, ShardNode } from './cluster-slots'; import RedisClusterSlots, { NodeAddressMap, ShardNode } from './cluster-slots';
import RedisClusterMultiCommand, { RedisClusterMultiCommandType } from './multi-command'; import RedisClusterMultiCommand, { RedisClusterMultiCommandType } from './multi-command';
@@ -16,14 +16,14 @@ interface ClusterCommander<
S extends RedisScripts, S extends RedisScripts,
RESP extends RespVersions, RESP extends RespVersions,
TYPE_MAPPING extends TypeMapping, TYPE_MAPPING extends TypeMapping,
POLICIES extends CommandPolicies // POLICIES extends CommandPolicies
> extends CommanderConfig<M, F, S, RESP>{ > extends CommanderConfig<M, F, S, RESP>{
commandOptions?: ClusterCommandOptions<TYPE_MAPPING, POLICIES>; commandOptions?: ClusterCommandOptions<TYPE_MAPPING/*, POLICIES*/>;
} }
export type RedisClusterClientOptions = Omit< export type RedisClusterClientOptions = Omit<
RedisClientOptions, RedisClientOptions,
keyof ClusterCommander<RedisModules, RedisFunctions, RedisScripts, RespVersions, TypeMapping, CommandPolicies> keyof ClusterCommander<RedisModules, RedisFunctions, RedisScripts, RespVersions, TypeMapping/*, CommandPolicies*/>
>; >;
export interface RedisClusterOptions< export interface RedisClusterOptions<
@@ -32,8 +32,8 @@ export interface RedisClusterOptions<
S extends RedisScripts = RedisScripts, S extends RedisScripts = RedisScripts,
RESP extends RespVersions = RespVersions, RESP extends RespVersions = RespVersions,
TYPE_MAPPING extends TypeMapping = TypeMapping, TYPE_MAPPING extends TypeMapping = TypeMapping,
POLICIES extends CommandPolicies = CommandPolicies // POLICIES extends CommandPolicies = CommandPolicies
> extends ClusterCommander<M, F, S, RESP, TYPE_MAPPING, POLICIES> { > extends ClusterCommander<M, F, S, RESP, TYPE_MAPPING/*, POLICIES*/> {
/** /**
* Should contain details for some of the cluster nodes that the client will use to discover * Should contain details for some of the cluster nodes that the client will use to discover
* the "cluster topology". We recommend including details for at least 3 nodes here. * the "cluster topology". We recommend including details for at least 3 nodes here.
@@ -68,7 +68,7 @@ export interface RedisClusterOptions<
type WithCommands< type WithCommands<
RESP extends RespVersions, RESP extends RespVersions,
TYPE_MAPPING extends TypeMapping, TYPE_MAPPING extends TypeMapping,
POLICIES extends CommandPolicies // POLICIES extends CommandPolicies
> = { > = {
[P in keyof typeof COMMANDS]: CommandWithPoliciesSignature<(typeof COMMANDS)[P], RESP, TYPE_MAPPING, POLICIES>; [P in keyof typeof COMMANDS]: CommandWithPoliciesSignature<(typeof COMMANDS)[P], RESP, TYPE_MAPPING, POLICIES>;
}; };
@@ -79,8 +79,8 @@ export type RedisClusterType<
S extends RedisScripts = {}, S extends RedisScripts = {},
RESP extends RespVersions = 2, RESP extends RespVersions = 2,
TYPE_MAPPING extends TypeMapping = {}, TYPE_MAPPING extends TypeMapping = {},
POLICIES extends CommandPolicies = {} // POLICIES extends CommandPolicies = {}
> = RedisCluster<M, F, S, RESP, TYPE_MAPPING, POLICIES> & WithCommands<RESP, TYPE_MAPPING, POLICIES>; > = RedisCluster<M, F, S, RESP, TYPE_MAPPING, POLICIES> & WithCommands<RESP, TYPE_MAPPING/*, POLICIES*/>;
// & WithModules<M> & WithFunctions<F> & WithScripts<S> // & WithModules<M> & WithFunctions<F> & WithScripts<S>
export interface ClusterCommandOptions< export interface ClusterCommandOptions<

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils'; import testUtils, { GLOBAL } from '../test-utils';
import ACL_CAT from './ACL_CAT'; import ACL_CAT from './ACL_CAT';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils'; import testUtils, { GLOBAL } from '../test-utils';
import ACL_DELUSER from './ACL_DELUSER'; import ACL_DELUSER from './ACL_DELUSER';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils'; import testUtils, { GLOBAL } from '../test-utils';
import ACL_DRYRUN from './ACL_DRYRUN'; import ACL_DRYRUN from './ACL_DRYRUN';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils'; import testUtils, { GLOBAL } from '../test-utils';
import ACL_GENPASS from './ACL_GENPASS'; import ACL_GENPASS from './ACL_GENPASS';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils'; import testUtils, { GLOBAL } from '../test-utils';
import ACL_GETUSER from './ACL_GETUSER'; import ACL_GETUSER from './ACL_GETUSER';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils'; import testUtils, { GLOBAL } from '../test-utils';
import ACL_LIST from './ACL_LIST'; import ACL_LIST from './ACL_LIST';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils from '../test-utils'; import testUtils from '../test-utils';
import ACL_LOAD from './ACL_LOAD'; import ACL_LOAD from './ACL_LOAD';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils'; import testUtils, { GLOBAL } from '../test-utils';
import ACL_LOG from './ACL_LOG'; import ACL_LOG from './ACL_LOG';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils'; import testUtils, { GLOBAL } from '../test-utils';
import ACL_LOG_RESET from './ACL_LOG_RESET'; import ACL_LOG_RESET from './ACL_LOG_RESET';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils from '../test-utils'; import testUtils from '../test-utils';
import ACL_SAVE from './ACL_SAVE'; import ACL_SAVE from './ACL_SAVE';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils from '../test-utils'; import testUtils from '../test-utils';
import ACL_SETUSER from './ACL_SETUSER'; import ACL_SETUSER from './ACL_SETUSER';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils from '../test-utils'; import testUtils from '../test-utils';
import ACL_USERS from './ACL_USERS'; import ACL_USERS from './ACL_USERS';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils from '../test-utils'; import testUtils from '../test-utils';
import ACL_WHOAMI from './ACL_WHOAMI'; import ACL_WHOAMI from './ACL_WHOAMI';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils'; import testUtils, { GLOBAL } from '../test-utils';
import APPEND from './APPEND'; import APPEND from './APPEND';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import ASKING from './ASKING'; import ASKING from './ASKING';
describe('ASKING', () => { describe('ASKING', () => {

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import AUTH from './AUTH'; import AUTH from './AUTH';
describe('AUTH', () => { describe('AUTH', () => {

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils'; import testUtils, { GLOBAL } from '../test-utils';
import BGREWRITEAOF from './BGREWRITEAOF'; import BGREWRITEAOF from './BGREWRITEAOF';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils'; import testUtils, { GLOBAL } from '../test-utils';
import BGSAVE from './BGSAVE'; import BGSAVE from './BGSAVE';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils'; import testUtils, { GLOBAL } from '../test-utils';
import BITCOUNT from './BITCOUNT'; import BITCOUNT from './BITCOUNT';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils'; import testUtils, { GLOBAL } from '../test-utils';
import BITFIELD from './BITFIELD'; import BITFIELD from './BITFIELD';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils'; import testUtils, { GLOBAL } from '../test-utils';
import BITFIELD_RO from './BITFIELD_RO'; import BITFIELD_RO from './BITFIELD_RO';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils'; import testUtils, { GLOBAL } from '../test-utils';
import BITOP from './BITOP'; import BITOP from './BITOP';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils'; import testUtils, { GLOBAL } from '../test-utils';
import BITPOS from './BITPOS'; import BITPOS from './BITPOS';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils'; import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
import BLMOVE from './BLMOVE'; import BLMOVE from './BLMOVE';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils'; import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
import BLMPOP from './BLMPOP'; import BLMPOP from './BLMPOP';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils'; import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
import BLPOP from './BLPOP'; import BLPOP from './BLPOP';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils'; import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
import BRPOP from './BRPOP'; import BRPOP from './BRPOP';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils'; import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
import BRPOPLPUSH from './BRPOPLPUSH'; import BRPOPLPUSH from './BRPOPLPUSH';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils'; import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
import BZMPOP from './BZMPOP'; import BZMPOP from './BZMPOP';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils'; import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
import BZPOPMAX from './BZPOPMAX'; import BZPOPMAX from './BZPOPMAX';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils'; import testUtils, { GLOBAL, BLOCKING_MIN_VALUE } from '../test-utils';
import BZPOPMIN from './BZPOPMIN'; import BZPOPMIN from './BZPOPMIN';

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import CLIENT_CACHING from './CLIENT_CACHING'; import CLIENT_CACHING from './CLIENT_CACHING';
describe('CLIENT CACHING', () => { describe('CLIENT CACHING', () => {

View File

@@ -1,4 +1,4 @@
import { strict as assert } from 'assert'; import { strict as assert } from 'node:assert';
import testUtils, { GLOBAL } from '../test-utils'; import testUtils, { GLOBAL } from '../test-utils';
import CLIENT_GETNAME from './CLIENT_GETNAME'; import CLIENT_GETNAME from './CLIENT_GETNAME';

Some files were not shown because too many files have changed in this diff Show More