-
Notifications
You must be signed in to change notification settings - Fork 42
Support optional peer dependencies via packageJson.peerDependenciesMeta
#44
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
Conversation
via `peerDependenciesMeta`
|
cool! can you add some tests? |
|
@seanmarthur I've added an example test using your code here dryror@a168712. Would love to see this merged in, but didn't want to take over your PR. :) |
Merge tests for OptionalDependencies
|
I merged the tests written by @dryror into my repo so they are now included in this PR. Pls review/verify them - I cannot test locally at the moment. |
|
@dougmoscrop any chance of getting this merged in now that there are tests? 🍻 |
|
Yes sorry! Today is a holiday in Canuckistan but I'll get to it tomorrow
…On Mon., Feb. 17, 2020, 1:26 p.m. Rory Drysdale, ***@***.***> wrote:
@dougmoscrop <https://github.com/dougmoscrop> any chance of getting this
merged in now that there are tests? 🍻
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#44?email_source=notifications&email_token=AAEPGFERBKOLSEAUIFN7LW3RDLJGJA5CNFSM4J2FBHI2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEL7KBMQ#issuecomment-587112626>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAEPGFCNS4MBZDLZFSJM62TRDLJGJANCNFSM4J2FBHIQ>
.
|
Great, thanks @dougmoscrop |
|
Sorry to keep bugging you @dougmoscrop, but any chance of getting this merged in? Would love to update my knex dependency, but this is preventing me from being able to. 🍻 |
|
no need to apologize I appreciate the reminder* |
I am not quite sure how to properly write a test to support this use case, but this code is tested against my serverless project.
A reproduction case would be to add the
knexpackage to a serverless project. Theknexpackage.jsonlooks like this:knexwill only be used with a maximum of 1 of those peer dependencies, and they are specified as optional via thepeerDependenciesMetaconfig. Without the code change in this PR, the build will fail, complaining about one of those dependencies being missing (Error: [serverless-plugin-include-dependencies]: Could not find mssql.)