1
0
mirror of https://github.com/redis/node-redis.git synced 2025-07-31 05:44:24 +03:00

2183 Commits

Author SHA1 Message Date
60b81ff7f0 Updated the JSON package to use client@5.0.0-next.7 2025-03-25 10:28:15 +02:00
8ab820c0db Release entraid@5.0.0-next.7 entraid@5.0.0-next.7 2025-03-25 10:27:10 +02:00
4f88442f6f Updated the EntraID package to use client@5.0.0-next.7 2025-03-25 10:25:18 +02:00
bf06a3b703 Release client@5.0.0-next.7 client@5.0.0-next.7 2025-03-25 10:19:53 +02:00
d64072da95 feat(integer 8 vector support): Changed ft create vector types to union, added support for int8/uint8 (#2911)
* [CAE-827] Changed ft create vector types to union, added support for int8/uint8

* [CAE-827] Moved test cases
2025-03-21 11:43:10 +02:00
6c5a3fd0c0 fix(entraid): correct package entry point structure (#2891)
- Add /index.ts that re-exports all from /lib/index.ts
- Preserve existing /lib/index.ts exports
2025-03-20 12:31:25 +02:00
4cbecf6a09 feat(hash field expiration): Added hash field expiration commands (#2907)
* [CAE-686] Added hash field expiration commands

* [CAE-686] Improve HSETEX return type

* [CAE-686] Minor pushTuples change, renamed HSETEX test

* [CAE-686] Changed hsetex function signature for better consistency with other commands

* [CAE-686] Fixed hsetex test

* [CAE-686] Bumped docker version to 8.0-M05-pre, enabled and fixed tests
2025-03-19 12:26:23 +02:00
2ff5cb88d4 tests: Reenable and fix profile aggregate tests (#2910) 2025-03-19 12:18:30 +02:00
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
ca85f8268d refactor!: Remove graph module (#2897)
https://redis.io/blog/redisgraph-eol/
2025-03-18 14:27:37 +02:00
8b4ed0059a feat(entraid): add support for azure identity (#2901)
This PR adds support for using Azure Identity's credential classes with Redis Enterprise Entra ID authentication.
The main changes include:

- Add a new factory method createForDefaultAzureCredential to enable using Azure Identity credentials
- Add @azure/identity as a dependency to support the new authentication flow
- Add support for DefaultAzureCredential, EnvironmentCredential, and any other TokenCredential implementation
- Create a new AzureIdentityProvider to support DefaultAzureCredential
- Update documentation and README with usage examples for DefaultAzureCredential
- Add integration tests for the new authentication methods
- Include a sample application demonstrating interactive browser authentication
- Export constants for Redis scopes / credential mappers to simplify authentication configuration
2025-03-05 14:47:18 +02:00
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
33cdc00746 churn(docs) update entraid documentation (#2898) 2025-02-18 15:57:40 +02:00
1af01373db feat(search): Set default dialect to 2 for Redis Search commands (#2895)
- The default dialect `DEFAULT_DIALECT`  is now set to '2'
- Automatically append DIALECT parameter to search commands when not explicitly specified
2025-02-17 13:47:12 +02:00
558ebb4d25 Update README.md (#2890) 2025-01-30 12:46:41 +02:00
aa4ea3317f Release redis@5.0.0-next.6 redis@5.0.0-next.6 2025-01-30 11:26:52 +02:00
70f3698134 Updated the Redis package to use client@5.0.0-next.6 2025-01-30 11:21:24 +02:00
0f7e0f45ae Release graph@5.0.0-next.6 graph@5.0.0-next.6 2025-01-30 11:19:25 +02:00
81f5fc43b8 Updated the graph package to use client@5.0.0-next.6 2025-01-30 11:18:54 +02:00
0a748590a0 Release bloom@5.0.0-next.6 bloom@5.0.0-next.6 2025-01-30 11:17:29 +02:00
aecd625901 Updated the bloom package to use client@5.0.0-next.6 2025-01-30 11:16:57 +02:00
a424058d37 Release time-series@5.0.0-next.6 time-series@5.0.0-next.6 2025-01-30 11:15:11 +02:00
81a40a7020 Updated the timeseries package to use client@5.0.0-next.6 2025-01-30 11:14:30 +02:00
f30926c91a Release search@5.0.0-next.6 search@5.0.0-next.6 2025-01-30 11:13:34 +02:00
153346b9aa Updated the search package to use client@5.0.0-next.6 2025-01-30 11:12:56 +02:00
c0da3db8cf Release json@5.0.0-next.6 json@5.0.0-next.6 2025-01-30 11:11:58 +02:00
68e8973fd0 Updated the JSON package to use client@5.0.0-next.6 2025-01-30 11:11:21 +02:00
998b7f0ebd Release entraid@5.0.0-next.6 entraid@5.0.0-next.6 2025-01-30 11:09:31 +02:00
c9215d18bf Updated the EntraID package to use client@5.0.0-next.6 2025-01-30 11:07:40 +02:00
6066692cb9 Release client@5.0.0-next.6 client@5.0.0-next.6 2025-01-30 11:02:54 +02:00
6d21de3f31 feat(auth): add Entra ID identity provider integration for Redis client authentication (#2877)
* feat(auth): refactor authentication mechanism to use CredentialsProvider

- Introduce new credential providers: AsyncCredentialsProvider, StreamingCredentialsProvider
- Update client handshake process to use the new CredentialsProviders and to support async credentials fetch / credentials refresh
- Internal conversion of username/password to a CredentialsProvider
- Modify URL parsing to accommodate the new authentication structure
- Tests

* feat(auth): auth extensions

Introduces TokenManager and supporting classes to handle token acquisition, automatic
refresh, and updates via identity providers. This foundation enables consistent
authentication token management across different identity provider implementations.

Key additions:
- Add TokenManager to obtain and maintain auth tokens from identity providers
  with automated refresh scheduling based on TTL and configurable thresholds
- Add IdentityProvider interface for token acquisition from auth providers
- Implement Token class for managing token state and TTL tracking
- Include configurable retry mechanism with exponential backoff and jitter
- Add comprehensive test suite covering refresh cycles and error handling

This change establishes the core infrastructure needed for reliable token
lifecycle management across different authentication providers.

* feat(auth): add Entra ID identity provider integration

Introduces Entra ID (former Azure AD) authentication support with multiple authentication flows
and automated token lifecycle management.

Key additions:
- Add EntraIdCredentialsProvider for handling Entra ID authentication flows
- Implement MSALIdentityProvider to integrate with MSAL/EntraID authentication library
- Add support for multiple authentication methods:
  - Managed identities (system and user-assigned)
  - Client credentials with certificate
  - Client credentials with secret
  - Authorization Code flow with PKCE
- Add factory class with builder methods for each authentication flow
- Include sample Express server implementation for Authorization Code flow
- Add comprehensive configuration options for authority and token management

* feat(test-utils): improve cluster testing

- Add support for configuring replica authentication with 'masterauth'
- Allow default client configuration during test cluster creation

This improves the testing framework's flexibility by automatically
configuring replica authentication when '--requirepass' is used and
enabling custom client configurations across cluster nodes.

* feat(auth): add EntraId integration tests

- Add integration tests for token renewal and re-authentication flows
- Update credentials provider to use uniqueId as username instead of account username
- Add test utilities for loading Redis endpoint configurations
- Split TypeScript configs into separate files for samples and integration tests
- Remove `@redis/authx` package and nest it under `@`
2025-01-30 10:29:19 +02:00
ae89341780 chore: Update tests.yml (#2887)
- Add node 22
- Update actions/setup-node from v3 to v4
- Ignore .md files from triggering the workflow
2025-01-29 12:40:58 +02:00
ffa7d2525c Fix cluster-slots discover race condition again (#2867) 2024-11-25 15:36:33 -05:00
9a3e1c5e03 Fix creation of cluster client again (#2870)
* shallow copy of this.#options.defaults.socket

* shallow copy of this.#options.defaults.socket

* nit

* fix redis create cluster client again

---------

Co-authored-by: Max Gruenfelder <maximilian.gruenfelder@sap.com>
Co-authored-by: Leibale Eidelman <me@leibale.com>
2024-11-25 15:28:44 -05:00
b87b8b1134 add createSentinel to the "redis" package 2024-11-04 12:21:41 -05:00
b835309cf8 fix cross packages imports 2024-11-04 12:21:17 -05:00
8dab27ed02 fix sentinel generics (#2859)
* fix sentinel generics

* comment nit
2024-11-04 10:23:34 -05:00
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
5ace34b9c9 Release redis@5.0.0-next.5 redis@5.0.0-next.5 2024-10-15 17:51:47 +02:00
78a7f32e24 Updated the main package to use the 5.0.0-next.5 sub-packages 2024-10-15 17:48:26 +02:00
e01f8496f9 Release time-series@5.0.0-next.5 time-series@5.0.0-next.5 2024-10-15 17:46:09 +02:00
9fbd346a88 Updated the TimeSeries package to use client@5.0.0-next.5 2024-10-15 17:45:22 +02:00
d3e720ffbd Release search@5.0.0-next.5 search@5.0.0-next.5 2024-10-15 17:43:16 +02:00
c0a418140e Updated the Search package to use client@5.0.0-next.5 2024-10-15 17:42:24 +02:00
91476f9ba7 Release json@5.0.0-next.5 json@5.0.0-next.5 2024-10-15 17:40:46 +02:00
a4466d2049 Updated the JSON package to use client@5.0.0-next.5 2024-10-15 17:40:01 +02:00
875ed36d3a Release graph@5.0.0-next.5 graph@5.0.0-next.5 2024-10-15 17:38:48 +02:00
c7b40889ac Updated the Graph package to use client@5.0.0-next.5 2024-10-15 17:37:31 +02:00
4bb8cf5209 Release bloom@5.0.0-next.5 bloom@5.0.0-next.5 2024-10-15 17:36:26 +02:00
accc5c47a8 Updated the Bloom package to use client@5.0.0-next.5 2024-10-15 17:34:46 +02:00