Skip to content

Commit 4dd98aa

Browse files
committed
upgrade to 6.0.0
1 parent b39515d commit 4dd98aa

File tree

4 files changed

+15
-4
lines changed

4 files changed

+15
-4
lines changed

README.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Supports flash messages - session data that is deleted after it's read.
99
## Usage
1010

1111
```ts
12-
import { Application, Router } from "jsr:@oak/oak@^13";
12+
import { Application, Router } from "jsr:@oak/oak@^14";
1313
import { Session } from "https://deno.land/x/oak_sessions/mod.ts";
1414

1515
type AppState = {
@@ -247,6 +247,7 @@ app.use(Session.initMiddleware(store, {
247247
```
248248

249249
## Session key rotation
250+
250251
Sometimes, you'll want to rotate the session key to help prevent session fixation attacks. If you're using this library to authenticate users, it's wise to rotate the key immediately after the user logs in.
251252

252253
To rotate the session key, simply add an Oak context state variable on the appropriate route or middleware. The variable can be set before or after the session is initialized.
@@ -263,3 +264,13 @@ To rotate the session key, simply add an Oak context state variable on the appro
263264
There are some breaking changes in how you initialize your session, but all of the `ctx.state.session` methods (`get`, `set`, `flash`, `has`) still work as they did before, except `deleteSession` no longer takes any arguments, which may or may not be breaking depending on how it's used in your project.
264265

265266
See more detail in the [migration guide](https://github.com/jcs224/oak_sessions/wiki/Migration-guide) wiki.
267+
268+
## Using the library with the correct `oak` version
269+
270+
To keep up with the correct types, you have to use the correct major version to match with the corresponding version of `oak`.
271+
272+
| Oak version | Session library version |
273+
| --- | --- |
274+
| ^12 | ^4.1.12
275+
| ^13 | ^5.0.0 |
276+
| ^14 | ^6.0.0 |

deno.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@jcs224/oak-sessions",
3-
"version": "5.0.0",
3+
"version": "6.0.0",
44
"exports": "./mod.ts",
55
"tasks": {
66
"typecheck": "deno check ./mod.ts"

deps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
export * from "jsr:@oak/oak@^13"
1+
export * from "jsr:@oak/oak@^14"

test/server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Application, Router } from "jsr:@oak/oak@^13"
1+
import { Application, Router } from "jsr:@oak/oak@^14"
22
import { Session } from '../mod.ts'
33
import { makeStore } from "./makeStore.ts";
44

0 commit comments

Comments
 (0)