update most of packages

This commit is contained in:
2021-07-31 18:48:52 +00:00
parent 7d3864322a
commit dc96925032
10 changed files with 2597 additions and 2922 deletions

View File

@@ -8,7 +8,6 @@
"workspaceFolder": "/workspace", "workspaceFolder": "/workspace",
// Set *default* container specific settings.json values on container create. // Set *default* container specific settings.json values on container create.
"settings": { "settings": {
"terminal.integrated.shell.linux": "/bin/bash",
"sqltools.connections": [ "sqltools.connections": [
{ {
"name": "MySQL", "name": "MySQL",
@@ -48,7 +47,7 @@
3000 3000
], ],
// Use 'postCreateCommand' to run commands after the container is created. // Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "npm config set unsafe-perm=true && npm i && cd frontend && npm i", // "postCreateCommand": "npm config set unsafe-perm=true && npm i && cd frontend && npm i",
// Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root. // Uncomment to connect as a non-root user. See https://aka.ms/vscode-remote/containers/non-root.
"remoteUser": "node" "remoteUser": "node"
} }

View File

@@ -15,4 +15,5 @@ module.exports = {
"react-spring": "<rootDir>/node_modules/react-spring/web.cjs", "react-spring": "<rootDir>/node_modules/react-spring/web.cjs",
}, },
setupFilesAfterEnv: ["<rootDir>/src/setupTests.ts"], setupFilesAfterEnv: ["<rootDir>/src/setupTests.ts"],
testEnvironment: "jsdom",
}; };

File diff suppressed because it is too large Load Diff

View File

