bump deps version

pull/318/head
undefined 3 years ago
parent e7b4b5de5e
commit f621d26ed7

@ -11,6 +11,7 @@ parser: '@typescript-eslint/parser'
plugins:
- '@typescript-eslint'
- simple-import-sort
- eslint-plugin-import
ignorePatterns:
- public/
- '*.spec.ts'
@ -56,6 +57,14 @@ rules:
match: false
format: [camelCase, PascalCase]
leadingUnderscore: allowSingleOrDouble
- selector: [objectLiteralProperty]
filter:
regex: '^[\d]+$'
match: true
format: null
- selector: [typeProperty, objectLiteralProperty]
modifiers: [requiresQuotes]
format: null
- selector: enum
format: [PascalCase]
- selector: [class, interface, typeAlias, enumMember]
@ -64,6 +73,7 @@ rules:
format: [camelCase, PascalCase, UPPER_CASE]
'@typescript-eslint/no-redeclare': 0
'@typescript-eslint/default-param-last': 0
class-methods-use-this: 0
global-require: 0
@ -95,6 +105,7 @@ rules:
no-return-await: 0
no-underscore-dangle: 0
prefer-destructuring: 0
function-paren-newline: 0
simple-import-sort/imports:
- warn
- groups:

@ -27,16 +27,16 @@
"license": "AGPL-3.0-only",
"devDependencies": {
"@types/cross-spawn": "^6.0.2",
"@types/node": "^16.11.26",
"@types/node": "^17.0.21",
"@types/semver": "^7.3.9",
"@typescript-eslint/eslint-plugin": "5.12.0",
"@typescript-eslint/parser": "5.12.0",
"@typescript-eslint/eslint-plugin": "5.14.0",
"@typescript-eslint/parser": "5.14.0",
"cac": "^6.7.12",
"cross-env": "^7.0.3",
"cross-spawn": "^7.0.3",
"esbuild": "0.14.3",
"eslint": "^8.10.0",
"eslint-config-airbnb-typescript": "12.3.1",
"eslint": "^8.11.0",
"eslint-config-airbnb-typescript": "16.1.1",
"eslint-import-resolver-typescript": "2.5.0",
"eslint-plugin-import": "2.25.4",
"eslint-plugin-simple-import-sort": "7.0.0",
@ -46,7 +46,7 @@
"mongodb": "^3.7.3",
"ora": "5.4.1",
"semver": "^7.3.5",
"typedoc": "^0.22.12",
"typescript": "4.4.3"
"typedoc": "^0.22.13",
"typescript": "4.6.2"
}
}

