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

chore(examples): change examples to ES modules #518

Merged
merged 14 commits into from
Aug 9, 2022
Merged

Conversation

sranka
Copy link
Contributor

@sranka sranka commented Aug 5, 2022

Fixes #517

Proposed Changes

Examples changed in the following way:

  • common JS modules were replaced by ES modules
  • js files renamed to mjs files (to work properly also in typescript)
  • full file names (including suffix) are used in relative imports
  • follow-redirects example was repaired
  • eslint configuration repaired to include also .mjs files
  • examples now utilize top-level await (supported OOTB in node 14 LTS, since node 14.8)

Checklist

  • CHANGELOG.md updated
  • Rebased/mergeable
  • yarn test completes successfully
  • Commit messages are conventional

@codecov-commenter
Copy link

codecov-commenter commented Aug 8, 2022

Codecov Report

Merging #518 (b4a15ec) into master (08cf472) will not change coverage.
The diff coverage is n/a.

@@          Coverage Diff           @@
##           master    #518   +/-   ##
======================================
  Coverage    0.00%   0.00%           
======================================
  Files           1       1           
  Lines           1       1           
======================================
  Misses          1       1           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@sranka sranka marked this pull request as ready for review August 8, 2022 07:45
examples/README.md Outdated Show resolved Hide resolved
@sranka sranka merged commit 799630a into master Aug 9, 2022
@sranka sranka deleted the 517/examples_esmodule branch August 9, 2022 04:29
@sranka sranka added this to the 1.29.0 milestone Aug 15, 2022
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.

change examples to use ECMAScript modules
3 participants