Text of MIT License is as follows:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
What is the definition of "substantial portions of the Software"?
My use case is that I used existing MIT licensed library written in rather old version of Javascript (copyright year is 2017). I have totally rewritten the library to use Typescript and modern Javascript features. I also improved code by refactoring methods, renamed, applied proper naming convention, applied code design patterns and turning functions to classes, to name few. The overall structure of the library remains similar to old version (main modules are organised the same way), it is doing same things as old one and it remains compatible with old version (the interface remained the same although it is subject to change).
I also added few new features, unit tests and proper bundling configuration. The amount of code has increased significantly compared to original.
In such case do I still need to mention full text of MIT license of the original library in my package?
Should i add the license to every file i made based on old library or keep license text in the root directory?
Where is the boundary between substantial and not substantial portion of the Software.
[update] Overall I think old library serves rather as an inspiration and source of solutions for some features, but my new code is more than just a 'modification' of the old code.