Skip to content
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)!: remove headless fetch & crypto polyfills #4358

Merged
merged 11 commits into from
Sep 5, 2024

Conversation

alexprudhomme
Copy link
Contributor

@alexprudhomme alexprudhomme commented Aug 29, 2024

https://coveord.atlassian.net/browse/KIT-3023

This PR is part of the making sure there are no 'require's in the headless ESM output.

Before

image

After

image
  • Remove undici from renovate.json

There is still this one that we will have to change or make it only available to the commonJs output. https://github.com/coveo/ui-kit/blob/KIT-3023/packages/headless/ponyfills/abortable-fetch-shim.js

Copy link

github-actions bot commented Aug 29, 2024

Pull Request Report

PR Title

✅ Title follows the conventional commit spec.

Live demo links

Bundle Size

File Old (kb) New (kb) Change (%)
case-assist 242.8 242.3 -0.2
commerce 342.8 342.3 -0.2
search 413.8 413.3 -0.1
insight 396.8 396.3 -0.1
product-listing 307.1 306.6 -0.2
product-recommendation 213.7 213.2 -0.2
recommendation 256.6 256.1 -0.2
ssr 406.4 405.9 -0.1
ssr-commerce 354.5 354.5 0

SSR Progress

Use case SSR (#) CSR (#) Progress (%)
search 39 44 89
recommendation 0 4 0
product-recommendation 0 10 0
product-listing 0 13 0
case-assist 0 6 0
insight 0 27 0
commerce 0 15 0
Detailed logs search : buildInteractiveResult
search : buildInteractiveInstantResult
search : buildInteractiveRecentResult
search : buildInteractiveCitation
search : buildGeneratedAnswer
recommendation : missing SSR support
product-recommendation : missing SSR support
product-listing : missing SSR support
case-assist : missing SSR support
insight : missing SSR support
commerce : missing SSR support

@louis-bompart
Copy link
Collaborator

@coveo/salesforce-integration can you help @alexprudhomme check/ensure that the IIFE bundle for Quantic are still kosher?

@alexprudhomme
Copy link
Contributor Author

@coveo/salesforce-integration can you help @alexprudhomme check/ensure that the IIFE bundle for Quantic are still kosher?

I think it should be fine since I did not touch the quanticUmd build phase in headless/dist/quantic

https://github.com/coveo/ui-kit/blob/KIT-3023/packages/headless/esbuild.mjs#L140-L163

@mmitiche
Copy link
Contributor

@coveo/salesforce-integration can you help @alexprudhomme check/ensure that the IIFE bundle for Quantic are still kosher?

I will do a quick sanity check/test from this PR to double check the Headless quantic bundle is still working property inside Salesforce.

@erocheleau
Copy link
Collaborator

Yea we need to check with multiple configuration after this has changed:

  1. With LWS enabled
  2. With LockerService instead of LWS
  3. With Locker disabled in a community.
  4. In a LWR site.

@mmitiche if you have the time, please put ✅ if you have tested some of these, I can try to test the others :)

Copy link
Collaborator

@erocheleau erocheleau left a comment

Choose a reason for hiding this comment

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

Just making sure this isn't merged before it has been properly tested

packages/headless/esbuild.mjs Show resolved Hide resolved
@mmitiche
Copy link
Contributor

Quantic working properly with:

  • With LWS enabled ✅
  • With LockerService instead of LWS ✅
  • With Locker disabled in a community ✅
  • In a LWR site ✅

Copy link
Collaborator

@erocheleau erocheleau left a comment

Choose a reason for hiding this comment

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

Looks good, thanks for making the tests!

I also confirmed that none of the Crypto stuff was needed due to any Locker/LWS limitation or distortion!

GG

@alexprudhomme alexprudhomme added this pull request to the merge queue Sep 5, 2024
@alexprudhomme alexprudhomme added this to the V3 milestone Sep 5, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Sep 5, 2024
@alexprudhomme alexprudhomme changed the title feat(headless)!: remove headless fetch polyfills feat(headless)!: remove headless fetch & crypto polyfills Sep 5, 2024
@alexprudhomme alexprudhomme changed the title feat(headless)!: remove headless fetch & crypto polyfills chore(headless)!: remove headless fetch & crypto polyfills Sep 5, 2024
@alexprudhomme alexprudhomme added this pull request to the merge queue Sep 5, 2024
Merged via the queue into master with commit 583e30a Sep 5, 2024
117 checks passed
@alexprudhomme alexprudhomme deleted the KIT-3023 branch September 5, 2024 17:34
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.

6 participants