1
0
mirror of https://github.com/redis/node-redis.git synced 2025-08-01 16:46:54 +03:00

Fix imports (#2929)

* fix: exports

align exports with v4 as much as possible

* document breaking changes

* export type

return SetOptions export
This commit is contained in:
Nikolay Karadzhov
2025-04-30 14:38:32 +03:00
committed by GitHub
parent 5295926cc0
commit 048df302e4
5 changed files with 39 additions and 15 deletions

View File

@ -141,6 +141,8 @@ In older versions, if the socket disconnects during the pipeline execution, i.e.
In v5, any unwritten commands (in the same pipeline) will be discarded. In v5, any unwritten commands (in the same pipeline) will be discarded.
- `RedisFlushModes` -> `REDIS_FLUSH_MODES` [^enum-to-constants]
## Commands ## Commands
### Redis ### Redis
@ -221,6 +223,13 @@ In v5, any unwritten commands (in the same pipeline) will be discarded.
- `FT.SUGDEL`: [^boolean-to-number] - `FT.SUGDEL`: [^boolean-to-number]
- `FT.CURSOR READ`: `cursor` type changed from `number` to `string` (in and out) to avoid issues when the number is bigger than `Number.MAX_SAFE_INTEGER`. See [here](https://github.com/redis/node-redis/issues/2561). - `FT.CURSOR READ`: `cursor` type changed from `number` to `string` (in and out) to avoid issues when the number is bigger than `Number.MAX_SAFE_INTEGER`. See [here](https://github.com/redis/node-redis/issues/2561).
- `AggregateGroupByReducers` -> `FT_AGGREGATE_GROUP_BY_REDUCERS` [^enum-to-constants]
- `AggregateSteps` -> `FT_AGGREGATE_STEPS` [^enum-to-constants]
- `RedisSearchLanguages` -> `REDISEARCH_LANGUAGE` [^enum-to-constants]
- `SchemaFieldTypes` -> `SCHEMA_FIELD_TYPE` [^enum-to-constants]
- `SchemaTextFieldPhonetics` -> `SCHEMA_TEXT_FIELD_PHONETIC` [^enum-to-constants]
- `SearchOptions` -> `FtSearchOptions`
- `VectorAlgorithms` -> `SCHEMA_VECTOR_FIELD_ALGORITHM` [^enum-to-constants]
### Time Series ### Time Series

View File

@ -2,7 +2,7 @@ export { RedisModules, RedisFunctions, RedisScripts, RespVersions, TypeMapping/*
export { RESP_TYPES } from './lib/RESP/decoder'; export { RESP_TYPES } from './lib/RESP/decoder';
export { VerbatimString } from './lib/RESP/verbatim-string'; export { VerbatimString } from './lib/RESP/verbatim-string';
export { defineScript } from './lib/lua-script'; export { defineScript } from './lib/lua-script';
// export * from './lib/errors'; export * from './lib/errors';
import RedisClient, { RedisClientOptions, RedisClientType } from './lib/client'; import RedisClient, { RedisClientOptions, RedisClientType } from './lib/client';
export { RedisClientOptions, RedisClientType }; export { RedisClientOptions, RedisClientType };
@ -20,8 +20,8 @@ import RedisSentinel from './lib/sentinel';
export { RedisSentinelOptions, RedisSentinelType } from './lib/sentinel/types'; export { RedisSentinelOptions, RedisSentinelType } from './lib/sentinel/types';
export const createSentinel = RedisSentinel.create; export const createSentinel = RedisSentinel.create;
// export { GeoReplyWith } from './lib/commands/generic-transformers'; export { GEO_REPLY_WITH, GeoReplyWith } from './lib/commands/GEOSEARCH_WITH';
// export { SetOptions } from './lib/commands/SET'; export { SetOptions } from './lib/commands/SET';
// export { RedisFlushModes } from './lib/commands/FLUSHALL'; export { REDIS_FLUSH_MODES } from './lib/commands/FLUSHALL';

View File

@ -19,11 +19,11 @@ import RedisJSON from '@redis/json';
import RediSearch from '@redis/search'; import RediSearch from '@redis/search';
import RedisTimeSeries from '@redis/time-series'; import RedisTimeSeries from '@redis/time-series';
// export * from '@redis/client'; export * from '@redis/client';
// export * from '@redis/bloom'; export * from '@redis/bloom';
// export * from '@redis/json'; export * from '@redis/json';
// export * from '@redis/search'; export * from '@redis/search';
// export * from '@redis/time-series'; export * from '@redis/time-series';
const modules = { const modules = {
...RedisBloomModules, ...RedisBloomModules,

View File

@ -1,7 +1,21 @@
export { default } from './commands'; export { default } from './commands'
export { SCHEMA_FIELD_TYPE, SchemaFieldType } from './commands/CREATE'; export { SearchReply } from './commands/SEARCH'
export { RediSearchSchema } from './commands/CREATE'
// export { RediSearchSchema, RedisSearchLanguages, SchemaFieldTypes, SchemaTextFieldPhonetics, SearchReply, VectorAlgorithms } from './commands'; export {
// export { AggregateGroupByReducers, AggregateSteps } from './commands/AGGREGATE'; REDISEARCH_LANGUAGE,
// export { SearchOptions } from './commands/SEARCH'; RediSearchLanguage,
SCHEMA_FIELD_TYPE,
SchemaFieldType,
SCHEMA_TEXT_FIELD_PHONETIC,
SchemaTextFieldPhonetic,
SCHEMA_VECTOR_FIELD_ALGORITHM,
SchemaVectorFieldAlgorithm
} from './commands/CREATE'
export {
FT_AGGREGATE_GROUP_BY_REDUCERS,
FtAggregateGroupByReducer,
FT_AGGREGATE_STEPS,
FtAggregateStep
} from './commands/AGGREGATE'
export { FtSearchOptions } from './commands/SEARCH'

View File

@ -5,3 +5,4 @@ export {
} from './commands'; } from './commands';
export { TIME_SERIES_AGGREGATION_TYPE, TimeSeriesAggregationType } from './commands/CREATERULE'; export { TIME_SERIES_AGGREGATION_TYPE, TimeSeriesAggregationType } from './commands/CREATERULE';
export { TIME_SERIES_BUCKET_TIMESTAMP, TimeSeriesBucketTimestamp } from './commands/RANGE'; export { TIME_SERIES_BUCKET_TIMESTAMP, TimeSeriesBucketTimestamp } from './commands/RANGE';
export { TIME_SERIES_REDUCERS, TimeSeriesReducer } from './commands/MRANGE_GROUPBY';