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 to run benchmark with MAPLIBRE_STYLES environment variables #2122 #4098

Merged
merged 7 commits into from
May 10, 2024

Conversation

smellman
Copy link
Contributor

Launch Checklist

Bugfix for #2122.

  • Confirm your changes do not include backports from Mapbox projects (unless with compliant license) - if you are not sure about this, please ask!
  • Briefly describe the changes in this PR.
  • Link to related issues.
  • Include before/after visuals or gifs if this PR includes visual changes.
  • Write tests for all new functionality.
  • Document any changes to public APIs.
  • Post benchmark scores.
  • Add an entry to CHANGELOG.md under the ## main section.

@codecov-commenter
Copy link

codecov-commenter commented May 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.59%. Comparing base (aa023df) to head (9177637).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4098      +/-   ##
==========================================
+ Coverage   86.57%   86.59%   +0.01%     
==========================================
  Files         241      241              
  Lines       32535    32535              
  Branches     1986     1990       +4     
==========================================
+ Hits        28167    28173       +6     
+ Misses       3418     3414       -4     
+ Partials      950      948       -2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@HarelM
Copy link
Member

HarelM commented May 10, 2024

Is this documented in a readme somewhere?
If not, can you please add instructions?

@smellman
Copy link
Contributor Author

@HarelM
Copy link
Member

HarelM commented May 10, 2024

I think the require is needed when using local files and not public URLs.
I think it needs to be replaced with "import", which is async I believe.
Am I missing anything?

@smellman
Copy link
Contributor Author

I think the require is needed when using local files and not public URLs. I think it needs to be replaced with "import", which is async I believe. Am I missing anything?

Oh, I don't care about local files.
I will check it.

@@ -15,10 +15,25 @@ import {RollupOptions} from 'rollup';

let styles = ['https://api.maptiler.com/maps/streets/style.json?key=get_your_own_OpIi9ZULNHzrESv6T2vL'];

const loadStyle = async (styleURL: string): Promise<string> => {
Copy link
Member

Choose a reason for hiding this comment

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

How about using readFileSync to reduce the complexity of this method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks you your comment, I will fix it.

@HarelM
Copy link
Member

HarelM commented May 10, 2024

Thanks for taking the time to fix this!!

@smellman
Copy link
Contributor Author

I fix to use readFileSync.

@HarelM HarelM merged commit fbf7295 into maplibre:main May 10, 2024
15 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.

None yet

3 participants