Repository navigation
fix(container): resolve packages from TypeScript configs - #4914
escapedcat merged 4 commits into
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes module resolution for TypeScript-based commitlint configuration files when using the published Docker image, where commitlint packages are installed globally and the TypeScript loader resolves imports relative to the mounted config file.
Changes:
- Set
NODE_PATHin the container image so the TypeScript config loader can resolve globally installed@commitlint/*packages. - Add a mounted TypeScript fixture and exercise it during the image build to prevent regressions.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Any of this feedback from Claude valuable?
|
|
Yes. I inlined the config, added a failing long-header check, included the extends case from the issue, and clean up the loader caches. I kept NODE_PATH on the image because limiting it to the build check would leave mounted TypeScript configs broken at runtime. |
PR Summary by Qodofix(container): resolve global commitlint packages from TypeScript configs
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| Dockerfile.ci | Configures global module resolution and adds a build-time TypeScript configuration smoke test; no eligible follow-up issue was identified. |
Reviews (3): Last reviewed commit: "test(container): prove custom TypeScript..." | Re-trigger Greptile
Code Review by Qodo
1. BuildKit-only heredoc
|
|
The workflow runs are waiting for maintainer approval before the jobs can start. |
8ff5f04 to
6b1b937
Compare
|
Does this comment from Claude make sense?
|
|
Yes, that makes sense. I changed the custom limit to 50 and use a 61-character header, so the check now proves the TypeScript rules block is being applied. |
f5712a9
into
conventional-changelog:master

Description
Make globally installed commitlint packages resolvable from TypeScript configuration files in the CI image. The image build now exercises a mounted TypeScript fixture that imports both a runtime value and a type from
@commitlint/types.Motivation and Context
The image installs commitlint packages globally, but the TypeScript config loader resolves imports relative to the config file. As a result, configs that import commitlint packages fail with
Cannot find module '@commitlint/types'.Setting
NODE_PATHto the image's global module directory makes those imports available to the loader.Fixes #4623.
Usage examples
How Has This Been Tested?
NODE_PATHpnpm lintpnpm buildA container runtime is not installed locally, so the final Docker image build is left to CI.
Types of changes
Checklist