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

chore: update workflows to use newer node js versions #549

Closed
wants to merge 10 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 commits
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
24 changes: 12 additions & 12 deletions .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest] # add windows-latest later
node-version: [14, 16]
node-version: [16, 18, 20, 22]

steps:
-
uses: actions/checkout@v2
uses: actions/checkout@v4
-
name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
-
name: Cache Node Modules
if: ${{ matrix.node-version == 16 }}
uses: actions/cache@v2
if: ${{ matrix.node-version == 20 }}
uses: actions/cache@v4
with:
path: |
node_modules
build
key: cache-${{ github.run_id }}-v16
key: cache-${{ github.run_id }}-v20
-
name: Install Dependencies
run: npm install
Expand All @@ -56,19 +56,19 @@ jobs:

steps:
-
uses: actions/checkout@v2
uses: actions/checkout@v4
-
name: Use Node.js 16
uses: actions/setup-node@v1
name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
-
name: Load Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
node_modules
build
key: cache-${{ github.run_id }}-v16
key: cache-${{ github.run_id }}-v20
-
run: npm run lint
24 changes: 12 additions & 12 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,25 +19,25 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest] # add windows-latest later
node-version: [14, 16]
node-version: [16, 18, 20, 22]

steps:
-
uses: actions/checkout@v2
uses: actions/checkout@v4
-
name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
-
name: Cache Node Modules
if: ${{ matrix.node-version == 16 }}
uses: actions/cache@v2
if: ${{ matrix.node-version == 20 }}
uses: actions/cache@v4
with:
path: |
node_modules
build
key: cache-${{ github.run_id }}-v16
key: cache-${{ github.run_id }}-v20
-
name: Install Dependencies
run: npm install
Expand All @@ -59,20 +59,20 @@ jobs:

steps:
-
uses: actions/checkout@v2
uses: actions/checkout@v4
-
name: Use Node.js 16
uses: actions/setup-node@v1
name: Use Node.js 20
uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
-
name: Load Cache
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: |
node_modules
build
key: cache-${{ github.run_id }}-v16
key: cache-${{ github.run_id }}-v20
-
run: npm run lint

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "proxy-chain",
"version": "2.5.2",
"version": "2.5.3",
"description": "Node.js implementation of a proxy server (think Squid) with support for SSL, authentication, upstream proxy chaining, and protocol tunneling.",
"main": "dist/index.js",
"keywords": [
Expand Down
4 changes: 3 additions & 1 deletion test/anonymize_proxy.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,9 @@ describe('utils.anonymizeProxy', function () {
assert.fail();
})
.catch((err) => {
expect(err.message).to.contain('ECONNREFUSED');
// ECONNREFUSED for Node.js <= 16
// socket hang up for Node.js >= 17
expect(['ECONNREFUSED', 'socket hang up']).to.include(err.message);
});
})
.then(() => {
Expand Down
4 changes: 3 additions & 1 deletion test/anonymize_proxy_no_password.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ describe('utils.anonymizeProxyNoPassword', function () {
assert.fail();
})
.catch((err) => {
expect(err.message).to.contain('ECONNREFUSED');
// ECONNREFUSED for Node.js <= 16
// socket hang up for Node.js >= 17
expect(['ECONNREFUSED', 'socket hang up']).to.include(err.message);
});
})
.then(() => {
Expand Down
Loading