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

feat(deno): allow direct CommonJS execution in Deno #300

Merged
merged 15 commits into from
May 29, 2024
Merged

Conversation

wellwelwel
Copy link
Owner

@wellwelwel wellwelwel commented May 28, 2024

Now, it's possible to run tests that use require, module.exports and module directly with Deno 🎉

  • A great feature to test if a project created primarily in Node.js is also compatible with Deno without the need to transpile the code or use workarounds.

Important

The incompatibility with CJS and Deno without npm doesn't seem to be an issue on Deno's side: denoland/deno#21149

This approach addresses this situation and allows the user to develop as they choose.

  • All this continuing without eval and maintaining high test isolation 🔐

Copy link

codecov bot commented May 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.80%. Comparing base (5015ef3) to head (400dbfa).

Current head 400dbfa differs from pull request most recent head 490fbde

Please upload reports for the commit 490fbde to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #300      +/-   ##
==========================================
+ Coverage   94.02%   94.80%   +0.77%     
==========================================
  Files          31       31              
  Lines        2476     2500      +24     
  Branches      363      367       +4     
==========================================
+ Hits         2328     2370      +42     
+ Misses        146      128      -18     
  Partials        2        2              
Flag Coverage Δ
linux-parallel 94.60% <100.00%> (+0.86%) ⬆️
linux-parallel-options 94.72% <100.00%> (+0.77%) ⬆️
linux-sequential 93.20% <100.00%> (+0.87%) ⬆️
linux-sequential-options 93.28% <100.00%> (+0.79%) ⬆️
osx-parallel 94.60% <100.00%> (+0.86%) ⬆️
osx-parallel-options 94.72% <100.00%> (+0.77%) ⬆️
osx-sequential 93.20% <100.00%> (+0.87%) ⬆️
osx-sequential-options 93.28% <100.00%> (+0.79%) ⬆️
windows-parallel 94.08% <100.00%> (+0.86%) ⬆️
windows-parallel-options 94.20% <100.00%> (+0.78%) ⬆️
windows-sequential 92.68% <100.00%> (+0.87%) ⬆️
windows-sequential-options 92.76% <100.00%> (+0.79%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@wellwelwel wellwelwel marked this pull request as ready for review May 29, 2024 15:10
@wellwelwel wellwelwel merged commit fa358b5 into main May 29, 2024
36 checks passed
@wellwelwel wellwelwel deleted the deno-cjs branch May 29, 2024 15:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant