Skip to content

Commit 4e4be86

Browse files
authored
Merge pull request #13026 from quarto-dev/feature/jupyter-widgets-jsdelivr
Use jsdelivr cdn for jupyter widgets dependencies
2 parents 0defb7a + 76e924c commit 4e4be86

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

news/changelog-1.8.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ All changes included in 1.8:
9191

9292
- ([#12753](https://github.com/quarto-dev/quarto-cli/issues/12753)): Support change in IPython 9+ and import `set_matplotlib_formats` from `matplotlib_inline.backend_inline` in the internal `setup.py` script used to initialize rendering with Jupyter engine.
9393
- ([#12839](https://github.com/quarto-dev/quarto-cli/issues/12839)): Support for `plotly.py` 6+ which now loads plotly.js using a cdn in script as a module.
94+
- ([#13026](https://github.com/quarto-dev/quarto-cli/pulls/13026)): Use `jsdelivr` CDN for jupyter widgets dependencies.
9495

9596
### `knitr`
9697

src/core/jupyter/widgets.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,10 +101,10 @@ export function includesForJupyterWidgetDependencies(
101101
const head: string[] = [];
102102
if (haveJavascriptWidgets || haveJupyterWidgets) {
103103
head.push(
104-
'<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.6/require.min.js" integrity="sha512-c3Nl8+7g4LMSTdrm621y7kf9v3SDPnhxLNhcjFJbKECVnmZHTdo+IRO05sNLTH/D3vA6u1X32ehoLC7WFVdheg==" crossorigin="anonymous"></script>',
104+
'<script src="https://cdn.jsdelivr.net/npm/requirejs@2.3.6/require.min.js" integrity="sha384-c9c+LnTbwQ3aujuU7ULEPVvgLs+Fn6fJUvIGTsuu1ZcCf11fiEubah0ttpca4ntM" crossorigin="anonymous"></script>',
105105
);
106106
head.push(
107-
'<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js" integrity="sha512-bLT0Qm9VnAYZDflyKcBaQ2gg0hSYNQrJ8RilYldYQ1FxQYoCLtUjuuRuZo+fjqhx/qtq/1itJ0C2ejDxltZVFg==" crossorigin="anonymous" data-relocate-top="true"></script>',
107+
'<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js" integrity="sha384-ZvpUoO/+PpLXR1lu4jmpXWu80pZlYUAfxl5NsBMWOEPSjUn/6Z/hRTt8+pR6L4N2" crossorigin="anonymous" data-relocate-top="true"></script>',
108108
);
109109
head.push(
110110
"<script type=\"application/javascript\">define('jquery', [],function() {return window.jQuery;})</script>",
@@ -117,7 +117,7 @@ export function includesForJupyterWidgetDependencies(
117117
// jupyter widget runtime
118118
if (haveJupyterWidgets) {
119119
head.push(
120-
'<script src="https://unpkg.com/@jupyter-widgets/html-manager@*/dist/embed-amd.js" crossorigin="anonymous"></script>',
120+
'<script src="https://cdn.jsdelivr.net/npm/@jupyter-widgets/html-manager@*/dist/embed-amd.js" crossorigin="anonymous"></script>',
121121
);
122122
}
123123

tests/docs/smoke-all/2023/09/29/test.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ _quarto:
77
tests:
88
html:
99
ensureHtmlElements:
10-
- ['script:first-of-type[src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"]']
10+
- ['script:first-of-type[src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.min.js"]']
1111

1212
---
1313

0 commit comments

Comments
 (0)