@@ -194,28 +194,23 @@ jobs:
194194 name : Check JupyterLab build artifacts
195195 command : |
196196 # 1. Compare all files except 'Only in' cases
197- diff -qr plotly/labextension-tmp/ plotly/labextension/ | grep -v '^Only in' > build_diff.txt || true
197+ diff -qr plotly/labextension-tmp/static plotly/labextension/static | grep -v '^Only in' > build_diff.txt || true
198198 cat build_diff.txt
199199
200- # 2. Filter out package.json from overall diff
201- grep -v 'package.json' build_diff.txt > filtered_diff.txt
202- cat filtered_diff.txt
200+ # Remove the "load" line from both package.json files before comparing
201+ grep -v '"load": "static/' plotly/labextension/ package.json > pkg1.json
202+ grep -v '"load": "static/' plotly/labextension-tmp/package.json > pkg2.json
203203
204- # 3. Diff package.json in unified mode
205- diff -u plotly/labextension/package.json plotly/labextension-tmp/package.json > package_json_diff.txt || true
206- cat package_json_diff.txt
207-
208- # 4. Filter out the line that changes ("load": "static/...js")
209- grep -vE '"load": "static/.*\.js"' package_json_diff.txt > package_json_diff_filtered.txt
210- cat package_json_diff_filtered.txt
204+ # Compare stripped versions
205+ diff pkg1.json pkg2.json > package_json_diff.txt || true
211206
212207 # 5. Final check
213- if [ -s filtered_diff .txt ] || [ -s package_json_diff_filtered .txt ]; then
208+ if [ -s build_diff .txt ] || [ -s package_json_diff .txt ]; then
214209 echo "❌ Build artifacts differ:"
215210 echo "--- Unexpected diffs ---"
216- cat filtered_diff .txt
211+ cat build_diff .txt
217212 echo "--- Unexpected package.json diffs ---"
218- cat package_json_diff_filtered .txt
213+ cat package_json_diff .txt
219214 exit 1
220215 else
221216 echo "✅ Build artifacts match expected output (ignoring known 'load' hash in package.json)."
0 commit comments