Rollup Plugin Typescript2 streamlines Typescript integration with Rollup, designed for developers seeking efficiency and error management. Comparing versions 0.21.1 and 0.21.2 reveals subtle yet potentially important distinctions. The core dependencies remain consistent, including *fs-extra*, *resolve*, *rollup-pluginutils*, and *tslib*, assuring stability in fundamental operations like file system interactions and module resolution. Development dependencies, crucial for testing and building, also share identical versions, suggesting minimal changes in the underlying build process and testing environment. This includes key tools like *rollup*, *typescript*, and various plugins for commonjs, node resolution, and more.
The peer dependencies, specifying compatible versions of *rollup* and *typescript*, are unchanged, indicating no breaking changes to core tooling compatibility. The most notable difference lies in the *dist* object, specifically the *unpackedSize*. Version 0.21.2 boasts a size of 4280726 bytes compared to 4280647 bytes in version 0.21.1. This approximately 80-byte increase hints at minor code adjustments, potentially bug fixes or small feature enhancements. Moreover, the release date distinguishes the versions, with 0.21.2 released a month later than 0.21.1, further suggesting refinements after the initial release. Developers should consider these subtle changes when deciding which version to implement, especially those prioritizing the latest bug fixes and minor improvements offered by version 0.21.2.
All the vulnerabilities related to the version 0.21.2 of the package
Regular Expression Denial of Service (ReDoS) in micromatch
The NPM package micromatch prior to version 4.0.8 is vulnerable to Regular Expression Denial of Service (ReDoS). The vulnerability occurs in micromatch.braces() in index.js because the pattern .* will greedily match anything. By passing a malicious payload, the pattern matching will keep backtracking to the input while it doesn't find the closing bracket. As the input size increases, the consumption time will also increase until it causes the application to hang or slow down. There was a merged fix but further testing shows the issue persisted prior to https://github.com/micromatch/micromatch/pull/266. This issue should be mitigated by using a safe pattern that won't start backtracking the regular expression due to greedy matching.
Uncontrolled resource consumption in braces
The NPM package braces fails to limit the number of characters it can handle, which could lead to Memory Exhaustion. In lib/parse.js, if a malicious user sends "imbalanced braces" as input, the parsing will enter a loop, which will cause the program to start allocating heap memory without freeing it at any moment of the loop. Eventually, the JavaScript heap limit is reached, and the program will crash.