Update JS dependencies (#21881)

- Update all JS deps
- Regenerate SVGs
- Add new eslint rules, fix issues
- Tested Mermaid, Swagger, Vue, Webpack, Citation

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
This commit is contained in:
silverwind 2022-11-22 01:58:55 +01:00 committed by GitHub
parent 1c7496c7a7
commit c8b217110b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
19 changed files with 1076 additions and 1331 deletions

View File

@ -551,7 +551,7 @@ steps:
# TODO: We should probably build all dependencies into a test image
- name: test-e2e
image: mcr.microsoft.com/playwright:v1.27.1-focal
image: mcr.microsoft.com/playwright:v1.28.0-focal
commands:
- curl -sLO https://go.dev/dl/go1.19.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.19.linux-amd64.tar.gz
- groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea

View File

@ -229,6 +229,7 @@ rules:
no-empty-character-class: [2]
no-empty-function: [0]
no-empty-pattern: [2]
no-empty-static-block: [2]
no-empty: [2, {allowEmptyCatch: true}]
no-eq-null: [2]
no-eval: [2]
@ -269,6 +270,7 @@ rules:
no-negated-condition: [0]
no-nested-ternary: [0]
no-new-func: [2]
no-new-native-nonconstructor: [2]
no-new-object: [2]
no-new-symbol: [2]
no-new-wrappers: [2]
@ -443,6 +445,7 @@ rules:
unicorn/no-invalid-remove-event-listener: [2]
unicorn/no-keyword-prefix: [0]
unicorn/no-lonely-if: [2]
unicorn/no-negated-condition: [0]
unicorn/no-nested-ternary: [0]
unicorn/no-new-array: [0]
unicorn/no-new-buffer: [0]
@ -453,6 +456,7 @@ rules:
unicorn/no-static-only-class: [2]
unicorn/no-thenable: [2]
unicorn/no-this-assignment: [2]
unicorn/no-typeof-undefined: [2]
unicorn/no-unnecessary-await: [2]
unicorn/no-unreadable-array-destructuring: [0]
unicorn/no-unreadable-iife: [2]
@ -503,6 +507,7 @@ rules:
unicorn/prefer-regexp-test: [2]
unicorn/prefer-replace-all: [0]
unicorn/prefer-set-has: [0]
unicorn/prefer-set-size: [2]
unicorn/prefer-spread: [0]
unicorn/prefer-starts-ends-with: [2]
unicorn/prefer-string-slice: [0]

2333
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -9,14 +9,14 @@
"dependencies": {
"@citation-js/core": "0.6.1",
"@citation-js/plugin-bibtex": "0.6.1",
"@citation-js/plugin-csl": "0.6.3",
"@citation-js/plugin-csl": "0.6.4",
"@citation-js/plugin-software-formats": "0.6.0",
"@claviska/jquery-minicolors": "2.3.6",
"@mcaptcha/vanilla-glue": "0.1.0-alpha-3",
"@primer/octicons": "17.7.0",
"@vue/compiler-sfc": "3.2.41",
"@primer/octicons": "17.9.0",
"@vue/compiler-sfc": "3.2.45",
"add-asset-webpack-plugin": "2.0.1",
"css-loader": "6.7.1",
"css-loader": "6.7.2",
"dropzone": "6.0.0-beta.2",
"easymde": "2.18.0",
"esbuild-loader": "2.20.0",
@ -29,45 +29,45 @@
"less": "4.1.3",
"less-loader": "11.1.0",
"license-checker-webpack-plugin": "0.2.1",
"mermaid": "9.1.7",
"mini-css-extract-plugin": "2.6.1",
"mermaid": "9.2.2",
"mini-css-extract-plugin": "2.7.0",
"monaco-editor": "0.34.1",
"monaco-editor-webpack-plugin": "7.0.1",
"pretty-ms": "8.0.0",
"sortablejs": "1.15.0",
"swagger-ui-dist": "4.15.0",
"swagger-ui-dist": "4.15.5",
"tippy.js": "6.3.7",
"tributejs": "5.1.3",
"uint8-to-base64": "0.2.0",
"vue": "3.2.41",
"vue": "3.2.45",
"vue-bar-graph": "2.0.0",
"vue-loader": "17.0.0",
"vue-loader": "17.0.1",
"vue3-calendar-heatmap": "2.0.0",
"webpack": "5.74.0",
"webpack-cli": "4.10.0",
"webpack": "5.75.0",
"webpack-cli": "5.0.0",
"workbox-routing": "6.5.4",
"workbox-strategies": "6.5.4",
"worker-loader": "3.0.8",
"wrap-ansi": "8.0.1"
},
"devDependencies": {
"@playwright/test": "1.27.1",
"@playwright/test": "1.28.0",
"@rollup/pluginutils": "5.0.2",
"@stoplight/spectral-cli": "6.5.1",
"eslint": "8.26.0",
"@stoplight/spectral-cli": "6.6.0",
"eslint": "8.28.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-jquery": "1.5.1",
"eslint-plugin-sonarjs": "0.16.0",
"eslint-plugin-unicorn": "44.0.2",
"eslint-plugin-vue": "9.6.0",
"jsdom": "20.0.1",
"eslint-plugin-unicorn": "45.0.0",
"eslint-plugin-vue": "9.7.0",
"jsdom": "20.0.3",
"markdownlint-cli": "0.32.2",
"postcss-less": "6.0.0",
"stylelint": "14.14.0",
"stylelint": "14.15.0",
"stylelint-config-standard": "29.0.0",
"svgo": "3.0.0",
"updates": "13.1.10",
"vitest": "0.24.3"
"svgo": "3.0.2",
"updates": "13.2.1",
"vitest": "0.25.2"
},
"browserslist": [
"defaults",

View File

@ -0,0 +1 @@
<svg viewBox="0 0 16 16" class="svg octicon-arrow-down-left" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M11.78 4.22a.75.75 0 0 1 0 1.06l-5.26 5.26h4.2a.75.75 0 0 1 0 1.5H4.71a.75.75 0 0 1-.75-.75V5.28a.75.75 0 1 1 1.5 0v4.2l5.26-5.26a.75.75 0 0 1 1.06 0z"/></svg>

After

Width:  |  Height:  |  Size: 291 B

View File

@ -0,0 +1 @@
<svg viewBox="0 0 16 16" class="svg octicon-arrow-down-right" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4.22 4.179a.75.75 0 0 1 1.06 0l5.26 5.26v-4.2a.75.75 0 0 1 1.5 0v6.01a.75.75 0 0 1-.75.75H5.28a.75.75 0 0 1 0-1.5h4.2L4.22 5.24a.75.75 0 0 1 0-1.06z"/></svg>

After

Width:  |  Height:  |  Size: 291 B

View File

@ -0,0 +1 @@
<svg viewBox="0 0 16 16" class="svg octicon-arrow-up-left" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M3.96 4.75A.75.75 0 0 1 4.71 4h6.01a.75.75 0 0 1 0 1.5h-4.2l5.26 5.26a.75.75 0 0 1-1.06 1.061l-5.26-5.26v4.2a.75.75 0 0 1-1.5 0V4.75z"/></svg>

After

Width:  |  Height:  |  Size: 272 B

View File

@ -0,0 +1 @@
<svg viewBox="0 0 16 16" class="svg octicon-arrow-up-right" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M4.53 4.75A.75.75 0 0 1 5.28 4h6.01a.75.75 0 0 1 .75.75v6.01a.75.75 0 1 1-1.5 0v-4.2l-5.26 5.261a.75.75 0 1 1-1.06-1.06L9.48 5.5h-4.2a.75.75 0 0 1-.75-.75z"/></svg>

After

Width:  |  Height:  |  Size: 295 B

View File

@ -0,0 +1 @@
<svg viewBox="0 0 16 16" class="svg octicon-clock-fill" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm8.575-3.25a.825.825 0 1 0-1.65 0v3.5c0 .337.205.64.519.766l2.5 1a.825.825 0 0 0 .612-1.532l-1.981-.793V4.75z"/></svg>

After

Width:  |  Height:  |  Size: 279 B

View File

@ -0,0 +1 @@
<svg viewBox="0 0 16 16" class="svg octicon-issue-tracked-by" width="16" height="16" aria-hidden="true"><path d="M1.5 8a6.5 6.5 0 0 1 13 0A.75.75 0 0 0 16 8a8 8 0 1 0-8 8 .75.75 0 0 0 0-1.5A6.5 6.5 0 0 1 1.5 8z"/><path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm1.5 1.75a.75.75 0 0 1 .75-.75h5a.75.75 0 0 1 0 1.5h-5a.75.75 0 0 1-.75-.75zm2.75 2.25a.75.75 0 0 0 0 1.5h3a.75.75 0 0 0 0-1.5h-3z"/></svg>

After

Width:  |  Height:  |  Size: 404 B

View File

@ -0,0 +1 @@
<svg viewBox="0 0 16 16" class="svg octicon-issue-tracked-in" width="16" height="16" aria-hidden="true"><path d="M1.5 8a6.5 6.5 0 0 1 13 0A.75.75 0 0 0 16 8a8 8 0 1 0-8 8 .75.75 0 0 0 0-1.5A6.5 6.5 0 0 1 1.5 8z"/><path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3zm3.573 5.823-2.896-2.896a.25.25 0 0 1 0-.354l2.896-2.896a.25.25 0 0 1 .427.177V11.5h3.25a.75.75 0 0 1 0 1.5H12v2.146a.25.25 0 0 1-.427.177z"/></svg>

After

Width:  |  Height:  |  Size: 413 B

View File

@ -0,0 +1 @@
<svg viewBox="0 0 16 16" class="svg octicon-project-roadmap" width="16" height="16" aria-hidden="true"><path d="M4.75 7a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-4.5zM5 4.75A.75.75 0 0 1 5.75 4h5.5a.75.75 0 0 1 0 1.5h-5.5A.75.75 0 0 1 5 4.75zM6.75 10a.75.75 0 0 0 0 1.5h4.5a.75.75 0 0 0 0-1.5h-4.5z"/><path fill-rule="evenodd" d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75zm1.75-.25h12.5a.25.25 0 0 1 .25.25v12.5a.25.25 0 0 1-.25.25H1.75a.25.25 0 0 1-.25-.25V1.75a.25.25 0 0 1 .25-.25z"/></svg>

After

Width:  |  Height:  |  Size: 574 B

View File

@ -0,0 +1 @@
<svg viewBox="0 0 16 16" class="svg octicon-project-symlink" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16h-8.5a.75.75 0 0 1 0-1.5h8.5a.25.25 0 0 0 .25-.25V6.5h-13v1.75a.75.75 0 0 1-1.5 0v-6.5zM1.5 5H5V1.5H1.75a.25.25 0 0 0-.25.25V5zm5 0h8V1.75a.25.25 0 0 0-.25-.25H6.5V5z"/><path d="M1.5 13.737a2.25 2.25 0 0 1 2.262-2.25L4 11.49v1.938c0 .218.26.331.42.183l2.883-2.677a.25.25 0 0 0 0-.366L4.42 7.89a.25.25 0 0 0-.42.183V9.99l-.23-.001A3.75 3.75 0 0 0 0 13.738v1.012a.75.75 0 0 0 1.5 0v-1.013z"/></svg>

After

Width:  |  Height:  |  Size: 615 B

View File

@ -0,0 +1 @@
<svg viewBox="0 0 16 16" class="svg octicon-skip-fill" width="16" height="16" aria-hidden="true"><path fill-rule="evenodd" d="M0 8a8 8 0 1 1 16 0A8 8 0 0 1 0 8zm11.333-2.167a.825.825 0 0 0-1.166-1.166l-5.5 5.5a.825.825 0 0 0 1.166 1.166l5.5-5.5z"/></svg>

After

Width:  |  Height:  |  Size: 254 B

View File

@ -4,7 +4,7 @@ const {copy_success, copy_error} = window.config.i18n;
export async function copyToClipboard(content) {
if (content instanceof Blob) {
const item = new window.ClipboardItem({[content.type]: content});
const item = new ClipboardItem({[content.type]: content});
await navigator.clipboard.write([item]);
} else { // text
try {

View File

@ -463,10 +463,10 @@ export function initRepository() {
$('.enable-system-radio').on('change', function () {
if (this.value === 'false') {
$($(this).data('target')).addClass('disabled');
if (typeof $(this).data('context') !== 'undefined') $($(this).data('context')).removeClass('disabled');
if ($(this).data('context') !== undefined) $($(this).data('context')).removeClass('disabled');
} else if (this.value === 'true') {
$($(this).data('target')).removeClass('disabled');
if (typeof $(this).data('context') !== 'undefined') $($(this).data('context')).addClass('disabled');
if ($(this).data('context') !== undefined) $($(this).data('context')).addClass('disabled');
}
});
const $trackerIssueStyleRadios = $('.js-tracker-issue-style');

View File

@ -9,7 +9,7 @@ export function initRepoMigrationStatusChecker() {
$('#repo_migrating_progress_message').hide();
if (migrating) {
const task = migrating.attr('task');
if (typeof task === 'undefined') {
if (task === undefined) {
return;
}
$.ajax({

View File

@ -21,7 +21,7 @@ function makeCollections({mentions, emoji}) {
},
lookup: (item) => item,
selectTemplate: (item) => {
if (typeof item === 'undefined') return null;
if (item === undefined) return null;
return emojiString(item.original);
},
menuItemTemplate: (item) => {

View File

@ -227,10 +227,11 @@ export default {
}).join('\n');
},
override: {
'jquery.are-you-sure@*': {licenseName: 'MIT'},
'jquery.are-you-sure@*': {licenseName: 'MIT'}, // https://github.com/codedance/jquery.AreYouSure/pull/147
'khroma@*': {licenseName: 'MIT'}, // https://github.com/fabiospampinato/khroma/pull/33
},
emitError: true,
allow: '(Apache-2.0 OR BSD-2-Clause OR BSD-3-Clause OR MIT OR ISC OR CPAL-1.0)',
allow: '(Apache-2.0 OR BSD-2-Clause OR BSD-3-Clause OR MIT OR ISC OR CPAL-1.0 OR Unlicense)',
ignore: [
'font-awesome',
],