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

fix: target tough-cookie 2.x to preserve node 6 support #33

Merged
merged 3 commits into from
Feb 14, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@
},
"dependencies": {
"request-promise-core": "1.1.1",
"stealthy-require": "^1.1.0",
"tough-cookie": ">=2.3.3"
"stealthy-require": "^1.1.1",
"tough-cookie": "^2.5.0"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix

},
"peerDependencies": {
"request": "^2.34"
"request": "^2.88.0"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jasonmit if you update the peer dep here you will need to update the dev dep below too. but why did you update the peer dep in the first place? is it required for the fix to work? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, removed! (Left over fragment as I was debugging the broken CI pipeline)

},
"devDependencies": {
"body-parser": "~1.15.2",
Expand Down
2 changes: 1 addition & 1 deletion test/spec/request-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ describe('Request-Promise-Native', function () {
var cookiejar = rp.jar();

expect(function () {
cookiejar.setCookie(sessionCookie, 'https://api.mydomain.com');
cookiejar.setCookie(sessionCookie.toString(), 'https://api.mydomain.com');
Copy link
Contributor Author

@jasonmit jasonmit Jan 9, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See: request/request-promise#277

Gets the CI back to being green for modern node versions. Likely a similar issue plagues Node 0.12.0 and iojs builds.

}).to.not.throw();

});
Expand Down