update JS dependencies
This commit is contained in:
parent
1a894513c5
commit
e0c7dc346e
90
package.json
90
package.json
|
|
@ -19,76 +19,70 @@
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/core": "^10.0.28",
|
"@emotion/core": "^10.0.28",
|
||||||
"@emotion/styled": "^10.0.27",
|
"@emotion/styled": "^10.0.27",
|
||||||
"@fortawesome/fontawesome-free": "^5.12.0",
|
"@hot-loader/react-dom": "^16.13.0",
|
||||||
"@hot-loader/react-dom": "^16.11.0",
|
"@tweenjs/tween.js": "^18.5.0",
|
||||||
"@tweenjs/tween.js": "^18.4.2",
|
|
||||||
"blessing-skin-shell": "^0.3.1",
|
"blessing-skin-shell": "^0.3.1",
|
||||||
"cli-spinners": "^2.2.0",
|
"cli-spinners": "^2.3.0",
|
||||||
"commander": "^5.0.0",
|
"commander": "^5.1.0",
|
||||||
"echarts": "^4.6.0",
|
"echarts": "^4.7.0",
|
||||||
"enquirer": "^2.3.4",
|
"enquirer": "^2.3.5",
|
||||||
"immer": "^6.0.2",
|
"immer": "^6.0.5",
|
||||||
"jquery": "^3.4.1",
|
"jquery": "^3.4.1",
|
||||||
"lodash.debounce": "^4.0.8",
|
"lodash.debounce": "^4.0.8",
|
||||||
"nanoid": "^2.1.11",
|
"nanoid": "^3.1.9",
|
||||||
"react": "^16.12.0",
|
"react": "^16.13.0",
|
||||||
"react-dom": "^16.12.0",
|
"react-dom": "^16.13.0",
|
||||||
"react-draggable": "^4.2.0",
|
"react-draggable": "^4.4.2",
|
||||||
"react-hot-loader": "^4.12.18",
|
"react-hot-loader": "^4.12.21",
|
||||||
"reaptcha": "^1.7.2",
|
"reaptcha": "^1.7.2",
|
||||||
"rxjs": "^6.5.3",
|
"rxjs": "^6.5.5",
|
||||||
"skinview-utils": "^0.2.1",
|
"skinview-utils": "^0.2.1",
|
||||||
"skinview3d": "^1.2.1",
|
"skinview3d": "^1.2.1",
|
||||||
"spectre.css": "^0.5.8",
|
"spectre.css": "^0.5.8",
|
||||||
"use-immer": "^0.3.5",
|
"use-immer": "^0.4.0",
|
||||||
"xterm": "^4.4.0",
|
"xterm": "^4.6.0",
|
||||||
"xterm-addon-fit": "^0.3.0"
|
"xterm-addon-fit": "^0.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@gplane/tsconfig": "^1.0.0",
|
"@gplane/tsconfig": "^1.1.0",
|
||||||
"@testing-library/jest-dom": "^5.3.0",
|
"@testing-library/jest-dom": "^5.7.0-beta.1",
|
||||||
"@testing-library/react": "^10.0.1",
|
"@testing-library/react": "^10.0.4",
|
||||||
"@types/bootstrap": "^4.3.1",
|
"@types/bootstrap": "^4.3.3",
|
||||||
"@types/echarts": "^4.4.2",
|
"@types/echarts": "^4.6.0",
|
||||||
"@types/jest": "^25.1.4",
|
"@types/jest": "^25.2.3",
|
||||||
"@types/jquery": "^3.3.29",
|
"@types/jquery": "^3.3.38",
|
||||||
"@types/js-yaml": "^3.12.2",
|
"@types/js-yaml": "^3.12.4",
|
||||||
"@types/lodash.debounce": "^4.0.6",
|
"@types/lodash.debounce": "^4.0.6",
|
||||||
"@types/nanoid": "^2.1.0",
|
"@types/react": "^16.9.35",
|
||||||
"@types/react": "^16.9.17",
|
"@types/react-dom": "^16.9.8",
|
||||||
"@types/react-dom": "^16.9.4",
|
"@types/tween.js": "^18.5.0",
|
||||||
"@types/tween.js": "^17.2.0",
|
"@types/webpack": "^4.41.13",
|
||||||
"@types/webpack": "^4.41.2",
|
|
||||||
"@typescript-eslint/eslint-plugin": "^2.8.0",
|
"@typescript-eslint/eslint-plugin": "^2.8.0",
|
||||||
"@typescript-eslint/parser": "^2.8.0",
|
"@typescript-eslint/parser": "^2.8.0",
|
||||||
"autoprefixer": "^9.7.3",
|
"autoprefixer": "^9.8.0",
|
||||||
"bootstrap": "^4.5.0",
|
"bootstrap": "^4.5.0",
|
||||||
"css-loader": "^3.4.2",
|
"css-loader": "^3.5.3",
|
||||||
"cssnano": "^4.1.10",
|
"cssnano": "^4.1.10",
|
||||||
"eslint": "^6.7.1",
|
"eslint": "^6.7.1",
|
||||||
"eslint-config-gplane": "^6.2.1",
|
"eslint-config-gplane": "^6.2.2",
|
||||||
"eslint-formatter-beauty": "^3.0.0",
|
"eslint-formatter-beauty": "^3.0.0",
|
||||||
"file-loader": "^5.0.2",
|
"file-loader": "^6.0.0",
|
||||||
"jest": "^25.2.3",
|
"jest": "^26.0.1",
|
||||||
"jest-extended": "^0.11.5",
|
"jest-extended": "^0.11.5",
|
||||||
"js-yaml": "^3.13.1",
|
"js-yaml": "^3.13.1",
|
||||||
"mini-css-extract-plugin": "^0.9.0",
|
"mini-css-extract-plugin": "^0.9.0",
|
||||||
"postcss-loader": "^3.0.0",
|
"postcss-loader": "^3.0.0",
|
||||||
"prettier": "^2.0.1",
|
"prettier": "^2.0.5",
|
||||||
"style-loader": "^1.1.2",
|
"style-loader": "^1.2.1",
|
||||||
"ts-jest": "^25.2.1",
|
"ts-jest": "^26.0.0",
|
||||||
"ts-loader": "^7.0.4",
|
"ts-loader": "^7.0.4",
|
||||||
"typescript": "^3.9.2",
|
"typescript": "^3.9.2",
|
||||||
"url-loader": "^3.0.0",
|
"url-loader": "^4.1.0",
|
||||||
"webpack": "^4.41.2",
|
"webpack": "^4.43.0",
|
||||||
"webpack-cli": "^3.3.10",
|
"webpack-cli": "^3.3.11",
|
||||||
"webpack-dev-server": "^3.10.1",
|
"webpack-dev-server": "^3.11.0",
|
||||||
"webpack-manifest-plugin": "^2.2.0"
|
"webpack-manifest-plugin": "^2.2.0"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
|
||||||
"caniuse-lite": "*",
|
|
||||||
"@types/testing-library__dom": "^7.0.0"
|
|
||||||
},
|
|
||||||
"browserslist": [
|
"browserslist": [
|
||||||
"> 1%",
|
"> 1%",
|
||||||
"not dead",
|
"not dead",
|
||||||
|
|
@ -177,7 +171,7 @@
|
||||||
"jest": {
|
"jest": {
|
||||||
"preset": "ts-jest",
|
"preset": "ts-jest",
|
||||||
"resetMocks": true,
|
"resetMocks": true,
|
||||||
"timers": "fake",
|
"timers": "modern",
|
||||||
"transform": {
|
"transform": {
|
||||||
".*\\.tsx?$": "ts-jest"
|
".*\\.tsx?$": "ts-jest"
|
||||||
},
|
},
|
||||||
|
|
@ -198,7 +192,7 @@
|
||||||
],
|
],
|
||||||
"coveragePathIgnorePatterns": [
|
"coveragePathIgnorePatterns": [
|
||||||
"/node_modules/",
|
"/node_modules/",
|
||||||
"<rootDir>/resources/assets/styles",
|
"<rootDir>/resources/assets/src/styles",
|
||||||
"<rootDir>/resources/assets/tests/setup",
|
"<rootDir>/resources/assets/tests/setup",
|
||||||
"<rootDir>/resources/assets/tests/utils",
|
"<rootDir>/resources/assets/tests/utils",
|
||||||
"<rootDir>/resources/assets/tests/scripts/cli/stdio"
|
"<rootDir>/resources/assets/tests/scripts/cli/stdio"
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
import React, { useState, useEffect } from 'react'
|
import React, { useState, useEffect } from 'react'
|
||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from 'react-dom'
|
||||||
import nanoid from 'nanoid'
|
import { nanoid } from 'nanoid'
|
||||||
import * as emitter from './event'
|
import * as emitter from './event'
|
||||||
import ToastBox, { ToastType } from '../components/Toast'
|
import ToastBox, { ToastType } from '../components/Toast'
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,10 +45,12 @@ describe('install plugin', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('remove plugin', () => {
|
describe('remove plugin', () => {
|
||||||
|
beforeAll(() => jest.useRealTimers())
|
||||||
|
|
||||||
it('cancelled', async () => {
|
it('cancelled', async () => {
|
||||||
const stdio = new Stdio()
|
const stdio = new Stdio()
|
||||||
|
|
||||||
process.nextTick(() => process.stdin.emit('keypress', 'n'))
|
setImmediate(() => process.stdin.emit('keypress', 'n'))
|
||||||
await apt(stdio, ['remove', 'test'])
|
await apt(stdio, ['remove', 'test'])
|
||||||
expect(fetch.post).not.toBeCalled()
|
expect(fetch.post).not.toBeCalled()
|
||||||
})
|
})
|
||||||
|
|
@ -57,7 +59,7 @@ describe('remove plugin', () => {
|
||||||
fetch.post.mockResolvedValue({ code: 0, message: 'ok' })
|
fetch.post.mockResolvedValue({ code: 0, message: 'ok' })
|
||||||
const stdio = new Stdio()
|
const stdio = new Stdio()
|
||||||
|
|
||||||
process.nextTick(() => process.stdin.emit('keypress', 'y'))
|
setImmediate(() => process.stdin.emit('keypress', 'y'))
|
||||||
await apt(stdio, ['remove', 'test'])
|
await apt(stdio, ['remove', 'test'])
|
||||||
expect(fetch.post).toBeCalledWith('/admin/plugins/manage', {
|
expect(fetch.post).toBeCalledWith('/admin/plugins/manage', {
|
||||||
action: 'delete',
|
action: 'delete',
|
||||||
|
|
|
||||||
|
|
@ -45,10 +45,12 @@ describe('install plugin', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('remove plugin', () => {
|
describe('remove plugin', () => {
|
||||||
|
beforeAll(() => jest.useRealTimers())
|
||||||
|
|
||||||
it('cancelled', async () => {
|
it('cancelled', async () => {
|
||||||
const stdio = new Stdio()
|
const stdio = new Stdio()
|
||||||
|
|
||||||
process.nextTick(() => process.stdin.emit('keypress', 'n'))
|
setImmediate(() => process.stdin.emit('keypress', 'n'))
|
||||||
await dnf(stdio, ['remove', 'test'])
|
await dnf(stdio, ['remove', 'test'])
|
||||||
expect(fetch.post).not.toBeCalled()
|
expect(fetch.post).not.toBeCalled()
|
||||||
})
|
})
|
||||||
|
|
@ -57,7 +59,7 @@ describe('remove plugin', () => {
|
||||||
fetch.post.mockResolvedValue({ code: 0, message: 'ok' })
|
fetch.post.mockResolvedValue({ code: 0, message: 'ok' })
|
||||||
const stdio = new Stdio()
|
const stdio = new Stdio()
|
||||||
|
|
||||||
process.nextTick(() => process.stdin.emit('keypress', 'y'))
|
setImmediate(() => process.stdin.emit('keypress', 'y'))
|
||||||
await dnf(stdio, ['remove', 'test'])
|
await dnf(stdio, ['remove', 'test'])
|
||||||
expect(fetch.post).toBeCalledWith('/admin/plugins/manage', {
|
expect(fetch.post).toBeCalledWith('/admin/plugins/manage', {
|
||||||
action: 'delete',
|
action: 'delete',
|
||||||
|
|
|
||||||
|
|
@ -41,10 +41,12 @@ describe('install plugin', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('remove plugin', () => {
|
describe('remove plugin', () => {
|
||||||
|
beforeAll(() => jest.useRealTimers())
|
||||||
|
|
||||||
it('cancelled', async () => {
|
it('cancelled', async () => {
|
||||||
const stdio = new Stdio()
|
const stdio = new Stdio()
|
||||||
|
|
||||||
process.nextTick(() => process.stdin.emit('keypress', 'n'))
|
setImmediate(() => process.stdin.emit('keypress', 'n'))
|
||||||
await pacman(stdio, ['-R', 'test'])
|
await pacman(stdio, ['-R', 'test'])
|
||||||
expect(fetch.post).not.toBeCalled()
|
expect(fetch.post).not.toBeCalled()
|
||||||
})
|
})
|
||||||
|
|
@ -53,7 +55,7 @@ describe('remove plugin', () => {
|
||||||
fetch.post.mockResolvedValue({ code: 0, message: 'ok' })
|
fetch.post.mockResolvedValue({ code: 0, message: 'ok' })
|
||||||
const stdio = new Stdio()
|
const stdio = new Stdio()
|
||||||
|
|
||||||
process.nextTick(() => process.stdin.emit('keypress', 'y'))
|
setImmediate(() => process.stdin.emit('keypress', 'y'))
|
||||||
await pacman(stdio, ['-R', 'test'])
|
await pacman(stdio, ['-R', 'test'])
|
||||||
expect(fetch.post).toBeCalledWith('/admin/plugins/manage', {
|
expect(fetch.post).toBeCalledWith('/admin/plugins/manage', {
|
||||||
action: 'delete',
|
action: 'delete',
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { t } from '@/scripts/i18n'
|
||||||
import { showModal } from '@/scripts/modal'
|
import { showModal } from '@/scripts/modal'
|
||||||
|
|
||||||
test('show modal', async () => {
|
test('show modal', async () => {
|
||||||
process.nextTick(() => {
|
Promise.resolve().then(() => {
|
||||||
expect(document.querySelector('.modal-title')!.textContent).toBe(
|
expect(document.querySelector('.modal-title')!.textContent).toBe(
|
||||||
t('general.tip'),
|
t('general.tip'),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -132,6 +132,7 @@ describe('sign button', () => {
|
||||||
})
|
})
|
||||||
|
|
||||||
it('remain in hours', async () => {
|
it('remain in hours', async () => {
|
||||||
|
jest.useRealTimers()
|
||||||
fetch.get.mockResolvedValue(scoreInfo({}, { lastSignAt: Date.now() }))
|
fetch.get.mockResolvedValue(scoreInfo({}, { lastSignAt: Date.now() }))
|
||||||
|
|
||||||
const { getByRole } = render(<Dashboard />)
|
const { getByRole } = render(<Dashboard />)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user