diff --git a/NOTES_FOR_MAINTAINERS.md b/NOTES_FOR_MAINTAINERS.md index 5946c9758..14326c12d 100644 --- a/NOTES_FOR_MAINTAINERS.md +++ b/NOTES_FOR_MAINTAINERS.md @@ -49,6 +49,15 @@ of some docstrings. Major version updates (e.g. Vega-Lite 1.X->2.X) have required substantial rewrites, because the internal structure of the schema changed appreciably. +## Updating the Vega-Lite in JupyterChart +To update the Vega-Lite version used in JupyterChart, update the version in the esm.sh URL in `altair/jupyter/js/index.js`. + +For example, to update to Vega-Lite 5.15.1, Vega 5 and Vega-Embed 6, the URL should be: + +```javascript +import embed from "https://esm.sh/vega-embed@6?deps=vega@5&deps=vega-lite@5.15.1"; +``` + ### Updating vl-convert version bound When updating the version of Vega-Lite, it's important to ensure that [vl-convert](https://github.com/vega/vl-convert) includes support for the new Vega-Lite version. diff --git a/altair/jupyter/js/index.js b/altair/jupyter/js/index.js index 55f507127..dbf4a0af2 100644 --- a/altair/jupyter/js/index.js +++ b/altair/jupyter/js/index.js @@ -1,5 +1,5 @@ -import embed from "https://cdn.jsdelivr.net/npm/vega-embed@6/+esm"; -import debounce from "https://cdn.jsdelivr.net/npm/lodash-es@4.17.21/debounce/+esm"; +import embed from "https://esm.sh/vega-embed@6?deps=vega@5&deps=vega-lite@5.15.1"; +import debounce from "https://esm.sh/lodash-es@4.17.21/debounce"; export async function render({ model, el }) { let finalize;