Skip to content

feat(version): use await import instead of require() for GHE release#546

Merged
ghiscoding merged 1 commit intonextfrom
chore/await-import-ghe-client
Apr 5, 2023
Merged

feat(version): use await import instead of require() for GHE release#546
ghiscoding merged 1 commit intonextfrom
chore/await-import-ghe-client

Conversation

@ghiscoding
Copy link
Copy Markdown
Member

Description

Use await import() instead of require() to be fully ESM compatible

Motivation and Context

I tried createRequire but that caused issue when I tried it under the conventional commits changelog creation, so I assume it might also give problems when creating GitHub Release with GHE which was loading Oktokit GHE plugin dynamic imports. Using await import() is more bullet proof for ESM

How Has This Been Tested?

Types of changes

  • Chore (change that has absolutely no effect on users)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@codecov
Copy link
Copy Markdown

codecov bot commented Apr 5, 2023

Codecov Report

❗ No coverage uploaded for pull request base (next@a6f44b3). Click here to learn what that means.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             next     #546   +/-   ##
=======================================
  Coverage        ?   97.64%           
=======================================
  Files           ?      160           
  Lines           ?    12374           
  Branches        ?     2012           
=======================================
  Hits            ?    12081           
  Misses          ?      292           
  Partials        ?        1           

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

@ghiscoding ghiscoding merged commit f6a2488 into next Apr 5, 2023
@ghiscoding ghiscoding deleted the chore/await-import-ghe-client branch April 5, 2023 23:12
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.

1 participant