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

CommonJS --> ESM #16

Merged
merged 7 commits into from
Oct 24, 2023
Merged

CommonJS --> ESM #16

merged 7 commits into from
Oct 24, 2023

Conversation

chris48s
Copy link
Member

@chris48s chris48s commented Jul 12, 2021

2 problems to solve

  1. Actions can't run on node14+ yet: Supporting Node.js 14 and 16 LTS as the runtime of JavaScript action actions/runner#772
  2. Adopt top-level await. Not done yet - still using (async () => {.... Eslint doesn't yet allow it
  3. nyc coverage doesn't work. Tests all run/pass but the cov report is
---------------|---------|----------|---------|---------|-------------------
File           | % Stmts | % Branch | % Funcs | % Lines | Uncovered Line #s 
---------------|---------|----------|---------|---------|-------------------
All files      |       0 |        0 |       0 |       0 |                   
 action.js     |       0 |      100 |       0 |       0 | 4-5               
 formatters.js |       0 |        0 |       0 |       0 | 3-24              
 lib.js        |       0 |        0 |       0 |       0 | 8-96              
---------------|---------|----------|---------|---------|-------------------

@codecov-commenter
Copy link

codecov-commenter commented Jul 12, 2021

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (f53fdb3) 72.72% compared to head (627ffa8) 86.66%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main      #16       +/-   ##
===========================================
+ Coverage   72.72%   86.66%   +13.93%     
===========================================
  Files           3        3               
  Lines          66      135       +69     
  Branches        7       28       +21     
===========================================
+ Hits           48      117       +69     
- Misses         17       18        +1     
+ Partials        1        0        -1     
Files Coverage Δ
src/formatters.js 92.59% <100.00%> (+5.92%) ⬆️
src/lib.js 88.46% <100.00%> (+13.99%) ⬆️
src/action.js 0.00% <0.00%> (ø)

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

@chris48s
Copy link
Member Author

If there is not an updated version of nyc by the time GH Actions allows node>12 maybe the solution is to switch to https://github.com/bcoe/c8 for coverage

@chris48s
Copy link
Member Author

Still to do:

@chris48s
Copy link
Member Author

Suspect the dist is fine. I've got the same over on https://github.com/chris48s/satisfying-python/tree/main/dist

@socket-security
Copy link

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
c8 8.0.1 filesystem, environment +14 1.18 MB oss-bot

🚮 Removed packages: [email protected]

@chris48s chris48s marked this pull request as ready for review October 24, 2023 19:24
@chris48s chris48s changed the title WIP CommonJS --> ESM CommonJS --> ESM Oct 24, 2023
@chris48s chris48s merged commit 07a9c1f into main Oct 24, 2023
9 of 10 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.

2 participants