From f28d3cb20b1c5b1268e6dd88e734cfabe6deeff2 Mon Sep 17 00:00:00 2001 From: Sruthi Chandran Date: Wed, 9 Dec 2020 23:02:53 +0530 Subject: [PATCH 01/10] Add canvas as externals in webpack.config.js --- debian/patches/0740-use-packaged-modules.patch | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/debian/patches/0740-use-packaged-modules.patch b/debian/patches/0740-use-packaged-modules.patch index 733d6341be..063c8a3108 100644 --- a/debian/patches/0740-use-packaged-modules.patch +++ b/debian/patches/0740-use-packaged-modules.patch @@ -16,7 +16,16 @@ Use debian packaged node modules when available const CopyWebpackPlugin = require('copy-webpack-plugin'); const vendorDllHash = require('./helpers/vendor_dll_hash'); -@@ -159,13 +158,13 @@ +@@ -150,6 +149,8 @@ + + entry: generateEntries, + ++ externals: [ 'canvas' ], ++ + output: { + path: path.join(ROOT_PATH, 'public/assets/webpack'), + publicPath: '/assets/webpack/', +@@ -159,13 +160,13 @@ }, resolve: { @@ -33,7 +42,7 @@ Use debian packaged node modules when available }, module: { -@@ -178,9 +177,13 @@ +@@ -178,9 +179,13 @@ }, { test: /\.js$/, @@ -48,7 +57,7 @@ Use debian packaged node modules when available loader: 'babel-loader', options: { cacheDirectory: path.join(CACHE_PATH, 'babel-loader'), -@@ -516,19 +519,6 @@ +@@ -516,19 +521,6 @@ // enable HMR only in webpack-dev-server DEV_SERVER_LIVERELOAD && new webpack.HotModuleReplacementPlugin(), @@ -68,7 +77,7 @@ Use debian packaged node modules when available new webpack.DefinePlugin({ // This one is used to define window.gon.ee and other things properly in tests: 'process.env.IS_EE': JSON.stringify(IS_EE), -@@ -563,6 +553,7 @@ +@@ -563,6 +555,7 @@ node: { fs: 'empty', // sqljs requires fs From 222dfe0debda3d1a3c68f97cb06d48557bed1c24 Mon Sep 17 00:00:00 2001 From: Pirate Praveen Date: Fri, 11 Dec 2020 01:42:18 +0530 Subject: [PATCH 02/10] Use packaged version of uuid node module --- debian/control | 1 + debian/patches/0740-use-packaged-modules.patch | 4 ++-- debian/patches/0780-css-loader-3.patch | 2 +- debian/patches/0790-worker-loader-3.patch | 2 +- debian/patches/0791-update-uuid.patch | 11 ----------- debian/patches/series | 1 - 6 files changed, 5 insertions(+), 16 deletions(-) delete mode 100644 debian/patches/0791-update-uuid.patch diff --git a/debian/control b/debian/control index 3c4b7f7a6a..ac4bddd6d2 100644 --- a/debian/control +++ b/debian/control @@ -408,6 +408,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, node-timeago.js (>= 4.0~), node-underscore (>= 1.9~), node-url-loader (>= 3.0~), + node-uuid (>= 8.1~), node-vue (>= 2.6.10~), node-vue-resource (>= 1.5.1~), # Blocked by #927254 diff --git a/debian/patches/0740-use-packaged-modules.patch b/debian/patches/0740-use-packaged-modules.patch index 063c8a3108..c3fc4db5c8 100644 --- a/debian/patches/0740-use-packaged-modules.patch +++ b/debian/patches/0740-use-packaged-modules.patch @@ -130,7 +130,7 @@ Use debian packaged node modules when available "diff": "^3.4.0", "document-register-element": "1.14.3", "dompurify": "^2.0.11", -@@ -85,81 +62,53 @@ +@@ -85,81 +62,52 @@ "editorconfig": "^0.15.3", "emoji-regex": "^7.0.3", "emoji-unicode-version": "^0.2.1", @@ -194,7 +194,7 @@ Use debian packaged node modules when available "tiptap-extensions": "^1.8.0", "tributejs": "5.1.3", - "url-loader": "^3.0.0", - "uuid": "8.1.0", +- "uuid": "8.1.0", "visibilityjs": "^1.2.4", - "vue": "^2.6.10", "vue-apollo": "^3.0.3", diff --git a/debian/patches/0780-css-loader-3.patch b/debian/patches/0780-css-loader-3.patch index 85f4a8e49e..87539f0908 100644 --- a/debian/patches/0780-css-loader-3.patch +++ b/debian/patches/0780-css-loader-3.patch @@ -11,7 +11,7 @@ Subject: [PATCH] Update css-loader node module 2.1.1 -> 3.2.1 --- a/config/webpack.config.js +++ b/config/webpack.config.js -@@ -252,8 +252,10 @@ +@@ -254,8 +254,10 @@ { loader: 'css-loader', options: { diff --git a/debian/patches/0790-worker-loader-3.patch b/debian/patches/0790-worker-loader-3.patch index 8560219134..45951ccf82 100644 --- a/debian/patches/0790-worker-loader-3.patch +++ b/debian/patches/0790-worker-loader-3.patch @@ -11,7 +11,7 @@ Subject: [PATCH] Update worker-loader from 2.x to 3.x --- a/config/webpack.config.js +++ b/config/webpack.config.js -@@ -230,8 +230,8 @@ +@@ -232,8 +232,8 @@ { loader: 'worker-loader', options: { diff --git a/debian/patches/0791-update-uuid.patch b/debian/patches/0791-update-uuid.patch deleted file mode 100644 index 9bfb1e0ebf..0000000000 --- a/debian/patches/0791-update-uuid.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/package.json -+++ b/package.json -@@ -99,7 +99,7 @@ - "tiptap-commands": "^1.4.0", - "tiptap-extensions": "^1.8.0", - "tributejs": "5.1.3", -- "uuid": "8.1.0", -+ "uuid": "^8.3.1", - "visibilityjs": "^1.2.4", - "vue-apollo": "^3.0.3", - "vue-loader": "^15.9.0", diff --git a/debian/patches/series b/debian/patches/series index 2d1629f26a..3ff259c9d5 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -31,4 +31,3 @@ 0770-remove-capybara-screenshot-rspec.patch 0780-css-loader-3.patch 0790-worker-loader-3.patch -0791-update-uuid.patch From 53dc81de5865831310a3363f5297ba916066c6ad Mon Sep 17 00:00:00 2001 From: Pirate Praveen Date: Fri, 11 Dec 2020 02:57:36 +0530 Subject: [PATCH 03/10] Use packaged version of mermaid node module --- debian/control | 1 + debian/patches/0740-use-packaged-modules.patch | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index ac4bddd6d2..a9fd761d7d 100644 --- a/debian/control +++ b/debian/control @@ -392,6 +392,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, node-jszip-utils, node-lodash (>= 4.17.15~), node-marked (>= 0.3~), + node-mermaid, node-mousetrap, node-pdfjs-dist, # Include node-pikaday only after @gitlab/ui is accepted diff --git a/debian/patches/0740-use-packaged-modules.patch b/debian/patches/0740-use-packaged-modules.patch index c3fc4db5c8..c3fc06c97c 100644 --- a/debian/patches/0740-use-packaged-modules.patch +++ b/debian/patches/0740-use-packaged-modules.patch @@ -130,7 +130,7 @@ Use debian packaged node modules when available "diff": "^3.4.0", "document-register-element": "1.14.3", "dompurify": "^2.0.11", -@@ -85,81 +62,52 @@ +@@ -85,81 +62,51 @@ "editorconfig": "^0.15.3", "emoji-regex": "^7.0.3", "emoji-unicode-version": "^0.2.1", @@ -159,7 +159,7 @@ Use debian packaged node modules when available - "lodash": "^4.17.20", + "loader-utils": "^2.0.0", "marked": "^0.3.12", - "mermaid": "^8.5.2", +- "mermaid": "^8.5.2", "mersenne-twister": "1.1.0", "minimatch": "^3.0.4", "miragejs": "^0.1.40", From dd8f94c6bf263c9b75ca2c4456534ab0c655d18b Mon Sep 17 00:00:00 2001 From: Pirate Praveen Date: Fri, 11 Dec 2020 15:51:21 +0530 Subject: [PATCH 04/10] Use packaged version of katex node module --- debian/control | 1 + debian/patches/0740-use-packaged-modules.patch | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index a9fd761d7d..3d0f6f28bc 100644 --- a/debian/control +++ b/debian/control @@ -390,6 +390,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, node-js-cookie, node-jszip, node-jszip-utils, + node-katex, node-lodash (>= 4.17.15~), node-marked (>= 0.3~), node-mermaid, diff --git a/debian/patches/0740-use-packaged-modules.patch b/debian/patches/0740-use-packaged-modules.patch index c3fc06c97c..b8ffaef69e 100644 --- a/debian/patches/0740-use-packaged-modules.patch +++ b/debian/patches/0740-use-packaged-modules.patch @@ -130,7 +130,7 @@ Use debian packaged node modules when available "diff": "^3.4.0", "document-register-element": "1.14.3", "dompurify": "^2.0.11", -@@ -85,81 +62,51 @@ +@@ -85,81 +62,50 @@ "editorconfig": "^0.15.3", "emoji-regex": "^7.0.3", "emoji-unicode-version": "^0.2.1", @@ -155,7 +155,7 @@ Use debian packaged node modules when available "js-yaml": "^3.13.1", - "jszip": "^3.1.3", - "jszip-utils": "^0.0.2", - "katex": "^0.10.0", +- "katex": "^0.10.0", - "lodash": "^4.17.20", + "loader-utils": "^2.0.0", "marked": "^0.3.12", From 16fd3660ecb02092f54b2f51d2bd7f53215e28fc Mon Sep 17 00:00:00 2001 From: Pirate Praveen Date: Fri, 11 Dec 2020 16:06:01 +0530 Subject: [PATCH 05/10] Use packaged version of minimatch node module --- debian/control | 1 + debian/patches/0740-use-packaged-modules.patch | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 3d0f6f28bc..70954ae7a1 100644 --- a/debian/control +++ b/debian/control @@ -394,6 +394,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, node-lodash (>= 4.17.15~), node-marked (>= 0.3~), node-mermaid, + node-minimatch, node-mousetrap, node-pdfjs-dist, # Include node-pikaday only after @gitlab/ui is accepted diff --git a/debian/patches/0740-use-packaged-modules.patch b/debian/patches/0740-use-packaged-modules.patch index b8ffaef69e..d2d3c58b01 100644 --- a/debian/patches/0740-use-packaged-modules.patch +++ b/debian/patches/0740-use-packaged-modules.patch @@ -130,7 +130,7 @@ Use debian packaged node modules when available "diff": "^3.4.0", "document-register-element": "1.14.3", "dompurify": "^2.0.11", -@@ -85,81 +62,50 @@ +@@ -85,81 +62,49 @@ "editorconfig": "^0.15.3", "emoji-regex": "^7.0.3", "emoji-unicode-version": "^0.2.1", @@ -161,7 +161,7 @@ Use debian packaged node modules when available "marked": "^0.3.12", - "mermaid": "^8.5.2", "mersenne-twister": "1.1.0", - "minimatch": "^3.0.4", +- "minimatch": "^3.0.4", "miragejs": "^0.1.40", + "mkdirp": "^1.0.4", "mock-apollo-client": "^0.4.0", From fcd4be54e333322bfd0c01c67704da77307e99bf Mon Sep 17 00:00:00 2001 From: Pirate Praveen Date: Fri, 11 Dec 2020 16:49:44 +0530 Subject: [PATCH 06/10] Use packaged version of js-yaml node module --- debian/control | 1 + debian/patches/0740-use-packaged-modules.patch | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index 70954ae7a1..a671d48f08 100644 --- a/debian/control +++ b/debian/control @@ -388,6 +388,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, # Broken # node-jquery.waitforimages, node-js-cookie, + node-js-yaml (>= 3.13.1~), node-jszip, node-jszip-utils, node-katex, diff --git a/debian/patches/0740-use-packaged-modules.patch b/debian/patches/0740-use-packaged-modules.patch index d2d3c58b01..d7534db26e 100644 --- a/debian/patches/0740-use-packaged-modules.patch +++ b/debian/patches/0740-use-packaged-modules.patch @@ -130,7 +130,7 @@ Use debian packaged node modules when available "diff": "^3.4.0", "document-register-element": "1.14.3", "dompurify": "^2.0.11", -@@ -85,81 +62,49 @@ +@@ -85,81 +62,48 @@ "editorconfig": "^0.15.3", "emoji-regex": "^7.0.3", "emoji-unicode-version": "^0.2.1", @@ -152,7 +152,7 @@ Use debian packaged node modules when available "jquery.caret": "^0.3.1", "jquery.waitforimages": "^2.2.0", - "js-cookie": "^2.2.1", - "js-yaml": "^3.13.1", +- "js-yaml": "^3.13.1", - "jszip": "^3.1.3", - "jszip-utils": "^0.0.2", - "katex": "^0.10.0", From 9abef1b71a703930c3cd4877c322649820870df2 Mon Sep 17 00:00:00 2001 From: Pirate Praveen Date: Sat, 12 Dec 2020 23:53:18 +0530 Subject: [PATCH 07/10] Use packaged version of webpack-stats-plugin --- debian/patches/0740-use-packaged-modules.patch | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/debian/patches/0740-use-packaged-modules.patch b/debian/patches/0740-use-packaged-modules.patch index d7534db26e..0c3acc97cd 100644 --- a/debian/patches/0740-use-packaged-modules.patch +++ b/debian/patches/0740-use-packaged-modules.patch @@ -130,7 +130,7 @@ Use debian packaged node modules when available "diff": "^3.4.0", "document-register-element": "1.14.3", "dompurify": "^2.0.11", -@@ -85,81 +62,48 @@ +@@ -85,81 +62,47 @@ "editorconfig": "^0.15.3", "emoji-regex": "^7.0.3", "emoji-unicode-version": "^0.2.1", @@ -204,14 +204,14 @@ Use debian packaged node modules when available "vue-virtual-scroll-list": "^1.4.4", "vuedraggable": "^2.23.0", "vuex": "^3.5.1", - "web-vitals": "^0.2.4", +- "web-vitals": "^0.2.4", - "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": "^0.3.1" ++ "web-vitals": "^0.2.4" }, "devDependencies": { }, From 79a45d57deb792717f13bdec5375b849679c4d22 Mon Sep 17 00:00:00 2001 From: Pirate Praveen Date: Mon, 14 Dec 2020 00:21:42 +0530 Subject: [PATCH 08/10] Use packaged font-awesome node module --- debian/control | 1 + debian/patches/0740-use-packaged-modules.patch | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/debian/control b/debian/control index a671d48f08..9d27673903 100644 --- a/debian/control +++ b/debian/control @@ -380,6 +380,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, node-exports-loader (>= 0.7~), node-imports-loader (>= 0.8~), node-file-loader (>= 5.0~), + node-font-awesome, node-fuzzaldrin-plus (>= 0.5~), node-glob (>= 7.1.6~), node-jed, diff --git a/debian/patches/0740-use-packaged-modules.patch b/debian/patches/0740-use-packaged-modules.patch index 0c3acc97cd..3a6cdefefb 100644 --- a/debian/patches/0740-use-packaged-modules.patch +++ b/debian/patches/0740-use-packaged-modules.patch @@ -130,13 +130,13 @@ Use debian packaged node modules when available "diff": "^3.4.0", "document-register-element": "1.14.3", "dompurify": "^2.0.11", -@@ -85,81 +62,47 @@ +@@ -85,81 +62,46 @@ "editorconfig": "^0.15.3", "emoji-regex": "^7.0.3", "emoji-unicode-version": "^0.2.1", - "exports-loader": "^0.7.0", - "file-loader": "^5.1.0", - "font-awesome": "4.7.0", +- "font-awesome": "4.7.0", "fuzzaldrin-plus": "^0.6.0", - "glob": "^7.1.6", "graphql": "^14.7.0", @@ -240,3 +240,14 @@ Use debian packaged node modules when available import page from './page/index.vue'; +--- a/config/application.rb ++++ b/config/application.rb +@@ -203,7 +203,7 @@ + config.assets.precompile << "illustrations/*.svg" + + # Import Fontawesome fonts +- config.assets.paths << "#{config.root}/node_modules/font-awesome/fonts" ++ config.assets.paths << "/usr/share/nodejs/font-awesome/fonts" + config.assets.precompile << "fontawesome-webfont.woff2" + config.assets.precompile << "fontawesome-webfont.woff" + From 49d40037b413b7047b67d4fc0bd1e87792a9e4b9 Mon Sep 17 00:00:00 2001 From: Pirate Praveen Date: Mon, 14 Dec 2020 17:51:31 +0530 Subject: [PATCH 09/10] Tighten dependency on node-autosize for bug fix --- debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/control b/debian/control index 9d27673903..2aefd4a1f6 100644 --- a/debian/control +++ b/debian/control @@ -357,7 +357,7 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, ruby-yajl (>= 1.4.1~), ruby-webauthn (>= 2.3~), # packaged node modules - all node packages are not packaged yet - node-autosize (>= 4.0~), + node-autosize (>= 4.0.2~dfsg1-5~), node-axios (>= 0.17.1~), node-babel7, node-babel-loader (>= 8.0~), From 4e710148d8ea66cd73f4ba762f8d588efebe9c4f Mon Sep 17 00:00:00 2001 From: Pirate Praveen Date: Thu, 17 Dec 2020 16:16:37 +0530 Subject: [PATCH 10/10] Upload to unstable --- debian/changelog | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/debian/changelog b/debian/changelog index 5151fd3dc3..681c28f97e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +gitlab (13.4.7-2) unstable; urgency=medium + + [ Sruthi Chandran ] + * Add canvas as externals in webpack.config.js + + [ Pirate Praveen ] + * Use packaged versions of uuid, mermaid, katex, minimatch, js-yaml, + webpack-stats-plugin and font-awesome node modules + * Tighten dependency on node-autosize for bug fix (error in browser console) + + -- Pirate Praveen Thu, 17 Dec 2020 16:14:45 +0530 + gitlab (13.4.7-1) unstable; urgency=medium * Use packaged version of pdfjs-dist and adapt for worker-loader 3 api