chore: remove the retired packages/muyajs engine by Jocs · Pull Request #5675 · marktext/marktext · GitHub
Skip to content

chore: remove the retired packages/muyajs engine - #5675

Merged
Jocs merged 1 commit into
developfrom
chore/remove-muyajs
Oct 9, 2026
Merged

Jocs merged 1 commit into
developfrom
chore/remove-muyajs

Conversation

@Jocs

@Jocs Jocs commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

Closes #

Summary

Deletes packages/muyajs, the legacy JS editor engine, and every reference to it.

The package has been dead since the TypeScript rewrite landed: the desktop renderer consumes @muyajs/core (packages/muya), and the muya/* alias, the ambient src/types/muya.d.ts bridge and the workspace dependency were already removed in #4257. A repo-wide search finds no import, dependency or build entry pointing at it — @marktext/muyajs only ever appeared in its own package.json. AGENTS.md has described it as "unreferenced, deleted post-0.20.0" for a while.

What needed to come out with it:

  • eslint.config.js — the two packages/muyajs/** ignore globs, the packages/muyajs/**/*.{js,mjs,cjs} file scope, and the rule-relaxation block that existed only for the legacy sources.
  • scripts/thirdPartyChecker.ts — packages/muyajs had to leave workspaceExclusions, which require()s each entry's package.json and would throw once the directory is gone.
  • .github/workflows/website-deploy.yml — the two packages/muyajs/** path filters.
  • AGENTS.md / packages/muya/AGENTS.md — the tech-stack row, the directory-tree entry, the website note and the architecture diagram.
  • Historical comments are left as-is. The ~120 "legacy packages/muyajs did X" notes in muya’s parity specs, the desktop specs and the PARITY_*.md docs record why those ported tests exist rather than describing the current layout, so they keep their original wording.

Dropping the package also removes its dependency ranges from the lockfile, so the extra copy of mermaid 11 / katex 0.17 / pako 2 that the workspace otherwise carried is gone.

Type of change

  • Bug fix (non-breaking, fixes an issue)
  • New feature (non-breaking, adds functionality)
  • Breaking change (causes existing functionality to change) — monorepo structure only: the package was private and unreferenced, so no shipped behaviour changes.
  • Documentation update

Test plan

  • New tests added (or explain why not needed): deletion only; the existing desktop, muya and e2e suites cover the remaining code.
  • Manually tested on: macOS (arm64, 27.2) — pnpm run dev launches and the editor is usable.
Command Result
pnpm lint 0 errors
pnpm typecheck pass
pnpm test 92 files / 1068 tests pass
pnpm --filter @muyajs/core lint · lint:types · test · test:spec pass (2467 + 1347 tests)
pnpm validate-licenses pass
pnpm build:unpack pass
desktop e2e smoke (launch, media-ipc, view-modes, diagram-viewer) 27 passed / 1 skipped

Notes for reviewers [optional]


By submitting this pull request, I confirm that my contribution is made under the terms of the MIT license.

@github-actions

github-actions Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Website preview ready: https://pr-5675-marktext-website.ransixi.workers.dev

Built from adcc5c5098e2857c4f7a81b48692c22ef06d2561 · Worker: marktext-website · Version: 80db60f1-28bd-49c2-a231-986539de8336 · Alias: pr-5675

The legacy JS engine has not been imported by anything since the TS
rewrite landed (#4257): the desktop renderer consumes @muyajs/core
(packages/muya), and the `muya/*` alias, the ambient bridge and the
workspace dependency are already gone.

Follow-ups the deletion needs:

- drop `packages/muyajs` from the root ESLint config: the two ignore
  globs, the JS-file scope and the rule relaxations that existed only
  for the legacy sources;
- drop `packages/muyajs` from the licence checker's workspace
  exclusions, which would otherwise `require()` a package.json that no
  longer exists;
- drop the two `packages/muyajs/**` path filters from the website
  deploy workflow;
- refresh AGENTS.md and packages/muya/AGENTS.md.

The historical "the legacy engine did X" comments in muya's parity
specs, the desktop specs and the PARITY docs are deliberately left
untouched: they record why those tests exist, not the current layout.

Prettier is told to leave pnpm-lock.yaml alone: it reformats the whole
lockfile and pnpm rewrites it back on the next install.
@Jocs
Jocs force-pushed the chore/remove-muyajs branch from b1ed63e to adcc5c5 Compare October 9, 2026 01:20
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Build artifacts for PR #5675:

Run: https://github.com/marktext/marktext/actions/runs/37869326561

Artifact Size Link
marktext-macos-x64 299.1 MB Download
marktext-windows-arm64 278.3 MB Download
marktext-linux 635.3 MB Download
marktext-macos-arm64 285.7 MB Download
marktext-windows-x64 286.4 MB Download

@Jocs
Jocs merged commit 0f11569 into develop Oct 9, 2026
19 checks passed
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.

1 participant