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

Make ical.es5.cjs an UMD module for browsers #659

Merged
merged 1 commit into from
Apr 11, 2024
Merged

Make ical.es5.cjs an UMD module for browsers #659

merged 1 commit into from
Apr 11, 2024

Conversation

kewisch
Copy link
Owner

@kewisch kewisch commented Apr 10, 2024

In version 2.0.0 ical.es5.cjs and ical.es5.min.cjs was a cjs module, which made it work with older version of node and use of require(). The regular version uses ES6 modules, so it needs to be imported instead of using a script tag. Therefore, none of the versions could be included in a <script> tag in the browser. You can now use the es5 version if you require <script> tag inclusion and would like an ICAL global on the window, and also if you require a cjs module in your node project.

[fixes #653]

@kewisch kewisch requested a review from mschroeder April 10, 2024 06:55
@coveralls
Copy link

coveralls commented Apr 10, 2024

Pull Request Test Coverage Report for Build 8643197963

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 98.024%

Totals Coverage Status
Change from base Build 8632607372: 0.0%
Covered Lines: 9287
Relevant Lines: 9458

💛 - Coveralls

Copy link
Collaborator

@mschroeder mschroeder left a comment

Choose a reason for hiding this comment

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

LGTM, but conflict has to be resolved.

In version 2.0.0 ical.es5.cjs and ical.es5.min.cjs was a cjs module, which made it work with older
version of node and use of `require()`. The regular version uses ES6 modules, so it needs to be
imported instead of using a script tag. Therefore, none of the versions could be included in a
<script> tag in the browser. You can now use the es5 version if you require <script> tag inclusion
and would like an `ICAL` global on the window, and also if you require a cjs module in your node
project.
@kewisch kewisch merged commit 022c9ab into main Apr 11, 2024
7 checks passed
@kewisch kewisch deleted the umd branch April 11, 2024 07:40
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.

Make browser usage more clear/compatible
3 participants