Sign in or sign up before continuing. Don't have an account yet? Register now to get started.
META: Library Updates and Webpack bundle optimisations
This is a META issue which is collecting our different tasks concerning libraries and webpack bundling according to our OKR's.
## Transfer old used libraries to being Yarn managed
We currently have different legacy libraries which are simply used on a copied version (see `\vendor\assets\javascripts`). The idea is to use instead their current Yarn managed Version.
| Status | Issue | Library | Version | Latest | URL |
|--------|-------|--------------------------|---------|--------|-----|
| :heavy_check_mark: : | gitlab-foss#39616 | autosize.js | 3.0.14 | 4.0.0 | http://www.jacklmoore.com/autosize/ |
| :heavy\_check\_mark: | | Chart.js | 1.0.2 | 2.7.1 | http://chartjs.org/ |
| :heavy_check_mark: | gitlab-foss!15531 | clipboard.js | 1.4.2 | 1.7.1 | https://zenorocha.github.io/clipboard.js |
| :heavy_check_mark: | gitlab-foss!20195 | date.format.js | 1.2.3 | | |
| :heavy_check_mark: | gitlab-foss#39633 | fuzzaldrin-plus.js | 0.3.1 | 0.5.0 | https://github.com/jeancroy/fuzz-aldrin-plus |
| | | jquery.atwho.js | 1.5.1 | 1.5.4 | https://github.com/ichord/At.js/blob/master/package.json |
| | | jquery.caret.js | | | |
| | | jquery.endless-scroll.js | 1.4.8 | 1.8.0 | https://github.com/fredwu/jquery-endless-scroll/blob/master/js/jquery.endless-scroll.js |
| :memo: | gitlab-foss!15098 | jquery.scrollTo.js | 2.1.2 | 2.1.2 | https://github.com/flesler/jquery.scrollTo |
| :heavy_check_mark: | gitlab-foss!17004 | jquery.waitforimages.js | 1.4 | 2.2.0 | https://github.com/alexanderdickson/waitForImages |
| :heavy\_check\_mark: | https://gitlab.com/gitlab-org/gitlab-foss/merge_requests/15864 | katex.js | Special GL Version | | |
| :heavy\_check\_mark: | | latinise.js | Only Function (Move to Utils) | | |
| | | pdf.js | Special GL Webpack | | |
| | | pdf.min.js | | | |
| | | pdf.worker.js | | | |
| | | pdf.worker.min.js | | | |
| :heavy\_check\_mark: | | peek.js | Special GL ? | | |
| :heavy\_check\_mark: | | peek.performance_bar.js | Performance Bar | | |
| :heavy\_check\_mark: | gitlab-foss!19274 | Sortable.js | 1.4.2 | 1.6.1 | https://github.com/RubaXa/Sortable |
| | | u2f.js | Google Special | | |
| :memo: | https://gitlab.com/gitlab-org/gitlab-foss/issues/49741 | xterm (Directory) | 2.1.0 | 2.9.1 | https://github.com/sourcelair/xterm.js |
## Updating existing libraries
The background is to update our currently used libraries to their latest version (based on `yarn outdated`). We have 3 types of libraries (Client packaged, Libraries Used for building etc., pure dev dependencies). We will try to group them in logic groups and update them per issue individually.
| Status | Issue | Type | Package | Current | Wanted | Latest | Package Type | URL |
|--------|-------|------|-----------------------------------|--------------------|-------------------|------------|------------------|-----------------------------------------------------------------------------|
| :heavy_check_mark: | gitlab-foss#40444 | C | axios | 0.16.2 | 0.16.2. | 0.17.0 | dependencies | https://github.com/axios/axios |
| :heavy_check_mark: | gitlab-foss#40445 | B | babel-core | 6.23.1 | 6.26.0 | 6.26.0 | dependencies | https://babeljs.io/ |
| :heavy_check_mark: | gitlab-foss#40445 | B | babel-eslint | 7.2.1 | 7.2.3 | 8.0.1 | dependencies | https://github.com/babel/babel-eslint |
| :heavy_check_mark: | gitlab-foss#40445 | B | babel-loader | 7.1.1 | 7.1.2 | 7.1.2 | dependencies | https://github.com/babel/babel-loader |
| :heavy_check_mark: | gitlab-foss#40445 | B | babel-plugin-istanbul | 4.0.0 | 4.1.5 | 4.1.5 | devDependencies | https://github.com/istanbuljs/babel-plugin-istanbul#readme |
| :heavy_check_mark: | gitlab-foss#40445 | B | babel-plugin-transform-define | 1.2.0 | 1.3.0 | 1.3.0 | dependencies | https://github.com/FormidableLabs/babel-plugin-transform-define |
| :heavy_check_mark: | gitlab-foss#40445 | B | babel-preset-latest | 6.24.0 | 6.24.1 | 6.24.1 | dependencies | https://babeljs.io/ |
| :heavy_check_mark: | gitlab-foss#40445 | B | babel-preset-stage-2 | 6.22.0 | 6.24.1 | 6.24.1 | dependencies | https://babeljs.io/ |
| (removed) | gitlab-foss!18232 | | bootstrap-sass | 3.3.6 | 3.3.7 | 3.3.7 | dependencies | https://github.com/twbs/bootstrap-sass#readme |
| :heavy_check_mark: | gitlab-foss!17246 | | compression-webpack-plugin | 1.0.0 | 1.0.1 | 1.0.1 | dependencies | https://webpack.js.org/plugins/compression-webpack-plugin/ |
| :heavy_check_mark: | gitlab-foss!17246 | | copy-webpack-plugin | 4.0.1 | 4.2.0 | 4.2.0 | dependencies | https://github.com/webpack-contrib/copy-webpack-plugin |
| | | | core-js | 2.4.1 | 2.5.1 | 2.5.1 | dependencies | https://github.com/zloirock/core-js#readme |
| | | | cropper | 2.3.0 | 2.3.4 | 3.1.3 | dependencies | https://fengyuanchen.github.io/cropper |
| :heavy_check_mark: | gitlab-foss!17246 | | css-loader | 0.28.0 | 0.28.7 | 0.28.7 | dependencies | https://github.com/webpack/css-loader#readme |
| :heavy_check_mark: | gitlab-foss#37013 | | d3 | 3.5.11 | 3.5.17 | 4.11.0 | dependencies | https://d3js.org |
| :newspaper2: | gitlab-foss!22646 (to 1.12.0) | | document-register-element | 1.3.0 | 1.3.0. | 1.7.0 | dependencies | https://github.com/WebReflection/document-register-element |
| | | | dropzone | 4.2.0 | 4.3.0 | 5.2.0 | dependencies | http://www.dropzonejs.com |
| :memo: | gitlab-foss#40476 | B | eslint | 3.19.0 | 3.19.0. | 4.10.0 | devDependencies | https://eslint.org |
| :memo: | gitlab-foss#40476 | B | eslint-config-airbnb-base | 10.0.1 | 10.0.1. | 12.1.0 | devDependencies | https://github.com/airbnb/javascript |
| :memo: | gitlab-foss#40476 | B | eslint-plugin-filenames | 1.1.0 | 1.2.0 | 1.2.0 | devDependencies | https://github.com/selaux/eslint-plugin-filenames |
| :memo: | gitlab-foss#40476 | B | eslint-plugin-html | 2.0.1 | 2.0.3 | 3.2.2 | dependencies | https://github.com/BenoitZugmeyer/eslint-plugin-html |
| :memo: | gitlab-foss#40476 | B | eslint-plugin-import | 2.2.0 | 2.8.0 | 2.8.0 | devDependencies | https://github.com/benmosher/eslint-plugin-import |
| :memo: | gitlab-foss#40476 | B | eslint-plugin-jasmine | 2.2.0 | 2.9.1 | 2.9.1 | devDependencies | https://github.com/tlvince/eslint-plugin-jasmine |
| :memo: | gitlab-foss#40476 | B | eslint-plugin-promise | 3.5.0 | 3.6.0 | 3.6.0 | devDependencies | https://github.com/xjamundx/eslint-plugin-promise#readme |
| :heavy_check_mark: | gitlab-foss!17246 | | file-loader | 0.11.1 | 0.11.2 | 1.1.5 | dependencies | https://github.com/webpack/file-loader |
| :heavy_check_mark: | gitlab-foss!16573 (to 2.9.0) | | jasmine-core | 2.6.3 | 2.8.0 | 2.8.0 | devDependencies | http://jasmine.github.io |
| :heavy_check_mark: | | | jquery | 2.2.1 | 2.2.4 | 3.2.1 | dependencies | https://jquery.com |
| :heavy_check_mark: | gitlab-foss!15570 | | jquery-ujs | 1.2.1 | 1.2.2 | 1.2.2 | dependencies | https://github.com/rails/jquery-ujs#readme |
| | | | js-cookie | 2.1.3 | 2.2.0 | 2.2.0 | dependencies | https://github.com/js-cookie/js-cookie#readme |
| | | | jszip | 3.1.3 | 3.1.4 | 3.1.4 | dependencies | https://github.com/Stuk/jszip#readme |
| :heavy_check_mark: | gitlab-foss!16402 | | karma | 1.7.0 | 1.7.1 | 1.7.1 | devDependencies | http://karma-runner.github.io/ |
| :heavy_check_mark: | gitlab-foss!16402 | | karma-chrome-launcher | 2.1.1 | 2.2.0 | 2.2.0 | devDependencies | https://github.com/karma-runner/karma-chrome-launcher#readme |
| :heavy_check_mark: | gitlab-foss!16402 | | karma-coverage-istanbul-reporter | 0.2.0 | 0.2.3 | 1.3.0 | devDependencies | https://github.com/mattlewis92/karma-coverage-istanbul-reporter#readme |
| :heavy_check_mark: | gitlab-foss!16402 | | karma-mocha-reporter | 2.2.2 | 2.2.5 | 2.2.5 | devDependencies | http://www.litixsoft.de/index.php?lang=en#modules |
| :heavy_check_mark: | gitlab-foss!16402 | | karma-webpack | 2.0.4 | 2.0.5 | 2.0.5 | devDependencies | http://github.com/webpack/karma-webpack |
| :heavy_check_mark: | gitlab-foss!21526 (to 0.14.3) | | monaco-editor | 0.10.0 | 0.10.0. | 0.10.1 | dependencies | https://github.com/Microsoft/monaco-editor#readme |
| | | | mousetrap | 1.4.6 | 1.6.1 | 1.6.1 | dependencies | https://github.com/ccampbell/mousetrap#readme |
| :heavy_check_mark: | gitlab-foss!17246 | | nodemon | 1.11.0 | 1.12.1 | 1.12.1 | devDependencies | http://nodemon.io |
| | | | prismjs | 1.6.0 | 1.8.3 | 1.8.3 | dependencies | https://github.com/LeaVerou/prism#readme |
| :heavy_check_mark: | gitlab-foss!16573 | | raven-js | 3.14.0 | 3.19.1 | 3.19.1 | dependencies | https://github.com/getsentry/raven-js |
| :heavy_check_mark: | gitlab-foss!17246 | | react-dev-utils | 0.5.2 | 0.5.2. | 4.1.0 | dependencies | https://github.com/facebookincubator/create-react-app#readme |
| | | | select2 | 3.5.2-browserify | 3.5.2-browserify. | 4.0.6-rc.0 | dependencies | https://select2.org |
| | | | three | 0.84.0 | 0.84.0. | 0.87.1 | dependencies | http://threejs.org/ |
| | | | three-stl-loader | 1.0.4 | 1.0.6 | 1.0.6 | dependencies | https://github.com/enspiral-cherubi/three-stl-loader#readme |
| :heavy_check_mark: | gitlab-foss#40465 | | timeago.js | 2.0.5 | 2.0.5. | 3.0.2 | dependencies | https://github.com/hustcc/timeago.js#readme |
| :heavy_check_mark: | gitlab-foss!17246 | | url-loader | 0.5.8 | 0.5.9 | 0.6.2 | dependencies | https://github.com/webpack-contrib/url-loader |
| | | | visibilityjs | 1.2.4 | 1.2.5 | 1.2.5 | dependencies | https://github.com/ai/visibilityjs#readme |
| :heavy_check_mark: | gitlab-foss!14874 | | vue | 2.2.6 | 2.5.2 | 2.5.2 | dependencies | https://github.com/vuejs/vue#readme |
| :heavy_check_mark: | gitlab-foss!17246 | | vue-loader | 11.3.4 | 11.3.4. | 13.3.0 | dependencies | https://github.com/vuejs/vue-loader |
| :heavy_check_mark: | gitlab-foss!14874 | | vue-template-compiler | 2.2.6 | 2.5.2 | 2.5.2 | dependencies | https://github.com/vuejs/vue/tree/dev/packages/vue-template-compiler#readme |
| :heavy_check_mark: | gitlab-foss!17246 | | webpack | 3.5.5 | 3.8.1 | 3.8.1 | dependencies | https://github.com/webpack/webpack |
| :heavy_check_mark: | gitlab-foss!17246 | | webpack-bundle-analyzer | 2.8.2 | 2.9.0 | 2.9.0 | dependencies | https://github.com/th0r/webpack-bundle-analyzer |
| :heavy_check_mark: | gitlab-foss!17246 | | webpack-dev-server | 2.7.1 | 2.9.3 | 2.9.3 | devDependencies | http://github.com/webpack/webpack-dev-server |
## Remove unnecessary libraries
The idea is to get rid of old libraries/unnecessary libraries.
## Improve Webpack bundled libraries
Sometimes due to different setup we end up with not optimised loading/importing of different libraries.
* Check that all external libraries are only included once in the bundles
* Currently loading some JS files multiple times due to duplicate `webpack_bundle_tag`'s (Investigation needed)
## Improve Webpack bundles
* Emoji digest.json is imported into the package and not loaded async this results in a huge bundle (gitlab-foss#39614)
#### Legend
:memo: - Update Started
:newspaper2: - In Review
:heavy_check_mark: - Done
issue