Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating all dependencies #37

Merged
merged 9 commits into from
Nov 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"env": {
"browser": true,
"node": true,
"es6": true
"es6": true,
"mocha": true
},
"extends": [
"eslint:recommended",
Expand Down Expand Up @@ -61,7 +62,6 @@
"args": "none"
}],
"@typescript-eslint/prefer-for-of": ["error"],
"@typescript-eslint/prefer-optional-chain": ["error"],
"@typescript-eslint/prefer-ts-expect-error": ["error"]
}
}
9 changes: 2 additions & 7 deletions .github/workflows/node.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

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

steps:
Expand All @@ -27,13 +27,10 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Setup Redis
uses: shogo82148/actions-setup-redis@v1
- run: npm ci
- run: npm run build --if-present
- run: npm test


cjs-test:
name: Node.js tests (CommonJS)

Expand All @@ -42,7 +39,7 @@ jobs:

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

steps:
Expand All @@ -51,8 +48,6 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Setup Redis
uses: shogo82148/actions-setup-redis@v1
- run: npm ci
- run: npm run build --if-present
- run: make test-cjs
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/npm-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
Expand All @@ -23,7 +23,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
Expand All @@ -37,11 +37,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: 16
- run: npm ci
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: 'https://npm.pkg.github.com'
Expand Down
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2019-2020 Evert Pot
Copyright (c) 2019-2023 Evert Pot

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ test-cjs:
mkdir -p cjs-test
cd test; npx tsc --module commonjs --outdir ../cjs-test
echo '{"type": "commonjs"}' > cjs-test/package.json
cd cjs-test; npx mocha --exit --no-package
cd cjs-test; npx mocha --no-package

.PHONY:lint
lint:
Expand Down
13 changes: 4 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ app.use(session({
store: new RedisStore({
prefix: 'mysess',
clientOptions: {
host: 'myhost.redis',
port: 1234,
...
url: 'redis://username:password@host:port/',
},
}),
cookieName: 'MY_SESSION',
Expand All @@ -60,12 +58,9 @@ re-used by a different part of your application:
```typescript
import session from '@curveball/session';
import RedisStore from '@curveball/session-redis';
import { RedisClient } from 'redis';
import { createClient } from 'redis';

const redis = new RedisClient({
host: 'myhost.redis',
port: 1234,
});
const redis = createClient('redis://localhost');

app.use(session({
store: new RedisStore({
Expand All @@ -77,4 +72,4 @@ app.use(session({
});
```

[1]: https://github.com/NodeRedis/node_redis#options-object-properties
[1]: https://github.com/redis/node-redis/blob/master/docs/client-configuration.md
9 changes: 8 additions & 1 deletion changelog.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
Changelog
=========

0.6.0 (2023-02-14)
0.6.0 (2023-11-09)
------------------

Note that this package upgraded the internal Redis package from 2 to 4. The
Redis package had some BC breaks, which means that as a user of this package
you may also need to make changes to how you configured or passed the Redis
instance.

* This package now supports ESM and CommonJS modules.
* No longer supports Node 14. Please use Node 16 or higher.
* Removed the cookie dependency, it wasn't used
* Updated to NPM Redis version 4.
* Removed debug console.log output


0.5.0 (2022-09-03)
Expand Down
Loading