@ -8,7 +8,7 @@
"preferUnplugged": true,
"dependencies": {
"js-yaml": "^4.1.0",
"superagent": "^6.1.0"
"superagent": "^7.1.1"
},
"devDependencies": {
"@types/js-yaml": "^4.0.5"

@ -10,7 +10,7 @@
"dependencies": {
"adm-zip": "0.5.5",
"decode-html": "^2.0.0",
"fs-extra": "^10.0.0",
"fs-extra": "^10.0.1",
"mongodb": "^3.7.3",
"xml2js": "^0.4.23"
},

@ -7,7 +7,7 @@
"repository": "https://github.com/hydro-dev/Hydro.git",
"dependencies": {
"@hydrooj/utils": "workspace:*",
"axios": "^0.25.0",
"axios": "^0.26.1",
"cac": "^6.7.12",
"esbuild": "0.14.3",
"fs-extra": "^10.0.1",
@ -25,7 +25,7 @@
"@types/js-yaml": "^4.0.5",
"@types/lodash": "^4.14.179",
"@types/shell-quote": "^1.7.1",
"@types/ws": "^8.5.2"
"@types/ws": "^8.5.3"
},
"peerDependencies": {
"hydrooj": "*"

@ -1,6 +1,6 @@
{
"name": "hydrooj",
"version": "3.8.7",
"version": "3.9.0",
"bin": "bin/hydrooj.js",
"main": "src/loader",
"module": "src/loader",
@ -20,12 +20,12 @@
"cac": "^6.7.12",
"cookies": "^0.8.0",
"detect-browser": "^5.3.0",
"emoji-regex": "^10.0.0",
"emoji-regex": "^10.0.1",
"emojis-list": "2.1.0",
"esbuild": "0.14.3",
"fs-extra": "^10.0.1",
"graphql": "^16.3.0",
"graphql-scalars": "1.14.1",
"graphql-scalars": "1.15.0",
"js-yaml": "^4.1.0",
"koa": "^2.13.4",
"koa-body": "^4.2.0",
@ -34,7 +34,7 @@
"koa-router": "^10.1.1",
"koa-static-cache": "^5.1.4",
"lodash": "^4.17.21",
"lru-cache": "6.0.0",
"lru-cache": "7.4.4",
"mime-types": "^2.1.34",
"minio": "7.0.25",
"moment-timezone": "^0.5.34",
@ -49,7 +49,7 @@
"serialize-javascript": "^6.0.0",
"sockjs": "^0.3.24",
"source-map-support": "^0.5.21",
"superagent": "^6.1.0",
"superagent": "^7.1.1",
"thirty-two": "^1.0.2",
"tx2": "^1.0.5"
},
@ -62,7 +62,7 @@
"@types/koa-router": "^7.4.4",
"@types/koa-static-cache": "^5.1.1",
"@types/lodash": "^4.14.179",
"@types/lru-cache": "^5.1.1",
"@types/lru-cache": "^7.4.0",
"@types/mime-types": "^2.1.1",
"@types/minio": "^7.0.12",
"@types/mongodb": "^3.6.20",

@ -5,7 +5,7 @@ const _CACHE_INFO = {
};
function _LOGP(x: number) {
const sqrtPi = 2.506628274631000502415765284811; // Sqrt[Pi]
const sqrtPi = 2.506628274631; // Sqrt[Pi]
return (2 * Math.exp(-1.0 * (Math.log(x) ** 2) * 2)) / x / sqrtPi;
}

@ -91,9 +91,7 @@ class DomainModel {
static async inc(domainId: string, field: NumberKeys<DomainDoc>, n: number): Promise<number | null> {
const res = await coll.findOneAndUpdate(
{ _id: domainId },
// FIXME
// @ts-expect-error
{ $inc: { [field]: n } },
{ $inc: { [field]: n } as any },
{ returnDocument: 'after' },
);
return res.value?.[field];

@ -52,9 +52,7 @@ export async function set(_id: string, value: any, broadcast = true) {
export async function inc<K extends NumberKeys<SystemKeys>>(_id: K) {
const res = await coll.findOneAndUpdate(
{ _id },
// FIXME NumberKeys<>
// @ts-ignore
{ $inc: { value: 1 } },
{ $inc: { value: 1 } as any },
{ upsert: true, returnDocument: 'after' },
);
cache[_id] = res.value.value;

@ -35,12 +35,12 @@ export function deleteUserCache(udoc: User | Udoc | string | undefined | null, r
}
if (typeof udoc === 'string') {
// is domainId
for (const key of cache.keys().filter((i) => i.endsWith(`/${udoc}`))) cache.del(key);
for (const key of [...cache.keys()].filter((i) => i.endsWith(`/${udoc}`))) cache.delete(key);
return;
}
const id = [`id/${udoc._id.toString()}`, `name/${udoc.uname.toLowerCase()}`, `mail/${udoc.mail.toLowerCase()}`];
for (const key of cache.keys().filter((k) => id.includes(`${k.split('/')[0]}/${k.split('/')[1]}`))) {
cache.del(key);
for (const key of [...cache.keys()].filter((k) => id.includes(`${k.split('/')[0]}/${k.split('/')[1]}`))) {
cache.delete(key);
}
}
bus.on('user/delcache', (content) => deleteUserCache(JSON.parse(content), true));

@ -25,6 +25,7 @@ function isBailed(value: any) {
export type Disposable = () => void;
export type VoidReturn = Promise<any> | any;
/* eslint-disable @typescript-eslint/naming-convention */
export interface EventMap extends Record<string, any> {
'app/started': () => void
'app/load/lib': () => VoidReturn
@ -100,6 +101,7 @@ export interface EventMap extends Record<string, any> {
'record/change': (rdoc: RecordDoc, $set?: any, $push?: any) => void
'record/judge': (rdoc: RecordDoc, updated: boolean) => VoidReturn
}
/* eslint-enable @typescript-eslint/naming-convention */
function getHooks<K extends keyof EventMap>(name: K) {
const hooks = _hooks[name] || (_hooks[name] = []);

@ -10,6 +10,6 @@
"dependencies": {
"adm-zip": "0.5.5",
"decode-html": "^2.0.0",
"fs-extra": "^10.0.0"
"fs-extra": "^10.0.1"
}
}

@ -13,6 +13,6 @@
"hydrooj": "*"
},
"dependencies": {
"superagent": "^6.1.0"
"superagent": "^7.1.1"
}
}

@ -13,6 +13,6 @@
"hydrooj": "*"
},
"dependencies": {
"superagent": "^6.1.0"
"superagent": "^7.1.1"
}
}

@ -13,6 +13,6 @@
"hydrooj": "*"
},
"dependencies": {
"superagent": "^6.1.0"
"superagent": "^7.1.1"
}
}

@ -10,6 +10,6 @@
"ws": "^8.5.0"
},
"devDependencies": {
"@types/ws": "^8.2.2"
"@types/ws": "^8.5.3"
}
}

