Add JavaScript and TypeScript kernels - #112
Merged
Merged
Conversation
thomasjm
force-pushed
the
javascript-kernel
branch
from
September 26, 2026 02:09
876cbf9 to
5c4fac4
Compare
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.
Brings back a JavaScript/Node.js kernel and adds a TypeScript one, both built on tslab (Node 24,
zeromq 6). The old ijavascript setup isn't a usable starting point:
nodePackagesandnode2nixare both gone from nixpkgs 26.05, so the kernel and its npm dependencies are packaged here.
--jsor not), so they share the packageset,
node_modulesand language server. The zeromq native addon is compiled from sourceagainst Nixpkgs' libzmq, since upstream's cmake-ts/vcpkg build needs the network. Node REPL,
typescript-language-server, and a sample environment each.package-lock.jsonis the pin;importNpmLockfetches eachtarball by its integrity hash, and a closure walk builds a
node_modulesfor just theselected packages. 55 curated libraries: d3, vega/vega-lite, echarts, plotly, Observable Plot,
arquero, apache-arrow, mathjs, the ml.js family, turf, sql.js, and so on. Install scripts are
not run;
update.shrejects only those that genuinely compile something.d3adds acodedown-d3helper withrender(browser-side, interactive)and
renderStatic(jsdom, SVG in the kernel).The kernel's working directory is the user's notebook directory, so packages reach the kernel
through
NODE_PATH, tslab's compiler is pointed at the tree it lives in, and a small stdio proxyseeds the language server's workspace with a
jsconfig.jsonortsconfig.json. Without thatlast part the server resolves nothing: hovers come back
anyand completion falls back to textmatches.
Tests cover both kernels, package selection and isolation, both D3 paths, and LSP
completions/hovers against an environment package.
Still to do: regenerating the feature matrix and options docs, and removing
old_languages/javascript.