Closed scottohara closed 2 years ago
Also doesn't support optional chaining (foo?.bar
)
Example: dataSync-controller_spec.ts
, find
specs:
scenarios.forEach((scenario: Scenario): void => {
describe(scenario.type ?? "invalid sync type", (): void => {
Had to change to:
scenarios.forEach((scenario: Scenario): void => {
describe(null === scenario.type ? "invalid sync type" : scenario.type, (): void => {
Investigate switching to https://github.com/JS-DevTools/coverage-istanbul-loader
The README indicates:
Coverage Istanbul Loader is based on Istanbul Instrumenter Loader, but uses a newer version of the Istanbul API and has better support for source maps.
The current loader is configured as:
{
test: /\.(?:t|j)s$/u,
loader: "istanbul-instrumenter-loader",
options: {
esModules: true
},
exclude: /node_modules/u,
enforce: "post"
}
The alternate loader appears to support the same config, so it should be a drop-in replacement.
DataDog appear to have confirmed this works with webpack 5:
https://github.com/webpack-contrib/istanbul-instrumenter-loader/issues/96
If we can't commit to the offer to take over maintenance of the entire
istanbul-instrumenter-loader
project, another option would be to create our own fork that just bumps the dependency version.