-
Notifications
You must be signed in to change notification settings - Fork 46
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
chore(dependencies): Update superagent version #114
Conversation
src/superagent-mock.js
Outdated
} else { | ||
// superagent < 3.6 | ||
|
||
if (isNodeServer) { // node server | ||
const originalPath = this.path; | ||
this.path = this.url; | ||
this._appendQueryString(this); // use superagent implementation of adding the query | ||
path = this.path; // save the url together with the query | ||
this.path = originalPath; // reverse the addition of query to path by _appendQueryString | ||
} else { // client | ||
const originalUrl = this.url; | ||
this._appendQueryString(this); // use superagent implementation of adding the query | ||
path = this.url; // save the url together with the query | ||
this.url = originalUrl; // reverse the addition of query to url by _appendQueryString | ||
} |
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.
I change only this in this file
All other modification is prettier
65a5015
to
79946af
Compare
79946af
to
b4bae73
Compare
615432a
to
d0ee3c8
Compare
.eslintrc
Outdated
@@ -7,7 +7,6 @@ | |||
"no-underscore-dangle": 0, | |||
"no-use-before-define": [2, "nofunc"], | |||
"max-len": [2, 150, 2], | |||
"quotes": [2, "single"], |
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.
Why this change? 👀 It generates a lot of noise in this PR 😕
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.
My prettier modifie all files with " "
instead of ' '
and
I can't do this :
"quotes": [2, "single", "double"]
So I removed it instead of revert all prettier modifications
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.
I just saw your comment above but it is not a good reason to change lint rules in this project 😄 You should find why your prettier is misconfigured. Maybe a .prettierrc
is missing here.
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.
Yes it was planned but you are too fast for review 😅
@@ -10,8 +10,8 @@ jobs: | |||
runs-on: ubuntu-latest | |||
strategy: | |||
matrix: | |||
node-version: [10.x, 12.x, 14.x, 15.x] |
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.
We should maybe keep the compatibility with node 16 because it's a LTS 🦒
package.json
Outdated
@@ -16,10 +16,10 @@ | |||
"url": "https://github.com/M6Web/superagent-mock" | |||
}, | |||
"engines": { | |||
"node": ">=10" | |||
"node": "^18.0.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.
As said above, maybe 16 is better
5b2362d
to
008667d
Compare
.prettierrc
Outdated
{ | ||
"singleQuote": true, | ||
"printWidth": 120, | ||
"trailingComma": "all", | ||
"bracketSpacing": false | ||
} |
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.
This rules come from app-bedrock-web
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.
It is a best practice to separate the refacto of prettier and the new code you want to add, here we can't see if a modification comes from the prettier refacto or not
}, | ||
"peerDependencies": { | ||
"superagent": ">=3.6.0" | ||
"superagent": ">=8.0.9" |
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.
Why is superagent a peer dependency instead of direct dependency ?
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.
superagent-mock
is not in responsibility for installing superagent
in the project where it is used
.prettierrc
Outdated
{ | ||
"singleQuote": true, | ||
"printWidth": 120, | ||
"trailingComma": "all", | ||
"bracketSpacing": false | ||
} |
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.
It is a best practice to separate the refacto of prettier and the new code you want to add, here we can't see if a modification comes from the prettier refacto or not
yarn.lock
Outdated
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.
Are we not supposed to move all projects to pnpm ?
@@ -10,7 +10,6 @@ module.exports = function (request, config, isServer) { | |||
currentLog = log; | |||
}; | |||
var superagentPackage = require('superagent/package.json'); | |||
var superagentUserAgentHeader = isServer ? {'User-Agent': 'node-superagent/' + superagentPackage.version} : {}; |
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.
Why does this have been removed ?
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.
The user agent is no longer set by the superagent library, so there's no point in testing its presence on the superagent-mock side
e9e3dca
to
e9d22a6
Compare
e9d22a6
to
f4fe7db
Compare
We want to update the superagent version