Assessing JavaScript API Deprecation - Nascimento, Romulo; Figueiredo, Eduardo; Hora, Andre (Anais Estendidos do Congresso Brasileiro de Software: Teoria e Prática (CBSoft); 2020: Anais Estendidos do XI Congresso Brasileiro de Software: Teoria e PráticaDO - 10.5753/cbsoft_estendido.2020.14616, 2020)
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 research work is to investigate deprecation of JavaScript APIs. In a first assessment, we analyzed popular software projects to identify API deprecation occurrences and classify them. We are now conducting a survey study with developers to understand their thoughts and experiences on JavaScript API deprecation. Lastly, we plan to develop a set of JavaScript API deprecation guidelines based on this master research result. Initial results suggest that the use of deprecation mechanisms in JavaScript packages is low. However, we were able to identify five different approaches that developers primarily use to deprecate APIs in the studied projects. Among these solutions, deprecation utility (i.e., any sort of function specially written to aid deprecation) and code comments are the most common practices in JavaScript. Finally, we found that the rate of helpful message is high: 67% of the deprecation occurrences have replacement messages to support developers when migrating APIs.