-
Notifications
You must be signed in to change notification settings - Fork 56
Transition to official module support #166
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -2,8 +2,8 @@ | |||||||||||||||||
| "name": "@pipecat-ai/client-js", | ||||||||||||||||||
| "version": "1.5.0", | ||||||||||||||||||
| "license": "BSD-2-Clause", | ||||||||||||||||||
| "type": "module", | ||||||||||||||||||
| "main": "dist/index.js", | ||||||||||||||||||
| "module": "dist/index.module.js", | ||||||||||||||||||
| "types": "dist/index.d.ts", | ||||||||||||||||||
|
||||||||||||||||||
| "types": "dist/index.d.ts", | |
| "types": "dist/index.d.ts", | |
| "exports": { | |
| ".": { | |
| "types": "./dist/index.d.ts", | |
| "default": "./dist/index.js" | |
| } | |
| }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding "type": "module" to package.json requires Jest/ts-jest ESM configuration. The current Jest configuration uses "preset": "ts-jest" without ESM-specific settings. When "type": "module" is set, ts-jest needs to use the "ts-jest/presets/default-esm" preset instead, and additional configuration is needed:
Without these changes, tests may fail when running with the ESM module type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤨 -- and yet, they ran and passed without these changes. of course, we don't have many so... 🤔