Skip to content

Commit

Permalink
[fix] fix yarn cover regression (#2846)
Browse files Browse the repository at this point in the history
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
  • Loading branch information
igorDykhta authored Dec 20, 2024
1 parent 6925bd4 commit a2abbf7
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ const PLUGINS = [
// We explicitly transpile this ESM library in scripts/fix-dependencies.js and consume the transpiled version here
// This may not be needed once switch to Jest is complete as it is handled by transformIgnorePatterns
'@mapbox/tiny-sdf': `${nodeModules}/@mapbox/tiny-sdf/index.cjs`,
// fix ERR_REQUIRE_ESM in yarn cover
'maplibregl-mapbox-request-transformer': `${nodeModules}/maplibregl-mapbox-request-transformer/src/index.cjs`,
// compile from @kepler.gl src
...RESOLVE_ALIASES,
// loaders.gl cjs bundle of polyfills is not transpiled properly, use esm instead
Expand Down
3 changes: 3 additions & 0 deletions scripts/fix-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,6 @@ yarn babel node_modules/@mapbox/tiny-sdf/index.js | tail -n +2 > node_modules/@m
if [[ -f "node_modules/react-virtualized/dist/es/WindowScroller/utils/onScroll.js" ]]; then
sed -i -e '/import { bpfrpt_proptype_WindowScroller } from "..\/WindowScroller.js";/d' node_modules/react-virtualized/dist/es/WindowScroller/utils/onScroll.js
fi

# fix ERR_REQUIRE_ESM in yarn cover
yarn babel node_modules/maplibregl-mapbox-request-transformer/src/index.js | tail -n +2 > node_modules/maplibregl-mapbox-request-transformer/src/index.cjs

0 comments on commit a2abbf7

Please sign in to comment.