Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert breaking change in Redis constructor #835

Merged
merged 1 commit into from
Jun 5, 2023
Merged

Revert breaking change in Redis constructor #835

merged 1 commit into from
Jun 5, 2023

Conversation

diogoazevedos
Copy link
Contributor

Please check if the PR fulfills these requirements

  • Followed the Contributing guidelines.
  • Tests for the changes have been added (for bug fixes/features) with 100% code coverage.
  • Docs have been added / updated (for bug fixes / features)

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Fixes #834

@diogoazevedos diogoazevedos marked this pull request as ready for review June 5, 2023 10:40
@diogoazevedos
Copy link
Contributor Author

diogoazevedos commented Jun 5, 2023

I want to cover this scenario, but I assume the redisURI is not pointing to a Redis Cluster.

import {Cluster} from 'ioredis';

test.serial('should support cluster instance', t => {
	const cluster = new Cluster([{ host: redisURI }]);
	const keyv = new KeyvRedis(cluster);

	t.is(keyv.redis, cluster);
});

@jaredwray
Copy link
Owner

@diogoazevedos - thanks and we will get this fix out ASAP. Sorry for the break.

@jaredwray
Copy link
Owner

@diogoazevedos do you want to get a fix in for these errors?

> @keyv/redis
$ tsc --project tsconfig.dist.json
Error: src/index.ts(25,12): error TS23[39](https://github.com/jaredwray/keyv/actions/runs/5176158773/jobs/9329732824?pr=835#step:6:40): Property 'options' does not exist on type 'KeyvUriOptions'.
  Property 'options' does not exist on type 'string'.
Error: src/index.ts(25,27): error TS2339: Property 'options' does not exist on type 'KeyvUriOptions'.
  Property 'options' does not exist on type 'string'.
Error: src/index.ts(25,51): error TS2339: Property 'options' does not exist on type 'KeyvUriOptions'.
  Property 'options' does not exist on type 'string'.
Error: src/index.ts(25,66): error TS2339: Property 'isCluster' does not exist on type 'KeyvUriOptions'.
  Property 'isCluster' does not exist on type 'string'.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed.
Exit code: 2
Command: /opt/hostedtoolcache/node/16.20.0/x64/bin/node
Arguments: /usr/local/lib/node_modules/yarn/lib/cli.js run build
Directory: /home/runner/work/keyv/keyv/packages/redis
Output:

info Visit https://yarnpkg.com/en/docs/cli/workspaces for documentation about this command.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
Error: Process completed with exit code 2.

@diogoazevedos
Copy link
Contributor Author

@jaredwray on it 😄

@jaredwray jaredwray merged commit b611488 into jaredwray:main Jun 5, 2023
@diogoazevedos diogoazevedos deleted the fix/redis-constructor branch June 5, 2023 16:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Breaking change introduced in 2.6.0
2 participants