Skip to content

Commit

Permalink
Merge pull request #2 from tj/master
Browse files Browse the repository at this point in the history
Fix broken windows (tj#409)
  • Loading branch information
kunal-mandalia authored Jan 22, 2024
2 parents 23fe812 + bd40b39 commit 635ff7e
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node: [16, 18]
node: [16, 18, 20]
name: Node v${{ matrix.node }}
steps:
- uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ class RedisStore extends Store {
let keys = await this._getAllKeys()
return cb(
null,
keys.map((k) => k.substring(len))
keys.map((k) => k.substring(len)),
)
} catch (err) {
return cb(err)
Expand Down
8 changes: 5 additions & 3 deletions index_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ import {createClient} from "redis"
import RedisStore from "./"
import * as redisSrv from "./testdata/server"

test("setup", redisSrv.connect)
test("setup", async () => {
await redisSrv.connect()
})

test("defaults", async (t) => {
let client = createClient({url: `redis://localhost:${redisSrv.port}`})
Expand Down Expand Up @@ -44,7 +46,7 @@ test("teardown", redisSrv.disconnect)
async function lifecycleTest(
store: RedisStore,
client: any,
t: test.Test
t: test.Test,
): Promise<void> {
const P = (f: any) => promisify(f).bind(store)
let res = await P(store.clear)()
Expand Down Expand Up @@ -85,7 +87,7 @@ async function lifecycleTest(
{id: "123", foo: "bar"},
{id: "456", cookie: {expires}},
],
"stored two keys data"
"stored two keys data",
)

await P(store.destroy)("456")
Expand Down
26 changes: 13 additions & 13 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,22 +29,22 @@
"url": "git@github.com:tj/connect-redis.git"
},
"devDependencies": {
"@types/blue-tape": "^0.1.33",
"@types/express-session": "^1.17.6",
"@types/node": "^18.13.0",
"@typescript-eslint/eslint-plugin": "^5.52.0",
"@typescript-eslint/parser": "^5.52.0",
"@types/blue-tape": "^0.1.36",
"@types/express-session": "^1.17.10",
"@types/node": "^20.11.5",
"@typescript-eslint/eslint-plugin": "^6.19.0",
"@typescript-eslint/parser": "^6.19.0",
"blue-tape": "^1.0.0",
"eslint": "^8.34.0",
"eslint-config-prettier": "^8.6.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"express-session": "^1.17.3",
"ioredis": "^5.3.1",
"ioredis": "^5.3.2",
"nyc": "^15.1.0",
"prettier": "^2.8.4",
"prettier-plugin-organize-imports": "^3.2.2",
"redis": "^4.6.4",
"ts-node": "^10.9.1",
"typescript": "^4.9.5"
"prettier": "^3.2.4",
"prettier-plugin-organize-imports": "^3.2.4",
"redis": "^4.6.12",
"ts-node": "^10.9.2",
"typescript": "^5.3.3"
},
"peerDependencies": {
"express-session": ">=1"
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ app.use(
resave: false, // required: force lightweight session keep alive (touch)
saveUninitialized: false, // recommended: only save session when data exists
secret: "keyboard cat",
})
}),
)
```

Expand Down
4 changes: 2 additions & 2 deletions tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"declaration": true,
"outDir": "./dist/cjs",
"esModuleInterop": true,
"resolveJsonModule": true
"resolveJsonModule": true,
},
"exclude": ["node_modules", "dist"]
"exclude": ["node_modules", "dist"],
}

0 comments on commit 635ff7e

Please sign in to comment.