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

refactor: use ESM modules #426

Open
wants to merge 122 commits into
base: master
Choose a base branch
from
Open

refactor: use ESM modules #426

wants to merge 122 commits into from

Conversation

kdhttps
Copy link
Contributor

@kdhttps kdhttps commented Mar 2, 2022

close #409

Major Changes:

  1. nyc package does not support ESM modules. Used c8 instead of it.
  2. rewire package does not support ESM modules. For work around exports all submodules. There are other packages but they need to build using babel. more details
  3. sinon does not support ESM modules. Used esmock instead of it

@kdhttps kdhttps self-assigned this Mar 2, 2022
@codecov
Copy link

codecov bot commented Mar 2, 2022

Codecov Report

Merging #426 (ba761f0) into master (d61566e) will increase coverage by 8.89%.
The diff coverage is 97.76%.

@@            Coverage Diff             @@
##           master     #426      +/-   ##
==========================================
+ Coverage   78.58%   87.48%   +8.89%     
==========================================
  Files          36       24      -12     
  Lines         780     2198    +1418     
  Branches        0        3       +3     
==========================================
+ Hits          613     1923    +1310     
- Misses        167      275     +108     
Impacted Files Coverage Δ
config/default.cjs 100.00% <ø> (ø)
config/production.cjs 100.00% <ø> (ø)
config/test.cjs 100.00% <ø> (ø)
server/utils/uma.js 92.09% <89.28%> (-6.46%) ⬇️
server/routes.js 59.81% <90.00%> (-3.15%) ⬇️
server/app-factory.js 95.55% <100.00%> (+1.43%) ⬆️
server/app.js 90.19% <100.00%> (-4.93%) ⬇️
server/cache-provider.js 84.29% <100.00%> (+49.00%) ⬆️
server/extra-passport-params.js 100.00% <100.00%> (ø)
server/idp-initiated.js 55.86% <100.00%> (+2.63%) ⬆️
... and 50 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d61566e...ba761f0. Read the comment docs.

@@ -32,7 +32,7 @@ jobs:
node-version: 14
- run: |
npm install --save-dev @commitlint/{config-conventional,cli}
echo "module.exports = {extends: ['@commitlint/config-conventional']};" > commitlint.config.js
echo "module.exports = {extends: ['@commitlint/config-conventional']};" > commitlint.config.cjs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a typo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope, It is correct. node-config need it. more details

@sonarcloud
Copy link

sonarcloud bot commented Mar 3, 2022

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@christian-hawk christian-hawk changed the title esm upgrade refactor: use ESM modules Mar 3, 2022
@christian-hawk
Copy link
Contributor

run tests

1 similar comment
@christian-hawk
Copy link
Contributor

run tests

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.

Upgrade project to use ESM imports
3 participants