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
fix: Convert to ESM #2227
fix: Convert to ESM #2227
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/markedjs/markedjs/4GVhinkD5B8e9yGBnM2czZnEa748 |
624246e
to
82ad1c6
Compare
We could probably remove |
ac583ce
to
1435b2c
Compare
Ok, I've added
We could, but I actually think it might be preferable to keep as is so that we know the UMD and ESM versions have the same exposed APIs. I think it could be easier to document and explain that way. |
@UziTech I was wondering if you had any other thoughts about this? Is it something we could move forward with in the near future to avoid merge conflicts from accruing? |
Looks like vercel is failing because |
7ae77a6
to
de27d69
Compare
Ok, thanks for letting me know. I didn't have permission to see the Vercel link, so didn't know what was wrong. I've updated it so that it's working now |
I'll take a look at this soon and make sure all the ways of importing marked works or see where we would have to update our docs. |
Can you fix the |
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.
Seems fine except for a bunch of random whitespace being be added between words in the documentation.
I really don't have experience in this side of JavaScript with module packaging and stuff though, so I don't know how useful my review is.
I think that might have been from @UziTech 's changes. I'm not sure if perhaps that file is autogenerated from something, but I just manually updated it |
That is auto generated but we can edit it manually. Lines 12 to 13 in e93f800
|
df8e644
to
b1d8416
Compare
Cool. Do we need to wait for @davisjam, @joshbruce and @styfle to weigh in before merging? |
I was just giving a little bit of time for anyone to weigh in. I'll merge this later today if there is no issues. |
# [4.0.0](v3.0.8...v4.0.0) (2021-11-02) ### Bug Fixes * Convert to ESM ([#2227](#2227)) ([4afb228](4afb228)) ### BREAKING CHANGES * - Default export removed. Use `import { marked } from 'marked'` or `const { marked } = require('marked')` instead. - `/lib/marked.js` removed. Use `/marked.min.js` in script tag instead. - When using marked in a script tag use `marked.parse(...)` instead of `marked(...)`
🎉 This PR is included in version 4.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Ty 4 this! |
Marked version:
master
Markdown flavor: all
Description
Converts the source code to ESM to be more modern and allow Rollup to better handle it. Rollup will still convert the final code to be UMD / ESM, but will do so more efficiently resulting in smaller output files
Contributor
Committer
In most cases, this should be a different person than the contributor.