Skip to content

Commit 8f9958e

Browse files
author
William
authored
Merge pull request #10 from scality/improvement/ARSNN-3
Bump package dependencies
2 parents 66e97ab + 3e737a5 commit 8f9958e

File tree

12 files changed

+240
-807
lines changed

12 files changed

+240
-807
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc.cjs

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/dependabot.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
version: 2
3+
updates:
4+
- package-ecosystem: "npm"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
8+
reviewers:
9+
- "scality/object"
10+
- package-ecosystem: "github-actions"
11+
directory: "/"
12+
schedule:
13+
interval: "daily"
14+
open-pull-requests-limit: 10
15+
reviewers:
16+
- "scality/object"

.github/workflows/release.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
---
12
name: release
3+
run-name: release ${{ inputs.tag }}
24

35
on:
46
workflow_dispatch:
@@ -13,7 +15,7 @@ jobs:
1315
runs-on: ubuntu-latest
1416
steps:
1517
- name: Checkout httpagent repository
16-
uses: 'actions/checkout@v3'
18+
uses: 'actions/checkout@v4'
1719
with:
1820
ref: ${{ github.ref }}
1921

@@ -33,7 +35,7 @@ jobs:
3335
- verify-release
3436
steps:
3537
- name: Create Release
36-
uses: softprops/action-gh-release@v1
38+
uses: softprops/action-gh-release@v2
3739
env:
3840
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3941
with:

.github/workflows/tests.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ jobs:
2020
runs-on: ubuntu-latest
2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2424
- name: Install deps
2525
run: sudo apt-get update -q
2626
- uses: actions/setup-node@v3
2727
with:
28-
node-version: '16'
28+
node-version: '20'
2929
- name: Install Yarn
3030
run: npm install -g yarn
3131
- name: install dependencies

eslint.config.mjs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import path from 'node:path';
2+
import { fileURLToPath } from 'node:url';
3+
import js from '@eslint/js';
4+
import { FlatCompat } from '@eslint/eslintrc';
5+
6+
const __filename = fileURLToPath(import.meta.url);
7+
const __dirname = path.dirname(__filename);
8+
const compat = new FlatCompat({
9+
baseDirectory: __dirname,
10+
recommendedConfig: js.configs.recommended,
11+
allConfig: js.configs.all
12+
});
13+
14+
export default [...compat.extends('scality'), {
15+
languageOptions: {
16+
ecmaVersion: 2020,
17+
sourceType: 'module',
18+
},
19+
}];

index.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
1-
/* eslint-disable global-require */
2-
31
exports.http = {
4-
Agent: require('./lib/http-agent').default,
2+
Agent: require('./lib/http-agent').default,
53
};
64

75
exports.https = {
8-
Agent: require('./lib/https-agent').default,
6+
Agent: require('./lib/https-agent').default,
97
};
108

119
exports.AgentConfiguration = require('./lib/config/agentConfiguration').default;

lib/config/agentConfiguration.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ const maxSocketsNumber = Number(process.env.MAX_SOCKETS) || 50;
99
* handle load.
1010
*/
1111
const agentConfiguration = {
12-
keepAlive: true,
13-
maxSockets: maxSocketsNumber,
14-
maxFreeSockets: maxSocketsNumber,
12+
keepAlive: true,
13+
maxSockets: maxSocketsNumber,
14+
maxFreeSockets: maxSocketsNumber,
1515
};
1616

1717
exports.default = agentConfiguration;

lib/http-agent.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ const agentConfiguration = require('./config/agentConfiguration');
77
* networking configuration across components.
88
*/
99
class AgentHttp extends HttpAgent {
10-
/**
10+
/**
1111
* Constructor for the AgentHttp class
1212
*
1313
* @param opts - Custom HTTP Agent options
1414
* @param config - user-defined default configuration to apply
1515
*/
16-
constructor(opts, config = {
17-
maxSockets: true,
18-
}) {
16+
constructor(opts, config = {
17+
maxSockets: true,
18+
}) {
1919
// Enforce TCP session reuse configuration, unless explicitely specified.
20-
let defaultConfigurations = {};
21-
if (config.maxSockets) {
22-
defaultConfigurations = agentConfiguration;
20+
let defaultConfigurations = {};
21+
if (config.maxSockets) {
22+
defaultConfigurations = agentConfiguration;
23+
}
24+
super({ ...opts, ...defaultConfigurations });
2325
}
24-
super({ ...opts, ...defaultConfigurations });
25-
}
2626
}
2727

2828
exports.default = AgentHttp;

lib/https-agent.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,22 @@ const agentConfiguration = require('./config/agentConfiguration');
77
* networking configuration across components.
88
*/
99
class AgentHttps extends HttpsAgent {
10-
/**
10+
/**
1111
* Constructor for the AgentHttps class
1212
*
1313
* @param opts - Custom HTTPs Agent options
1414
* @param config - user-defined default configuration to apply
1515
*/
16-
constructor(opts, config = {
17-
maxSockets: true,
18-
}) {
16+
constructor(opts, config = {
17+
maxSockets: true,
18+
}) {
1919
// Enforce TCP session reuse configuration, unless explicitely specified.
20-
let defaultConfigurations = {};
21-
if (config.maxSockets) {
22-
defaultConfigurations = agentConfiguration;
20+
let defaultConfigurations = {};
21+
if (config.maxSockets) {
22+
defaultConfigurations = agentConfiguration;
23+
}
24+
super({ ...opts, ...defaultConfigurations });
2325
}
24-
super({ ...opts, ...defaultConfigurations });
25-
}
2626
}
2727

2828
exports.default = AgentHttps;

0 commit comments

Comments
 (0)