File tree Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Expand file tree Collapse file tree 1 file changed +18
-7
lines changed Original file line number Diff line number Diff line change @@ -193,20 +193,31 @@ jobs:
193193 - run :
194194 name : Check JupyterLab build artifacts
195195 command : |
196+ # Compare all files except 'Only in' cases
196197 diff -qr plotly/labextension-tmp/ plotly/labextension/ | grep -v '^Only in' > build_diff.txt || true
197198
198- ls -l build_diff.txt
199- wc -l build_diff.txt
200- cat build_diff.txt
199+ # Filter out package.json from the global diff (we’ll check it separately)
200+ grep -v 'package.json' build_diff.txt > filtered_diff.txt
201201
202- if [ -s build_diff.txt ]; then
203- echo "❌ Build artifacts differ from committed files:"
204- cat build_diff.txt
202+ # Check if package.json differs
203+ diff plotly/labextension/package.json plotly/labextension-tmp/package.json > package_json_diff.txt || true
204+
205+ # Filter package.json diff to ignore allowed hash changes (e.g. jupyterlab/build keys)
206+ grep -vE '"(jupyterlab|build)"\s*:' package_json_diff.txt > package_json_diff_filtered.txt
207+
208+ # Check both filtered diffs
209+ if [ -s filtered_diff.txt ] || [ -s package_json_diff_filtered.txt ]; then
210+ echo "❌ Build artifacts differ:"
211+ echo "--- Unexpected diffs ---"
212+ cat filtered_diff.txt
213+ echo "--- Unexpected package.json diffs ---"
214+ cat package_json_diff_filtered.txt
205215 exit 1
206216 else
207- echo "✅ Build artifacts are identical to committed files ."
217+ echo "✅ Build artifacts match expected output (ignoring allowed hash in package.json) ."
208218 fi
209219
220+
210221 # Percy
211222 python_311_percy :
212223 docker :
You can’t perform that action at this time.
0 commit comments