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

feat(javascript): bundle CJS, ESM and UMD #135

Merged
merged 18 commits into from
Feb 18, 2022

Conversation

shortcuts
Copy link
Member

@shortcuts shortcuts commented Feb 11, 2022

🧭 What and Why

🎟 JIRA Ticket: https://algolia.atlassian.net/browse/APIC-232

The PR seems big but most of the changes are generated/from lock files.

Changes included:

  • Provide CJS, UMD and ESM output for the JavaScript clients.
  • Update playground to test browser

🧪 Test

CI :D

@shortcuts shortcuts self-assigned this Feb 11, 2022
@shortcuts shortcuts force-pushed the feat/APIC-232/javascript-bundle branch from 9e85ed7 to 405578e Compare February 14, 2022 16:15
@shortcuts shortcuts changed the title feat(javascript): bundle ESM and UMD feat(javascript): bundle CJS, ESM and UMD Feb 14, 2022
@shortcuts shortcuts force-pushed the feat/APIC-232/javascript-bundle branch from 405578e to 7242d9f Compare February 14, 2022 16:47
Dockerfile Show resolved Hide resolved
scripts/post-gen/javascript.sh Outdated Show resolved Hide resolved
playground/javascript/browser/index-umd.html Outdated Show resolved Hide resolved
playground/javascript/browser/app.ts Outdated Show resolved Hide resolved
Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

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

Wow tons of progress ! The flow is quite big, does it alter the creation process of a new client (create file by hand) or is it automatic ?

playground/javascript/browser/index-umd.html Outdated Show resolved Hide resolved
Copy link
Contributor

@eunjae-lee eunjae-lee left a comment

Choose a reason for hiding this comment

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

Can you split this PR? I see lots of renames, and EchoRequester-related changes.

@shortcuts
Copy link
Member Author

shortcuts commented Feb 15, 2022

Can you split this PR? I see lots of renames, and EchoRequester-related changes.

I've tried to but all the changes are related to the build. I can do a stacked PR for the echo requester, but it's still required to scope the URL dependency of node/browser builds

@shortcuts
Copy link
Member Author

Wow tons of progress ! The flow is quite big, does it alter the creation process of a new client (create file by hand) or is it automatic ?

The flow should not change, it introduces a new additionalProperties called buildFile, but it can be guessed as it's just the packageName without @algolia/. I believe using a custom generator would remove all of those small parts everywhere

@eunjae-lee
Copy link
Contributor

Can you split this PR? I see lots of renames, and EchoRequester-related changes.

I've tried to but all the changes are related to the build. I can do a stacked PR for the echo requester, but it's still required to scope the URL dependency of node/browser builds

I know it's really troublesome to manage stacked PRs, but it'd be much easier for me to review this PR if there's a PR dedicated to rollup and build process, and another one for the rest.

@shortcuts shortcuts force-pushed the feat/APIC-232/javascript-bundle branch from 38d7cc4 to cf6be3f Compare February 15, 2022 14:25
@shortcuts shortcuts marked this pull request as ready for review February 16, 2022 09:59
@shortcuts
Copy link
Member Author

I've kept the weird browser playground for you to test it if you want, but will make it cleaner before merging the PR

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.

4 participants