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

Fixes missing peer dependencies #127

Closed
wants to merge 1 commit into from

Conversation

eoingroat
Copy link

In older npm/yarn setups a peer dependency can be satisfied anywhere to function, and its resolution is ambiguous; however in yarn berry (yarn v2) dependency resolution is strictly and unambiguously enforced.

In yarn berry environments snowflake-connector-nodejs fails to function due to missing peer dependencies; in this case "asn1.js" and "bn.js" are peerDependencies of some of snowflake-connector-nodejs's dependencies. This can be resolved in two ways:

  • Making the missing peerDependencies dependencies of snowflake-connector-nodejs
  • Making the missing peerDependencies into peerDependencies of snowflake-connector-nodejs (allowing the importing project to satisfy them).

Trying to set them as dependencies of the importing project without setting them as peerDependencies of snowflake-connector-nodejs (the traditional solution) will fail to unambiguously resolve the dependencies (due to broken dependency chain).

This PR resolves the issue with the first fix, that is to resolve the peerDependencies in this project.

@dynamikus
Copy link

Any plan to resolve this issue?
bn.js is used
https://github.com/snowflakedb/snowflake-connector-nodejs/blob/master/lib/agent/cert_util.js#L36
yet it dependency is not listed in package.json.
Not sure why the build failed in here but the change is simple.

@onesien
Copy link

onesien commented Apr 13, 2021

Just ran into this issue also. Any update?

@danmactough
Copy link

Bump. This is also a problem for anyone using this library together with a bundler (like Webpack), as one might do in a Lambda on AWS.

@eoingroat eoingroat force-pushed the master branch 2 times, most recently from ecf29f5 to 361f023 Compare April 17, 2021 00:40
@eoingroat
Copy link
Author

I've rebased the branch onto upstream/master.

The tests are failing with:

Run ./ci/test.sh
...
gpg: gcry_kdf_derive failed: Invalid data
gpg: decryption failed: No secret key
Error: Process completed with exit code 2.

I expect it is because a variable is injected on the main branch, or branches owned by project maintainers, that is not present when triggered by myself.

@github-actions
Copy link

github-actions bot commented Apr 7, 2022

CLA Assistant Lite bot:
Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request

@eoingroat
Copy link
Author

I have read the CLA Document and I hereby sign the CLA

@eoingroat
Copy link
Author

recheck

@sfc-gh-dszmolka
Copy link
Collaborator

this has been fixed in the past with another PR, closing

@github-actions github-actions bot locked and limited conversation to collaborators Oct 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants