Repository navigation
deps(vis-network): bump from 9.1.13 to 10.1.4 and guard the bundled library - #119
Merged
Merged
Conversation
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 Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaces the Dependabot PR #117, which only changed
package.jsonand the lock file. The vis-network bundle inresources/visNetworkis committed and generated by the postinstall step, so that PR would have passed CI without changing the shipped library.Changes
vis-networkfrom 9.1.13 to 10.1.4 and regenerate the bundle as described in the README.NetworkandDataSetmember used by the production sources exists. All other tests usevisstubs and would not notice a removed or renamed API.package.json. It installs withnpm ci --ignore-scripts, because the postinstall step would otherwise overwrite the committed files before they are compared.eslint-config-wikimediadoes 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.Networkmethod is used, and passes with both versions.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.