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 yarnto updateyarn.lock. -
Run make lint-frontendandmake jest-testsand verify frontend tests still pass. -
Run make viewand 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
-
Run yarn set version stableto update thepackageManagerfield inpackage.json.
Go version
-
Update .tool-versions -
If this is a major version, update go.mod -
If this is a major version, update GO_VERSION_PREVIOUSandGO_VERSIONin.gitlab-ci.yml -
If this is a major version, update the versions in test:go > parallel > matrix > GO_VERSIONintest.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 tidyto remove now unneeded dependencies fromgo.sum -
Update .tool-versionsand.gitlab-ci.ymlto bump the version forgolangci-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).
-
Hugo (releases) -
node.js (releases). We want to use the LTS version of node. -
Shellcheck (releases) -
yq (releases)
Update .gitlab-ci.yml variables only: