Empirical evaluation of API deprecation in JavaScript - Romulo Silva do Nascimento (2021)
Building an application using third-party libraries is a common practice in software development. As any other software system, code libraries and their APIs evolve over time. In order to help version migration and ensure backward compatibility, a recommended practice during development is to deprecate API. Although studies have been conducted to investigate deprecation in some programming languages, such as Java and C#, there are no detailed studies on API deprecation in the JavaScript ecosystem. The goal of this master dissertation is to investigate deprecation of JavaScript APIs. Therefore, we report the results of three studies with JavaScript developers and popular packages. We first report the results of a survey with 109 JavaScript developers. Afterwards, we mine 320 popular JavaScript projects to identify deprecated API occurrences. Finally, we analyze the evolution of API deprecation in 50 popular JavaScript packages. Results suggest that there is no standard solution to deprecate JavaScript APIs. Overall, we find several solutions, including console message, project documentation, JSDoc annotation, code comment, and prefixed element. Furthermore, developers may use multiple deprecation solutions in the same project or even in the same file. Additionally, most projects present upward trends in the number of deprecated APIs.