2
1
mirror of https://github.com/Thream/socketio-jwt.git synced 2024-07-06 19:30:11 +02:00

build(deps): update latest

This commit is contained in:
Divlo 2022-09-09 11:39:27 +02:00
parent 7977c42c20
commit c7c152a554
No known key found for this signature in database
GPG Key ID: 8F9478F220CE65E9
10 changed files with 3276 additions and 2512 deletions

View File

@ -2,5 +2,5 @@
"*": ["editorconfig-checker"], "*": ["editorconfig-checker"],
"*.{js,jsx,ts,tsx}": ["prettier --write", "eslint --fix"], "*.{js,jsx,ts,tsx}": ["prettier --write", "eslint --fix"],
"*.{json,jsonc,yml,yaml}": ["prettier --write"], "*.{json,jsonc,yml,yaml}": ["prettier --write"],
"*.{md}": ["prettier --write", "markdownlint --dot --fix"] "*.{md,mdx}": ["prettier --write", "markdownlint-cli2 --fix"]
} }

10
.markdownlint-cli2.jsonc Normal file
View File

@ -0,0 +1,10 @@
{
"config": {
"default": true,
"MD013": false,
"MD033": false,
"MD041": false
},
"globs": ["**/*.{md,mdx}"],
"ignores": ["**/node_modules"]
}

View File

@ -1,7 +0,0 @@
{
"default": true,
"MD013": false,
"MD024": false,
"MD033": false,
"MD041": false
}

14
.swcrc
View File

@ -2,21 +2,11 @@
"jsc": { "jsc": {
"parser": { "parser": {
"syntax": "typescript", "syntax": "typescript",
"decorators": true,
"dynamicImport": true "dynamicImport": true
}, },
"transform": { "target": "es2022"
"legacyDecorator": true,
"decoratorMetadata": true
},
"target": "es2022",
"loose": true
}, },
"module": { "module": {
"type": "es6", "type": "es6"
"strict": false,
"strictMode": true,
"lazy": false,
"noInterop": false
} }
} }

View File

@ -6,5 +6,6 @@
"editor.formatOnSave": true, "editor.formatOnSave": true,
"editor.codeActionsOnSave": { "editor.codeActionsOnSave": {
"source.fixAll": true "source.fixAll": true
} },
"eslint.options": { "ignorePath": ".gitignore" }
} }

