fix: bump jsonwebtoken to v9.0.0

fixes #342

It introduces several security fixes to follow best practices.
This commit is contained in:
Divlo 2023-01-10 20:57:23 +01:00
parent bf234bd7b8
commit 03e8d51f9a
No known key found for this signature in database
GPG Key ID: 8F9478F220CE65E9
10 changed files with 2102 additions and 11560 deletions

View File

@ -10,10 +10,10 @@ jobs:
build: build:
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
steps: steps:
- uses: 'actions/checkout@v3.0.0' - uses: 'actions/checkout@v3.3.0'
- name: 'Use Node.js' - name: 'Use Node.js'
uses: 'actions/setup-node@v3.1.0' uses: 'actions/setup-node@v3.6.0'
with: with:
node-version: 'lts/*' node-version: 'lts/*'
cache: 'npm' cache: 'npm'
@ -23,3 +23,5 @@ jobs:
- name: 'Build' - name: 'Build'
run: 'npm run build' run: 'npm run build'
- run: 'npm run build:typescript'

View File

@ -10,10 +10,10 @@ jobs:
lint: lint:
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
steps: steps:
- uses: 'actions/checkout@v3.0.0' - uses: 'actions/checkout@v3.3.0'
- name: 'Use Node.js' - name: 'Use Node.js'
uses: 'actions/setup-node@v3.1.0' uses: 'actions/setup-node@v3.6.0'
with: with:
node-version: 'lts/*' node-version: 'lts/*'
cache: 'npm' cache: 'npm'
@ -24,5 +24,5 @@ jobs:
- run: 'npm run lint:commit -- --to "${{ github.sha }}"' - run: 'npm run lint:commit -- --to "${{ github.sha }}"'
- run: 'npm run lint:editorconfig' - run: 'npm run lint:editorconfig'
- run: 'npm run lint:markdown' - run: 'npm run lint:markdown'
- run: 'npm run lint:typescript' - run: 'npm run lint:eslint'
- run: 'npm run lint:prettier' - run: 'npm run lint:prettier'

View File

@ -8,10 +8,10 @@ jobs:
release: release:
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
steps: steps:
- uses: 'actions/checkout@v3.0.0' - uses: 'actions/checkout@v3.3.0'
- name: 'Use Node.js' - name: 'Use Node.js'
uses: 'actions/setup-node@v3.1.0' uses: 'actions/setup-node@v3.6.0'
with: with:
node-version: 'lts/*' node-version: 'lts/*'
cache: 'npm' cache: 'npm'
@ -22,6 +22,8 @@ jobs:
- name: 'Build Package' - name: 'Build Package'
run: 'npm run build' run: 'npm run build'
- run: 'npm run build:typescript'
- name: 'Release' - name: 'Release'
run: 'npm run release' run: 'npm run release'
env: env:

View File

@ -10,10 +10,10 @@ jobs:
test: test:
runs-on: 'ubuntu-latest' runs-on: 'ubuntu-latest'
steps: steps:
- uses: 'actions/checkout@v3.0.0' - uses: 'actions/checkout@v3.3.0'
- name: 'Use Node.js' - name: 'Use Node.js'
uses: 'actions/setup-node@v3.1.0' uses: 'actions/setup-node@v3.6.0'
with: with:
node-version: 'lts/*' node-version: 'lts/*'
cache: 'npm' cache: 'npm'

View File

@ -3,3 +3,4 @@
npm run lint:staged npm run lint:staged
npm run build npm run build
npm run build:typescript

View File

@ -1,10 +1,5 @@
{ {
"config": {
"default": true,
"MD013": false,
"MD033": false,
"MD041": false
},
"globs": ["**/*.{md,mdx}"], "globs": ["**/*.{md,mdx}"],
"ignores": ["**/node_modules"] "ignores": ["**/node_modules"],
"customRules": ["markdownlint-rule-relative-links"]
} }

7
.markdownlint.json Normal file
View File

@ -0,0 +1,7 @@
{
"default": true,
"relative-links": true,
"extends": "markdownlint/style/prettier",
"MD033": false,
"MD041": false
}

