Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
marked: Rename to *.cjs.
Anders Kaseorg905fc3b50edd
diff --git a/.prettierignore b/.prettierignoreindex bb611591d04..0fdd31c1e00 100644--- a/.prettierignore+++ b/.prettierignore@@ -10,7 +10,7 @@ pnpm-lock.yaml/web/third/marked/*!/web/third/marked/lib/web/third/marked/lib/*-!/web/third/marked/lib/marked.d.ts+!/web/third/marked/lib/marked.d.cts/zerver/tests/fixtures/zerver/webhooks/*/doc.md/zerver/webhooks/github/githubsponsors.mddiff --git a/docs/subsystems/markdown.md b/docs/subsystems/markdown.mdindex 2589a209865..48d0b7f772c 100644--- a/docs/subsystems/markdown.md+++ b/docs/subsystems/markdown.md@@ -102,7 +102,7 @@ places:- The backend Markdown processor (`zerver/lib/markdown/__init__.py`).- The frontend Markdown processor (`web/src/markdown.ts` and sometimes- `web/third/marked/lib/marked.js`), or `markdown.contains_backend_only_syntax` if+ `web/third/marked/lib/marked.cjs`), or `markdown.contains_backend_only_syntax` ifyour changes won't be supported in the frontend processor.- If desired, the typeahead logic in `web/src/composebox_typeahead.ts`.- The test suite, probably via adding entries to `zerver/tests/fixtures/markdown_test_cases.json`.diff --git a/web/src/markdown.ts b/web/src/markdown.tsindex 9461209e595..471f9c7461c 100644--- a/web/src/markdown.ts+++ b/web/src/markdown.ts@@ -5,13 +5,13 @@ import assert from "minimalistic-assert";import type {Template} from "url-template";import * as fenced_code from "../shared/src/fenced_code.ts";-import marked from "../third/marked/lib/marked.js";-import type {LinkifierMatch, ParseOptions, RegExpOrStub} from "../third/marked/lib/marked.js";+import marked from "../third/marked/lib/marked.cjs";+import type {LinkifierMatch, ParseOptions, RegExpOrStub} from "../third/marked/lib/marked.cjs";// This contains zulip's frontend Markdown implementation; see// docs/subsystems/markdown.md for docs on our Markdown syntax. The other// main piece in rendering Markdown client-side is-// web/third/marked/lib/marked.js, which we have significantly+// web/third/marked/lib/marked.cjs, which we have significantly// modified from the original implementation.// Docs: https://zulip.readthedocs.io/en/latest/subsystems/markdown.htmldiff --git a/web/third/marked/lib/marked.js b/web/third/marked/lib/marked.cjssimilarity index 100%rename from web/third/marked/lib/marked.jsrename to web/third/marked/lib/marked.cjsdiff --git a/web/third/marked/lib/marked.d.ts b/web/third/marked/lib/marked.d.ctssimilarity index 100%rename from web/third/marked/lib/marked.d.tsrename to web/third/marked/lib/marked.d.cts