More Effective JavaScript Breaking Change Detection via Dynamic Object Relation Graph
Open Access
- 22 June 2025
- journal article
- Published by Association for Computing Machinery (ACM) in Proceedings of the ACM on Software Engineering
- Vol. 2 (ISSTA) , 2340-2361
Abstract
JavaScript libraries are characterized by their widespread use, frequent code changes, and a high tolerance for backward incompatible changes. Awareness of such breaking changes can help developers adapt to version updates and avoid negative impacts. Several tools have been targeted to or can be used to detect breaking change detection in the JavaScript community. However, these tools detect breaking changes using different ways, and there are currently no systematic reviews of these approaches. From a preliminary study on popular JavaScript libraries, we find that existing approaches, including simple regression testing, model-based testing and type differencing cannot detect many breaking changes but can produce plenty of false positives. We discuss the reasons for missing breaking changes and producing false positives. Based on the insights from our findings, we propose a new approach named Diagnose that iteratively constructs an object relation graph based on API exploration and forced execution-based type analysis. Diagnose then refine the graphs and reconstruct the graphs in the newer versions of the libraries to detect breaking changes. By evaluating approach on the same set of libraries used in the empirical study, we find that Diagnose can detect much more breaking changes (60.2%) and produce fewer false positives. Therefore, Diagnose is suitable for practical use.Keywords
This publication has 27 references indexed in Scilit:
- AexPy: Detecting API Breaking Changes in Python Packages2022
- How Do Python Framework APIs Evolve? An Exploratory Study2020
- What Do Package Dependencies Tell Us About Semantic Versioning?IEEE Transactions on Software Engineering, 2019
- JSForce: A Forced Execution Engine for Malicious JavaScript Detection2018
- APIDiff: Detecting API breaking changes2018
- Semantic versioning and impact of breaking changes in the Maven repositoryJournal of Systems and Software, 2017
- RefDiff: Detecting Refactorings in Version Histories2017
- Inference and Evolution of TypeScript Declaration Files2017
- Static Analysis of JavaScript Web Applications in the Wild via Practical DOM Modeling (T)2015
- Recommended Steps for Thematic Synthesis in Software Engineering2011