Skip to content

fix: support module namespaces for node.js #10105

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

Draft
wants to merge 1 commit into
base: v3
Choose a base branch
from

Conversation

dnalborczyk
Copy link

@dnalborczyk dnalborczyk commented Oct 15, 2021

Closes: #10091

for future reference: with this commit, once released, we could potentially add the RIC to the dependencies and call the handler directly.

@codecov
Copy link

codecov bot commented Oct 15, 2021

Codecov Report

Merging #10105 (986b495) into master (6264296) will decrease coverage by 0.12%.
The diff coverage is 92.30%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #10105      +/-   ##
==========================================
- Coverage   85.39%   85.26%   -0.13%     
==========================================
  Files         334      334              
  Lines       13604    13648      +44     
==========================================
+ Hits        11617    11637      +20     
- Misses       1987     2011      +24     
Impacted Files Coverage Δ
lib/plugins/aws/invokeLocal/index.js 69.28% <92.30%> (+0.58%) ⬆️
...b/plugins/aws/package/compile/events/cloudFront.js 96.84% <0.00%> (-2.09%) ⬇️
lib/classes/PluginManager.js 91.31% <0.00%> (-1.87%) ⬇️
lib/utils/eventuallyUpdate.js 26.49% <0.00%> (-1.55%) ⬇️
lib/classes/ConfigSchemaHandler/index.js 90.11% <0.00%> (-1.51%) ⬇️
lib/plugins/aws/deploy/index.js 98.63% <0.00%> (-1.37%) ⬇️
.../package/compile/events/apiGateway/lib/validate.js 96.35% <0.00%> (-0.49%) ⬇️
...ib/plugins/aws/package/lib/generateCoreTemplate.js 95.45% <0.00%> (-0.11%) ⬇️
lib/plugins/aws/info/index.js 97.14% <0.00%> (-0.08%) ⬇️
lib/plugins/aws/provider.js 94.27% <0.00%> (ø)
... and 8 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 6264296...986b495. Read the comment docs.

@dnalborczyk dnalborczyk force-pushed the nodejs-namespace-support branch from 6e02033 to 986b495 Compare October 16, 2021 01:40
@dnalborczyk dnalborczyk marked this pull request as draft October 16, 2021 01:47
Copy link
Contributor

@pgrzesik pgrzesik left a comment

Choose a reason for hiding this comment

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

Thanks a lot @dnalborczyk - it looks good in general, however the tests should be using runServerless based approach as we're slowly migrating old tests to it and not allow introduction of new tests written the "old way". Would you be able to adjust them?

EDIT: Looks like there are some failing tests

@@ -414,8 +414,90 @@ describe('AwsInvokeLocal', () => {

describe('for different handler paths', () => {
[
{ path: 'handler.hello', expected: 'handler' },
{ path: '.build/handler.hello', expected: '.build/handler' },
{
Copy link
Contributor

Choose a reason for hiding this comment

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

We should not expand the old-style tests but rather all new ones should use runServerless-based approach

@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 92.30769% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 85.26%. Comparing base (6264296) to head (986b495).
⚠️ Report is 1168 commits behind head on v3.

Files with missing lines Patch % Lines
lib/plugins/aws/invokeLocal/index.js 92.30% 1 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##               v3   #10105      +/-   ##
==========================================
- Coverage   85.39%   85.26%   -0.13%     
==========================================
  Files         334      334              
  Lines       13604    13648      +44     
==========================================
+ Hits        11617    11637      +20     
- Misses       1987     2011      +24     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.

node.js runtime: invoke local does not support handlers with "namespace" exports
3 participants