Skip to content

deps(vis-network): bump from 9.1.13 to 10.1.4 and guard the bundled library - #119

Merged
gesinn-it-gea merged 5 commits into
mainfrom
deps/vis-network-10
Nov 11, 2026
Merged

gesinn-it-gea merged 5 commits into
mainfrom
deps/vis-network-10

Conversation

@gesinn-it-gea

Copy link
Copy Markdown
Member

Replaces the Dependabot PR #117, which only changed package.json and the lock file. The vis-network bundle in resources/visNetwork is committed and generated by the postinstall step, so that PR would have passed CI without changing the shipped library.

Changes

  • Bump vis-network from 9.1.13 to 10.1.4 and regenerate the bundle as described in the README.
  • Add a contract test that loads the real bundle and checks that every Network and DataSet member used by the production sources exists. All other tests use vis stubs and would not notice a removed or renamed API.
  • Add a CI job that fails when the committed bundle does not match the version in package.json. It installs with npm ci --ignore-scripts, because the postinstall step would otherwise overwrite the committed files before they are compared.
  • Ignore eslint major updates in Dependabot: eslint-config-wikimedia does not support eslint 10 yet.

Verification

Same browser script against 9.1.13 and 10.1.4 on a MediaWiki 1.43 / SMW 7.2.0 test wiki. The served library version was read from the ResourceLoader module for each run. Results are identical: 3 nodes and 3 edges, getNodeAt, hover, node context menu, double-click opening the page, the Designer page loads, no console or page errors.

  • npm test: 213 passing, npm run lint: 0 errors.
  • The contract test fails when a non-existent Network method is used, and passes with both versions.
  • The bundle check was run in throw-away copies: passes on the current state, fails for the Dependabot case (new version in package.json, old bundle).

Not covered

Network events and rendering are not covered by automated tests. The Designer dialogs (for example "Add node") were not exercised in the browser.

Regenerate the bundled library in resources/visNetwork with npm install, as
described in the README. Verified in a browser against the previous version:
graph rendering, hover, click, double-click, the node context menu and the
Designer behave the same.
All other tests run against hand-rolled vis stubs, so a library upgrade that
renames or removes an API the code calls would go unnoticed. Load the bundled
vis-network and verify that every Network and DataSet member used by the
production sources exists, and that DataSet add, update, get and remove behave
as expected. The list of used members is derived from the sources.
…e.json

Dependency bots only change package.json and package-lock.json, while the
vis-network bundle in resources/visNetwork is committed and generated by the
postinstall step. Such a pull request therefore passed CI without changing the
shipped library. Add a check that rebuilds the expected files from
node_modules and compares them with the committed ones. It runs in its own job
after npm ci --ignore-scripts, because the postinstall step would otherwise
overwrite the committed files before they are compared.
eslint-config-wikimedia does not support eslint 10 yet, so the update fails
at npm install with ERESOLVE. Ignore major updates of eslint until the
configuration supports it.
@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.68%. Comparing base (cafc0ad) to head (48282c3).

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #119      +/-   ##
============================================
- Coverage     80.74%   80.68%   -0.06%     
  Complexity      186      186              
============================================
  Files            18       18              
  Lines          1807     1807              
  Branches        216      216              
============================================
- Hits           1459     1458       -1     
- Misses          196      197       +1     
  Partials        152      152              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@gesinn-it-gea
gesinn-it-gea merged commit 24241f7 into main Nov 11, 2026
6 checks passed
@gesinn-it-gea
gesinn-it-gea deleted the deps/vis-network-10 branch November 11, 2026 10:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant