Skip to content

Commit

Permalink
Update JS dependencies, Require Node.js 16 (#23528)
Browse files Browse the repository at this point in the history
- Update all JS dependencies
- Require Node.js 16 as dictated by `esbuild-loader`
- Regenerate SVG
- Adapt to `esbuild-loader` breaking changes
- Minor refactor in `webpack.config.js`
- Tested build, monaco and swagger-ui

---------

Co-authored-by: techknowlogick <techknowlogick@gitea.io>
  • Loading branch information
silverwind and techknowlogick committed Mar 17, 2023
1 parent 12ddc48 commit 96be0cb
Show file tree
Hide file tree
Showing 23 changed files with 1,521 additions and 1,410 deletions.
2 changes: 1 addition & 1 deletion .drone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ steps:

# TODO: We should probably build all dependencies into a test image
- name: test-e2e
image: mcr.microsoft.com/playwright:v1.29.2-focal
image: mcr.microsoft.com/playwright:v1.31.2-focal
commands:
- curl -sLO https://go.dev/dl/go1.20.linux-amd64.tar.gz && tar -C /usr/local -xzf go1.20.linux-amd64.tar.gz
- groupadd --gid 1001 gitea && useradd -m --gid 1001 --uid 1001 gitea
Expand Down
2,856 changes: 1,477 additions & 1,379 deletions package-lock.json

Large diffs are not rendered by default.

38 changes: 19 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,42 +4,42 @@
"private": true,
"type": "module",
"engines": {
"node": ">= 14.0.0"
"node": ">= 16.0.0"
},
"dependencies": {
"@citation-js/core": "0.6.5",
"@citation-js/plugin-bibtex": "0.6.5",
"@citation-js/plugin-csl": "0.6.5",
"@citation-js/plugin-bibtex": "0.6.6",
"@citation-js/plugin-csl": "0.6.7",
"@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.10.2",
"@vue/compiler-sfc": "3.2.45",
"@primer/octicons": "18.2.0",
"@vue/compiler-sfc": "3.2.47",
"add-asset-webpack-plugin": "2.0.1",
"ansi-to-html": "0.7.2",
"asciinema-player": "3.0.1",
"asciinema-player": "3.2.0",
"css-loader": "6.7.3",
"dropzone": "6.0.0-beta.2",
"easymde": "2.18.0",
"esbuild-loader": "2.21.0",
"esbuild-loader": "3.0.1",
"escape-goat": "4.0.0",
"fast-glob": "3.2.12",
"font-awesome": "4.7.0",
"jquery": "3.6.3",
"jquery": "3.6.4",
"jquery.are-you-sure": "1.9.0",
"katex": "0.16.4",
"license-checker-webpack-plugin": "0.2.1",
"mermaid": "10.0.2",
"mini-css-extract-plugin": "2.7.4",
"monaco-editor": "0.34.1",
"monaco-editor": "0.36.1",
"monaco-editor-webpack-plugin": "7.0.1",
"pretty-ms": "8.0.0",
"sortablejs": "1.15.0",
"swagger-ui-dist": "4.15.5",
"swagger-ui-dist": "4.18.1",
"tippy.js": "6.3.7",
"tributejs": "5.1.3",
"uint8-to-base64": "0.2.0",
"vue": "3.2.45",
"vue": "3.2.47",
"vue-bar-graph": "2.0.0",
"vue-loader": "17.0.1",
"vue3-calendar-heatmap": "2.0.0",
Expand All @@ -48,25 +48,25 @@
"workbox-routing": "6.5.4",
"workbox-strategies": "6.5.4",
"worker-loader": "3.0.8",
"wrap-ansi": "8.0.1"
"wrap-ansi": "8.1.0"
},
"devDependencies": {
"@playwright/test": "1.29.2",
"@playwright/test": "1.31.2",
"@rollup/pluginutils": "5.0.2",
"@stoplight/spectral-cli": "6.6.0",
"eslint": "8.32.0",
"eslint": "8.36.0",
"eslint-plugin-import": "2.27.5",
"eslint-plugin-jquery": "1.5.1",
"eslint-plugin-sonarjs": "0.18.0",
"eslint-plugin-unicorn": "45.0.2",
"eslint-plugin-unicorn": "46.0.0",
"eslint-plugin-vue": "9.9.0",
"jsdom": "21.0.0",
"jsdom": "21.1.1",
"markdownlint-cli": "0.33.0",
"stylelint": "15.2.0",
"stylelint": "15.3.0",
"stylelint-declaration-strict-value": "1.9.2",
"svgo": "3.0.2",
"updates": "13.2.7",
"vitest": "0.27.2"
"updates": "13.2.9",
"vitest": "0.29.3"
},
"browserslist": [
"defaults",
Expand Down
2 changes: 1 addition & 1 deletion public/img/svg/octicon-chevron-down.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/img/svg/octicon-chevron-up.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/img/svg/octicon-discussion-closed.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/img/svg/octicon-discussion-duplicate.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/img/svg/octicon-discussion-outdated.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/img/svg/octicon-download.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/img/svg/octicon-fiscal-host.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/img/svg/octicon-issue-tracked-by.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion public/img/svg/octicon-issue-tracked-in.svg

This file was deleted.

1 change: 1 addition & 0 deletions public/img/svg/octicon-issue-tracks.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/img/svg/octicon-move-to-bottom.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/img/svg/octicon-move-to-end.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/img/svg/octicon-move-to-start.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/img/svg/octicon-move-to-top.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/img/svg/octicon-passkey-fill.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/img/svg/octicon-sparkle-fill.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion public/img/svg/octicon-upload.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/img/svg/octicon-zoom-in.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions public/img/svg/octicon-zoom-out.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 6 additions & 5 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ import webpack from 'webpack';
import {fileURLToPath} from 'node:url';
import {readFileSync} from 'node:fs';

const {ESBuildMinifyPlugin} = EsBuildLoader;
const {SourceMapDevToolPlugin} = webpack;
const {EsbuildPlugin} = EsBuildLoader;
const {SourceMapDevToolPlugin, DefinePlugin} = webpack;
const formatLicenseText = (licenseText) => wrapAnsi(licenseText || '', 80).trim();

const glob = (pattern) => fastGlob.sync(pattern, {
Expand Down Expand Up @@ -90,7 +90,7 @@ export default {
optimization: {
minimize: isProduction,
minimizer: [
new ESBuildMinifyPlugin({
new EsbuildPlugin({
target: 'es2015',
minify: true,
css: true,
Expand Down Expand Up @@ -130,7 +130,8 @@ export default {
{
loader: 'esbuild-loader',
options: {
target: 'es2015'
loader: 'js',
target: 'es2015',
},
},
],
Expand Down Expand Up @@ -173,7 +174,7 @@ export default {
],
},
plugins: [
new webpack.DefinePlugin({
new DefinePlugin({
__VUE_OPTIONS_API__: true, // at the moment, many Vue components still use the Vue Options API
__VUE_PROD_DEVTOOLS__: false, // do not enable devtools support in production
}),
Expand Down

0 comments on commit 96be0cb

Please sign in to comment.