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

Align main with changes needed for hybrid publish #1199

Merged
merged 4 commits into from
Apr 2, 2024

Conversation

avifenesh
Copy link
Collaborator

As it appear, altho commonjs cannot use ES modules - ES modules can use commonjs, with the limits that export default is emitted.
After trying every version of hybrid build, apparently the simplest option is the best one.
We build into commonjs, in our index.ts we are using export default, and the package can be used for all type of users.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@avifenesh avifenesh marked this pull request as ready for review April 1, 2024 02:24
@avifenesh avifenesh requested a review from a team as a code owner April 1, 2024 02:24
@avifenesh avifenesh force-pushed the version0.3.3intoMain branch 2 times, most recently from b193059 to a929c32 Compare April 1, 2024 02:33
Copy link
Collaborator

@barshaul barshaul left a comment

Choose a reason for hiding this comment

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

Looks like you're reverting pretty much all of the PR you did for the hybrid mode, what changes are left to support ECMA?

@avifenesh
Copy link
Collaborator Author

Looks like you're reverting pretty much all of the PR you did for the hybrid mode, what changes are left to support ECMA?
@barshaul
So what we had before is an ecma build mixed with common in some places.

The first approach where to create different builds, but our usage of different packages for each platform made it impossible, and the solution was almost duplicate all code to different versions, to support the different chains of import statements types.

But apparently, if the whole package compiled to common, and at the starting point common put export default ecma know how to deal with it from there. Not true for the opposite.

So the simple, easy and hidden solution, that no-body mention for some reason, is apparently the best one.

@avifenesh avifenesh merged commit 3158103 into main Apr 2, 2024
7 checks passed
@avifenesh avifenesh deleted the version0.3.3intoMain branch April 2, 2024 11:40
shohamazon pushed a commit to adanWattad/glide-for-redis that referenced this pull request Apr 9, 2024
* Align main with changes needed for hybrid publish

* remove unnecessary info

* add relevant changes to the change log
cyip10 pushed a commit to Bit-Quill/valkey-glide that referenced this pull request Jun 24, 2024
* Align main with changes needed for hybrid publish

* remove unnecessary info

* add relevant changes to the change log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI CI/CD related node
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants