Skip to content

Commit

Permalink
Merge pull request #592 from quirrel-dev/use-ioredis-mock-fork
Browse files Browse the repository at this point in the history
Use own ioredis-mock fork until PR is merged
  • Loading branch information
Skn0tt authored Jul 8, 2021
2 parents 8c387e1 + 8fdc413 commit 8446dff
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 6 deletions.
31 changes: 30 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
"dependencies": {
"@babel/parser": "^7.14.7",
"@babel/traverse": "^7.14.7",
"@quirrel/ioredis-mock": "^5.6.1",
"@quirrel/owl": "^0.13.3",
"@sentry/node": "6.8.0",
"@sentry/tracing": "6.8.0",
Expand All @@ -92,7 +93,6 @@
"fastify-swagger": "^4.5.0",
"fastify-websocket": "3.2.0",
"ioredis": "4.27.6",
"ioredis-mock": "^5.5.6",
"js-yaml": "^4.1.0",
"jsonwebtoken": "^8.5.1",
"ms": "2.1.3",
Expand Down
4 changes: 2 additions & 2 deletions src/api/shared/create-redis.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import IORedis from "ioredis";
import IORedisMock from "ioredis-mock";
import IORedisMock from "@quirrel/ioredis-mock";

export function createRedisFactory(redisUrl?: string): () => IORedis.Redis {
if (!redisUrl) {
let redis: IORedisMock | undefined = undefined;
let redis: any | undefined = undefined;
return () => {
if (!redis) {
redis = new IORedisMock();
Expand Down
2 changes: 1 addition & 1 deletion src/api/shared/ioredis.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
declare module "ioredis-mock" {
declare module "@quirrel/ioredis-mock" {
import { Redis } from "ioredis";
class RedisMock extends Redis {
createConnectedClient(): RedisMock;
Expand Down
2 changes: 1 addition & 1 deletion src/api/shared/usage-meter.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import type { Redis } from "ioredis";
import RedisMock from "ioredis-mock";
import RedisMock from "@quirrel/ioredis-mock";

export class UsageMeter {
constructor(private readonly redis: Redis) {}
Expand Down

2 comments on commit 8446dff

@vercel
Copy link

@vercel vercel bot commented on 8446dff Jul 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

quirrel-development-ui – ./development-ui

quirrel-development-ui-skn0tt.vercel.app
quirrel-development-ui.vercel.app
quirrel-development-ui-git-main-skn0tt.vercel.app
ui.quirrel.dev

@vercel
Copy link

@vercel vercel bot commented on 8446dff Jul 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.