Fix the package types exports#5204
Merged
kobenguyent merged 1 commit intocodeceptjs:3.xfrom Sep 24, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes TypeScript type resolution issues in the codeceptjs package by restructuring the exports field in package.json to properly support both CommonJS and ES modules while maintaining correct type definitions.
- Restructured the exports field to use conditional exports with explicit import/require/types mappings
- Moved the top-level types field above exports to ensure proper fallback behavior
- Added module field for ES module compatibility
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Contributor
Author
|
Hey, @kobenguyent! Thank you for the merge. When do you plan to make the next release? Without the change, it's not possible to develop integrations for codeceptjs |
Collaborator
|
hey @epszaw we haven't got concrete plan for the next release, but I guess you could try https://www.npmjs.com/package/codeceptjs/v/3.7.6-beta.1?activeTab=code as this included your fix. Thanks! |
Contributor
Author
|
Awesome, thank you! |
Merged
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.
Motivation/Description of the PR
It's not possible to correctly build codeceptjs custom reporters after the package update.
The PR provides a correct
exportsfield that no longer overridestypesfield and make possible to use types without collisions.Applicable helpers:
Applicable plugins:
Type of change
Checklist:
npm run docs)npm run lint)npm test)