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

fix: modify module loader to look in parent directories #144

Merged
merged 1 commit into from
Jan 5, 2023

Conversation

lance
Copy link
Member

@lance lance commented Dec 15, 2022

This resolves issues where function source may be in a subdirectory, for example ./build in a TypeScript project.

Fixes: #143

Signed-off-by: Lance Ball lball@redhat.com

@codecov-commenter
Copy link

codecov-commenter commented Dec 15, 2022

Codecov Report

Merging #144 (d936f51) into main (14297d2) will decrease coverage by 0.41%.
The diff coverage is 87.50%.

@@            Coverage Diff             @@
##             main     #144      +/-   ##
==========================================
- Coverage   92.40%   91.98%   -0.42%     
==========================================
  Files           9        9              
  Lines         250      262      +12     
==========================================
+ Hits          231      241      +10     
- Misses         19       21       +2     
Impacted Files Coverage Δ
lib/function-loader.js 92.30% <87.50%> (-7.70%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

lib/function-loader.js Outdated Show resolved Hide resolved
lib/function-loader.js Outdated Show resolved Hide resolved
lholmquist
lholmquist previously approved these changes Dec 16, 2022
Copy link
Member

@lholmquist lholmquist left a comment

Choose a reason for hiding this comment

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

LGTM

lib/function-loader.js Outdated Show resolved Hide resolved
@lance
Copy link
Member Author

lance commented Dec 16, 2022

@matejvasek @lholmquist I've added windows compatibility and tests - ptal

This resolves issues where function source may be in a subdirectory, for
example `./build` in a TypeScript project.

Fixes: nodeshift#143

Signed-off-by: Lance Ball <lball@redhat.com>
@matejvasek
Copy link
Contributor

/lgtm

@lance lance merged commit 2a1e618 into nodeshift:main Jan 5, 2023
@lance lance deleted the 143-esm-on-typescript branch January 5, 2023 16:11
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.

ESM module loader fails on TypeScript projects
4 participants