1
0
mirror of https://github.com/redis/node-redis.git synced 2025-12-09 21:21:11 +03:00
Commit Graph

90 Commits

Author SHA1 Message Date
Bobby I.
0438865b8a chore: Update default Redis version to 8.4-M01-pre in tests (#3092) 2025-10-06 13:53:37 +03:00
GitHub Action
43e5a582dd Release time-series@5.9.0-beta.2 2025-10-01 13:47:01 +00:00
GitHub Action
87d0e4f3f9 Release time-series@5.9.0-beta.1 2025-09-26 08:53:11 +00:00
GitHub Action
aee6f05853 Release time-series@5.9.0-beta.0 2025-09-10 09:04:41 +00:00
Nikolay Karadzhov
208a0d250f Hitless upgrades (#3021)
* feat(errors): Add specialized timeout error types for maintenance scenarios

- Added `SocketTimeoutDuringMaintananceError`, a subclass of `TimeoutError`, to handle socket timeouts during maintenance.
- Added `CommandTimeoutDuringMaintenanceError`, another subclass of `TimeoutError`, to address command write timeouts during maintenance.

* feat(linked-list): Add EmptyAwareSinglyLinkedList and enhance DoublyLinkedList functionality

- Introduced `EmptyAwareSinglyLinkedList`, a subclass of `SinglyLinkedList` that emits an `empty` event when the list becomes empty due to `reset`, `shift`, or `remove` operations.
- Added `nodes()` iterator method to `DoublyLinkedList` for iterating over nodes directly.
- Enhanced unit tests for `DoublyLinkedList` and `SinglyLinkedList` to cover edge cases and new functionality.
- Added comprehensive tests for `EmptyAwareSinglyLinkedList` to validate `empty` event emission under various scenarios.
- Improved code formatting and consistency.

* refactor(commands-queue): Improve push notification handling

- Replaced `setInvalidateCallback` with a more flexible `addPushHandler` method, allowing multiple handlers for push notifications.
- Introduced the `PushHandler` type to standardize push notification processing.
- Refactored `RedisCommandsQueue` to use a `#pushHandlers` array, enabling dynamic and modular handling of push notifications.
- Updated `RedisClient` to leverage the new handler mechanism for `invalidate` push notifications, simplifying and decoupling logic.

* feat(commands-queue): Add method to wait for in-flight commands to complete

- Introduced `waitForInflightCommandsToComplete` method to asynchronously wait for all in-flight commands to finish processing.
- Utilized the `empty` event from `#waitingForReply` to signal when all commands have been completed.

* feat(commands-queue): Introduce maintenance mode support for commands-queue

- Added `#maintenanceCommandTimeout` and `setMaintenanceCommandTimeout` method to dynamically adjust command timeouts during maintenance

* refator(client): Extract socket event listener setup into helper method

* refactor(socket): Add maintenance mode support and dynamic timeout handling

- Added `#maintenanceTimeout` and `setMaintenanceTimeout` method to dynamically adjust socket timeouts during maintenance.

* feat(client): Add Redis Enterprise maintenance configuration options

- Added `maintPushNotifications` option to control how the client handles Redis Enterprise maintenance push notifications (`disabled`, `enabled`, `au
to`).
- Added `maintMovingEndpointType` option to specify the endpoint type for reconnecting during a MOVING notification (`auto`, `internal-ip`, `external-ip`,
etc.).
- Added `maintRelaxedCommandTimeout` option to define a relaxed timeout for commands during maintenance.
- Added `maintRelaxedSocketTimeout` option to define a relaxed timeout for the socket during maintenance.
- Enforced RESP3 requirement for maintenance-related features (`maintPushNotifications`).

* feat(client): Add socket helpers and pause mechanism

- Introduced `#paused` flag with corresponding `_pause` and `_unpause` methods to
temporarily halt writing commands to the socket during maintenance windows.
- Updated `#write` method to respect the `#paused` flag, preventing new commands from being written during maintenance.
- Added `_ejectSocket` method to safely detach from and return the current socket
- Added `_insertSocket` method to receive and start using a new socket

* feat(client): Add Redis Enterprise maintenance handling capabilities

- Introduced `EnterpriseMaintenanceManager` to manage Redis Enterprise maintenance events and push notifications.
- Integrated `EnterpriseMaintenanceManager` into `RedisClient` to handle maintenance push notifications and manage socket transitions.
- Implemented graceful handling of MOVING, MIGRATING, and FAILOVER push notifications, including socket replacement and timeout adjustments.


* test: add E2E test infrastructure for Redis maintenance scenarios

* test: add E2E tests for Redis Enterprise maintenance timeout handling (#3)

* test: add connection handoff test


---------

Co-authored-by: Pavel Pashov <pavel.pashov@redis.com>
Co-authored-by: Pavel Pashov <60297174+PavelPashov@users.noreply.github.com>
2025-09-10 11:05:37 +03:00
GitHub Action
01157a0147 Release time-series@5.8.2 2025-08-20 08:33:29 +00:00
Nikolay Karadzhov
d5423b93d6 chore(tests): bump test container version 8.2.1-pre (#3057) 2025-08-18 11:32:41 +03:00
GitHub Action
c0e6c78873 Release time-series@5.8.1 2025-08-13 06:22:39 +00:00
Nikolay Karadzhov
6406172ea8 chore(tests): bump test container version 8.2 (#3046) 2025-08-06 09:49:52 +03:00
GitHub Action
4b6a3d1c39 Release time-series@5.8.0 2025-08-05 09:58:25 +00:00
Pavel Pashov
66638fc903 Add support svs vamana index creation (#3025)
* feat(search): add SVS-VAMANA vector index algorithm support

- Add VAMANA algorithm with compression and tuning parameters
- Include comprehensive test coverage for various configurations
- Fix parameter validation to handle falsy values correctly

* feat(search): add additional VAMANA compression algorithms

- Add LVQ4, LVQ4x4, LVQ4x8, LeanVec4x8, and LeanVec8x8 compression options
- Update test to use LeanVec4x8 compression algorithm

* chore: update Redis version from 8.2-rc1 to 8.2-rc2-pre
2025-08-04 12:07:18 +03:00
GitHub Action
fa3ca983a3 Release time-series@5.7.0 2025-07-31 13:39:34 +00:00
Pavel Pashov
d941ec5a4c Add Redis 8.2 New Stream Commands (#3029)
* chore: update Redis version from 8.2-RC1-pre to 8.2-rc1

* feat: implement XDELEX command for Redis 8.2

* feat: implement XACKDEL command for Redis 8.2

* refactor: create shared stream deletion types
  for Redis 8.2 commands

* feat: add Redis 8.2 deletion policies to XTRIM
  command

* feat: add Redis 8.2 deletion policies to XADD commands

* fix: correct XDELEX command method name and test parameter
2025-07-25 17:58:28 +03:00
GitHub Action
3c4defda0b Release time-series@5.6.1 2025-07-23 15:53:11 +00:00
GitHub Action
a6193a770c Release time-series@5.6.0 2025-07-08 11:37:51 +00:00
Pavel Pashov
b52177752e feat: added support for new bitop operations (#3001)
refactored bitop tests, covered all operations

updated default docker version on all packages
2025-06-19 13:56:00 +03:00
Nikolay Karadzhov
5d205cf161 chore(tests): bump test container version 8.0.2 (#2997) 2025-06-16 10:20:49 +03:00
Nikolay Karadzhov
7deaf336e4 Release time-series@5.5.6 2025-06-06 10:18:52 +03:00
Nikolay Karadzhov
b07346e74a Updated the Timeseries package to use client@5.5.6 2025-06-06 10:18:25 +03:00
Nikolay Karadzhov
b33a662e50 Automate release (#2977)
* release-it/bumper

* remove git:false

* fix package ordering

* adjust git add

* fix git config

* adjust git config for all packages

* add noop release script for test-utils

* no need to try to release root

* better way to handle skipping

* pass parameters down

* better version hint

* update node version

* return git arguments from before

* rename release workflow

* rename workflow

* set git.tagMatch

* add link to docs

* update description

* update workspace order in package-lock

* fix secondary releases

release-it/bumper was removing the ^ before the peerDep to client
npm is not happy with that. one potential fix would be to bump all
packages together as a prestep and then proceed without bupming again.
for now, this fix should bring us to the previous state ( what was used
in the manual process )

* require clean working dir in root

* remove root release-it config

not needed
2025-06-04 10:52:14 +03:00
Bobby I.
20c16e0c2c (docs) add jsdoc comments to command parsers (#2984)
* (docs) bloom: add jsdocs for all commands

* (docs) json: add jsdocs

* (docs) search: add jsdocs for all commands

* (docs) jsdocs for std commands

* (docs) jsdoc comments to time series commands
2025-06-03 14:38:07 +03:00
Nikolay Karadzhov
d4380221c8 Release time-series@5.1.1 2025-05-28 16:25:56 +03:00
Nikolay Karadzhov
d178b7839a Updated the Timeseries package to use client@5.1.1 2025-05-28 16:25:37 +03:00
Nikolay Karadzhov
8d34ee207e Release time-series@5.1.0 2025-05-20 16:12:49 +03:00
Nikolay Karadzhov
7fca460305 Updated the Timeseries package to use client@5.1.0 2025-05-20 16:07:45 +03:00
Nikolay Karadzhov
7b737821b2 fix: fix various command import issues (#2944)
* fix: fix various command import issues

there was some sort of a circular dependency
in <module>/lib/commands/index.ts for various modules

fixes #2937 fixes #2941

* remove redundant definition
2025-05-07 16:10:35 +03:00
Nikolay Karadzhov
71ab009ef8 Release time-series@5.0.1 2025-05-05 12:03:48 +03:00
Nikolay Karadzhov
1e976d24cc Updated the Timeseries package to use client@5.0.1 2025-05-05 12:03:17 +03:00
Nikolay Karadzhov
16fb7e02da Release time-series@5.0.0 2025-04-30 17:15:15 +03:00
Nikolay Karadzhov
912e0d8170 Updated the Timeseries package to use client@5.0.0 2025-04-30 17:14:39 +03:00
Nikolay Karadzhov
048df302e4 Fix imports (#2929)
* fix: exports

align exports with v4 as much as possible

* document breaking changes

* export type

return SetOptions export
2025-04-30 14:38:32 +03:00
H. Temelski
1b2eba2b76 Release time-series@5.0.0-next.7 2025-03-25 10:32:21 +02:00
H. Temelski
abba2f8493 Updated the timeseries package to use client@5.0.0-next.7 2025-03-25 10:31:40 +02:00
Hristo Temelski
a7feb60e0a tests: bumped the version of the 8 docker test image to '8.0-M05-pre' (#2909) 2025-03-18 15:24:11 +02:00
Bobby I.
69d507a572 refactor!: redis 8 compatibility improvements and test infrastructure updates (#2893)
* churn(test): use redislabs/client-libs-test for testing

This  switches our testing infrastructure from redis/redis-stack to
redislabs/client-libs-test Docker image across all packages. This change
also updates the default Docker version from 7.4.0-v1 to 8.0-M04-pre.

* churn(test): verify CONFIG SET / GET compatibility with Redis 8

- Add tests for Redis 8 search configuration settings
- Deprecate Redis Search CONFIG commands in favor of standard CONFIG
- Test read-only config restrictions for Redis 8

* churn(test): handle Redis 8 coordinate precision in GEOPOS

- Update GEOPOS tests to handle increased precision in Redis 8 (17 decimal places vs 14)
- Add precision-aware coordinate comparison helper
- Add comprehensive test suite for coordinate comparison function

* test(search): adapt SUGGET tests for Redis 8 empty results

- Update tests to expect empty array ([]) instead of null for SUGGET variants
- Affects sugGet, sugGetWithPayloads, sugGetWithScores, and sugGetWithScoresWithPayloads

* test(search): support Redis 8 INFO indexes_all field

- Add indexes_all field introduced in Redis 8 to index definition test

* refactor!(search): simplify PROFILE commands to return raw response

- BREAKING CHANGE: FT.PROFILE now returns raw response, letting users implement their own parsing

* test: improve version-specific test coverage

- Add `testWithClientIfVersionWithinRange` method to run tests for specific Redis versions
- Refactor TestUtils to handle version comparisons more accurately
- Update test utilities across Redis modules to run tests against multiple versions, and not against latest only
2025-02-27 10:56:58 +02:00
dmaier-redislabs
a424058d37 Release time-series@5.0.0-next.6 2025-01-30 11:15:11 +02:00
dmaier-redislabs
81a40a7020 Updated the timeseries package to use client@5.0.0-next.6 2025-01-30 11:14:30 +02:00
Leibale Eidelman
b835309cf8 fix cross packages imports 2024-11-04 12:21:17 -05:00
Shaya Potter
4708736f3b new "transform arguments" API for better key and metadata extraction (#2733)
* Parser support with all commands

* remove "dist" from all imports for consistency

* address most of my review comments

* small tweak to multi type mapping handling

* tweak multi commands / fix addScript cases

* nits

* addressed all in person review comments

* revert addCommand/addScript changes to multi-commands

addCommand needs to be there for sendCommand like ability within a multi.

If its there, it might as well be used by createCommand() et al, to avoid repeating code.

addScript is there (even though only used once), but now made private to keep the logic for bookkeeping near each other.
2024-10-31 12:16:59 -04:00
dmaier-redislabs
e01f8496f9 Release time-series@5.0.0-next.5 2024-10-15 17:46:09 +02:00
dmaier-redislabs
9fbd346a88 Updated the TimeSeries package to use client@5.0.0-next.5 2024-10-15 17:45:22 +02:00
Shaya Potter
b2d35c5286 V5 bringing RESP3, Sentinel and TypeMapping to node-redis
RESP3 Support
   - Some commands responses in RESP3 aren't stable yet and therefore return an "untyped" ReplyUnion.
 
Sentinel

TypeMapping

Correctly types Multi commands

Note: some API changes to be further documented in v4-to-v5.md
2024-10-15 17:46:52 +03:00
Leibale
268ceda625 Release time-series@1.1.0 2024-07-29 10:27:51 -04:00
Shaya Potter
5576a0db49 CAE-193: add "IGNORE" options to time series commands (for v4 branch) (#2752) 2024-07-10 19:45:33 +03:00
Leibale
4976231f24 upgrade deps, remove node 14 & 16 from tests matrix 2023-09-18 17:23:01 -04:00
Leibale
afd8c235fb Release time-series@1.0.5 2023-08-23 15:30:19 -04:00
Leibale
fe74e322dd upgrade deps 2023-08-23 14:53:26 -04:00
Leibale Eidelman
0298c1ac41 upgrade deps (#2517)
* upgrade deps

* fix graph tests
2023-05-29 09:01:34 -04:00
Leibale Eidelman
986a510237 fix #2481 - fix "falsy" arguments in TS.ALTER (#2483) 2023-04-26 14:29:39 -04:00
Gady
c88dea6151 Augment subpackages npm info (#2478)
* augment subpackages npm info

* some more keywords

---------

Co-authored-by: Leibale Eidelman <me@leibale.com>
2023-04-24 12:41:44 -04:00