Skip to content

[Simple Markdown] Remove deprecated APIs and features (html output) #2690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

jeremywiebe
Copy link
Collaborator

Summary:

This PR removes long-deprecated features and APIs from the @khanacademy/simple-markdown project. We haven't used HTML output for a long, long time (everything is rendered to React) and so that is being removed.

There are also a few APIs that are marked as deprecated that I've verified as unused, which we can delete.

This work is being done because I need to make another change and thought it would be handy to clean up the library a bit before doing any new work.

Issue: LEMS-3096

Test plan:

pnpm tsc
pnpm test

Install the snapshot version of the package in the frontend repo and type check everything there.

Copy link
Contributor

github-actions bot commented Jul 8, 2025

Size Change: -726 B (-0.15%)

Total Size: 480 kB

Filename Size Change
packages/simple-markdown/dist/es/index.js 5.99 kB -726 B (-10.81%) 👏
ℹ️ View Unchanged
Filename Size
packages/kas/dist/es/index.js 20.7 kB
packages/keypad-context/dist/es/index.js 1 kB
packages/kmath/dist/es/index.js 5.98 kB
packages/math-input/dist/es/index.js 98.6 kB
packages/math-input/dist/es/strings.js 1.61 kB
packages/perseus-core/dist/es/index.js 21.2 kB
packages/perseus-editor/dist/es/index.js 91.3 kB
packages/perseus-linter/dist/es/index.js 7.14 kB
packages/perseus-score/dist/es/index.js 9.25 kB
packages/perseus-utils/dist/es/index.js 403 B
packages/perseus/dist/es/index.js 208 kB
packages/perseus/dist/es/strings.js 7.56 kB
packages/pure-markdown/dist/es/index.js 1.22 kB

compressed-size-action

Copy link
Contributor

github-actions bot commented Jul 8, 2025

npm Snapshot: Published

Good news!! We've packaged up the latest commit from this PR (dd13ccf) and published it to npm. You
can install it using the tag PR2690.

Example:

pnpm add @khanacademy/perseus@PR2690

If you are working in Khan Academy's frontend, you can run the below command.

./tools/bump_perseus_version.ts -t PR2690

If you are working in Khan Academy's webapp, you can run the below command.

./dev/tools/bump_perseus_version.js -t PR2690

) {
var parsed = blockParse(tableSrc + "\n");
assert.strictEqual(parsed[0].type, "table");
var actualAligns = parsed[0].align;
validateParse(actualAligns, expectedAligns);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

validateParse() is really a glorified wrapper around an equality assertion, we were fighting the types here so I've just reverted to use... expect() here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant