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

use with for json modules instead of assert #4092

Merged
merged 1 commit into from
May 8, 2024

Conversation

birkskyum
Copy link
Member

@birkskyum birkskyum commented May 8, 2024

The JSON modules / import attribute syntax has been changed from assert to with, which it appear to finally stabilize on.

https://github.com/tc39/proposal-json-modules
https://github.com/tc39/proposal-import-attributes/

@birkskyum birkskyum changed the title use with for json modules instead of assert use with for json modules instead of assert May 8, 2024
@HarelM
Copy link
Collaborator

HarelM commented May 8, 2024

Does it require a newer node version? Does it create any rollup issue?
I'm surprised nothing is failing...

@codecov-commenter
Copy link

codecov-commenter commented May 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.34%. Comparing base (3d0f0db) to head (d78e2e4).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4092      +/-   ##
==========================================
- Coverage   86.61%   86.34%   -0.28%     
==========================================
  Files         241      241              
  Lines       32518    32518              
  Branches     2145     2008     -137     
==========================================
- Hits        28165    28077      -88     
- Misses       3395     3476      +81     
- Partials      958      965       +7     

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

@birkskyum
Copy link
Member Author

birkskyum commented May 8, 2024

I believe it works because the with syntax has been added in minor versions, like here for 18.20 (nodejs/node#52165), and must be the same for node 20.

@birkskyum birkskyum merged commit b6e1c0a into maplibre:main May 8, 2024
15 checks passed
jleedev added a commit to jleedev/maplibre-style-spec that referenced this pull request May 20, 2024
HarelM pushed a commit to maplibre/maplibre-style-spec that referenced this pull request May 20, 2024
* use `with` for json modules instead of `assert`

See maplibre/maplibre-gl-js#4092

* Add a changelog entry
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.

3 participants