From 0a35d8f28b264b801dc01f256d578f4edf46d002 Mon Sep 17 00:00:00 2001 From: Tony Brix Date: Thu, 26 Jun 2025 22:44:11 -0600 Subject: [PATCH] fix: remove cjs build & update min node to 20 (#3687) BREAKING CHANGE: - minify ./lib/marked.esm.js and ./lib/marked.umd.js - remove ./marked.min.js use ./lib/marked.umd.js instead - remove ./lib/marked.cjs - update minimum supported node version to 20 to support require('marked.esm.js'). see nodejs.org/docs/latest-v20.x/api/modules.html#loading-ecmascript-modules-using-require --- .gitattributes | 1 - .github/workflows/tests.yml | 4 +- .gitignore | 1 - README.md | 2 +- bin/main.js | 4 +- docs/INDEX.md | 2 +- docs/USING_ADVANCED.md | 2 +- docs/build.js | 13 +- docs/demo/worker.js | 1 + esbuild.config.js | 14 +- eslint.config.js | 2 +- package-lock.json | 3140 +++++++++++++++++++++-------------- package.json | 30 +- src/Instance.ts | 2 +- test/bench.js | 30 +- test/cjs-test.cjs | 2 +- test/update-specs.js | 4 +- 17 files changed, 1981 insertions(+), 1273 deletions(-) diff --git a/.gitattributes b/.gitattributes index cb144e0a..165ddd34 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,4 +1,3 @@ * eol=lf test/* linguist-vendored lib/* linguist-generated -marked.min.js linguist-generated diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b609d055..d65ccef0 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,8 +12,8 @@ jobs: UnitTests: strategy: matrix: - # lowest verison here should also be in `engines` field - node_version: [18, "lts/*", "latest"] + # lowest version here should also be in `engines` field + node_version: [20, "lts/*", "latest"] runs-on: ubuntu-latest steps: - name: Checkout Code diff --git a/.gitignore b/.gitignore index dc62331a..ba01f199 100644 --- a/.gitignore +++ b/.gitignore @@ -8,5 +8,4 @@ lib docs/LICENSE.md vuln.js man/marked.1 -marked.min.js test.js diff --git a/README.md b/README.md index b7bf8075..e5d23f15 100644 --- a/README.md +++ b/README.md @@ -83,7 +83,7 @@ $ marked --help
- + +