5684
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -35,7 +35,7 @@
"build:dev": "swc ./src --out-dir ./build --watch", "build:dev": "swc ./src --out-dir ./build --watch",
"lint:commit": "commitlint", "lint:commit": "commitlint",
"lint:editorconfig": "editorconfig-checker", "lint:editorconfig": "editorconfig-checker",
"lint:markdown": "markdownlint \"**/*.md\" --dot --ignore-path \".gitignore\"", "lint:markdown": "markdownlint-cli2",
"lint:typescript": "eslint \"**/*.{js,jsx,ts,tsx}\" --ignore-path \".gitignore\"", "lint:typescript": "eslint \"**/*.{js,jsx,ts,tsx}\" --ignore-path \".gitignore\"",
"lint:prettier": "prettier \".\" --check --ignore-path \".gitignore\"", "lint:prettier": "prettier \".\" --check --ignore-path \".gitignore\"",
"lint:staged": "lint-staged", "lint:staged": "lint-staged",
@ -52,36 +52,36 @@
"jsonwebtoken": "8.5.1" "jsonwebtoken": "8.5.1"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "16.2.4", "@commitlint/cli": "17.1.2",
"@commitlint/config-conventional": "16.2.4", "@commitlint/config-conventional": "17.1.0",
"@swc/cli": "0.1.57", "@swc/cli": "0.1.57",
"@swc/core": "1.2.182", "@swc/core": "1.2.249",
"@types/jsonwebtoken": "8.5.8", "@types/jsonwebtoken": "8.5.9",
"@types/node": "17.0.32", "@types/node": "18.7.16",
"@types/tap": "15.0.7", "@types/tap": "15.0.7",
"@typescript-eslint/eslint-plugin": "5.23.0", "@typescript-eslint/eslint-plugin": "5.36.2",
"@typescript-eslint/parser": "5.23.0", "@typescript-eslint/parser": "5.36.2",
"axios": "0.27.2", "axios": "0.27.2",
"c8": "7.11.2", "c8": "7.12.0",
"editorconfig-checker": "4.0.2", "editorconfig-checker": "4.0.2",
"eslint": "8.15.0", "eslint": "8.23.0",
"eslint-config-conventions": "2.0.0", "eslint-config-conventions": "4.0.0",
"eslint-config-prettier": "8.5.0", "eslint-config-prettier": "8.5.0",
"eslint-plugin-import": "2.26.0", "eslint-plugin-import": "2.26.0",
"eslint-plugin-prettier": "4.0.0", "eslint-plugin-prettier": "4.2.1",
"eslint-plugin-promise": "6.0.0", "eslint-plugin-promise": "6.0.1",
"eslint-plugin-unicorn": "42.0.0", "eslint-plugin-unicorn": "43.0.2",
"fastify": "3.29.0", "fastify": "4.5.3",
"husky": "8.0.1", "husky": "8.0.1",
"lint-staged": "12.4.1", "lint-staged": "13.0.3",
"markdownlint-cli": "0.31.1", "markdownlint-cli2": "0.5.1",
"pinst": "3.0.0", "pinst": "3.0.0",
"prettier": "2.6.2", "prettier": "2.7.1",
"rimraf": "3.0.2", "rimraf": "3.0.2",
"semantic-release": "19.0.3", "semantic-release": "19.0.5",
"socket.io": "4.5.0", "socket.io": "4.5.2",
"socket.io-client": "4.5.0", "socket.io-client": "4.5.2",
"tap": "16.2.0", "tap": "16.3.0",
"typescript": "4.6.4" "typescript": "4.8.3"
} }
} }

View File

@ -1,15 +1,16 @@
import tap from 'tap' import tap from 'tap'
import axios from 'axios' import axios from 'axios'
import { io, Socket } from 'socket.io-client' import type { Socket } from 'socket.io-client'
import { io } from 'socket.io-client'
import { isUnauthorizedError } from '../UnauthorizedError.js' import { isUnauthorizedError } from '../UnauthorizedError.js'
import type { Profile } from './fixture/index.js'
import { import {
API_URL, API_URL,
fixtureStart, fixtureStart,
fixtureStop, fixtureStop,
getSocket, getSocket,
basicProfile, basicProfile
Profile
} from './fixture/index.js' } from './fixture/index.js'
export const api = axios.create({ export const api = axios.create({

View File

@ -1,8 +1,10 @@
import jwt from 'jsonwebtoken' import jwt from 'jsonwebtoken'
import { Server as SocketIoServer } from 'socket.io' import { Server as SocketIoServer } from 'socket.io'
import fastify, { FastifyInstance } from 'fastify' import type { FastifyInstance } from 'fastify'
import fastify from 'fastify'
import { authorize, AuthorizeOptions } from '../../index.js' import type { AuthorizeOptions } from '../../index.js'
import { authorize } from '../../index.js'
interface FastifyIo { interface FastifyIo {
instance: SocketIoServer instance: SocketIoServer
@ -67,7 +69,9 @@ export const fixtureStart = async (
application.addHook('onClose', (fastify) => { application.addHook('onClose', (fastify) => {
fastify.io.instance.close() fastify.io.instance.close()
}) })
await application.listen(PORT) await application.listen({
port: PORT
})
} }
export const fixtureStop = async (): Promise<void> => { export const fixtureStop = async (): Promise<void> => {

View File

@ -1,5 +1,6 @@
import jwt, { Algorithm } from 'jsonwebtoken' import type { Algorithm } from 'jsonwebtoken'
import { Socket } from 'socket.io' import jwt from 'jsonwebtoken'
import type { Socket } from 'socket.io'
import { UnauthorizedError } from './UnauthorizedError.js' import { UnauthorizedError } from './UnauthorizedError.js'