chore: bump seemark to v2.0.0 - #30
Merged
Merged
Conversation
see-mark 2.0.0 removes AsciiMath support. Backtick spans now always render
as standard markdown code spans instead of being parsed as math; LaTeX and
Nemeth are unaffected.
Drop the esbuild `define: { global: 'globalThis' }` shim: it only existed
because mathjax-full's asciimath legacy code referenced the Node `global`.
The remaining mathjax v3 code (tex->mml, mml->svg) needs neither that nor a
non-strict context, and the bundle no longer contains any `arguments.callee`.
`format: 'iife'` stays -- index.html loads main.js as a classic (non-module)
script so the exported site keeps working over file://. The comments said
asciimath was the reason for it; corrected.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景描述 (Why)
@coseeing/see-mark2.0.0 已發佈(SeeMark#44),移除了 AsciiMath 支援。本 PR 讓 Template 跟上,並清掉一個只為 AsciiMath 存在的 build 設定。
破壞性變更 (Breaking)
`...`實作方法 (How)
package.json:@coseeing/see-mark^1.11.0→^2.0.0(Template 自身版本維持 1.3.1,同 chore: bump seemark to v1.10.2 #28 慣例)scripts/pipeline.mjs:移除 esbuild 的define: { global: 'globalThis' }那個 shim 純粹是因為 mathjax-full 的 asciimath legacy 會參照 Node 的
global。2.0.0 之後bundle 內已無任何
arguments.callee,剩下的 mathjax v3(tex→mml、mml→svg)既不需要非嚴格context 也不需要
global。format: 'iife'保留 —— index.html 是用 classic(非 module)script 載入 main.js,讓匯出網站能在
file://下運作。原註解把理由寫成「asciimath 需要非嚴格模式」,一併更正。測試驗證
npm run lint、npm run build、npm run build-zip全數通過asciimath/arguments.callee皆為 0(升級前分別是 4 / 1)mainbuild 的產物 sha256 全部一致MathML、圖片、五種 alert、內部連結皆正常
`sum_(i=1)^n i`、`a/b`→<code>;\(\frac{n!}{k!}\)→SVG(mfrac 1);fenced block →
<pre><code>defineshim 後單獨驗過:build 成功、bundle 內無裸global參照、頁面渲染不變補充說明
安裝時會多出 25 個套件(
vue、react、react-dom、prop-types及其相依,約 22 MB)——see-mark 2.0.0 把它們宣告為
peerDependencies且全部標記optional: true,但 npm 仍會安裝。不影響產物:bundle 內
@vue/runtime/react-domgrep 皆為 0,zip 大小不變。實測
npm ci --omit=peer可省下那 22 MB,且 bundle sha256 完全相同、lockfile 不受影響;但安裝時間各跑 9 次後中位數 7.02s vs 7.26s,沒有可測量的差異。因此不值得為此改動 CI,
未列入本 PR。