debian-mirror-gitlab/doc/development/fe_guide/dependencies.md

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

44 lines
2.1 KiB
Markdown
Raw Normal View History

2021-01-29 00:20:46 +05:30
---
stage: none
group: unassigned
2021-02-22 17:27:13 +05:30
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2021-01-29 00:20:46 +05:30
---
2020-04-08 14:13:33 +05:30
# Frontend dependencies
2021-03-11 19:13:27 +05:30
We use [yarn@1](https://classic.yarnpkg.com/lang/en/) to manage frontend dependencies.
2020-04-08 14:13:33 +05:30
2021-03-11 19:13:27 +05:30
There are a few exceptions in the GitLab repository, stored in `vendor/assets/`.
2020-04-08 14:13:33 +05:30
2021-03-11 19:13:27 +05:30
## What are production and development dependencies?
These dependencies are defined in two groups within `package.json`, `dependencies` and `devDependencies`.
For our purposes, we consider anything that is required to compile our production assets a "production" dependency.
That is, anything required to run the `webpack` script with `NODE_ENV=production`.
Tools like `eslint`, `jest`, and various plugins and tools used in development are considered `devDependencies`.
This distinction is used by omnibus to determine which dependencies it requires when building GitLab.
2020-04-08 14:13:33 +05:30
2021-03-11 19:13:27 +05:30
Exceptions are made for some tools that we require in the
`compile-production-assets` CI job such as `webpack-bundle-analyzer` to analyze our
2021-04-17 20:07:23 +05:30
production assets post-compile.
2021-03-11 19:13:27 +05:30
## Updating dependencies
2020-04-08 14:13:33 +05:30
2021-10-27 15:23:28 +05:30
See the main [Dependencies](../dependencies.md) page for general information about dependency updates.
2020-04-08 14:13:33 +05:30
### Blocked dependencies
2021-03-11 19:13:27 +05:30
We discourage installing some dependencies in [GitLab repository](https://gitlab.com/gitlab-org/gitlab) because they can create conflicts in the dependency tree.
Blocked dependencies are declared in the `blockDependencies` property of the GitLab [`package.json`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/package.json).
2020-04-08 14:13:33 +05:30
## Dependency notes
### BootstrapVue
2020-06-23 00:09:42 +05:30
[BootstrapVue](https://bootstrap-vue.org/) is a component library built with Vue.js and Bootstrap.
2020-04-08 14:13:33 +05:30
We wrap BootstrapVue components in [GitLab UI](https://gitlab.com/gitlab-org/gitlab-ui/) with the
purpose of applying visual styles and usage guidelines specified in the
[Pajamas Design System](https://design.gitlab.com/). For this reason, we recommend not installing
BootstrapVue directly in the GitLab repository. Instead create a wrapper of the BootstrapVue
component you want to use in GitLab UI first.