Rollup-plugin-typescript2, a tool for integrating TypeScript with Rollup, saw a minor update from version 0.21.0 to 0.21.1 in May 2019. While both versions maintain the core functionality of enabling seamless TypeScript compilation within Rollup workflows, there are a few notable shifts beneficial for developers.
Primarily, dependency updates are the key focus. Version 0.21.1 upgrades the resolve dependency from 1.10.0 to 1.10.1 and rollup-pluginutils from 2.4.1 to 2.6.0. While seemingly small, these dependency bumps often include bug fixes, performance improvements, and enhanced compatibility. Developers can expect a slightly more robust and potentially faster experience when resolving modules and utilizing Rollup's plugin utilities.
Furthermore, rollup was updated from ^1.6.0 to ^1.10.1 and rollup-plugin-typescript2 from 0.20.1 to 0.21.0 in the devDependencies. Also, there are updates to the development dependencies @types/fs-extra, @types/graphlib, @types/lodash, semver, tslint and typescript.
The dist information indicates a slight increase in the unpacked size, suggesting minor code additions or changes within the package. The release date also reflects the recency of version 0.21.1. Developers already using 0.21.0 should consider upgrading for the benefit of these refined dependencies, while new users will find the latest improvements immediately available. This update ensures a reliable and up-to-date TypeScript integration with Rollup.
All the vulnerabilities related to the version 0.21.1 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.