Skip to content

Update dependencies

Dependency updates

Dependencies can be updated in a single MR, or if anything seems risky or requires more changes to our custom code, you can create separate MRs for individual packages, or to split up frontend/backend updates.

Take the time to review release notes for any major releases. There may be new features of a package we might want to use, bugfixes that allow us to remove workarounds we'd introduced previously, or opportunities to drop some dependencies altogether.

Node modules

  • Run npx npm-check-updates -u -x '*vue*, eslint' to bump versions for everything except Vue and eslint.
  • Run yarn to update yarn.lock.
  • Run make lint-frontend and make jest-tests and verify frontend tests still pass.
  • Run make view and browse around the site a bit. Check for new console errors or other problems.

Be sure to check @gitlab/ui release notes for breaking changes. Changes in minor versions also have the potential to make visual changes to the Docs site. Usually these are OK, but it's worth taking the time to understand the changes.

Yarn

Release History

  • Run yarn set version stable to update the packageManager field in package.json.

Go version

Release History

  • Update .tool-versions
  • If this is a major version, update go.mod
  • If this is a major version, update GO_VERSION_PREVIOUS and GO_VERSION in .gitlab-ci.yml
  • If this is a major version, update the versions in test:go > parallel > matrix > GO_VERSION in test.gitlab-ci.yml
  • Check that linting and tests still pass: make lint-go && make go-tests

Go modules and linters

  • Run go get -t -u ./... to update all dependencies, including test dependencies
  • Run go mod tidy to remove now unneeded dependencies from go.sum
  • Update .tool-versions and .gitlab-ci.yml to bump the version for golangci-lint (Release History)
  • Check that linting and tests still pass: make lint-go && make go-tests

Linux distros

Update the relevant variable in .gitlab-ci.yml (e.g, ALPINE_VERSION). Verify pipelines all still pass.

Other tools

Update .tool-versions and the relevant variable in .gitlab-ci.yml (e.g, HUGO_VERSION).

Update .gitlab-ci.yml variables only:

Edited by Hiru Fernando