2020-04-13 13:49:04 +05:30
|
|
|
Use debian packaged node modules when available
|
|
|
|
- Exclude packaged modules from transpiling
|
|
|
|
- Remove webpack-bundle-analyzer
|
|
|
|
- Resolve .json files
|
2020-12-07 17:52:42 +05:30
|
|
|
- Add mkdirp 1.0 and loader-utils 2.0 to ensure compatibility for packaged
|
|
|
|
modules (See #976310)
|
2020-12-24 20:32:23 +05:30
|
|
|
- Use link protocol for modules with permission issues (which has a bin: entry
|
2021-01-04 16:46:44 +05:30
|
|
|
in package.json) or dependencies. Use portal protocol only for modules that
|
|
|
|
1. does not have any other dependency and 2. does not have a bin: entry
|
2020-12-24 20:32:23 +05:30
|
|
|
See https://github.com/yarnpkg/berry/issues/2266
|
2021-01-04 16:46:44 +05:30
|
|
|
- Even better, portal protocol tries to satisfy even devDependencies so avoid
|
|
|
|
it
|
|
|
|
- Modules with problems compression-webpack-plugin, copy-webpack-plugin,
|
|
|
|
jszip, mkdirp, js-yaml, font-awesome, katex, cache-loader, webpack
|
2021-01-30 18:05:51 +05:30
|
|
|
- babel-loader, cache-loader needs loader-utils 1.x and we already have 2.x and
|
|
|
|
no compat patch
|
|
|
|
- brace-expansion is a major version ahead in the archive
|
|
|
|
- xterm build is broken (#980406)
|
2020-04-13 13:49:04 +05:30
|
|
|
|
2019-08-08 15:17:34 +05:30
|
|
|
--- a/config/webpack.config.js
|
|
|
|
+++ b/config/webpack.config.js
|
2022-03-02 13:35:08 +05:30
|
|
|
@@ -16,7 +16,6 @@
|
2021-04-17 20:43:06 +05:30
|
|
|
const VUE_VERSION = require('vue/package.json').version;
|
2021-10-01 04:34:20 +05:30
|
|
|
|
2021-04-17 20:43:06 +05:30
|
|
|
const webpack = require('webpack');
|
|
|
|
-const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer');
|
|
|
|
const { StatsWriterPlugin } = require('webpack-stats-plugin');
|
|
|
|
const WEBPACK_VERSION = require('webpack/package.json').version;
|
|
|
|
|
2022-05-07 22:13:53 +05:30
|
|
|
@@ -237,6 +236,8 @@
|
2020-12-09 23:02:53 +05:30
|
|
|
|
|
|
|
entry: generateEntries,
|
|
|
|
|
|
|
|
+ externals: [ 'canvas' ],
|
|
|
|
+
|
|
|
|
output: {
|
2021-02-22 22:40:45 +05:30
|
|
|
path: WEBPACK_OUTPUT_PATH,
|
|
|
|
publicPath: WEBPACK_PUBLIC_PATH,
|
2022-05-07 22:13:53 +05:30
|
|
|
@@ -246,10 +247,15 @@
|
2020-04-09 18:43:07 +05:30
|
|
|
},
|
2019-08-08 15:17:34 +05:30
|
|
|
|
|
|
|
resolve: {
|
2021-06-09 22:52:32 +05:30
|
|
|
- extensions: ['.js'],
|
2020-04-09 18:43:07 +05:30
|
|
|
+ extensions: ['.js', '.gql', '.graphql', '.json'],
|
2021-01-04 20:35:13 +05:30
|
|
|
+ modules: ['node_modules','/var/lib/gitlab/node_modules','/usr/share/gitlab/vendor/node_modules','/usr/share/gitlab/node_modules/mermaid/node_modules', '/usr/share/nodejs/markdown-it/node_modules/', '/usr/lib/nodejs', '/usr/share/nodejs'],
|
2019-08-08 15:17:34 +05:30
|
|
|
alias,
|
|
|
|
},
|
|
|
|
|
2021-06-09 22:52:32 +05:30
|
|
|
+ resolveLoader: {
|
2021-01-04 20:35:13 +05:30
|
|
|
+ modules: ['node_modules','/var/lib/gitlab/node_modules', '/usr/lib/nodejs','/usr/share/nodejs'],
|
2021-06-09 22:52:32 +05:30
|
|
|
+ },
|
|
|
|
+
|
2019-08-08 15:17:34 +05:30
|
|
|
module: {
|
2021-06-09 22:52:32 +05:30
|
|
|
strictExportPresence: true,
|
|
|
|
rules: [
|
2022-05-07 22:13:53 +05:30
|
|
|
@@ -348,7 +354,7 @@
|
2021-01-30 18:05:51 +05:30
|
|
|
},
|
|
|
|
{
|
|
|
|
test: /\.(eot|ttf|woff|woff2)$/,
|
|
|
|
- include: /node_modules\/(katex\/dist\/fonts|monaco-editor)/,
|
|
|
|
+ include: /(node_modules\/monaco-editor|\/usr\/share\/fonts\/truetype\/katex)/,
|
|
|
|
loader: 'file-loader',
|
|
|
|
options: {
|
|
|
|
name: '[name].[contenthash:8].[ext]',
|
2022-05-07 22:13:53 +05:30
|
|
|
@@ -659,19 +665,6 @@
|
2022-04-04 12:50:17 +05:30
|
|
|
},
|
|
|
|
},
|
2019-08-08 15:17:34 +05:30
|
|
|
|
|
|
|
- // optionally generate webpack bundle analysis
|
|
|
|
- WEBPACK_REPORT &&
|
|
|
|
- new BundleAnalyzerPlugin({
|
|
|
|
- analyzerMode: 'static',
|
|
|
|
- generateStatsFile: true,
|
|
|
|
- openAnalyzer: false,
|
|
|
|
- reportFilename: path.join(ROOT_PATH, 'webpack-report/index.html'),
|
|
|
|
- statsFilename: path.join(ROOT_PATH, 'webpack-report/stats.json'),
|
2019-12-21 21:33:11 +05:30
|
|
|
- statsOptions: {
|
|
|
|
- source: false,
|
|
|
|
- },
|
2019-08-08 15:17:34 +05:30
|
|
|
- }),
|
|
|
|
-
|
|
|
|
new webpack.DefinePlugin({
|
2021-11-11 17:04:58 +05:30
|
|
|
// These are used to define window.gon.ee, window.gon.jh and other things properly in tests:
|
2019-12-21 21:33:11 +05:30
|
|
|
'process.env.IS_EE': JSON.stringify(IS_EE),
|
2022-06-22 00:40:03 +05:30
|
|
|
@@ -739,6 +732,7 @@
|
2019-08-08 15:17:34 +05:30
|
|
|
|
2019-09-30 22:13:22 +05:30
|
|
|
node: {
|
2022-06-22 00:40:03 +05:30
|
|
|
fs: 'empty', // editorconfig requires 'fs'
|
2019-09-30 22:13:22 +05:30
|
|
|
+ Buffer: 'mock',
|
|
|
|
setImmediate: false,
|
|
|
|
},
|
2019-08-08 15:17:34 +05:30
|
|
|
};
|
2022-06-22 00:40:03 +05:30
|
|
|
--- a/babel.config.js
|
|
|
|
+++ b/babel.config.js
|
|
|
|
@@ -14,6 +14,7 @@
|
|
|
|
// include stage 3 proposals
|
|
|
|
const plugins = [
|
|
|
|
'@babel/plugin-syntax-import-meta',
|
|
|
|
+ '@babel/plugin-syntax-dynamic-import',
|
|
|
|
'@babel/plugin-proposal-class-properties',
|
|
|
|
'@babel/plugin-proposal-json-strings',
|
|
|
|
'@babel/plugin-proposal-private-methods',
|
|
|
|
--- a/app/assets/javascripts/pdf/index.vue
|
|
|
|
+++ b/app/assets/javascripts/pdf/index.vue
|
|
|
|
@@ -1,6 +1,6 @@
|
|
|
|
<script>
|
|
|
|
import pdfjsLib from 'pdfjs-dist/build/pdf';
|
|
|
|
-import workerSrc from 'pdfjs-dist/build/pdf.worker.min';
|
|
|
|
+import workerSrc from 'pdfjs-dist/build/pdf.worker';
|
|
|
|
|
|
|
|
import page from './page/index.vue';
|
|
|
|
|
2020-01-11 19:08:58 +05:30
|
|
|
--- a/package.json
|
|
|
|
+++ b/package.json
|
2022-04-04 12:50:17 +05:30
|
|
|
@@ -48,18 +48,18 @@
|
2021-04-21 01:01:41 +05:30
|
|
|
},
|
|
|
|
"dependencies": {
|
2022-06-22 00:40:03 +05:30
|
|
|
"@apollo/client": "^3.5.10",
|
2021-04-21 01:01:41 +05:30
|
|
|
- "@babel/core": "^7.10.1",
|
|
|
|
- "@babel/plugin-proposal-class-properties": "^7.10.1",
|
|
|
|
- "@babel/plugin-proposal-json-strings": "^7.10.1",
|
|
|
|
- "@babel/plugin-proposal-private-methods": "^7.10.1",
|
|
|
|
- "@babel/plugin-syntax-import-meta": "^7.10.1",
|
|
|
|
- "@babel/preset-env": "^7.10.1",
|
|
|
|
+ "@babel/core": "link:/usr/share/nodejs/@babel/core",
|
|
|
|
+ "@babel/plugin-proposal-class-properties": "link:/usr/share/nodejs/@babel/plugin-proposal-class-properties",
|
|
|
|
+ "@babel/plugin-proposal-json-strings": "link:/usr/share/nodejs/@babel/plugin-proposal-json-strings",
|
|
|
|
+ "@babel/plugin-proposal-private-methods": "link:/usr/share/nodejs/@babel/plugin-proposal-private-methods",
|
|
|
|
+ "@babel/plugin-syntax-import-meta": "link:/usr/share/nodejs/@babel/plugin-syntax-import-meta",
|
|
|
|
+ "@babel/preset-env": "link:/usr/share/nodejs/@babel/preset-env",
|
|
|
|
"@gitlab/at.js": "1.5.7",
|
|
|
|
"@gitlab/favicon-overlay": "2.0.0",
|
2022-06-22 00:40:03 +05:30
|
|
|
"@gitlab/svgs": "2.8.0",
|
|
|
|
"@gitlab/ui": "38.8.1",
|
2021-05-10 01:10:00 +05:30
|
|
|
"@gitlab/visual-review-tools": "1.6.1",
|
2022-06-22 00:40:03 +05:30
|
|
|
- "@rails/actioncable": "6.1.4-7",
|
2021-05-10 01:10:00 +05:30
|
|
|
+ "@rails/actioncable": "link:/usr/share/nodejs/@rails/actioncable",
|
2022-06-22 00:40:03 +05:30
|
|
|
"@rails/ujs": "6.1.4-7",
|
2021-11-11 17:04:58 +05:30
|
|
|
"@sentry/browser": "5.30.0",
|
|
|
|
"@sourcegraph/code-host-integration": "0.0.60",
|
2022-05-12 18:46:38 +05:30
|
|
|
@@ -100,24 +100,24 @@
|
2021-04-20 23:14:12 +05:30
|
|
|
"aws-sdk": "^2.637.0",
|
2021-12-11 22:56:32 +05:30
|
|
|
"axios": "^0.24.0",
|
2022-06-22 00:40:03 +05:30
|
|
|
"babel-loader": "^8.2.4",
|
2021-04-20 23:14:12 +05:30
|
|
|
- "babel-plugin-lodash": "^3.3.4",
|
|
|
|
+ "babel-plugin-lodash": "link:/usr/share/nodejs/babel-plugin-lodash",
|
2021-06-09 22:52:32 +05:30
|
|
|
"bootstrap": "4.5.3",
|
2021-04-20 23:14:12 +05:30
|
|
|
"cache-loader": "^4.1.0",
|
2021-12-11 22:56:32 +05:30
|
|
|
"canvas-confetti": "^1.4.0",
|
2022-04-09 14:40:05 +05:30
|
|
|
- "clipboard": "^2.0.8",
|
2022-04-09 21:19:18 +05:30
|
|
|
- "codemirror": "^5.48.4",
|
2022-04-09 14:40:05 +05:30
|
|
|
+ "clipboard": "link:/usr/share/nodejs/clipboard",
|
2022-04-09 21:19:18 +05:30
|
|
|
+ "codemirror": "link:/usr/share/nodejs/codemirror",
|
2022-04-09 14:40:05 +05:30
|
|
|
"codesandbox-api": "0.0.23",
|
|
|
|
"compression-webpack-plugin": "^5.0.2",
|
2022-04-09 21:19:18 +05:30
|
|
|
"copy-webpack-plugin": "^6.4.1",
|
2022-06-22 00:40:03 +05:30
|
|
|
"core-js": "^3.22.0",
|
2022-04-09 21:25:41 +05:30
|
|
|
- "cron-validator": "^1.1.1",
|
|
|
|
+ "cron-validator": "link:/usr/share/nodejs/cron-validator",
|
|
|
|
"cronstrue": "^1.122.0",
|
|
|
|
"cropper": "^2.3.0",
|
|
|
|
"css-loader": "^2.1.1",
|
2022-05-11 18:18:39 +05:30
|
|
|
- "d3": "^5.16.0",
|
|
|
|
- "d3-sankey": "^0.12.3",
|
|
|
|
- "d3-selection": "^1.2.0",
|
2022-05-12 18:46:38 +05:30
|
|
|
- "dateformat": "^5.0.1",
|
2022-05-11 18:18:39 +05:30
|
|
|
+ "d3": "link:/usr/share/nodejs/d3",
|
|
|
|
+ "d3-sankey": "link:/usr/share/nodejs/d3-sankey",
|
|
|
|
+ "d3-selection": "link:/usr/share/nodejs/d3-selection",
|
2022-05-12 18:46:38 +05:30
|
|
|
+ "dateformat": "link:/usr/share/nodejs/dateformat",
|
2022-05-11 18:18:39 +05:30
|
|
|
"deckar01-task_list": "^2.3.1",
|
|
|
|
"diff": "^3.4.0",
|
2022-05-12 18:46:38 +05:30
|
|
|
"dompurify": "^2.3.6",
|
2022-06-07 18:12:18 +05:30
|
|
|
@@ -135,33 +135,33 @@
|
2021-11-11 17:04:58 +05:30
|
|
|
"jed": "^1.1.1",
|
2021-09-04 02:51:02 +05:30
|
|
|
"jquery": "^3.6.0",
|
2020-01-11 19:08:58 +05:30
|
|
|
"jquery.caret": "^0.3.1",
|
2020-04-08 15:34:39 +05:30
|
|
|
- "js-cookie": "^2.2.1",
|
2020-12-11 16:49:44 +05:30
|
|
|
- "js-yaml": "^3.13.1",
|
2022-03-03 21:49:46 +05:30
|
|
|
+ "js-cookie": "link:/usr/share/nodejs/js-cookie",
|
|
|
|
+ "js-yaml": "link:/usr/share/nodejs/js-yaml",
|
|
|
|
"jszip": "^3.1.3",
|
2020-01-11 19:08:58 +05:30
|
|
|
- "jszip-utils": "^0.0.2",
|
2021-06-12 00:45:14 +05:30
|
|
|
- "katex": "^0.13.2",
|
|
|
|
- "lodash": "^4.17.20",
|
2022-03-03 21:49:46 +05:30
|
|
|
+ "jszip-utils": "link:/usr/share/nodejs/jszip-utils",
|
2021-06-12 00:45:14 +05:30
|
|
|
+ "katex": "link:/usr/share/nodejs/katex",
|
2021-04-20 23:14:12 +05:30
|
|
|
+ "lodash": "link:/usr/share/nodejs/lodash",
|
2022-05-07 22:13:53 +05:30
|
|
|
"lowlight": "^2.5.0",
|
2020-04-08 15:34:39 +05:30
|
|
|
"marked": "^0.3.12",
|
2021-03-08 22:12:33 +05:30
|
|
|
"mathjax": "3",
|
2022-05-11 12:19:55 +05:30
|
|
|
- "mermaid": "^8.13.10",
|
2021-04-30 00:10:56 +05:30
|
|
|
- "minimatch": "^3.0.4",
|
2022-05-11 12:19:55 +05:30
|
|
|
+ "mermaid": "link:/usr/share/nodejs/mermaid",
|
2021-04-30 00:10:56 +05:30
|
|
|
+ "minimatch": "link:/usr/share/nodejs/minimatch",
|
2021-10-28 01:36:19 +05:30
|
|
|
"monaco-editor": "^0.25.2",
|
2021-10-01 04:34:20 +05:30
|
|
|
"monaco-editor-webpack-plugin": "^4.0.0",
|
2021-01-29 14:51:13 +05:30
|
|
|
"monaco-yaml": "^2.5.1",
|
2021-01-30 18:05:51 +05:30
|
|
|
"mousetrap": "1.6.5",
|
2021-10-01 04:34:20 +05:30
|
|
|
"papaparse": "^5.3.1",
|
2020-12-07 01:51:00 +05:30
|
|
|
- "pdfjs-dist": "^2.0.943",
|
2021-01-04 16:46:44 +05:30
|
|
|
+ "pdfjs-dist": "link:/usr/share/nodejs/pdfjs-dist",
|
2020-01-11 19:09:17 +05:30
|
|
|
"pikaday": "^1.8.0",
|
2020-04-08 15:34:39 +05:30
|
|
|
- "popper.js": "^1.16.1",
|
2021-01-30 18:05:51 +05:30
|
|
|
+ "popper.js": "link:/usr/share/nodejs/popper.js",
|
2021-06-09 22:52:32 +05:30
|
|
|
"portal-vue": "^2.1.7",
|
2022-05-10 18:41:43 +05:30
|
|
|
- "postcss": "8.4.5",
|
|
|
|
+ "postcss": "link:/usr/share/nodejs/postcss",
|
2021-01-30 18:05:51 +05:30
|
|
|
"prismjs": "^1.21.0",
|
2022-06-22 00:40:03 +05:30
|
|
|
- "prosemirror-markdown": "1.8.0",
|
2022-03-02 13:35:08 +05:30
|
|
|
- "prosemirror-model": "^1.16.1",
|
2021-11-11 17:04:58 +05:30
|
|
|
- "prosemirror-state": "^1.3.4",
|
2021-01-04 16:46:44 +05:30
|
|
|
+ "prosemirror-markdown": "link:/usr/share/nodejs/prosemirror-markdown",
|
|
|
|
+ "prosemirror-model": "link:/usr/share/nodejs/prosemirror-model",
|
2021-11-11 17:04:58 +05:30
|
|
|
+ "prosemirror-state": "link:/usr/share/nodejs/prosemirror-state",
|
|
|
|
"prosemirror-tables": "^1.1.1",
|
2022-06-22 00:40:03 +05:30
|
|
|
- "prosemirror-view": "^1.23.10",
|
2022-06-07 18:12:18 +05:30
|
|
|
+ "prosemirror-view": "link:/usr/share/nodejs/prosemirror-view",
|
2020-02-23 17:54:41 +05:30
|
|
|
"raphael": "^2.2.7",
|
2022-06-07 18:12:18 +05:30
|
|
|
"raw-loader": "^4.0.2",
|
2022-06-22 00:40:03 +05:30
|
|
|
"rehype-raw": "^6.1.1",
|
|
|
|
@@ -175,26 +175,25 @@
|
2021-06-09 22:52:32 +05:30
|
|
|
"style-loader": "^2.0.0",
|
2022-04-01 22:11:57 +05:30
|
|
|
"swagger-ui-dist": "4.8.0",
|
2020-01-11 19:08:58 +05:30
|
|
|
"three": "^0.84.0",
|
|
|
|
- "three-orbit-controls": "^82.1.0",
|
2021-01-04 16:46:44 +05:30
|
|
|
+ "three-orbit-controls": "link:/usr/share/nodejs/three-orbit-controls",
|
2021-01-30 18:05:51 +05:30
|
|
|
"three-stl-loader": "^1.0.4",
|
2022-05-07 22:13:53 +05:30
|
|
|
- "timeago.js": "^4.0.2",
|
2021-01-04 16:46:44 +05:30
|
|
|
+ "timeago.js": "link:/usr/share/nodejs/timeago.js",
|
2022-06-22 00:40:03 +05:30
|
|
|
"unified": "^10.1.2",
|
2021-04-30 00:10:56 +05:30
|
|
|
"url-loader": "^4.1.1",
|
2020-12-11 01:42:18 +05:30
|
|
|
- "uuid": "8.1.0",
|
2021-01-04 16:46:44 +05:30
|
|
|
+ "uuid": "link:/usr/share/nodejs/uuid",
|
2020-01-11 19:08:58 +05:30
|
|
|
"visibilityjs": "^1.2.4",
|
2021-01-04 16:46:44 +05:30
|
|
|
- "vue": "^2.6.12",
|
2020-12-22 00:51:54 +05:30
|
|
|
+ "vue": "link:/usr/share/nodejs/vue",
|
2022-04-04 12:50:17 +05:30
|
|
|
"vue-apollo": "^3.0.7",
|
2021-03-08 22:12:33 +05:30
|
|
|
"vue-loader": "^15.9.6",
|
2021-06-09 22:52:32 +05:30
|
|
|
"vue-observe-visibility": "^1.0.0",
|
|
|
|
"vue-resize": "^1.0.1",
|
2021-02-22 22:40:45 +05:30
|
|
|
"vue-router": "3.4.9",
|
2021-01-04 16:46:44 +05:30
|
|
|
- "vue-template-compiler": "^2.6.12",
|
2020-12-22 00:51:54 +05:30
|
|
|
+ "vue-template-compiler": "link:/usr/share/nodejs/vue-template-compiler",
|
2021-04-30 00:10:56 +05:30
|
|
|
"vue-virtual-scroll-list": "^1.4.7",
|
2020-01-11 19:08:58 +05:30
|
|
|
"vuedraggable": "^2.23.0",
|
2021-02-22 22:40:45 +05:30
|
|
|
"vuex": "^3.6.0",
|
2020-12-24 20:32:23 +05:30
|
|
|
"web-vitals": "^0.2.4",
|
2021-03-11 21:09:22 +05:30
|
|
|
"webpack": "^4.46.0",
|
2022-06-22 00:40:03 +05:30
|
|
|
- "webpack-bundle-analyzer": "^4.5.0",
|
2022-04-04 12:50:17 +05:30
|
|
|
"webpack-cli": "^4.9.2",
|
2021-01-30 18:05:51 +05:30
|
|
|
"webpack-stats-plugin": "^0.3.1",
|
|
|
|
"worker-loader": "^2.0.0",
|