Zihua Li

Results 343 comments of Zihua Li

> The build passes now but travis hasn't run for some reason. Travis has a credit thing which has run out and will be refilled tomorrow. Considering moving to GitHub...

Hey @schw4rzlicht 👋 What error did you get?

Thanks for the details. I think the cause is `jest.spyOn` doesn't work with generic methods or it's a usage issue. `cluster()` accepts multiple subcommand so your intention was to mock...

@fabrykowski Don't think that works. TypeScript asks to [give the parameters types](https://www.typescriptlang.org/play?ts=4.6.2#code/C4TwDgpgBAwghgGwQIzgYwNZQLxQBR4QBORAXFAKIkD2RANFERAM4CuCw5AdhAG7EBKHAD4ovagEsAJkIA++QiXKsuUiADMJPKQyZsO3VgFtkgkWMkyA3AFgAUPbTUuzYFDjl4SVJhz5i9Iws7MBC2KIA3vZQMVAS6v4kQlF2sWlQTi7UCBAAdAjUAOaKRAK2qbEAvlAQCMzQKemxmczZeQXFeiFl0VX2lfZAA).

In that case seems `result` [will never be `never`](https://www.typescriptlang.org/play?ts=4.6.2#code/KYDwDg9gTgLgBDAnmYcDCBDANlgRhgYwGsAeAFTgF44BXAOyLogHc6A+KuACgDo+MoAcwDOALjgBtYFCjiAojOgAaOFGDCaWGOLrAAbtIC6cAD6Tps2nQAmwAGYBLXdZVqNW8WUMBKKhz0QDtYA3ACwAFARBBB0wvAY4pg4+MQkdDQAtrjSHNRcFq7qmjC+lBwA3hFw1XDRsRBYwDxYEIJcAIxwALSqRVreYeEAvhFAA) 😢

@fabrykowski Oh that's awesome! I didn't know that was possible. Looks like it's only supported from TypeScript 4.6 but seems to be a good progressive enhancement.

Hey @ligreman 👋 When `readOnly` is `true`, ioredis should already ensure that `READONLY` command is sent before other commands. We have a test case for that: https://github.com/luin/ioredis/blob/b530a0b9fe0f987d6786e5cfccbfae8b5b9c9294/test/functional/connection.ts#L355. In your log:...

> Would adding Commander.getKeyPrefix make sense? What would it look like with this approach? Should `Script` call that method?

Sorry @TrySound I overlooked this PR. I agree with the direction to remove all lodash packages in favor of native ones. Will take a look!

The only pitfall is this introduces a potential backward compatibility issue when the provided option contains an `undefined` value due to the difference between `_.defaults` and `Object.assign`: ```javascript > const...