Skip to content

Fix require() of botframework-webchat-fluent-theme - #5976

Merged
Eugene (OEvgeny) merged 3 commits into
mainfrom
OEvgeny/fix-fluent-theme-require-export
Oct 28, 2026
Merged

Eugene (OEvgeny) merged 3 commits into
mainfrom
OEvgeny/fix-fluent-theme-require-export

Conversation

@OEvgeny

@OEvgeny Eugene (OEvgeny) commented Oct 28, 2026 •

Copy link
Copy Markdown
Collaborator

require('botframework-webchat-fluent-theme') fails with ERR_PACKAGE_PATH_NOT_EXPORTED since 4.17.0.

Changelog Entry

Fixed

  • Fixed require() failing to resolve botframework-webchat-fluent-theme, in PR #5976, by @OEvgeny

Description

The "." export of botframework-webchat-fluent-theme used a misspelled "required" condition, so CommonJS consumers (Node.js require(), jest without mocks, TypeScript node16/nodenext in CommonJS) could not resolve the package. The condition is now "require"; ESM import and webpack 4 (which reads main) were not affected and resolve as before.

Specific Changes

  • packages/fluent-theme/package.json: "required" → "require"
  • packages/fluent-theme/src/__tests__/packageExports.spec.js: require() by package name resolves and loads the CommonJS entrypoint
  • I have added tests and executed them locally
  • I have added .changelog/<PR#>-<slug>.md
  • I have updated documentation

Review Checklist

This section is for contributors to review your work.

  • Accessibility reviewed (tab order, content readability, alt text, color contrast)
  • Browser and platform compatibilities reviewed
  • CSS styles reviewed (minimal rules, no z-index)
  • Documents reviewed (docs, samples, live demo)
  • Internationalization reviewed (strings, unit formatting)
  • package.json and package-lock.json reviewed
  • Security reviewed (no data URIs, check for nonce leak)
  • Tests reviewed (coverage, legitimacy)

Eugene Olonov added 2 commits October 28, 2026 15:24
The "." export used a misspelled "required" condition, so Node.js require(),
require.resolve() and TypeScript node16/nodenext in CommonJS could not resolve the package.

@compulim William Wong (compulim) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

🤣

@OEvgeny
Eugene (OEvgeny) marked this pull request as ready for review October 28, 2026 23:03
Copilot AI balanced review requested due to automatic review settings October 28, 2026 23:03

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

@OEvgeny
Eugene (OEvgeny) merged commit bd980b2 into main Oct 28, 2026
33 checks passed
@OEvgeny
Eugene (OEvgeny) deleted the OEvgeny/fix-fluent-theme-require-export branch October 28, 2026 23:39
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.

3 participants