-
Notifications
You must be signed in to change notification settings - Fork 0
[Snyk] Fix for 2 vulnerabilities #20
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -17,13 +17,13 @@ | |
| "test": "repo-tools test run --cmd npm -- run cover" | ||
| }, | ||
| "dependencies": { | ||
| "@google-cloud/pubsub": "0.16.2", | ||
| "@google-cloud/pubsub": "0.20.0", | ||
| "yargs": "10.1.2" | ||
| }, | ||
| "devDependencies": { | ||
| "@google-cloud/nodejs-repo-tools": "3.3.0", | ||
| "ava": "^0.25.0", | ||
| "nyc": "^11.3.0", | ||
| "ava": "^4.0.0", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The upgrade of
To resolve this, the tests need to be migrated to use |
||
| "nyc": "^15.0.0", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Upgrading
The |
||
| "proxyquire": "1.8.0", | ||
| "sinon": "4.5.0", | ||
| "uuid": "^3.1.0" | ||
|
|
||
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.
Upgrading
@google-cloud/pubsubto version0.20.0introduces several breaking changes that will cause runtime errors in the sample code:google-gaxdropped support for Node.js 4), which conflicts with the"node": ">=4.3.2"requirement inpackage.json(line 12).Topic#publisher: In version0.17.0and later,Topic#publisherbecame a property instead of a method. The sample filesamples/topics.jscalls it as a method (e.g., line 120:.publisher()), which will throw aTypeError.IAM#setPolicy: In version0.18.0and later, thePromisereturned bysetPolicyresolves with thePolicyobject directly, not an array. The code insamples/subscriptions.js(line 501) expects an array (results[0]) and will fail.To fix this, the application code needs to be updated to match the new API, and the
enginesfield inpackage.jsonmust be updated to reflect the new Node.js version requirement.