Replacing node dependency

37 views
Skip to first unread message

Oscar Levin

unread,
Jul 25, 2026, 10:10:47 PM (5 days ago) Jul 25
to PreTeXt development
For Rob, Andrew, and David A.,

I'm working on a PR that will elevate Doenet support to be closer to what we have for WeBWorK thanks to a new pip-installable tool that generates static PreTeXt (and PreFigure) from DoenetML.  However, this tool uses the Deno tool (a runtime for javascript/typescript/webassembly).  

Turns out this isn't that big of a deal, since Deno has an official pip installable python package that includes the Deno binary.  

This got me thinking: could we eliminate the (soft) dependency on node for pretext?  We would use Deno to do all the current things node does, and this really just adds a python dependency (easy for the CLI to require).  

Claude ran a "spike" to see if deno could handle the entire mjsre workflow, and it can (with a small modification to the mjsre package.json, which apparently was working only by accident currently).

Is this something there is an appetite for?  I'd be happy to shepherd this through if there was.

Jason Siefken

unread,
Jul 25, 2026, 10:51:41 PM (5 days ago) Jul 25
to prete...@googlegroups.com
This sounds great. Deno has a much better security model than Node :-)
--
You received this message because you are subscribed to the Google Groups "PreTeXt development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/631883e9-6b90-4952-9687-be39dba349bfn%40googlegroups.com.

Sean Fitzpatrick

unread,
Jul 26, 2026, 1:32:37 PM (5 days ago) Jul 26
to PreTeXt development
Node is a pain for Windows users, so eliminating the dependency would help there. 

Rob Beezer

unread,
Jul 26, 2026, 2:43:51 PM (5 days ago) Jul 26
to prete...@googlegroups.com
Rightly or wrongly, we have cast our lot with Python and XSL. So if Deno is a
PyPi package, that sounds like a plus. Do you still get "node_modules"
directories in lots of places?

> with a small modification to the mjsre package.json, which apparently was
working only by accident currently

And lets fix that no matter what!

I'm really just read-only when it comes to Javascript, so I don't think my
opinion should carry much weight. Of course, rolling this out piecemeal on
bite-sized tasks would be a good approach. Save the big tasks (CSS build,
offline MathJax) for later.

Poking around, I saw a mention of Bun as an alternative. Not clear it is a
better idea. Might be worse. Does have a PyPi package with a binary - which
seems to be all I care about. ;-)

Rob
> --
> You received this message because you are subscribed to the Google Groups
> "PreTeXt development" group.
> To unsubscribe from this group and stop receiving emails from it, send an email
> to pretext-dev...@googlegroups.com <mailto:pretext-
> dev+uns...@googlegroups.com>.
> To view this discussion visit https://groups.google.com/d/msgid/pretext-
> dev/631883e9-6b90-4952-9687-be39dba349bfn%40googlegroups.com <https://
> groups.google.com/d/msgid/pretext-dev/631883e9-6b90-4952-9687-
> be39dba349bfn%40googlegroups.com?utm_medium=email&utm_source=footer>.

Jason Siefken

unread,
Jul 26, 2026, 2:49:58 PM (5 days ago) Jul 26
to prete...@googlegroups.com
I would advise against Bun. It's a fast-moving package that draws lots of excitement, but it also has many questionable design decisions (and takes shortcuts in the name of speed). Deno is designed by the creator of Node after he realized the security nightmare he created and set out to fix it.

Rob Beezer

unread,
Jul 26, 2026, 3:22:56 PM (5 days ago) Jul 26
to prete...@googlegroups.com
Thanks, Jason. Consistent with what I have read.

Apparently the rewrite in Rust took AI agents 11 days and cost $165,000 in API
fees. Lines of code, commits, etc are equally impressive. Wild.

Rob
> dev/89c9f951-610f-4497-8ef0-0e442acaac01%40gmail.com <https://groups.google.com/
> d/msgid/pretext-dev/89c9f951-610f-4497-8ef0-0e442acaac01%40gmail.com?
> utm_medium=email&utm_source=footer>.

David Austin

unread,
Jul 27, 2026, 8:00:43 AM (4 days ago) Jul 27
to prete...@googlegroups.com
I'm not familiar with deno, but I'm definitely interested in removing the node dependency from PreFigure!

To unsubscribe from this group and stop receiving emails from it, send an email to pretext-dev...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/pretext-dev/MTAwMDAwUEdZbi5MaHM.1785093773%40pnsh.

Bradley Miller

unread,
Jul 27, 2026, 12:07:56 PM (4 days ago) Jul 27
to PreTeXt development
This removes the “node” dependency but replaces it with an alternative to node.  I’ve had my assistant summarize the advantages of Deno over node, and I get that it was designed to address some security decisions the initial author made, and it removes the node_modules litter.  But at the end of the day it doesn’t remove the dependency on javascript.

So, its not clear to me how much of a win this is for PreTeXt.  Maybe it makes installation cleaner as deno can be installed with pip?  Maybe everything we rely on is supported by deno, but there are plenty of caveats about packages that have deep node ties that are not yet supported by deno.

Brad

Brad Miller
Professor Emeritus, Luther College
Founder, Runestone Academy LTD
Blog: http://reputablejournal.com

Set up a time to meet with me.


Andrew Scholer

unread,
Jul 29, 2026, 2:27:40 PM (2 days ago) Jul 29
to prete...@googlegroups.com
Reducing the number of install steps would be a nice win for those getting started.

If deno can handle everything we currently use node for, sounds reasonable to make the switch. Having parts of the JS being built by deno and other parts by node sounds like a mess, so I would vote for all or nothing.

Andrew


Reply all
Reply to author
Forward
0 new messages