Skip to content

Commit 4421438

Browse files
authored
Merge pull request #37 from curveball/update-deps-plus-rel
Updating all dependencies
2 parents ae55579 + 8b2d18d commit 4421438

11 files changed

+741
-3621
lines changed

.eslintrc.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
"env": {
33
"browser": true,
44
"node": true,
5-
"es6": true
5+
"es6": true,
6+
"mocha": true
67
},
78
"extends": [
89
"eslint:recommended",
@@ -61,7 +62,6 @@
6162
"args": "none"
6263
}],
6364
"@typescript-eslint/prefer-for-of": ["error"],
64-
"@typescript-eslint/prefer-optional-chain": ["error"],
6565
"@typescript-eslint/prefer-ts-expect-error": ["error"]
6666
}
6767
}

.github/workflows/node.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818

1919
strategy:
2020
matrix:
21-
node-version: [16.x, 18.x]
21+
node-version: [16.x, 18.x, 20.x]
2222
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
2323

2424
steps:
@@ -27,13 +27,10 @@ jobs:
2727
uses: actions/setup-node@v3
2828
with:
2929
node-version: ${{ matrix.node-version }}
30-
- name: Setup Redis
31-
uses: shogo82148/actions-setup-redis@v1
3230
- run: npm ci
3331
- run: npm run build --if-present
3432
- run: npm test
3533

36-
3734
cjs-test:
3835
name: Node.js tests (CommonJS)
3936

@@ -42,7 +39,7 @@ jobs:
4239

4340
strategy:
4441
matrix:
45-
node-version: [16.x, 18.x]
42+
node-version: [16.x, 18.x, 20.x]
4643
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
4744

4845
steps:
@@ -51,8 +48,6 @@ jobs:
5148
uses: actions/setup-node@v3
5249
with:
5350
node-version: ${{ matrix.node-version }}
54-
- name: Setup Redis
55-
uses: shogo82148/actions-setup-redis@v1
5651
- run: npm ci
5752
- run: npm run build --if-present
5853
- run: make test-cjs

.github/workflows/npm-publish.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- uses: actions/checkout@v3
15-
- uses: actions/setup-node@v2
15+
- uses: actions/setup-node@v3
1616
with:
1717
node-version: 16
1818
- run: npm ci
@@ -23,7 +23,7 @@ jobs:
2323
runs-on: ubuntu-latest
2424
steps:
2525
- uses: actions/checkout@v3
26-
- uses: actions/setup-node@v2
26+
- uses: actions/setup-node@v3
2727
with:
2828
node-version: 16
2929
registry-url: https://registry.npmjs.org/
@@ -37,11 +37,11 @@ jobs:
3737
runs-on: ubuntu-latest
3838
steps:
3939
- uses: actions/checkout@v3
40-
- uses: actions/setup-node@v2
40+
- uses: actions/setup-node@v3
4141
with:
4242
node-version: 16
4343
- run: npm ci
44-
- uses: actions/setup-node@v2
44+
- uses: actions/setup-node@v3
4545
with:
4646
node-version: 16
4747
registry-url: 'https://npm.pkg.github.com'

LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2019-2020 Evert Pot
3+
Copyright (c) 2019-2023 Evert Pot
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ test-cjs:
1515
mkdir -p cjs-test
1616
cd test; npx tsc --module commonjs --outdir ../cjs-test
1717
echo '{"type": "commonjs"}' > cjs-test/package.json
18-
cd cjs-test; npx mocha --exit --no-package
18+
cd cjs-test; npx mocha --no-package
1919

2020
.PHONY:lint
2121
lint:

README.md

+4-9
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,7 @@ app.use(session({
3939
store: new RedisStore({
4040
prefix: 'mysess',
4141
clientOptions: {
42-
host: 'myhost.redis',
43-
port: 1234,
44-
...
42+
url: 'redis://username:password@host:port/',
4543
},
4644
}),
4745
cookieName: 'MY_SESSION',
@@ -60,12 +58,9 @@ re-used by a different part of your application:
6058
```typescript
6159
import session from '@curveball/session';
6260
import RedisStore from '@curveball/session-redis';
63-
import { RedisClient } from 'redis';
61+
import { createClient } from 'redis';
6462

65-
const redis = new RedisClient({
66-
host: 'myhost.redis',
67-
port: 1234,
68-
});
63+
const redis = createClient('redis://localhost');
6964

7065
app.use(session({
7166
store: new RedisStore({
@@ -77,4 +72,4 @@ app.use(session({
7772
});
7873
```
7974
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

changelog.md

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
Changelog
22
=========
33

4-
0.6.0 (2023-02-14)
4+
0.6.0 (2023-11-09)
55
------------------
66

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+
712
* This package now supports ESM and CommonJS modules.
813
* No longer supports Node 14. Please use Node 16 or higher.
914
* Removed the cookie dependency, it wasn't used
15+
* Updated to NPM Redis version 4.
16+
* Removed debug console.log output
1017

1118

1219
0.5.0 (2022-09-03)

0 commit comments

Comments
 (0)