Skip to content

Commit bd40b39

Browse files
authoredJan 22, 2024
Fix broken windows (#409)
Includes: - Update dependencies - Add Node v20 as a test environment
1 parent 5f5976e commit bd40b39

File tree

6 files changed

+23
-21
lines changed

6 files changed

+23
-21
lines changed
 

‎.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
node: [16, 18]
12+
node: [16, 18, 20]
1313
name: Node v${{ matrix.node }}
1414
steps:
1515
- uses: actions/checkout@v3

‎index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class RedisStore extends Store {
153153
let keys = await this._getAllKeys()
154154
return cb(
155155
null,
156-
keys.map((k) => k.substring(len))
156+
keys.map((k) => k.substring(len)),
157157
)
158158
} catch (err) {
159159
return cb(err)

‎index_test.ts

+5-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import {createClient} from "redis"
66
import RedisStore from "./"
77
import * as redisSrv from "./testdata/server"
88

9-
test("setup", redisSrv.connect)
9+
test("setup", async () => {
10+
await redisSrv.connect()
11+
})
1012

1113
test("defaults", async (t) => {
1214
let client = createClient({url: `redis://localhost:${redisSrv.port}`})
@@ -44,7 +46,7 @@ test("teardown", redisSrv.disconnect)
4446
async function lifecycleTest(
4547
store: RedisStore,
4648
client: any,
47-
t: test.Test
49+
t: test.Test,
4850
): Promise<void> {
4951
const P = (f: any) => promisify(f).bind(store)
5052
let res = await P(store.clear)()
@@ -85,7 +87,7 @@ async function lifecycleTest(
8587
{id: "123", foo: "bar"},
8688
{id: "456", cookie: {expires}},
8789
],
88-
"stored two keys data"
90+
"stored two keys data",
8991
)
9092

9193
await P(store.destroy)("456")

‎package.json

+13-13
Original file line numberDiff line numberDiff line change
@@ -29,22 +29,22 @@
2929
"url": "git@github.com:tj/connect-redis.git"
3030
},
3131
"devDependencies": {
32-
"@types/blue-tape": "^0.1.33",
33-
"@types/express-session": "^1.17.6",
34-
"@types/node": "^18.13.0",
35-
"@typescript-eslint/eslint-plugin": "^5.52.0",
36-
"@typescript-eslint/parser": "^5.52.0",
32+
"@types/blue-tape": "^0.1.36",
33+
"@types/express-session": "^1.17.10",
34+
"@types/node": "^20.11.5",
35+
"@typescript-eslint/eslint-plugin": "^6.19.0",
36+
"@typescript-eslint/parser": "^6.19.0",
3737
"blue-tape": "^1.0.0",
38-
"eslint": "^8.34.0",
39-
"eslint-config-prettier": "^8.6.0",
38+
"eslint": "^8.56.0",
39+
"eslint-config-prettier": "^9.1.0",
4040
"express-session": "^1.17.3",
41-
"ioredis": "^5.3.1",
41+
"ioredis": "^5.3.2",
4242
"nyc": "^15.1.0",
43-
"prettier": "^2.8.4",
44-
"prettier-plugin-organize-imports": "^3.2.2",
45-
"redis": "^4.6.4",
46-
"ts-node": "^10.9.1",
47-
"typescript": "^4.9.5"
43+
"prettier": "^3.2.4",
44+
"prettier-plugin-organize-imports": "^3.2.4",
45+
"redis": "^4.6.12",
46+
"ts-node": "^10.9.2",
47+
"typescript": "^5.3.3"
4848
},
4949
"peerDependencies": {
5050
"express-session": ">=1"

‎readme.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ app.use(
6363
resave: false, // required: force lightweight session keep alive (touch)
6464
saveUninitialized: false, // recommended: only save session when data exists
6565
secret: "keyboard cat",
66-
})
66+
}),
6767
)
6868
```
6969

‎tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
"declaration": true,
1313
"outDir": "./dist/cjs",
1414
"esModuleInterop": true,
15-
"resolveJsonModule": true
15+
"resolveJsonModule": true,
1616
},
17-
"exclude": ["node_modules", "dist"]
17+
"exclude": ["node_modules", "dist"],
1818
}

0 commit comments

Comments
 (0)
Please sign in to comment.