-
Notifications
You must be signed in to change notification settings - Fork 350
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
Export Item and Article parsing functions from the 'perseus' package #2085
base: main
Are you sure you want to change the base?
Conversation
… `parseAndMigratePerseusItem() and `parseAndMigratePerseusArticle()` functions.
npm Snapshot: PublishedGood news!! We've packaged up the latest commit from this PR (efd9064) and published it to npm. You Example: yarn add @khanacademy/perseus@PR2085 If you are working in Khan Academy's webapp, you can run: ./dev/tools/bump_perseus_version.sh -t PR2085 |
Size Change: +916 B (+0.07%) Total Size: 1.28 MB
ℹ️ View Unchanged
|
I haven't looked at this yet, but my first reaction is that I think this will need to live outside of My guess is we'll want this in (EDIT: I don't think we have to do it now, I'm just wondering if we should rip the band-aid while the work is fresh) |
@handeyeco do you mean that all the parsing code will have to live in |
There are a few trivial non-type imports from
More concerning: the parsing code imports
Dynamically-defined widgets can't exist on the server (probably? I'm assuming that LEMS owns the server code and it's separate from |
We're going to have two registries, one on the BE (upgrading, scoring, validation) and one on the FE (upgrading, rendering). Things might be too much in-flight to address right now. |
import type {Parser} from "../parser-types"; | ||
import type {PerseusImageBackground} from "@khanacademy/perseus"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've seen "self" imports like this sneak into our codebase before. I think they work, but it'd be nice if we could lint for them and prevent them.
This is the public API for Perseus JSON parsing that we'll call in Webapp.
See ADR 773 for context on why this is needed.
Issue: https://khanacademy.atlassian.net/browse/LEMS-2774
Test plan:
yarn test