From ead17b17d644b69fe4c26d537ac8963414cb8502 Mon Sep 17 00:00:00 2001 From: Pirate Praveen Date: Sat, 30 Jan 2021 18:05:51 +0530 Subject: [PATCH] Sync patches with buster-fasttrack branch --- .../patches/0740-use-packaged-modules.patch | 160 ++++++++++++------ debian/patches/0780-css-loader-3.patch | 26 --- debian/patches/0790-worker-loader-3.patch | 24 --- debian/patches/series | 2 - 4 files changed, 106 insertions(+), 106 deletions(-) delete mode 100644 debian/patches/0780-css-loader-3.patch delete mode 100644 debian/patches/0790-worker-loader-3.patch diff --git a/debian/patches/0740-use-packaged-modules.patch b/debian/patches/0740-use-packaged-modules.patch index af253aebc5..e9097a19db 100644 --- a/debian/patches/0740-use-packaged-modules.patch +++ b/debian/patches/0740-use-packaged-modules.patch @@ -13,6 +13,10 @@ Use debian packaged node modules when available it - Modules with problems compression-webpack-plugin, copy-webpack-plugin, jszip, mkdirp, js-yaml, font-awesome, katex, cache-loader, webpack + - 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) --- a/config/webpack.config.js +++ b/config/webpack.config.js @@ -65,6 +69,15 @@ Use debian packaged node modules when available loader: 'babel-loader', options: { cacheDirectory: path.join(CACHE_PATH, 'babel-loader'), +@@ -261,7 +266,7 @@ + }, + { + 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]', @@ -528,19 +533,6 @@ // enable HMR only in webpack-dev-server DEV_SERVER_LIVERELOAD && new webpack.HotModuleReplacementPlugin(), @@ -95,7 +108,7 @@ Use debian packaged node modules when available }; --- a/package.json +++ b/package.json -@@ -36,12 +36,6 @@ +@@ -36,12 +36,12 @@ "webpack-prod": "NODE_OPTIONS=\"--max-old-space-size=3584\" NODE_ENV=production webpack --config config/webpack.config.js" }, "dependencies": { @@ -105,10 +118,16 @@ Use debian packaged node modules when available - "@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.5", "@gitlab/svgs": "1.175.0", "@gitlab/ui": "23.9.0", -@@ -56,29 +50,27 @@ +@@ -56,29 +56,29 @@ "apollo-link": "^1.2.14", "apollo-link-batch-http": "^1.2.14", "apollo-upload-client": "^13.0.0", @@ -116,34 +135,30 @@ Use debian packaged node modules when available + "autosize": "link:/usr/share/nodejs/autosize", "aws-sdk": "^2.637.0", - "axios": "^0.20.0", -- "babel-loader": "^8.0.6", + "axios": "link:/usr/share/nodejs/axios", -+ "babel-loader": "link:/usr/share/nodejs/babel-loader", + "babel-loader": "^8.0.6", "babel-plugin-lodash": "^3.3.4", "bootstrap": "4.4.1", -- "brace-expansion": "^1.1.8", -- "cache-loader": "^4.1.0", + "brace-expansion": "^1.1.8", + "cache-loader": "^4.1.0", - "clipboard": "^1.7.1", - "codemirror": "^5.48.4", -+ "brace-expansion": "link:/usr/share/nodejs/brace-expansion", -+ "cache-loader": "link:/usr/share/nodejs/cache-loader", + "clipboard": "link:/usr/share/nodejs/clipboard", + "codemirror": "link:/usr/share/nodejs/codemirror", "codesandbox-api": "0.0.23", -- "compression-webpack-plugin": "^3.0.1", -- "copy-webpack-plugin": "^5.0.5", + "compression-webpack-plugin": "^3.0.1", + "copy-webpack-plugin": "^5.0.5", - "core-js": "^3.6.4", + "core-js": "link:/usr/share/nodejs/core-js", "cron-validator": "^1.1.1", "cropper": "^2.3.0", -- "css-loader": "^2.1.1", + "css-loader": "^2.1.1", - "d3": "^5.16.0", - "d3-sankey": "^0.12.3", - "d3-scale": "^2.2.2", - "d3-selection": "^1.2.0", - "dateformat": "^3.0.3", - "deckar01-task_list": "^2.3.1", -+ "css-loader": "link:/usr/share/nodejs/css-loader", + "d3": "link:/usr/share/nodejs/d3", + "d3-sankey": "link:/usr/share/nodejs/d3-sankey", + "d3-scale": "link:/usr/share/nodejs/d3-scale", @@ -153,15 +168,11 @@ Use debian packaged node modules when available "diff": "^3.4.0", "document-register-element": "1.14.3", "dompurify": "^2.2.2", -@@ -86,79 +78,82 @@ - "editorconfig": "^0.15.3", - "emoji-regex": "^7.0.3", +@@ -88,41 +88,42 @@ "emoji-unicode-version": "^0.2.1", -- "exports-loader": "^0.7.0", -- "file-loader": "^5.1.0", + "exports-loader": "^0.7.0", + "file-loader": "^5.1.0", - "font-awesome": "4.7.0", -+ "exports-loader": "link:/usr/share/nodejs/exports-loader", -+ "file-loader": "link:/usr/share/nodejs/file-loader", + "font-awesome": "link:/usr/share/nodejs/font-awesome", "fuzzaldrin-plus": "^0.6.0", - "glob": "^7.1.6", @@ -169,10 +180,9 @@ Use debian packaged node modules when available "graphql": "^15.4.0", "graphql-tag": "^2.11.0", "immer": "^7.0.7", -- "imports-loader": "^0.8.0", -+ "imports-loader": "link:/usr/share/nodejs/imports-loader", + "imports-loader": "^0.8.0", "ipaddr.js": "^1.9.1", -- "jed": "^1.1.1", + "jed": "^1.1.1", + "jed": "link:/usr/share/nodejs/jed", "jest-transform-graphql": "^2.1.0", - "jquery": "^3.5.0", @@ -187,7 +197,7 @@ Use debian packaged node modules when available + "js-cookie": "link:/usr/share/nodejs/js-cookie", + "js-yaml": "link:/usr/share/nodejs/js-yaml", + "jszip": "link:/usr/share/nodejs/jszip", -+ "jszip-utils": "portal:/usr/share/nodejs/jszip-utils", ++ "jszip-utils": "link:/usr/share/nodejs/jszip", + "katex": "link:/usr/share/nodejs/katex", "lodash": "^4.17.20", "marked": "^0.3.12", @@ -195,52 +205,41 @@ Use debian packaged node modules when available + "mermaid": "link:/usr/share/nodejs/mermaid", "mersenne-twister": "1.1.0", - "minimatch": "^3.0.4", -- "miragejs": "^0.1.40", + "minimatch": "link:/usr/share/nodejs/minimatch", -+ "miragejs": "link:/usr/share/nodejs/miragejs", + "miragejs": "^0.1.40", "mock-apollo-client": "^0.4.0", "monaco-editor": "^0.20.0", "monaco-editor-webpack-plugin": "^1.9.0", "monaco-yaml": "^2.5.1", -- "mousetrap": "1.6.5", + "mousetrap": "1.6.5", - "pdfjs-dist": "^2.0.943", -+ "mousetrap": "link:/usr/share/nodejs/mousetrap", + "pdfjs-dist": "link:/usr/share/nodejs/pdfjs-dist", "pikaday": "^1.8.0", - "popper.js": "^1.16.1", -- "prismjs": "^1.21.0", ++ "popper.js": "link:/usr/share/nodejs/popper.js", + "prismjs": "^1.21.0", - "prosemirror-markdown": "^1.3.0", - "prosemirror-model": "^1.6.4", -+ "popper.js": "link:/usr/share/nodejs/popper.js", -+ "prismjs": "link:/usr/share/nodejs/prismjs", + "prosemirror-markdown": "link:/usr/share/nodejs/prosemirror-markdown", + "prosemirror-model": "link:/usr/share/nodejs/prosemirror-model", "raphael": "^2.2.7", -- "raw-loader": "^4.0.0", -+ "raw-loader": "link:/usr/share/nodejs/raw-loader", + "raw-loader": "^4.0.0", "select2": "3.5.2-browserify", - "smooshpack": "^0.0.62", - "sortablejs": "^1.10.2", - "sql.js": "^0.4.0", - "stickyfilljs": "^2.1.0", - "string-hash": "1.1.3", -- "style-loader": "^1.1.3", -+ "style-loader": "link:/usr/share/nodejs/style-loader", +@@ -134,33 +135,90 @@ + "style-loader": "^1.1.3", "swagger-ui-dist": "^3.32.4", "three": "^0.84.0", - "three-orbit-controls": "^82.1.0", -- "three-stl-loader": "^1.0.4", -- "timeago.js": "^4.0.2", + "three-orbit-controls": "link:/usr/share/nodejs/three-orbit-controls", -+ "three-stl-loader": "link:/usr/share/nodejs/three-stl-loader", + "three-stl-loader": "^1.0.4", +- "timeago.js": "^4.0.2", + "timeago.js": "link:/usr/share/nodejs/timeago.js", "tiptap": "^1.8.0", "tiptap-commands": "^1.4.0", "tiptap-extensions": "^1.8.0", "tributejs": "5.1.3", -- "url-loader": "^3.0.0", + "url-loader": "^3.0.0", - "uuid": "8.1.0", -+ "url-loader": "link:/usr/share/nodejs/url-loader", + "uuid": "link:/usr/share/nodejs/uuid", "visibilityjs": "^1.2.4", - "vue": "^2.6.12", @@ -257,19 +256,72 @@ Use debian packaged node modules when available "webpack": "^4.42.0", - "webpack-bundle-analyzer": "^3.6.0", "webpack-cli": "^3.3.11", -- "webpack-stats-plugin": "^0.3.1", -- "worker-loader": "^2.0.0", -- "xterm": "3.14.5" -+ "webpack-stats-plugin": "link:/usr/share/nodejs/webpack-stats-plugin", -+ "worker-loader": "link:/usr/share/nodejs/worker-loader", -+ "xterm": "portal:/usr/share/nodejs/xterm", -+ "loader-utils": "link:/usr/share/nodejs/loader-utils", -+ "mkdirp": "link:/usr/share/nodejs/mkdirp", -+ "postcss": "link:/usr/share/nodejs/postcss", -+ "schema-utils": "link:/usr/share/nodejs/schema-utils" + "webpack-stats-plugin": "^0.3.1", + "worker-loader": "^2.0.0", + "xterm": "3.14.5" }, "devDependencies": { ++ "@babel/plugin-transform-modules-commonjs": "^7.10.1", ++ "@gitlab/eslint-plugin": "4.0.0", ++ "@testing-library/dom": "^7.16.2", ++ "@vue/test-utils": "1.0.0-beta.30", ++ "acorn": "^6.3.0", ++ "axios-mock-adapter": "^1.15.0", ++ "babel-jest": "^26.5.2", ++ "babel-plugin-dynamic-import-node": "^2.3.3", ++ "babel-plugin-istanbul": "^6.0.0", ++ "chalk": "^2.4.1", ++ "commander": "^2.18.0", ++ "custom-jquery-matchers": "^2.1.0", ++ "docdash": "^1.0.2", ++ "eslint": "^6.8.0", ++ "eslint-import-resolver-jest": "^2.1.1", ++ "eslint-import-resolver-webpack": "^0.12.1", ++ "eslint-plugin-jasmine": "^4.1.0", ++ "eslint-plugin-no-jquery": "^2.3.0", ++ "gettext-extractor": "^3.4.3", ++ "gettext-extractor-vue": "^4.0.2", ++ "istanbul-lib-coverage": "^3.0.0", ++ "istanbul-lib-report": "^3.0.0", ++ "istanbul-reports": "^3.0.0", ++ "jasmine-core": "^2.9.0", ++ "jasmine-diff": "^0.1.3", ++ "jasmine-jquery": "^2.1.1", ++ "jest": "^26.5.2", ++ "jest-canvas-mock": "^2.1.2", ++ "jest-environment-jsdom": "^26.5.2", ++ "jest-junit": "^12.0.0", ++ "jest-util": "^26.5.2", ++ "jsdoc": "^3.5.5", ++ "jsdoc-vue": "^1.0.0", ++ "karma": "^4.2.0", ++ "karma-chrome-launcher": "^3.0.0", ++ "karma-coverage-istanbul-reporter": "^2.1.0", ++ "karma-jasmine": "^1.1.2", ++ "karma-junit-reporter": "^1.2.0", ++ "karma-mocha-reporter": "^2.2.5", ++ "karma-sourcemap-loader": "^0.3.7", ++ "karma-webpack": "^4.0.2", ++ "markdownlint-cli": "0.23.2", ++ "md5": "^2.2.1", ++ "node-sass": "^4.14.1", ++ "nodemon": "^2.0.4", ++ "pixelmatch": "^4.0.2", ++ "postcss": "^7.0.14", ++ "prettier": "1.18.2", ++ "readdir-enhanced": "^2.2.4", ++ "stylelint": "^10.1.0", ++ "stylelint-config-recommended": "^2.2.0", ++ "stylelint-scss": "^3.9.2", ++ "timezone-mock": "^1.0.8", ++ "vue-jest": "4.0.0-rc.0", ++ "webpack-dev-server": "^3.10.3", ++ "xhr-mock": "^2.5.1", ++ "yarn-check-webpack-plugin": "^1.2.0", ++ "yarn-deduplicate": "^1.1.1" }, + "blockedDependencies": { + "bootstrap-vue": "https://docs.gitlab.com/ee/development/fe_guide/dependencies.html#bootstrapvue" --- a/babel.config.js +++ b/babel.config.js @@ -34,9 +34,12 @@ diff --git a/debian/patches/0780-css-loader-3.patch b/debian/patches/0780-css-loader-3.patch deleted file mode 100644 index de1a8475a5..0000000000 --- a/debian/patches/0780-css-loader-3.patch +++ /dev/null @@ -1,26 +0,0 @@ -From 8eb81d27554c5b361e93d7aa2593623caac9c016 Mon Sep 17 00:00:00 2001 -From: Pirate Praveen -Date: Wed, 21 Oct 2020 10:26:53 +0000 -Subject: [PATCH] Update css-loader node module 2.1.1 -> 3.2.1 - ---- - config/webpack.config.js | 6 ++- - package.json | 2 +- - yarn.lock | 107 +++++++++++++++++++++++++++------------ - 3 files changed, 79 insertions(+), 36 deletions(-) - ---- a/config/webpack.config.js -+++ b/config/webpack.config.js -@@ -258,8 +258,10 @@ - { - loader: 'css-loader', - options: { -- modules: 'global', -- localIdentName: '[name].[contenthash:8].[ext]', -+ modules: { -+ mode: 'global', -+ localIdentName: '[name].[contenthash:8].[ext]', -+ }, - }, - }, - ], diff --git a/debian/patches/0790-worker-loader-3.patch b/debian/patches/0790-worker-loader-3.patch deleted file mode 100644 index 6e5276bd44..0000000000 --- a/debian/patches/0790-worker-loader-3.patch +++ /dev/null @@ -1,24 +0,0 @@ -From d074f685027a6a8b03bcaaf1f0cb2ff08c167dc9 Mon Sep 17 00:00:00 2001 -From: Pirate Praveen -Date: Sun, 6 Dec 2020 18:24:33 +0000 -Subject: [PATCH] Update worker-loader from 2.x to 3.x - ---- - config/webpack.config.js | 4 ++-- - package.json | 2 +- - yarn.lock | 46 ++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 49 insertions(+), 3 deletions(-) - ---- a/config/webpack.config.js -+++ b/config/webpack.config.js -@@ -236,8 +236,8 @@ - { - loader: 'worker-loader', - options: { -- name: '[name].[contenthash:8].worker.js', -- inline: IS_DEV_SERVER, -+ filename: '[name].[contenthash:8].worker.js', -+ inline: "fallback", - }, - }, - 'babel-loader', diff --git a/debian/patches/series b/debian/patches/series index 6c98e8948a..73d18bbaa2 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -30,5 +30,3 @@ 0740-use-packaged-modules.patch 0750-fix-relative-paths.patch 0770-remove-capybara-screenshot-rspec.patch -0780-css-loader-3.patch -0790-worker-loader-3.patch