Skip to content

Commit

Permalink
fix: bump deps (closes #1742)
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Sep 29, 2022
1 parent 29fd1f9 commit 1fc9682
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 12,212 deletions.
1 change: 1 addition & 0 deletions .dist.babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
}
}]
],
"sourceType": "script",
"sourceMaps": "inline",
"comments": false
}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ coverage
lib
dist
*.swp
yarn.lock
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# superagent

[![build status](https://img.shields.io/travis/visionmedia/superagent.svg)](https://travis-ci.org/visionmedia/superagent)
[![code coverage](https://img.shields.io/codecov/c/github/visionmedia/superagent.svg)](https://codecov.io/gh/visionmedia/superagent)
[![code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/sindresorhus/xo)
[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)
[![made with lass](https://img.shields.io/badge/made_with-lass-95CC28.svg)](https://lass.js.org)
Expand Down
36 changes: 17 additions & 19 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,28 +27,27 @@
"formidable": "^2.0.1",
"methods": "^1.1.2",
"mime": "2.6.0",
"qs": "^6.10.3",
"readable-stream": "^3.6.0",
"qs": "^6.11.0",
"readable-stream": "^4.2.0",
"semver": "^7.3.7"
},
"devDependencies": {
"@babel/cli": "^7.17.10",
"@babel/core": "^7.18.5",
"@babel/plugin-transform-runtime": "^7.18.5",
"@babel/preset-env": "^7.18.2",
"@babel/runtime": "^7.18.3",
"@commitlint/cli": "16",
"@commitlint/config-conventional": "16",
"@babel/cli": "^7.19.3",
"@babel/core": "^7.19.3",
"@babel/plugin-transform-runtime": "^7.19.1",
"@babel/preset-env": "^7.19.3",
"@babel/runtime": "^7.19.0",
"@commitlint/cli": "17",
"@commitlint/config-conventional": "17",
"Base64": "^1.1.0",
"babelify": "^10.0.0",
"basic-auth-connect": "^1.0.0",
"body-parser": "^1.20.0",
"browserify": "^17.0.0",
"codecov": "^3.8.3",
"cookie-parser": "^1.4.6",
"cross-env": "^7.0.3",
"eslint": "^8.18.0",
"eslint-config-xo-lass": "1",
"eslint": "^8.24.0",
"eslint-config-xo-lass": "2",
"eslint-plugin-compat": "^4.0.2",
"eslint-plugin-node": "^11.1.0",
"express": "^4.18.1",
Expand All @@ -57,17 +56,17 @@
"get-port": "4.2.0",
"husky": "7",
"lint-staged": "12",
"marked": "^2.0.0",
"marked": "^4.1.0",
"mocha": "6.2.2",
"multer": "^1.4.4",
"multer": "1.4.5-lts.1",
"nyc": "^15.1.0",
"remark-cli": "^10.0.1",
"remark-preset-github": "4.0.3",
"remark-cli": "^11.0.0",
"remark-preset-github": "4.0.4",
"rimraf": "^3.0.2",
"should": "^13.2.3",
"should-http": "^0.1.1",
"tinyify": "^3.0.0",
"xo": "^0.49.0",
"tinyify": "^3.1.0",
"xo": "^0.52.3",
"zuul": "^3.12.0"
},
"engines": {
Expand Down Expand Up @@ -124,7 +123,6 @@
"build:dist": "npm run browserify && npm run minify",
"build:lib": "babel --config-file ./.lib.babelrc src --out-dir lib",
"build:test": "babel --config-file ./.test.babelrc test --out-dir lib/node/test",
"coverage": "nyc report --reporter=text-lcov > coverage.lcov && codecov",
"lint": "eslint -c .eslintrc src test && remark . -qfo && eslint -c .lib.eslintrc lib/**/*.js && eslint -c .dist.eslintrc dist/**/*.js",
"minify": "cross-env NODE_ENV=production browserify src/node/index.js -o dist/superagent.min.js -s superagent -g [ babelify --configFile ./.dist.babelrc ] -p tinyify",
"nyc": "cross-env NODE_ENV=test nyc ava",
Expand Down
4 changes: 1 addition & 3 deletions src/node/http2wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,6 @@ Request.prototype.createUnixConnection = function (authority, options) {
}
};

// eslint-disable-next-line no-unused-vars
Request.prototype.setNoDelay = function (bool) {
// We can not use setNoDelay with HTTP/2.
// Node 10 limits http2session.socket methods to ones safe to use with HTTP/2.
Expand All @@ -106,7 +105,7 @@ Request.prototype.getFrame = function () {
headers = Object.assign(headers, method);

const frame = this.session.request(headers);
// eslint-disable-next-line no-unused-vars

frame.once('response', (headers, flags) => {
headers = this.mapToHttpHeader(headers);
frame.headers = headers;
Expand Down Expand Up @@ -191,7 +190,6 @@ Request.prototype.end = function (data) {
frame.end(data);
};

// eslint-disable-next-line no-unused-vars
Request.prototype.abort = function (data) {
const frame = this.getFrame();
frame.close(NGHTTP2_CANCEL);
Expand Down
25 changes: 15 additions & 10 deletions test/node/multipart.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,9 +105,9 @@ describe('Multipart', () => {
error.code.should.equal('ENOENT');
error.message.should.containEql('ENOENT');
if (IS_WINDOWS) {
error.path.toLowerCase().should.equal(
getFullPath('foo').toLowerCase()
);
error.path
.toLowerCase()
.should.equal(getFullPath('foo').toLowerCase());
} else {
error.path.should.equal(getFullPath('foo'));
}
Expand All @@ -126,13 +126,14 @@ describe('Multipart', () => {
(err) => {
err.code.should.equal('ENOENT');
if (IS_WINDOWS) {
err.path.toLowerCase().should.equal(
getFullPath('does-not-exist.txt').toLowerCase()
);
err.path
.toLowerCase()
.should.equal(
getFullPath('does-not-exist.txt').toLowerCase()
);
} else {
err.path.should.equal(getFullPath('does-not-exist.txt'));
}

}
);
});
Expand Down Expand Up @@ -205,9 +206,13 @@ describe('Multipart', () => {
assert.ok(Boolean(error), 'Request should have failed.');
error.code.should.equal('ENOENT');
if (IS_WINDOWS) {
error.path.toLowerCase().should.equal(
getFullPath('test/node/fixtures/non-existent-file.ext').toLowerCase()
);
error.path
.toLowerCase()
.should.equal(
getFullPath(
'test/node/fixtures/non-existent-file.ext'
).toLowerCase()
);
} else {
error.path.should.equal(
getFullPath('test/node/fixtures/non-existent-file.ext')
Expand Down
4 changes: 2 additions & 2 deletions test/node/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
const assert = require('assert');
const utils =
process.env.OLD_NODE_TEST === '1'
// eslint-disable-next-line node/no-missing-require
? require('../../../utils')
? // eslint-disable-next-line node/no-missing-require
require('../../../utils')
: require('../../lib/utils');

describe('utils.type(str)', () => {
Expand Down

4 comments on commit 1fc9682

@yunnysunny
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we consider droping the old node support , since we bump to dependencies not compatibled with old node.

@titanism
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@titanism
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

PR welcome

@lamweili
Copy link
Contributor

Choose a reason for hiding this comment

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

The bumped dependencies that are not compatible with old Node.js are all devDependencies.
We can follow PR #1729 to remove them from old Node.js so that the CI can run.

I created a PR (#1744) for this.

Please sign in to comment.