Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

UziTech
Copy link
Member

@UziTech UziTech commented Apr 25, 2025

Description

Sourcemaps don't work currently because of some strange thing between rollup and typescript.

This PR removes rollup and replaces it with esbuild. The sourcemaps work!

Contributor

  • Test(s) exist to ensure functionality and minimize regression (if no tests added, list tests covering this PR); or,
  • no tests required for this PR.
  • If submitting new feature, it has been documented in the appropriate places.

Committer

In most cases, this should be a different person than the contributor.

Copy link

vercel bot commented Apr 25, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
marked-website ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 20, 2025 4:52am

Copy link
Member

@styfle styfle left a comment

Choose a reason for hiding this comment

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

Sounds good!

I also think we should consider releasing a new semver major and drop support for CJS because all LTS versions of Node.js support require(esm)

https://nodejs.org/docs/latest-v20.x/api/process.html#processfeaturesrequire_module

We could also drop support for Node.js 18 since we still have it in package.json engines.node even though its been EOL since 2025-04-30.

https://github.com/nodejs/Release/blob/main/README.md#end-of-life-releases

Although technically Node.js 18 can load ESM just fine, but you would need await import(esm) from a CJS file.

@UziTech
Copy link
Member Author

UziTech commented May 18, 2025

Ya I think we can do that after this fix. We should just have two versions: esm and umd, and minify both. Now that the source maps work I don't see any reason not to minify the built files.

@UziTech UziTech merged commit 7a6b2d7 into markedjs:master May 20, 2025
8 checks passed
github-actions bot pushed a commit that referenced this pull request May 20, 2025
## [15.0.12](v15.0.11...v15.0.12) (2025-05-20)

### Bug Fixes

* use esbuild for accurate sourcemaps ([#3670](#3670)) ([7a6b2d7](7a6b2d7))
RainVice added a commit to RainVice/marked that referenced this pull request Jun 21, 2025
* master: (39 commits)
  chore(deps-dev): Bump @arethetypeswrong/cli from 0.18.1 to 0.18.2 (markedjs#3711)
  chore(deps-dev): Bump eslint from 9.28.0 to 9.29.0 (markedjs#3710)
  chore(deps-dev): Bump cheerio from 1.0.0 to 1.1.0 (markedjs#3708)
  chore(deps-dev): Bump esbuild from 0.25.4 to 0.25.5 (markedjs#3706)
  chore(deps-dev): Bump eslint from 9.27.0 to 9.28.0 (markedjs#3705)
  Document risk of adding infinite extensions when using global marked instance (markedjs#3702)
  chore(deps-dev): Bump semantic-release from 24.2.4 to 24.2.5 (markedjs#3697)
  chore(deps-dev): Bump @semantic-release/github from 11.0.2 to 11.0.3 (markedjs#3698)
  chore(deps-dev): Bump esbuild from 0.25.3 to 0.25.4 (markedjs#3696)
  chore(release): 15.0.12 [skip ci]
  fix: use esbuild for accurate sourcemaps (markedjs#3670)
  chore(deps-dev): Bump semantic-release from 24.2.3 to 24.2.4 (markedjs#3690)
  chore(deps-dev): Bump rollup from 4.40.2 to 4.41.0 (markedjs#3692)
  chore(deps-dev): Bump eslint from 9.26.0 to 9.27.0 (markedjs#3691)
  chore(deps-dev): Bump undici from 6.21.1 to 6.21.3 (markedjs#3684)
  chore(deps-dev): Bump rollup from 4.40.1 to 4.40.2 (markedjs#3681)
  chore(deps-dev): Bump @arethetypeswrong/cli from 0.17.4 to 0.18.1 (markedjs#3682)
  chore(deps-dev): Bump eslint from 9.25.1 to 9.26.0 (markedjs#3680)
  chore(deps-dev): Bump rollup from 4.40.0 to 4.40.1 (markedjs#3678)
  chore(deps-dev): Bump eslint from 9.25.0 to 9.25.1 (markedjs#3677)
  ...
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.

3 participants