1
0
mirror of https://github.com/redis/node-redis.git synced 2025-07-29 18:21:14 +03:00

546 Commits

Author SHA1 Message Date
d8e14fa4fe fix(scan): remove console.logs (#3038)
fixes #3037
2025-07-28 14:54:50 +03:00
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
ff8319d2d7 fix(pool): chain promise handlers to prevent unhandled rejections (#3035) 2025-07-25 16:39:32 +03:00
e96db0d13c Release redis@5.6.1 2025-07-23 15:53:25 +00:00
3365920470 Release entraid@5.6.1 2025-07-23 15:53:19 +00:00
3c4defda0b Release time-series@5.6.1 2025-07-23 15:53:11 +00:00
726e2c7c64 Release search@5.6.1 2025-07-23 15:53:04 +00:00
fc5ff18875 Release json@5.6.1 2025-07-23 15:52:56 +00:00
945b77af16 Release bloom@5.6.1 2025-07-23 15:52:49 +00:00
1c266371a3 Release client@5.6.1 2025-07-23 15:52:42 +00:00
4ae14bb558 Add Redis transparent proxy test utilities (#3019) 2025-07-23 18:21:13 +03:00
0541b32f34 docs: Update doctests (#3020)
* move all doctests from emb-examples branch

* fix readme

* add package-lock.json

* --wip-- [skip ci]

* fix: replace client.quit() with client.close() as quit is deprecated

- doctests/cmds-hash.js
- doctests/cmds-list.js
- doctests/cmds-servermgmt.js
- doctests/cmds-set.js

* fix: replace client.quit() with client.close() as quit is deprecated

- doctests/cmds-sorted-set.js
- doctests/cmds-string.js
- doctests/dt-bitfield.js
- doctests/dt-bitmap.js

* fix: replace client.quit() with client.close() as quit is deprecated

- dt-bloom.js: replace client.quit() with client.close()
- dt-cms.js: replace client.quit() with client.close()
- dt-cuckoo.js: replace client.quit() with client.close() and update expected output comments to reflect v5 boolean returns
- dt-geo.js: replace client.quit() with client.close()

* fix(doctests): correct pfAdd return values and replace quit with close

- Fix dt-hll.js: pfAdd returns 1 instead of true in comments and assertions
- Fix dt-hash.js and dt-hll.js: replace deprecated client.quit() with client.close()

* fix(doctests): correct API usage and return values in json and list examples

- Fix dt-json.js: use options object for json.type, json.strLen, json.del, json.arrPop, json.objLen, json.objKeys
- Fix dt-json.js: correct json.del return value from [1] to 1
- Fix dt-list.js: correct client initialization, return values (null, OK, 1), and error type
- Replace deprecated client.quit() with client.close() in both files

* fix(doctests): update dt-set.js and dt-ss.js for v5 compliance

- Updated boolean return values to numbers for SISMEMBER and SMISMEMBER commands
- Fixed client lifecycle to use client.close() instead of client.quit()
- Removed unnecessary await from createClient()
- Added order-independent assertions for set operations
- Removed debug statement

* fix(doctests): update deprecated methods and imports for v5 compliance

- Fix dt-string.js: remove await from client creation and replace client.quit() with client.close()
- Fix dt-tdigest.js: replace deprecated client.quit() with client.close()
- Fix dt-topk.js: replace client.quit() with client.close() and fix output comment from [1, 0] to [true, false]
- Fix query-agg.js: update @redis/search imports to use new constant names and replace client.disconnect() with client.close()

* fix(doctests): update imports and replace deprecated disconnect with close

- Replace SchemaFieldTypes/VectorAlgorithms with SCHEMA_FIELD_TYPE/SCHEMA_VECTOR_FIELD_ALGORITHM
- Replace client.disconnect() with client.close() for consistent deprecation handling
- Update query-combined.js, query-em.js, query-ft.js, and query-geo.js

* fix(doctests): update imports and replace deprecated methods in remaining files

- Update imports to use SCHEMA_FIELD_TYPE and SCHEMA_VECTOR_FIELD_ALGORITHM constants
- Replace deprecated disconnect() and quit() methods with close()
- Fix assertion in search-quickstart.js to use correct bicycle ID

* fix(doctests): update cmds-generic.js and cmds-cnxmgmt.js for v5 compliance

- Replace deprecated client.quit() with client.close()
- Update sScanIterator to use collection-yielding behavior (value -> values)
- Fix HSCAN API changes: tuples renamed to entries
- Fix cursor type issues: use string '0' instead of number 0 for hScan
- Fix infinite loop in scan cleanup by using do-while pattern

* fix(doctests): update dt-streams.js object shapes and parameters for v5 compliance

- Update stream result objects from tuple format to proper object format with id/message properties
- Change xRead/xReadGroup results from nested arrays to objects with name/messages structure
- Update xAutoClaim results to use nextId, messages, and deletedMessages properties
- Add missing properties to xInfo* results (max-deleted-entry-id, entries-added, recorded-first-entry-id, entries-read, lag, inactive)
- Modernize parameter names (count -> COUNT, block -> BLOCK, etc.)
- Update MAXLEN/APPROXIMATE options to new TRIM object structure
- Fix error message format for XADD duplicate ID error
- Update boolean return values (True -> OK)

---------

Co-authored-by: Nikolay Karadzhov <nkaradzhov89@gmail.com>
2025-07-23 18:16:08 +03:00
ddd2cc5185 fix(client): export RedisJSON type (#3026)
fixes #3014
2025-07-23 13:41:30 +03:00
539fe52236 fix(client): make socket.host not required (#3024)
Underlying node tls.ConnectionOptions does not require host,
so we shouldnt as well. Further, if `url` is provided in
the upper level config, it takes precedence, which could be misleading:

createClient({
  url: 'rediss://user:secret@localhost:6379/0',
  socket: {
    tls: true,
    host: 'somehost' <-- this gets overwritten to `localhost`
  }
});

fixes #3023
2025-07-21 18:17:07 +03:00
c21dd924fe fix(search): adjust field types for ft.search (#3018)
In ft.search SORTBY, SUMMARIZE and HIGHLIGHT all take
string arguments and do not need @ or $ as a prefix.
In fact, if you put @ or $ there, redis returns error like this:

[SimpleError: Property `@age` not loaded nor in schema]

fixes #3017
2025-07-17 14:02:22 +03:00
4d886b8866 Release redis@5.6.0 2025-07-08 11:38:02 +00:00
e5b2466da3 Release entraid@5.6.0 2025-07-08 11:37:56 +00:00
a6193a770c Release time-series@5.6.0 2025-07-08 11:37:51 +00:00
ff5c6b3066 Release search@5.6.0 2025-07-08 11:37:44 +00:00
dab595d8d9 Release json@5.6.0 2025-07-08 11:37:38 +00:00
b7a5f40ab1 Release bloom@5.6.0 2025-07-08 11:37:32 +00:00
748cad2e7f Release client@5.6.0 2025-07-08 11:37:25 +00:00
65a12d50e7 feat(client): add command timeout option (#3008)
Co-authored-by: Florian Schunk <149071178+florian-schunk@users.noreply.github.com>
2025-07-07 11:37:08 +03:00
79749f2461 fix(sentinel): propagate RESP option to clients (#3011)
`createSentinel` takes RESP as an option, but does not propagate down
to the actual clients. This creates confusion for the users as they
expect the option to be set to all clients, which is reasonable.

In case of clientSideCaching, this problem manifests as validation failure
because clientSideCaching requires RESP3, but if we dont propagate,
clients start with the default RESP2

fixes #3010
2025-07-07 11:06:34 +03:00
742d5713e8 fix(commands): sPopCount return Array<string> (#3006)
Also, touch the tests for spop and spopcount
to use the new parseCommand API

fixes #3004
2025-06-25 13:15:44 +03:00
c5b4f47975 feat: add support for vector sets (#2998)
* wip

* improve the vadd api

* resp3 tests

* fix some tests

* extract json helper functions in client package

* use transformJsonReply

* remove the CACHEABLE flag for all vector set commands

currently, client side caching is not supported
for vector set commands by the server

* properly transform vinfo result

* add resp3 test for vlinks

* add more tests for vrandmember

* fix vrem return types

* fix vsetattr return type

* fix vsim_withscores

* implement vlinks_withscores

* set minimum docker image version to 8

* align return types

* add RAW variant for VEMB -> VEMB_RAW

* use the new parseCommand api
2025-06-24 13:35:29 +03:00
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
5d205cf161 chore(tests): bump test container version 8.0.2 (#2997) 2025-06-16 10:20:49 +03:00
62ac8b7c32 fix(client): make unstable cmds throw (#2990)
As per the docs, unstableResp3 commands should throw
when client is created with { RESP: 3, unstableResp3: false|undefined }

fixes #2989
2025-06-06 15:38:52 +03:00
ca91718b59 Release redis@5.5.6 2025-06-06 10:21:11 +03:00
ba0ba71aad Updated the Redis package to use client@5.5.6 2025-06-06 10:20:13 +03:00
7deaf336e4 Release time-series@5.5.6 2025-06-06 10:18:52 +03:00
b07346e74a Updated the Timeseries package to use client@5.5.6 2025-06-06 10:18:25 +03:00
c9ecb3d65c Release search@5.5.6 2025-06-06 10:16:17 +03:00
8610a6c836 Updated the Search package to use client@5.5.6 2025-06-06 10:15:45 +03:00
a5dc786b76 Release json@5.5.6 2025-06-06 10:14:12 +03:00
b2519abe7b Updated the Json package to use client@5.5.6 2025-06-06 10:13:34 +03:00
7d12438300 Release entraid@5.5.6 2025-06-06 10:12:16 +03:00
91e5d306ca Updated the Entraid package to use client@5.5.6 2025-06-06 10:11:18 +03:00
2302df3abd Release bloom@5.5.6 2025-06-06 10:09:56 +03:00
44caf9fcba Updated the Bloom package to use client@5.5.6 2025-06-06 10:08:35 +03:00
0ebe55cbd7 Release client@5.5.6 2025-06-06 10:02:58 +03:00
21d8f0e957 docs(search): update SchemaFieldTypes to SCHEMA_FIELD_TYPE for redis@5.x (#2992) 2025-06-06 09:30:07 +03:00
2bb515e489 fix(search): align ft.search with server (#2988)
as per the ft.search docs ( https://redis.io/docs/latest/commands/ft.search ):

    If a relevant key expires while a query is running,
    an attempt to load the key's value will return a null array.
    However, the key is still counted in the total number of results.

So, instead of crashing when seeing a null as a value, we
return empty object.

fixes #2772
see https://github.com/redis/node-redis/pull/2814
2025-06-05 11:46:57 +03:00
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
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
e4a1ca467f Release redis@5.1.1 2025-05-28 16:31:12 +03:00
d374514309 Updated the Redis package to use client@5.1.1 2025-05-28 16:27:23 +03:00
d4380221c8 Release time-series@5.1.1 2025-05-28 16:25:56 +03:00
d178b7839a Updated the Timeseries package to use client@5.1.1 2025-05-28 16:25:37 +03:00