Skip to content

Commit

Permalink
refactor: follow up (#534)
Browse files Browse the repository at this point in the history
* refactor: follow up

* docs: update to use scoped packages

* chore: update package.json

* test: update test

* chore: add @fastify/cookie
  • Loading branch information
climba03003 authored Apr 27, 2022
1 parent 4af4715 commit be80aee
Show file tree
Hide file tree
Showing 8 changed files with 113 additions and 112 deletions.
66 changes: 33 additions & 33 deletions README.md

Large diffs are not rendered by default.

142 changes: 71 additions & 71 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@
"node": ">= 12.0.0"
},
"dependencies": {
"fastify-flash": "^3.0.0",
"@fastify/flash": "^4.0.0",
"fastify-plugin": "^3.0.0"
},
"peerDependencies": {
"fastify": "^3.0.3"
},
"devDependencies": {
"@fastify/cookie": "^6.0.0",
"@fastify/secure-session": "^4.0.0",
"@fastify/session": "^8.0.0",
"@types/jest": "^27.0.0",
"@types/node": "^17.0.0",
Expand All @@ -59,7 +61,6 @@
"eslint-config-prettier": "^8.1.0",
"eslint-plugin-prettier": "^4.0.0",
"fastify": "^3.9.2",
"fastify-secure-session": "^3.0.0",
"got": "^11.8.1",
"jest": "^27.0.6",
"passport-facebook": "^3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/AuthenticationRoute.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// <reference types="fastify-secure-session" />
/// <reference types="@fastify/secure-session" />
import * as http from 'http'
import AuthenticationError from './errors'
import Authenticator from './Authenticator'
Expand Down
2 changes: 1 addition & 1 deletion src/CreateInitializePlugin.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fp from 'fastify-plugin'
import { logIn, logOut, isAuthenticated, isUnauthenticated } from './decorators'
import Authenticator from './Authenticator'
import flash = require('fastify-flash')
import flash = require('@fastify/flash')

export function CreateInitializePlugin(passport: Authenticator) {
return fp(async (fastify) => {
Expand Down
2 changes: 1 addition & 1 deletion src/session-managers/SecureSessionManager.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/// <reference types="fastify-secure-session" />
/// <reference types="@fastify/secure-session" />
import { FastifyRequest } from 'fastify'
import { SerializeFunction } from '../Authenticator'

Expand Down
2 changes: 1 addition & 1 deletion src/type-extensions.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* eslint-disable @typescript-eslint/no-empty-interface */
import { flashFactory } from 'fastify-flash/lib/flash'
import { flashFactory } from '@fastify/flash/lib/flash'
import { logIn, logOut, isAuthenticated, isUnauthenticated } from './decorators'
import Authenticator from './Authenticator'

Expand Down
4 changes: 2 additions & 2 deletions test/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as fs from 'fs'
import fastify, { FastifyInstance } from 'fastify'
import fastifySecureSession, { SecureSessionPluginOptions } from 'fastify-secure-session'
import fastifyCookie from 'fastify-cookie'
import fastifySecureSession, { SecureSessionPluginOptions } from '@fastify/secure-session'
import fastifyCookie from '@fastify/cookie'
import fastifySession from '@fastify/session'
import Authenticator from '../src/Authenticator'
import { Strategy } from '../src/strategies'
Expand Down

0 comments on commit be80aee

Please sign in to comment.