@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/naming-convention */
/* eslint-disable no-await-in-loop */
import mongodb, { Cursor, Db } from 'mongodb';
import {

@ -8,6 +8,6 @@
"license": "AGPL-3.0-or-later",
"preferUnplugged": true,
"dependencies": {
"superagent": "^6.1.0"
"superagent": "^7.1.1"
}
}

@ -87,6 +87,8 @@ module.exports = {
'class-methods-use-this': 'off',
'consistent-return': 'warn',
'func-names': 'off',
'function-paren-newline': 'off',
'default-param-last': 'off',
'import/first': 'off',
'import/extensions': 'off',
'import/no-extraneous-dependencies': 'off',

@ -32,7 +32,7 @@ const tagCheck = new Xss.FilterXSS({
},
});
const xss = new Xss.FilterXSS({
export const xss = new Xss.FilterXSS({
whiteList: {
a: ['target', 'href', 'title'],
abbr: ['title'],
@ -107,13 +107,13 @@ const xss = new Xss.FilterXSS({
},
});
function ensureTag(html: string) {
export function ensureTag(html: string) {
stack.length = 0;
const res = tagCheck.process(html);
return res + stack.map((i) => `</${i}>`).join('');
}
function xssProtector(md) {
export function xssProtector(md) {
function protector(state) {
for (let i = 0; i < state.tokens.length; i++) {
const cur = state.tokens[i];
@ -133,5 +133,3 @@ function xssProtector(md) {
md.core.ruler.after('linkify', 'xss', protector);
}
module.exports = { xss, ensureTag, xssProtector };

@ -23,7 +23,7 @@ function transform(filename) {
return result.outputFiles[0].text;
}
require.extensions['.js'] = function loader(module, filename) {
if (!filename.includes('node_modules') && !filename.includes('postcss.config.js')) {
if (filename.includes('chalk') || (!filename.includes('node_modules') && !filename.includes('postcss.config.js'))) {
return module._compile(transform(filename), filename);
}
const content = fs.readFileSync(filename, 'utf-8');

@ -119,6 +119,7 @@ export default class DOMAttachedObject {
}
constructor($dom: JQuery<HTMLElement>, monitorDetach = false) {
// eslint-disable-next-line no-constructor-return
if ($dom == null) return null;
this.$dom = $dom;
this.id = ++DOMAttachedObject.uniqueIdCounter;

@ -23,9 +23,8 @@ class Marker {
}
constructor() {
if (Marker.exists()) {
return markerInstance;
}
// eslint-disable-next-line no-constructor-return
if (Marker.exists()) return markerInstance;
if (markerInstance) {
markerInstance.destroy();
}

@ -109,7 +109,7 @@ function handlePasteEvent(editor: monaco.editor.IStandaloneCodeEditor) {
});
}
let progress = 0;
request.postFile(isProblemEdit ? './file' : '/file', data, {
request.postFile(isProblemEdit ? './files' : '/file', data, {
xhr() {
const xhr = new XMLHttpRequest();
xhr.upload.addEventListener('loadstart', () => updateText(i18n('Uploading...')));

@ -11,7 +11,8 @@ console.log(
'%c%s%c%s',
'color:red;font-size:24px;',
' Welcome to\n',
'color:blue;font-weight:bold;', `\
'color:blue;font-weight:bold;',
`\
__ __ __
/ / / /_ ______/ /________
/ /_/ / / / / __ / ___/ __ \\

@ -1,6 +1,6 @@
{
"name": "@hydrooj/ui-default",
"version": "4.33.8",
"version": "4.34.0",
"author": "undefined <i@undefined.moe>",
"license": "AGPL-3.0",
"main": "hydro.js",
@ -11,14 +11,14 @@
},
"devDependencies": {
"@blueprintjs/core": "^3.53.0",
"@fontsource/dm-mono": "^4.5.3",
"@fontsource/dm-mono": "^4.5.4",
"@fontsource/fira-code": "^4.5.5",
"@fontsource/inconsolata": "^4.5.2",
"@fontsource/jetbrains-mono": "^4.5.3",
"@fontsource/pt-mono": "^4.5.2",
"@fontsource/pt-mono": "^4.5.3",
"@fontsource/roboto-mono": "^4.5.3",
"@fontsource/source-code-pro": "^4.5.4",
"@fontsource/ubuntu-mono": "^4.5.3",
"@fontsource/ubuntu-mono": "^4.5.4",
"@hydrooj/utils": "workspace:*",
"@types/gulp-if": "^0.0.34",
"@types/jquery": "^3.5.14",
@ -30,27 +30,27 @@
"@undefined-moe/monaco-yaml": "^2.5.1",
"ansi_up": "^5.1.0",
"autoprefixer": "^9.8.8",
"chalk": "^4.1.2",
"chalk": "^5.0.1",
"classnames": "^2.3.1",
"clean-webpack-plugin": "^4.0.0",
"clipboard": "^2.0.10",
"copy-webpack-plugin": "^6.4.1",
"css-loader": "^4.3.0",
"diff-dom": "^4.2.3",
"echarts": "^5.3.0",
"echarts": "^5.3.1",
"emojis-keywords": "2.0.0",
"emojis-list": "2.1.0",
"esbuild-loader": "^2.18.0",
"eslint": "^8.10.0",
"eslint-config-airbnb": "^18.2.1",
"eslint": "^8.11.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-import-resolver-webpack": "^0.13.2",
"eslint-plugin-import": "^2.25.4",
"eslint-plugin-jsx-a11y": "^6.5.1",
"eslint-plugin-react": "^7.29.2",
"fancy-log": "^1.3.3",
"eslint-plugin-react": "^7.29.3",
"fancy-log": "^2.0.0",
"file-loader": "^6.2.0",
"friendly-errors-webpack-plugin": "^1.7.0",
"graphiql": "^1.6.0",
"graphiql": "^1.7.1",
"gulp": "^4.0.2",
"gulp-cli": "^2.3.0",
"gulp-iconfont": "^11.0.1",
@ -101,7 +101,7 @@
"through2": "^4.0.2",
"timeago-react": "^3.0.4",
"timeago.js": "^4.0.2",
"vditor": "^3.8.11",
"vditor": "^3.8.12",
"vinyl-buffer": "^1.0.1",
"web-streams-polyfill": "^3.2.0",
"webpack": "^4.46.0",
@ -127,6 +127,6 @@
"nunjucks": "^3.2.3",
"react-query": "^3.34.16",
"streamsaver": "^2.0.6",
"xss": "^1.0.10"
"xss": "^1.0.11"
}
}

@ -1,3 +1,4 @@
/* eslint-disable react/function-component-definition */
import { NamedPage } from 'vj/misc/Page';
import request from 'vj/utils/request';
import React from 'react';

@ -12,7 +12,7 @@
"js-yaml": "^4.1.0",
"moment": "^2.29.1",
"mongodb": "^3.7.3",
"systeminformation": "^5.11.5"
"systeminformation": "^5.11.8"
},
"devDependencies": {
"@types/fs-extra": "^9.0.13",

@ -12,17 +12,17 @@
"chrome-finder": "^1.0.7",
"jsdom": "^19.0.0",
"lodash": "^4.17.21",
"puppeteer-core": "^13.2.0",
"puppeteer-core": "^13.5.1",
"puppeteer-extra": "^3.2.3",
"puppeteer-extra-plugin-portal": "^3.0.1",
"puppeteer-extra-plugin-stealth": "^2.9.0",
"superagent": "^6.1.0",
"superagent-proxy": "^2.1.0"
"superagent": "^7.1.1",
"superagent-proxy": "^3.0.0"
},
"devDependencies": {
"@types/jsdom": "^16.2.14",
"@types/lodash": "^4.14.178",
"@types/lodash": "^4.14.179",
"@types/superagent": "^4.1.15",
"@types/superagent-proxy": "^2.0.1"
"@types/superagent-proxy": "^3.0.0"
}
}

Loading…
Cancel
Save