Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] fix yarn cover regression #2846

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading