Repository navigation
feat(pydeck): register_library(npm=...) loads npm packages as ES modules (experimental) - #10797
Merged
Merged
Conversation
This was referenced Oct 4, 2026
|
chrisgervang
force-pushed
the
chr/pydeck-register-library-npm
branch
2 times, most recently
from
October 4, 2026 04:57
d1bab95 to
20cf000
Compare
Collaborator
Author
|
@greptileai re-review |
Base automatically changed from
chr/jupyter-widget-esm-shared-modules
to
master
October 4, 2026 18:45
chrisgervang
force-pushed
the
chr/pydeck-register-library-npm
branch
from
October 4, 2026 18:45
20cf000 to
8f88d66
Compare
ibgreen
approved these changes
Oct 8, 2026
chrisgervang
force-pushed
the
chr/pydeck-register-library-npm
branch
from
October 8, 2026 19:09
8f88d66 to
91a42ab
Compare
chrisgervang
force-pushed
the
chr/pydeck-register-library-npm
branch
from
October 8, 2026 19:21
91a42ab to
f1679c6
Compare
This was referenced Oct 22, 2026
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.
For #10800
Background
Loading an npm package with #10794 needs an esm.sh URL with a long
?external=list, plus a version that matches pydeck's deck.gl. pydeck now builds that URL, so the shared list lives in one place.Stacked on #10794. Tracked in #10763.
Change List
register_library(npm=...): esm.sh URL with shared packages external@deck.gl-community/*defaults to pydeck's deck.gl minor versionnameoptional withnpm;settings.esm_cdnfor self-hosted CDNsshared-modules.jscustom_layers.rstsection and CHANGELOGVerified with pytest and
to_htmlagainst the #10794 widget build:PathOutlineLayerfromnpm="@deck.gl-community/layers"renders in Chromium, Firefox and WebKit.Note
Low Risk
Additive experimental API for custom JS library registration with tests and version warnings; no changes to core rendering or data paths.
Overview
Adds an experimental
register_library(npm=...)path so users can load npm packages as ES modules without hand-building esm.sh URLs and?external=lists.pydeck now centralizes
SHARED_PACKAGES, constructs the CDN URL (defaultesm_cdn= esm.sh), forcesmodule=True, and defaults the window name to the package name.@deck.gl-community/*packages without a version pin to pydeck’s deck.gl minor; mismatched or unpinned community versions emitUserWarning.uriandnpmremain mutually exclusive;nameis required only foruri.Docs in
custom_layers.rstand the CHANGELOG replace the manual esm.sh example with thenpmAPI. Tests cover URL shape, warnings,esm_cdn, validation, and parity withshared-modules.jsin the Jupyter widget.Reviewed by Cursor Bugbot for commit f1679c6. Bugbot is set up for automated code reviews on this repo. Configure here.