0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-24 15:12:48 +01:00

Update JS dependencies (#30713)

- Update all JS dependencies
- Remove
[now-unnecessary](https://github.com/microsoft/monaco-editor/issues/4325)
monaco workaround
- Update stylelint config for new rule
- Tested Monaco, Swagger UI, Mermaid
This commit is contained in:
silverwind 2024-04-27 13:28:28 +02:00 committed by GitHub
parent b2abac5e5f
commit 238eb3ff9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 347 additions and 357 deletions

665
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -4,9 +4,9 @@
"node": ">= 18.0.0" "node": ">= 18.0.0"
}, },
"dependencies": { "dependencies": {
"@citation-js/core": "0.7.9", "@citation-js/core": "0.7.11",
"@citation-js/plugin-bibtex": "0.7.9", "@citation-js/plugin-bibtex": "0.7.11",
"@citation-js/plugin-csl": "0.7.9", "@citation-js/plugin-csl": "0.7.11",
"@citation-js/plugin-software-formats": "0.6.1", "@citation-js/plugin-software-formats": "0.6.1",
"@github/markdown-toolbar-element": "2.2.3", "@github/markdown-toolbar-element": "2.2.3",
"@github/relative-time-element": "4.4.0", "@github/relative-time-element": "4.4.0",
@ -33,17 +33,17 @@
"katex": "0.16.10", "katex": "0.16.10",
"license-checker-webpack-plugin": "0.2.1", "license-checker-webpack-plugin": "0.2.1",
"mermaid": "10.9.0", "mermaid": "10.9.0",
"mini-css-extract-plugin": "2.8.1", "mini-css-extract-plugin": "2.9.0",
"minimatch": "9.0.4", "minimatch": "9.0.4",
"monaco-editor": "0.47.0", "monaco-editor": "0.48.0",
"monaco-editor-webpack-plugin": "7.1.0", "monaco-editor-webpack-plugin": "7.1.0",
"pdfobject": "2.3.0", "pdfobject": "2.3.0",
"postcss": "8.4.38", "postcss": "8.4.38",
"postcss-loader": "8.1.1", "postcss-loader": "8.1.1",
"postcss-nesting": "12.1.1", "postcss-nesting": "12.1.2",
"pretty-ms": "9.0.0", "pretty-ms": "9.0.0",
"sortablejs": "1.15.2", "sortablejs": "1.15.2",
"swagger-ui-dist": "5.15.1", "swagger-ui-dist": "5.17.2",
"tailwindcss": "3.4.3", "tailwindcss": "3.4.3",
"temporal-polyfill": "0.2.4", "temporal-polyfill": "0.2.4",
"throttle-debounce": "5.0.0", "throttle-debounce": "5.0.0",
@ -53,7 +53,7 @@
"tributejs": "5.1.3", "tributejs": "5.1.3",
"uint8-to-base64": "0.2.0", "uint8-to-base64": "0.2.0",
"vanilla-colorful": "0.7.2", "vanilla-colorful": "0.7.2",
"vue": "3.4.21", "vue": "3.4.25",
"vue-bar-graph": "2.0.0", "vue-bar-graph": "2.0.0",
"vue-chartjs": "5.3.1", "vue-chartjs": "5.3.1",
"vue-loader": "17.4.2", "vue-loader": "17.4.2",
@ -66,7 +66,7 @@
"@eslint-community/eslint-plugin-eslint-comments": "4.3.0", "@eslint-community/eslint-plugin-eslint-comments": "4.3.0",
"@playwright/test": "1.43.1", "@playwright/test": "1.43.1",
"@stoplight/spectral-cli": "6.11.1", "@stoplight/spectral-cli": "6.11.1",
"@stylistic/eslint-plugin-js": "1.7.0", "@stylistic/eslint-plugin-js": "1.7.2",
"@stylistic/stylelint-plugin": "2.1.1", "@stylistic/stylelint-plugin": "2.1.1",
"@vitejs/plugin-vue": "5.0.4", "@vitejs/plugin-vue": "5.0.4",
"eslint": "8.57.0", "eslint": "8.57.0",
@ -81,20 +81,20 @@
"eslint-plugin-unicorn": "52.0.0", "eslint-plugin-unicorn": "52.0.0",
"eslint-plugin-vitest": "0.4.1", "eslint-plugin-vitest": "0.4.1",
"eslint-plugin-vitest-globals": "1.5.0", "eslint-plugin-vitest-globals": "1.5.0",
"eslint-plugin-vue": "9.24.1", "eslint-plugin-vue": "9.25.0",
"eslint-plugin-vue-scoped-css": "2.8.0", "eslint-plugin-vue-scoped-css": "2.8.0",
"eslint-plugin-wc": "2.1.0", "eslint-plugin-wc": "2.1.0",
"happy-dom": "14.7.1", "happy-dom": "14.7.1",
"markdownlint-cli": "0.39.0", "markdownlint-cli": "0.39.0",
"postcss-html": "1.6.0", "postcss-html": "1.6.0",
"stylelint": "16.3.1", "stylelint": "16.4.0",
"stylelint-declaration-block-no-ignored-properties": "2.8.0", "stylelint-declaration-block-no-ignored-properties": "2.8.0",
"stylelint-declaration-strict-value": "1.10.4", "stylelint-declaration-strict-value": "1.10.4",
"stylelint-value-no-unknown-custom-properties": "6.0.1", "stylelint-value-no-unknown-custom-properties": "6.0.1",
"svgo": "3.2.0", "svgo": "3.2.0",
"updates": "16.0.1", "updates": "16.0.1",
"vite-string-plugin": "1.1.5", "vite-string-plugin": "1.2.0",
"vitest": "1.5.0" "vitest": "1.5.2"
}, },
"browserslist": [ "browserslist": [
"defaults" "defaults"

View file

@ -191,8 +191,9 @@ export default {
'no-invalid-double-slash-comments': true, 'no-invalid-double-slash-comments': true,
'no-invalid-position-at-import-rule': [true, {ignoreAtRules: ['tailwind']}], 'no-invalid-position-at-import-rule': [true, {ignoreAtRules: ['tailwind']}],
'no-irregular-whitespace': true, 'no-irregular-whitespace': true,
'no-unknown-animations': null, 'no-unknown-animations': null, // disabled until stylelint supports multi-file linting
'no-unknown-custom-properties': null, 'no-unknown-custom-media': null, // disabled until stylelint supports multi-file linting
'no-unknown-custom-properties': null, // disabled until stylelint supports multi-file linting
'number-max-precision': null, 'number-max-precision': null,
'plugin/declaration-block-no-ignored-properties': true, 'plugin/declaration-block-no-ignored-properties': true,
'property-allowed-list': null, 'property-allowed-list': null,

View file

@ -6,18 +6,10 @@
// This file must be imported before any lazy-loading is being attempted. // This file must be imported before any lazy-loading is being attempted.
__webpack_public_path__ = `${window.config?.assetUrlPrefix ?? '/assets'}/`; __webpack_public_path__ = `${window.config?.assetUrlPrefix ?? '/assets'}/`;
const filteredErrors = new Set([
'getModifierState is not a function', // https://github.com/microsoft/monaco-editor/issues/4325
]);
export function showGlobalErrorMessage(msg) { export function showGlobalErrorMessage(msg) {
const pageContent = document.querySelector('.page-content'); const pageContent = document.querySelector('.page-content');
if (!pageContent) return; if (!pageContent) return;
for (const filteredError of filteredErrors) {
if (msg.includes(filteredError)) return;
}
// compact the message to a data attribute to avoid too many duplicated messages // compact the message to a data attribute to avoid too many duplicated messages
const msgCompact = msg.replace(/\W/g, '').trim(); const msgCompact = msg.replace(/\W/g, '').trim();
let msgDiv = pageContent.querySelector(`.js-global-error[data-global-error-msg-compact="${msgCompact}"]`); let msgDiv = pageContent.querySelector(`.js-global-error[data-global-error-msg-compact="${msgCompact}"]`);