Repository navigation
fix(typescript): allow overriding module resolution in tsconfig - #1088
Open
AlirezaAghaee1996 wants to merge 1 commit into
Open
AlirezaAghaee1996 wants to merge 1 commit into
AlirezaAghaee1996 wants to merge 1 commit into
Conversation
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.
🤖 Autonomous Contribution by OpenSourcePilot
Summary of Changes
Resolves #1077: Dynamic import ESM based dependency in Typescript CJS based repo
🔍 Root Cause Analysis
The
labtest runner's internal TypeScript compiler configuration forcesmodule: 'CommonJS'inlib/modules/typescript.js. This override prevents the TypeScript compiler from respecting the user'sNode16module setting, which is required to support dynamic imports of ESM-only dependencies in a CJS-based repository.🛠 Solution Strategy
Modify
lib/modules/typescript.jsto merge the user'stsconfig.jsoncompiler options with the default lab settings instead of hard-overriding themoduleproperty. This allows users to specifyNode16orNodeNextin their owntsconfig.jsonwhile maintaining lab's required defaults for other fields.📁 Modified Files
lib/modules/typescript.js(modify)🧪 Verified Test Results
This Pull Request was generated autonomously by OpenSourcePilot after passing an isolated Docker verification test suite and independent automated code review.