Remove tsconfig-paths from chai test bootstrap#95
Merged
Conversation
Copilot
AI
changed the title
[WIP] Fix failing CI job due to TypeScript DTS build
Scope chai-openapi-response-validator DTS builds to a tsup-specific bundler tsconfig
May 31, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #95 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 16 16
Lines 410 410
Branches 77 77
=========================================
Hits 410 410 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Copilot
AI
changed the title
Scope chai-openapi-response-validator DTS builds to a tsup-specific bundler tsconfig
Remove May 31, 2026
tsconfig-paths from chai test bootstrap
ehuelsmann
approved these changes
May 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
CI was emitting a
tsconfig-pathswarning because the chai test runner still loadedtsconfig-paths/registereven though the package does not define abaseUrlor path aliases. This change removes that stale bootstrap so the test command matches the package’s actual TypeScript setup.Test runner cleanup
tsconfig-paths/registerfrompackages/chai-openapi-response-validator's Mocha invocationts-node/registerin place for TypeScript test executionBehavioral impact
{ "test": "yarn build:openapi-validator && yarn build:common-test-resources && mocha --require ts-node/register --extension ts --recursive" }Original prompt
Update the existing pull request in repository
ehuelsmann/OpenAPIValidatorsto fix the failing CI job caused by the TypeScript DTS build in@ehuelsmann/chai-openapi-response-validator.Context:
error TS5101: Option 'baseUrl' is deprecated and will stop functioning in TypeScript 7.0. Specify compilerOption '"ignoreDeprecations": "6.0"' to silence this error.tsupDTS build forpackages/chai-openapi-response-validator.tsupremains the source of truth.Requested solution:
packages/chai-openapi-response-validatorto use a bundler-oriented module resolution strategy.moduleResolution: "bundler"withmodule: "ESNext"for the package where appropriate.ignoreDeprecations: "6.0"if still required.tsupgenerating DTS output.Please modify the PR with the minimal code changes needed and open/update the pull request accordingly.
The following is the prior conversation context from the user's chat exploration (may be truncated):
User: Please find a solution for this failing job. Use the logs, job definition, and any referenced files where the failure occurred. Keep your response focused on the solution and include code suggestions when appropriate.
Assistant: The failure is caused by TypeScript 6 treating
compilerOptions.baseUrlas deprecated during the DTS build for@ehuelsmann/chai-openapi-response-validator.Root cause
The job fails in the package build step, specifically while
tsupgenerates declarations:.github/workflows/ci.ymlpackages/chai-openapi-response-validator/package.jsonpackages/chai-openapi-response-validator/tsconfig.jsonFrom the log:
This package tsconfig extends the repo root tsconfig, so the deprecated
baseUrlis almost certainly inherited there. The DTS build now fails because TypeScript wants that deprecation explicitly acknowledged.Solution
Add
ignoreDeprecations: "6.0"to the compiler options used by the failing package, or preferably to the shared roottsconfig.jsonif other packages inherit the same deprecated setting.Minimal fix in
packages/chai-openapi-response-validator/tsconfig.json{ "extends": "../../tsconfig.json", "include": ["lib"], "compilerOptions": { "outDir": "dist", "ignoreDeprecations": "6.0" } }That is the smallest targeted fix and should unblock the DTS build immediately.
Better repo-wide fix
If the root
tsconfig.jsoncontainsbaseUrl, update that shared config instead so all packages behave consistently:{ "compilerOptions": { "baseUrl": ".", "ignoreDeprecations": "6.0" } }Recommended follow-up cleanup
Since this is only silencing a TypeScript 6 deprecation, the longer-term fix is to remove reliance on
baseUrlentirely and migrate imports to supported alternatives such as:pathswith an explicit modern module resolution strategy where appropriateBut for this CI failure,
ignoreDeprecations: "6.0"is the correct direct fix.User: Ehat does the modern module resolution strategy look like?
Assistant: Use
moduleResolution: "nodenext"for Node-targeted packages, ormoduleResolution: "bundler"for packages primarily built by tsup/esbuild. That’s the modern replacement direction TypeScript recommends instead of oldernode/baseUrl-driven setups. (typescriptlang.org)For this repo, since
tsupis doing the build and the package exports both CJS and ESM artifacts, the most practical modern shape is usually:{ "extends": "../../tsconfig.json", "include": ["lib"], "compilerOptions": { "outDir": "dist", "module": "ESNext", "moduleResolution": "bundler", "ignoreDeprecations": "6.0" } }That works well when a bundler owns resolution, and TypeScript explicitly says
bundler...This pull request was created from Copilot chat.