Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 2.8k
Add back the mime renderer JL extension#5096
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uh oh!
There was an error while loading. Please reload this page.
Changes from all commits
5cb5754e5e2994583dea9bed4c451cd7c4faa13a9723dad1874724a5b8375f3df3970f4353bbaef5add114b5a0daf46e255ced43e847b87c00a794b61df8d78f32ac50ee60e74a2f69918f70acca54548b827f02c67cadae3afcf762721e93a6f3ee0859aef12606121db6c814bcbd30b8cc069cbfddad5254258f51b3dcb4cd36c5d0aa9c56433a7a7cf8e154cc73fafc511a87c5260f167e6fdaac60e024325e0df9265e26d9daab922bfa56c55af7df6a8ce27281f918835cd26c8f585cf4a4fdca55d7157f6d10fd16ce161d948c510c2dbb09c9e097ecf3a42785baedf32e9a29615ea2d7a4b0c4235506f3ce867a18f3227e3ac422460735feFile filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,66 @@ | ||
| on: push | ||
| jobs: | ||
| check-js-build: | ||
| name: Check JS build artifacts | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.x" | ||
| - name: Install Node | ||
| uses: actions/setup-node@v2 | ||
| with: | ||
| node-version: '22' | ||
| - name: Copy current files to a temporary directory | ||
| run: | | ||
| cp -R plotly/labextension/ plotly/labextension-tmp/ | ||
| - name: Install dependencies and build | ||
| run: | | ||
| curl -LsSf https://astral.sh/uv/install.sh | sh | ||
| uv venv | ||
| source .venv/bin/activate | ||
| uv pip install jupyter | ||
| cd js | ||
| npm ci | ||
| npm run build | ||
| - name: Check JupyterLab build artifacts | ||
| run: | | ||
| # 1. Hash contents of all static files, sort by content hash | ||
| find plotly/labextension/static -type f -exec sha256sum {} \; | awk '{print $1}' | sort > new_hashes.txt | ||
| find plotly/labextension-tmp/static -type f -exec sha256sum {} \; | awk '{print $1}' | sort > old_hashes.txt | ||
| # 2. Compare the sorted content hashes | ||
| diff old_hashes.txt new_hashes.txt > content_diff.txt | ||
| # Remove the "load" line from both package.json files before comparing | ||
| grep -v '"load": "static/' plotly/labextension/package.json > pkg1.json | ||
| grep -v '"load": "static/' plotly/labextension-tmp/package.json > pkg2.json | ||
| # Compare stripped versions | ||
| diff pkg1.json pkg2.json > package_json_diff.txt | ||
| # 5. Final check | ||
| if [ -s content_diff.txt ] || [ -s package_json_diff.txt ]; then | ||
| echo "❌ Build artifacts differ:" | ||
| echo "--- Unexpected diffs ---" | ||
| cat content_diff.txt | ||
| echo "--- Unexpected package.json diffs ---" | ||
| cat package_json_diff.txt | ||
| echo "Please replace the 'plotly/labextension' directory with the artifacts of this CI run." | ||
| exit 1 | ||
| else | ||
| echo "✅ Build artifacts match expected output (ignoring known 'load' hash in package.json)." | ||
| fi | ||
| - name: Store the build artifacts from plotly/labextension | ||
| uses: actions/upload-artifact@v4 | ||
| if: failure() | ||
| with: | ||
| name: labextension | ||
| path: plotly/labextension |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "schemaVersion": 1, | ||
| "name": "jupyterlab-plotly", | ||
| "version": "6.0.1", | ||
| "jupyterlab": { | ||
| "mimeExtension": "lib/mimeExtension.js" | ||
| } | ||
| } | ||
Large diffs are not rendered by default.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.