A Preliminary Study on Self-Contained Libraries in the NPM Ecosystem

AI4SE Other SE
2024年06月17日
在现代软件生态系统中广泛使用的库形成了复杂的依赖网络。这些依赖关系很容易被破坏、过时或冗余,可能导致依赖库中的级联问题。一种减轻策略是减少依赖关系;没有依赖关系的库可以成为自包含的库。本文探讨了NPM生态系统中自包含库的特性。通过分析一组包含2763个NPM库的数据集,我们发现39.49%的库是自包含的。在这些自包含库中,40.42%曾经有依赖关系,后来被移除了。这个分析揭示了NPM生态系统中依赖关系减少的显著趋势。最常被移除的依赖是babel-runtime。我们的调查表明,依赖关系被移除的主要原因是对性能和依赖大小的担忧。我们的研究结果阐明了自包含库及其起源的本质,为指导软件开发实践提供了有价值的见解。
The widespread of libraries within modern software ecosystems creates complex networks of dependencies. These dependencies are fragile to breakage, outdated, or redundancy, potentially leading to cascading issues in dependent libraries. One mitigation strategy involves reducing dependencies; libraries with zero dependencies become to self-contained. This paper explores the characteristics of self-contained libraries within the NPM ecosystem. Analyzing a dataset of 2763 NPM libraries, we found that 39.49\% are self-contained. Of these self-contained libraries, 40.42\% previously had dependencies that were later removed. This analysis revealed a significant trend of dependency reduction within the NPM ecosystem. The most frequently removed dependency was babel-runtime. Our investigation indicates that the primary reasons for dependency removal are concerns about the performance and the size of the dependency. Our findings illuminate the nature of self-contained libraries and their origins, offering valuable insights to guide software development practices.
许愿