@gitlab/ui v131.3.1+ ships without dist/ folder — publishing pipeline regression

Summary

Starting at @gitlab/ui v131.3.1, the dist/ folder is no longer included in the published npm package. The package.json still declares "main": "dist/index.js", which breaks any tooling that resolves @gitlab/ui via Node module resolution.

Affected versions:

  • 131.3.0 (Apr 14) — ships dist/
  • 131.3.1 (Apr 15) — dist/ missing
  • 131.3.2dist/ missing

Impact

Any consumer using ESLint with eslint-import-resolver-alias (or similar Node-based resolution) gets:

Error: Cannot find module '.../node_modules/@gitlab/ui/dist/index.js'

This specifically breaks the import/no-cycle rule on .js files that import from @gitlab/ui.

We hit this while upgrading Switchboard from v129 to v131: https://gitlab.com/gitlab-com/gl-infra/gitlab-dedicated/switchboard/-/merge_requests/3992

Root cause

!5838 (merged) moved package publishing to a dedicated scheduled pipeline. The root .gitlab-ci.yml include rules for packages/gitlab-ui/.gitlab-ci.yml now have is-publishing-pipeline: when: never as the first rule, which excludes the entire UI CI config from the scheduled publishing pipeline.

This means ui:build_package — the job that runs yarn build and produces dist/ — never executes during the publishing pipeline. So publish_npm_packages publishes the package without the built artifacts.

v131.3.0 was the last version published by the old pipeline (on merge to main). v131.3.1 was the first version published by the new scheduled pipeline, without dist/.

/cc @markrian