13562
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -31,12 +31,13 @@
}, },
"homepage": "https://github.com/Thream/socketio-jwt#readme", "homepage": "https://github.com/Thream/socketio-jwt#readme",
"scripts": { "scripts": {
"build": "rimraf ./build && swc ./src --out-dir ./build && tsc", "build": "rimraf ./build && swc ./src --out-dir ./build",
"build:dev": "swc ./src --out-dir ./build --watch", "build:dev": "swc ./src --out-dir ./build --watch",
"build:typescript": "tsc",
"lint:commit": "commitlint", "lint:commit": "commitlint",
"lint:editorconfig": "editorconfig-checker", "lint:editorconfig": "editorconfig-checker",
"lint:markdown": "markdownlint-cli2", "lint:markdown": "markdownlint-cli2",
"lint:typescript": "eslint \"**/*.{js,jsx,ts,tsx}\" --ignore-path \".gitignore\"", "lint:eslint": "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",
"test": "c8 tap", "test": "c8 tap",
@ -49,39 +50,41 @@
"socket.io": ">=3.0.0" "socket.io": ">=3.0.0"
}, },
"dependencies": { "dependencies": {
"jsonwebtoken": "8.5.1" "jsonwebtoken": "9.0.0"
}, },
"devDependencies": { "devDependencies": {
"@commitlint/cli": "17.1.2", "@commitlint/cli": "17.4.1",
"@commitlint/config-conventional": "17.1.0", "@commitlint/config-conventional": "17.4.0",
"@swc/cli": "0.1.57", "@swc/cli": "0.1.57",
"@swc/core": "1.2.249", "@swc/core": "1.3.25",
"@types/jsonwebtoken": "8.5.9", "@tsconfig/strictest": "1.0.2",
"@types/node": "18.7.16", "@types/jsonwebtoken": "9.0.0",
"@types/node": "18.11.18",
"@types/tap": "15.0.7", "@types/tap": "15.0.7",
"@typescript-eslint/eslint-plugin": "5.36.2", "@typescript-eslint/eslint-plugin": "5.48.1",
"@typescript-eslint/parser": "5.36.2", "@typescript-eslint/parser": "5.48.1",
"axios": "0.27.2", "axios": "1.2.2",
"c8": "7.12.0", "c8": "7.12.0",
"editorconfig-checker": "4.0.2", "editorconfig-checker": "4.0.2",
"eslint": "8.23.0", "eslint": "8.31.0",
"eslint-config-conventions": "4.0.0", "eslint-config-conventions": "6.0.0",
"eslint-config-prettier": "8.5.0", "eslint-config-prettier": "8.6.0",
"eslint-plugin-import": "2.26.0", "eslint-plugin-import": "2.26.0",
"eslint-plugin-prettier": "4.2.1", "eslint-plugin-prettier": "4.2.1",
"eslint-plugin-promise": "6.0.1", "eslint-plugin-promise": "6.1.1",
"eslint-plugin-unicorn": "43.0.2", "eslint-plugin-unicorn": "45.0.2",
"fastify": "4.5.3", "fastify": "4.11.0",
"husky": "8.0.1", "husky": "8.0.3",
"lint-staged": "13.0.3", "lint-staged": "13.1.0",
"markdownlint-cli2": "0.5.1", "markdownlint-cli2": "0.6.0",
"markdownlint-rule-relative-links": "1.1.1",
"pinst": "3.0.0", "pinst": "3.0.0",
"prettier": "2.7.1", "prettier": "2.8.2",
"rimraf": "3.0.2", "rimraf": "3.0.2",
"semantic-release": "19.0.5", "semantic-release": "20.0.2",
"socket.io": "4.5.2", "socket.io": "4.5.4",
"socket.io-client": "4.5.2", "socket.io-client": "4.5.4",
"tap": "16.3.0", "tap": "16.3.3",
"typescript": "4.8.3" "typescript": "4.9.4"
} }
} }

View File

@ -1,4 +1,5 @@
{ {
"extends": "@tsconfig/strictest/tsconfig.json",
"compilerOptions": { "compilerOptions": {
"target": "ESNext", "target": "ESNext",
"module": "ESNext", "module": "ESNext",
@ -7,9 +8,6 @@
"outDir": "./build", "outDir": "./build",
"rootDir": "./src", "rootDir": "./src",
"emitDeclarationOnly": true, "emitDeclarationOnly": true,
"declaration": true, "declaration": true
"strict": true,
"skipLibCheck": true,
"esModuleInterop": true
} }
} }