-
Notifications
You must be signed in to change notification settings - Fork 35
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
chore(headless): fix internal resolution errors in node16 #4445
Conversation
This reverts commit 480b5bb.
"module": "ES2022", | ||
"module": "Node16", | ||
"target": "ES2022", | ||
"moduleResolution": "Bundler", | ||
"moduleResolution": "Node16", |
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.
The only relevant changes in this PR is here. Changing these to Node16 is required for the types to be correctly inferred by typescript. Change this value also causes all relative imports to have a .js extension. More details here https://github.com/arethetypeswrong/arethetypeswrong.github.io/blob/main/docs/problems/InternalResolutionError.md
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.
The reason this is needed is because we use tsc
to generate types and not a bundler. Therefore, we have to use moduleResolution as node16 to help typescript make the right resolutions. We can't use Bundler. Esbuild doesnt support generating types so this is our only option.
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.
Pull Request ReportPR Title✅ Title follows the conventional commit spec. Live demo linksBundle Size
SSR Progress
Detailed logssearch : buildInteractiveResultsearch : buildInteractiveInstantResult search : buildInteractiveRecentResult search : buildInteractiveCitation search : buildGeneratedAnswer recommendation : missing SSR support case-assist : missing SSR support insight : missing SSR support commerce : missing SSR support |
To be merged into #4442 Unit tests were failing because Jest has a hard time with ESM modules. I tried to make it work but it ended up being easier to switch to vitest altogether. The api are really really similar, it should not change how we write tests. ## Headless-react unit tests are still failing it is addressed here - > #4452 --------- Co-authored-by: Louis Bompart <[email protected]>
… headless (#4442) https://coveord.atlassian.net/browse/KIT-3580 ## Unit tests are failing. This is adressed [here](https://github.com/coveo/ui-kit/pull/4449/files#diff-75f80b97846615f5b074710648b8191f74aa4f00fd1536c45bc344b284ca8e87), once all PRs are approved we will merge in here ## [Publint](https://publint.dev/) status - atomic : no errors - headless: no errors - atomic-react: no errors ## [Are the types wrong](https://arethetypeswrong.github.io/) status - atomic : errors Internal resolution in node16 (Do we need to address this ?) + cjs type warnings - headless: errors Internal resolution in node16 ([addressed here](#4445)) + cjs type warnings - atomic-react: cjs type warnings --------- Co-authored-by: Alex Prudhomme <[email protected]>
Unit tests are failing. This is adressed here, once all PRs are approved we will merge in #4442
Publint status
Are the types wrong status