-
Notifications
You must be signed in to change notification settings - Fork 152
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(cli): add flags to handle native deps #2567
Conversation
🦋 Changeset detectedLatest commit: d283433 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
854b560
to
439c962
Compare
439c962
to
90285e4
Compare
8be7a10
to
1eccb58
Compare
This change introduces two new flags to the CLI to handle transitive dependencies on packages containing native modules. `--allow-native-package [package-name...]` to selectively allow native packages when exporting a dynamic plugin and allowing it's installation into the exported dynamic plugin and `--suppress-native-package [package-name..]` which replaces the native package with an empty package during export, preventing the native package's inclusion into the exported dynamic plugin's private dependencies. Signed-off-by: Stan Lewis <[email protected]>
1eccb58
to
d283433
Compare
Quality Gate passedIssues Measures |
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.
Only one comment about possibly completing the error message.
Buy apart from that it's very nice !
path.join(target, 'embedded', toSuppress, 'index.js'), | ||
` | ||
throw new Error( | ||
'The package "${toSuppress}" has been marked as a native module and removed from this dynamic plugin package "${derivedPackageName}"' |
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.
Maybe add the fact that it is throwing an error because loading native modules from a dynamic backend plugin is currently not supported
?
This change introduces two new flags to the CLI to handle transitive dependencies on packages containing native modules. `--allow-native-package [package-name...]` to selectively allow native packages when exporting a dynamic plugin and allowing it's installation into the exported dynamic plugin and `--suppress-native-package [package-name..]` which replaces the native package with an empty package during export, preventing the native package's inclusion into the exported dynamic plugin's private dependencies. Signed-off-by: Stan Lewis <[email protected]>
This change introduces two new flags to the CLI to handle transitive dependencies on packages containing native modules.
--allow-native-package [package-name...]
to selectively allow native packages when exporting a dynamic plugin and allowing it's installation into the exported dynamic plugin and--suppress-native-package [package-name..]
which replaces the native package with an empty package during export, preventing the native package's inclusion into the exported dynamic plugin's private dependencies.