-
Notifications
You must be signed in to change notification settings - Fork 7
[DRAFT] Make Babel plugin more "compatible" with Node.js; emit requireNodeAddons() with 3 args
#105
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
Closed
Closed
Changes from 4 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
0a106e5
feat(babel): add 2 params to requireNodeAddon(); respect package entr…
6725125
refactor: extract `findNodeAddonForBindings()`
c64891f
feat: add shortcut to `isNodeApiModule()`
2d17eb6
feat: relax the condition for CJS modules without file exts
8bb3e77
style: address linter issues
0ed5259
feat: extract path normalization from `determineModuleContext()`
4dcf2fd
feat: update tests to cover `determineNormalizedModuleContext()`
9bb9eec
feat: add test for scoped package names
4154615
feat: update tests for 3 arg `requireNodeAddon()`
ee87dd0
feat: remove xcframework dir from test code
a60c848
feat: change the third param to original path
41d4ebb
feat: add test case for require with "main" entry point
5596273
fix: remove unused `requiredFrom` parameter
d23fe0b
fix: remove unsupported babel option "naming"
63725af
feat: add tests for `findNodeAddonsForBindings()`
25b55da
fix: ensure that module paths use only forward slash (esp. on Windows)
e5c28a7
feat: add test case for addon that "escaped" its package
7106775
feat: make `resolvedPath` optional as suggested by Kraen
47db302
feat: run each test case as separate call to `it()`
8e1c278
chore: move `findNodeAddonForBindings()` to path-utils
4aa8549
chore: rename `originalPath` parameter to `originalId`
a431e8e
chore: replace `[].forEach()` with for-of
446b1a4
feat: move path slash normalization to determineModuleContext()
cdf1316
chore: use more descriptive variable names
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not feeling strong for this, but its a bit more semantic to use the constants:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be good to have a test for this too?