Skip to content

Conversation

epszaw
Copy link
Contributor

@epszaw epszaw commented Sep 22, 2025

Motivation/Description of the PR

It's not possible to correctly build codeceptjs custom reporters after the package update.

The PR provides a correct exports field that no longer overrides types field and make possible to use types without collisions.

Applicable helpers:

  • Playwright
  • Puppeteer
  • WebDriver
  • REST
  • FileHelper
  • Appium
  • TestCafe

Applicable plugins:

  • allure
  • autoDelay
  • autoLogin
  • customLocator
  • pauseOnFail
  • coverage
  • retryFailedStep
  • screenshotOnFail
  • selenoid
  • stepByStepReport
  • stepTimeout
  • wdio
  • subtitles

Type of change

  • 🔥 Breaking changes
  • 🚀 New functionality
  • 🐛 Bug fix
  • 🧹 Chore
  • 📋 Documentation changes/updates
  • ♨️ Hot fix
  • 🔨 Markdown files fix - not related to source code
  • 💅 Polish code

Checklist:

  • Tests have been added
  • Documentation has been added (Run npm run docs)
  • Lint checking (Run npm run lint)
  • Local tests are passed (Run npm test)

@epszaw epszaw changed the title fix: add a correct signatures for the package types exports Fix the package types exports Sep 22, 2025
@kobenguyent kobenguyent requested a review from Copilot September 23, 2025 08:55
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@kobenguyent kobenguyent merged commit f4da7e9 into codeceptjs:3.x Sep 24, 2025
14 checks passed
@epszaw
Copy link
Contributor Author

epszaw commented Sep 25, 2025

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 3.7.x.

@kobenguyent
Copy link
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!

@epszaw
Copy link
Contributor Author

epszaw commented Sep 26, 2025

Awesome, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants