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

Export v8.json file as latest.json in dist folder #490

Merged
merged 6 commits into from
Jan 11, 2024
Merged

Conversation

HarelM
Copy link
Collaborator

@HarelM HarelM commented Jan 11, 2024

Launch Checklist

This copies the v8.json file into dist/latest.json to allow other libraries to import it and use it.
The exported variable is stripped from the docs and sdk as part of the build to reduce package size.
Fixes #489

I'm not sure this is the best solution to this, but I don't have another one at the moment...

I also improved some of the types while I upgraded maputnik to latest version where I found out about this issue.

  • 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.
  • Add an entry to CHANGELOG.md under the ## main section.

@HarelM HarelM changed the title Export v8.json file as latest.json Export v8.json file as latest.json in dist folder Jan 11, 2024
@HarelM HarelM requested review from neodescis and birkskyum January 11, 2024 14:54
package.json Show resolved Hide resolved
@HarelM
Copy link
Collaborator Author

HarelM commented Jan 11, 2024

In order to import it in maputnik I'll be using the following line:

import latest from '@maplibre/maplibre-gl-style-spec/dist/latest.json'

I think it's OK.

src/validate_style.ts Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (86c4898) 92.09% compared to head (93726f3) 92.22%.
Report is 12 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #490      +/-   ##
==========================================
+ Coverage   92.09%   92.22%   +0.13%     
==========================================
  Files         100      100              
  Lines        4176     4195      +19     
  Branches     1197     1202       +5     
==========================================
+ Hits         3846     3869      +23     
+ Misses        330      326       -4     

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

@HarelM HarelM enabled auto-merge (squash) January 11, 2024 18:23
@HarelM HarelM merged commit ecb13f0 into main Jan 11, 2024
6 checks passed
@HarelM HarelM deleted the export-latest.json branch January 11, 2024 18:24
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.

Missing information in spec exported variable
4 participants