@@ -9,46 +9,46 @@
}, },
"devDependencies": { "devDependencies": {
"@types/autoprefixer": "^9.7.2", "@types/autoprefixer": "^9.7.2",
"@types/enzyme": "^3.10.8", "@types/enzyme": "^3.10.9",
"@types/enzyme-adapter-react-16": "^1.0.6",
"@types/highlight.js": "^9.12.4", "@types/highlight.js": "^9.12.4",
"@types/jest": "^26.0.20", "@types/jest": "^26.0.24",
"@types/parcel-bundler": "^1.12.3", "@types/parcel-bundler": "^1.12.4",
"@types/react": "^16", "@types/react": "^17",
"@types/react-dom": "^16", "@types/react-dom": "^17",
"@types/react-redux": "^7.1.16", "@types/react-redux": "^7.1.18",
"@types/react-router": "^5.1.12", "@types/react-router": "^5.1.16",
"@types/react-router-dom": "^5.1.7", "@types/react-router-dom": "^5.1.8",
"@types/sass": "^1.16.0" "@types/sass": "^1.16.1"
}, },
"dependencies": { "dependencies": {
"@blueprintjs/core": "^3.41.0", "@blueprintjs/core": "^3.47.0",
"@blueprintjs/icons": "^3.25.1", "@blueprintjs/icons": "^3.27.0",
"autoprefixer": "^9", "@wojtekmaj/enzyme-adapter-react-17": "^0",
"autoprefixer": "^10",
"enzyme": "^3.11.0", "enzyme": "^3.11.0",
"enzyme-adapter-react-16": "^1.15.6",
"eslint-plugin-html": "^6.1.2", "eslint-plugin-html": "^6.1.2",
"eslint-plugin-jest": "^24.2.1", "eslint-plugin-jest": "^24.4.0",
"eslint-plugin-jsx-a11y": "^6.4.1", "eslint-plugin-jsx-a11y": "^6.4.1",
"eslint-plugin-react": "^7.22.0", "eslint-plugin-react": "^7.24.0",
"eslint-plugin-react-hooks": "^4.2.0", "eslint-plugin-react-hooks": "^4.2.0",
"flush-promises": "^1.0.2",
"highlight.js": "^10.6.0", "highlight.js": "^10.6.0",
"jest": "^26.6.3", "jest": "^27.0.6",
"parcel-bundler": "^1.12.4", "parcel-bundler": "^1.12.4",
"postcss-modules": "^4.0.0", "postcss-modules": "^4.2.2",
"react": "^16", "react": "^17",
"react-dom": "^16", "react-dom": "^17",
"react-markdown": "^5.0.3", "react-markdown": "^5.0.3",
"react-redux": "^7.2.2", "react-redux": "^7.2.4",
"react-router": "^5.2.0", "react-router": "^5.2.0",
"react-router-dom": "^5.2.0", "react-router-dom": "^5.2.0",
"react-spring": "^8.0.27", "react-spring": "^8.0.27",
"redux": "^4.0.5", "redux": "^4.1.0",
"redux-devtools-extension": "^2.13.9", "redux-devtools-extension": "^2.13.9",
"redux-persist": "^6.0.0", "redux-persist": "^6.0.0",
"redux-saga": "^1.1.3", "redux-saga": "^1.1.3",
"sass": "^1.32.8", "sass": "^1.37.0",
"ts-jest": "^26.5.3" "ts-jest": "^27.0.4"
}, },
"postcss": { "postcss": {
"plugins": { "plugins": {

View File

@@ -1,13 +1,13 @@
import { mount } from "enzyme"; import { mount } from "enzyme";
import * as React from "react"; import * as React from "react";
import * as flushPromises from "flush-promises";
import ReactMarkdown = require("react-markdown"); import ReactMarkdown = require("react-markdown");
import { Redirect } from "react-router"; import { Redirect } from "react-router";
import { SharedViewComponent } from "~Documents/SharedView"; import { SharedViewComponent } from "~Documents/SharedView";
import { LoadingStub } from "~LoadingStub"; import { LoadingStub } from "~LoadingStub";
import { fetchSharedDoc } from "~redux/api/docs"; import { fetchSharedDoc } from "~redux/api/docs";
import { IDocumentEntry } from "~redux/docs/reducer"; import { IDocumentEntry } from "~redux/docs/reducer";
import { flushPromises } from "~tests/utils";
import { IDocumentJSON } from "../../../../src/entity/Document"; import { IDocumentJSON } from "../../../../src/entity/Document";
const testDoc: IDocumentJSON = { const testDoc: IDocumentJSON = {

View File

@@ -1,4 +1,4 @@
import * as Enzyme from "enzyme"; import * as Enzyme from "enzyme";
import * as Adapter from "enzyme-adapter-react-16"; import * as Adapter from "@wojtekmaj/enzyme-adapter-react-17";
Enzyme.configure({ adapter: new Adapter() }); Enzyme.configure({ adapter: new Adapter() });

View File

@@ -1,3 +0,0 @@
export function flushPromises() {
return new Promise(setImmediate);
}

2023
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,62 +1,62 @@
{ {
"name": "writer-backend", "name": "writer-backend",
"devDependencies": { "devDependencies": {
"@types/bcrypt": "^3.0.0", "@types/bcrypt": "^5.0.0",
"@types/chai": "^4.2.15", "@types/chai": "^4.2.21",
"@types/concurrently": "^6.0.1", "@types/concurrently": "^6.2.1",
"@types/eslint": "^7.2.7", "@types/eslint": "^7.28.0",
"@types/eslint-plugin-prettier": "^3.1.0", "@types/eslint-plugin-prettier": "^3.1.0",
"@types/jsonwebtoken": "^8.5.0", "@types/jsonwebtoken": "^8.5.4",
"@types/koa": "^2.13.1", "@types/koa": "^2.13.4",
"@types/koa-logger": "^3.1.1", "@types/koa-logger": "^3.1.1",
"@types/koa-router": "^7.4.1", "@types/koa-router": "^7.4.4",
"@types/koa-send": "^4.1.2", "@types/koa-send": "^4.1.3",
"@types/koa-sslify": "^4.0.1", "@types/koa-sslify": "^4.0.2",
"@types/koa-static": "^4.0.1", "@types/koa-static": "^4.0.2",
"@types/koa__cors": "^3.0.2", "@types/koa__cors": "^3.0.3",
"@types/lodash": "^4.14.168", "@types/lodash": "^4.14.171",
"@types/mocha": "^8.2.1", "@types/mocha": "^9.0.0",
"@types/mysql": "^2.15.18", "@types/mysql": "^2.15.19",
"@types/node": "^14.14.33", "@types/node": "^16.4.8",
"@types/prettier": "^2.2.2", "@types/prettier": "^2.3.2",
"@types/supertest": "^2.0.10", "@types/supertest": "^2.0.11",
"@typescript-eslint/eslint-plugin": "^4.17.0", "@typescript-eslint/eslint-plugin": "^4.28.5",
"@typescript-eslint/parser": "^4.17.0", "@typescript-eslint/parser": "^4.28.5",
"chai": "^4.3.3", "chai": "^4.3.4",
"eslint": "^7.21.0", "eslint": "^7.32.0",
"eslint-config-airbnb": "^18.2.1", "eslint-config-airbnb": "^18.2.1",
"eslint-config-prettier": "^8.1.0", "eslint-config-prettier": "^8.3.0",
"eslint-import-resolver-typescript": "^2.4.0", "eslint-import-resolver-typescript": "^2.4.0",
"eslint-plugin-import": "^2.22.1", "eslint-plugin-import": "^2.23.4",
"eslint-plugin-mocha": "^8.1.0", "eslint-plugin-mocha": "^9.0.0",
"eslint-plugin-prettier": "^3.3.1", "eslint-plugin-prettier": "^3.4.0",
"husky": "^5.1.3", "husky": "^7.0.1",
"mocha": "^8.3.1", "mocha": "^9.0.3",
"prettier": "^2.2.1", "prettier": "^2.3.2",
"supertest": "^6.1.3", "supertest": "^6.1.4",
"ts-node-dev": "^1.1.6" "ts-node-dev": "^1.1.8"
}, },
"dependencies": { "dependencies": {
"@koa/cors": "^3.1.0", "@koa/cors": "^3.1.0",
"bcrypt": "^5.0.1", "bcrypt": "^5.0.1",
"concurrently": "^6.0.0", "concurrently": "^6.2.0",
"cross-env": "^7.0.3", "cross-env": "^7.0.3",
"jsonwebtoken": "^8.5.1", "jsonwebtoken": "^8.5.1",
"koa": "^2.13.1", "koa": "^2.13.1",
"koa-body": "^4.2.0", "koa-body": "^4.2.0",
"koa-jwt": "^4.0.0", "koa-jwt": "^4.0.1",
"koa-logger": "^3.2.1", "koa-logger": "^3.2.1",
"koa-router": "^10.0.0", "koa-router": "^10.0.0",
"koa-send": "^5.0.1", "koa-send": "^5.0.1",
"koa-sslify": "^4.0.3", "koa-sslify": "^5.0.0",
"koa-static": "^5.0.0", "koa-static": "^5.0.0",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"mysql": "^2.18.1", "mysql": "^2.18.1",
"reflect-metadata": "^0.1.13", "reflect-metadata": "^0.1.13",
"ts-node": "9.1.1", "ts-node": "10.1.0",
"tsconfig-paths": "^3.9.0", "tsconfig-paths": "^3.10.1",
"typeorm": "0.2.31", "typeorm": "0.2.36",
"typescript": "^4.2.3" "typescript": "^4.3.5"
}, },
"cacheDirectories": [ "cacheDirectories": [
"frontend/node_modules", "frontend/node_modules",
@@ -78,7 +78,7 @@
"lint-all": "npm run lint && npm run lint-frontend", "lint-all": "npm run lint && npm run lint-frontend",
"lint-all-fix": "npm run lint-fix && npm run lint-frontend-fix", "lint-all-fix": "npm run lint-fix && npm run lint-frontend-fix",
"prettier-check": "prettier src/**/*.ts frontend/src/**/*.ts frontend/src/**/*.tsx --check", "prettier-check": "prettier src/**/*.ts frontend/src/**/*.ts frontend/src/**/*.tsx --check",
"prettify": "prettier src/**/*.ts frontend/src/**/*.ts frontend/src/**/*.tsx --write", "prettify": "prettier src/**/*.ts frontend/src/**/*.ts frontend/src/**/*.tsx --write",
"typeorm-dev": "cross-env NODE_ENV=development ts-node -T -r tsconfig-paths/register ./node_modules/typeorm/cli.js", "typeorm-dev": "cross-env NODE_ENV=development ts-node -T -r tsconfig-paths/register ./node_modules/typeorm/cli.js",
"typeorm": "cross-env NODE_ENV=production ts-node -T -r tsconfig-paths/register ./node_modules/typeorm/cli.js" "typeorm": "cross-env NODE_ENV=production ts-node -T -r tsconfig-paths/register ./node_modules/typeorm/cli.js"
}, },

View File

@@ -43,7 +43,7 @@ docsRouter.patch("/docs/byID/:id", async (ctx) => {
const { user } = ctx.state; const { user } = ctx.state;
const { id } = ctx.params as { const { id } = ctx.params as {
id: number | undefined; id: string | undefined;
}; };
if (!id) { if (!id) {
@@ -56,7 +56,7 @@ docsRouter.patch("/docs/byID/:id", async (ctx) => {
shared: boolean | undefined; shared: boolean | undefined;
}; };
const document = await Document.findOne({ id, user }); const document = await Document.findOne({ id: parseInt(id), user });
if (!document) { if (!document) {
ctx.throw(404); ctx.throw(404);
@@ -106,7 +106,7 @@ docsRouter.get("/docs/byID/:id", async (ctx) => {
} }
const { id } = ctx.params as { const { id } = ctx.params as {
id: number | undefined; id: string | undefined;
}; };
if (!id) { if (!id) {
@@ -115,7 +115,7 @@ docsRouter.get("/docs/byID/:id", async (ctx) => {
const { user } = ctx.state; const { user } = ctx.state;
const document = await Document.findOne({ id, user }); const document = await Document.findOne({ id: parseInt(id), user });
if (!document) { if (!document) {
ctx.throw(404); ctx.throw(404);
@@ -129,7 +129,7 @@ docsRouter.get("/docs/byID/:id", async (ctx) => {
docsRouter.get("/docs/shared/:username/:id", async (ctx) => { docsRouter.get("/docs/shared/:username/:id", async (ctx) => {
const { id, username } = ctx.params as { const { id, username } = ctx.params as {
id: number | undefined; id: string | undefined;
username: string | undefined; username: string | undefined;
}; };
@@ -143,7 +143,7 @@ docsRouter.get("/docs/shared/:username/:id", async (ctx) => {
ctx.throw(404); ctx.throw(404);
} }
const document = await Document.findOne({ id, user }); const document = await Document.findOne({ id: parseInt(id), user });
if (!document) { if (!document) {
ctx.throw(404); ctx.throw(404);
@@ -165,7 +165,7 @@ docsRouter.delete("/docs/byID/:id", async (ctx) => {
} }
const { id } = ctx.params as { const { id } = ctx.params as {
id: number | undefined; id: string | undefined;
}; };
if (!id) { if (!id) {
@@ -174,7 +174,7 @@ docsRouter.delete("/docs/byID/:id", async (ctx) => {
const { user } = ctx.state; const { user } = ctx.state;
const document = await Document.findOne({ id, user }); const document = await Document.findOne({ id: parseInt(id), user });
if (!document) { if (!document) {
ctx.throw(404); ctx.throw(404);