File tree 11 files changed +741
-3621
lines changed
11 files changed +741
-3621
lines changed Original file line number Diff line number Diff line change 2
2
"env" : {
3
3
"browser" : true ,
4
4
"node" : true ,
5
- "es6" : true
5
+ "es6" : true ,
6
+ "mocha" : true
6
7
},
7
8
"extends" : [
8
9
" eslint:recommended" ,
61
62
"args" : " none"
62
63
}],
63
64
"@typescript-eslint/prefer-for-of" : [" error" ],
64
- "@typescript-eslint/prefer-optional-chain" : [" error" ],
65
65
"@typescript-eslint/prefer-ts-expect-error" : [" error" ]
66
66
}
67
67
}
Original file line number Diff line number Diff line change 18
18
19
19
strategy :
20
20
matrix :
21
- node-version : [16.x, 18.x]
21
+ node-version : [16.x, 18.x, 20.x ]
22
22
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
23
23
24
24
steps :
@@ -27,13 +27,10 @@ jobs:
27
27
uses : actions/setup-node@v3
28
28
with :
29
29
node-version : ${{ matrix.node-version }}
30
- - name : Setup Redis
31
- uses : shogo82148/actions-setup-redis@v1
32
30
- run : npm ci
33
31
- run : npm run build --if-present
34
32
- run : npm test
35
33
36
-
37
34
cjs-test :
38
35
name : Node.js tests (CommonJS)
39
36
42
39
43
40
strategy :
44
41
matrix :
45
- node-version : [16.x, 18.x]
42
+ node-version : [16.x, 18.x, 20.x ]
46
43
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
47
44
48
45
steps :
51
48
uses : actions/setup-node@v3
52
49
with :
53
50
node-version : ${{ matrix.node-version }}
54
- - name : Setup Redis
55
- uses : shogo82148/actions-setup-redis@v1
56
51
- run : npm ci
57
52
- run : npm run build --if-present
58
53
- run : make test-cjs
Original file line number Diff line number Diff line change 12
12
runs-on : ubuntu-latest
13
13
steps :
14
14
- uses : actions/checkout@v3
15
- - uses : actions/setup-node@v2
15
+ - uses : actions/setup-node@v3
16
16
with :
17
17
node-version : 16
18
18
- run : npm ci
23
23
runs-on : ubuntu-latest
24
24
steps :
25
25
- uses : actions/checkout@v3
26
- - uses : actions/setup-node@v2
26
+ - uses : actions/setup-node@v3
27
27
with :
28
28
node-version : 16
29
29
registry-url : https://registry.npmjs.org/
@@ -37,11 +37,11 @@ jobs:
37
37
runs-on : ubuntu-latest
38
38
steps :
39
39
- uses : actions/checkout@v3
40
- - uses : actions/setup-node@v2
40
+ - uses : actions/setup-node@v3
41
41
with :
42
42
node-version : 16
43
43
- run : npm ci
44
- - uses : actions/setup-node@v2
44
+ - uses : actions/setup-node@v3
45
45
with :
46
46
node-version : 16
47
47
registry-url : ' https://npm.pkg.github.com'
Original file line number Diff line number Diff line change 1
1
MIT License
2
2
3
- Copyright (c) 2019-2020 Evert Pot
3
+ Copyright (c) 2019-2023 Evert Pot
4
4
5
5
Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
of this software and associated documentation files (the "Software"), to deal
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ test-cjs:
15
15
mkdir -p cjs-test
16
16
cd test ; npx tsc --module commonjs --outdir ../cjs-test
17
17
echo ' {"type": "commonjs"}' > cjs-test/package.json
18
- cd cjs-test; npx mocha --exit -- no-package
18
+ cd cjs-test; npx mocha --no-package
19
19
20
20
.PHONY :lint
21
21
lint :
Original file line number Diff line number Diff line change @@ -39,9 +39,7 @@ app.use(session({
39
39
store: new RedisStore ({
40
40
prefix: ' mysess' ,
41
41
clientOptions: {
42
- host: ' myhost.redis' ,
43
- port: 1234 ,
44
- ...
42
+ url: ' redis://username:password@host:port/' ,
45
43
},
46
44
}),
47
45
cookieName: ' MY_SESSION' ,
@@ -60,12 +58,9 @@ re-used by a different part of your application:
60
58
` ` ` typescript
61
59
import session from ' @curveball/session' ;
62
60
import RedisStore from ' @curveball/session-redis' ;
63
- import { RedisClient } from ' redis' ;
61
+ import { createClient } from ' redis' ;
64
62
65
- const redis = new RedisClient ({
66
- host: ' myhost.redis' ,
67
- port: 1234 ,
68
- });
63
+ const redis = createClient (' redis://localhost' );
69
64
70
65
app .use (session ({
71
66
store: new RedisStore ({
@@ -77,4 +72,4 @@ app.use(session({
77
72
});
78
73
` ` `
79
74
80
- [1]: https://github.com/NodeRedis/node_redis#options-object-properties
75
+ [1]: https://github.com/redis/node-redis/blob/master/docs/client-configuration.md
Original file line number Diff line number Diff line change 1
1
Changelog
2
2
=========
3
3
4
- 0.6.0 (2023-02-14 )
4
+ 0.6.0 (2023-11-09 )
5
5
------------------
6
6
7
+ Note that this package upgraded the internal Redis package from 2 to 4. The
8
+ Redis package had some BC breaks, which means that as a user of this package
9
+ you may also need to make changes to how you configured or passed the Redis
10
+ instance.
11
+
7
12
* This package now supports ESM and CommonJS modules.
8
13
* No longer supports Node 14. Please use Node 16 or higher.
9
14
* Removed the cookie dependency, it wasn't used
15
+ * Updated to NPM Redis version 4.
16
+ * Removed debug console.log output
10
17
11
18
12
19
0.5.0 (2022-09-03)
You can’t perform that action at this time.
0 commit comments