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

test: fix h3 bundle in sf #515

Merged
merged 7 commits into from
Jul 2, 2024
Merged

test: fix h3 bundle in sf #515

merged 7 commits into from
Jul 2, 2024

Conversation

Jesus89
Copy link
Member

@Jesus89 Jesus89 commented Jul 2, 2024

context #514 (comment)

Problem

Recently, without any change from our side, a specific bundle h3_polyfill can not be properly generated:

/home/runner/work/analytics-toolbox-core/analytics-toolbox-core/clouds/snowflake/libraries/javascript/libs/h3_polyfill.js → build/h3_polyfill.js...
(!) Missing shims for Node.js built-ins
Creating a browser bundle that depends on "util". You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node
Created bundle h3_polyfill.js: 172.17 kB → 50.83 kB (gzip)
(!) Missing global variable name
Use output.globals to specify browser global variable names corresponding to external modules
util (guessing 'require$$0$2')
created build/h3_polyfill.js in 4.6s

I have traced the problem to this library:

booleanIntersects -> booleanDisjoint -> lineIntersect -> `import rbush from "geojson-rbush";` 

This library is used in @turf/line-intersect 6.3.0 and has the following dependency rule:

"@turf/bbox": "*",

This bad rule will always install the latest version. And this is what happened because less than a month ago, a new version of turf 7.0.0 was released: https://github.com/Turfjs/turf/releases/tag/v7.0.0. This version has removed the dependency with geojson-rbush, but this affects existing installations using turf 6.x.

Solution

Fix turf resolution to "@turf/bbox": "6.5.0" in our package.

@Jesus89 Jesus89 changed the base branch from main to release/2024-06-27 July 2, 2024 10:10
@Jesus89 Jesus89 marked this pull request as ready for review July 2, 2024 13:04
Copy link
Contributor

@vdelacruzb vdelacruzb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Jesus89 Jesus89 mentioned this pull request Jul 2, 2024
@Jesus89 Jesus89 merged commit 3e47dee into release/2024-06-27 Jul 2, 2024
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants