Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
5 changes: 4 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,8 @@ module.exports = {
'digitalbazaar/jsdoc',
'digitalbazaar/module'
],
ignorePatterns: ['dist/']
ignorePatterns: ['dist/'],
rules: {
'unicorn/prefer-node-protocol': 'error'
}
};
33 changes: 17 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
node-version: [20.x]
node-version: [22.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
Expand All @@ -24,16 +24,16 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
node-version: [18.x, 20.x]
node-version: [18.x, 20.x, 22.x]
steps:
- uses: actions/checkout@v3
- name: Install with Node.js 20.x
uses: actions/setup-node@v3
- uses: actions/checkout@v4
- name: Install with Node.js 22.x
uses: actions/setup-node@v4
with:
node-version: 20.x
node-version: 22.x
- run: npm install
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Run ESM test with Node.js ${{ matrix.node-version }}
Expand All @@ -46,11 +46,11 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
node-version: [20.x]
node-version: [22.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
Expand All @@ -62,18 +62,19 @@ jobs:
timeout-minutes: 10
strategy:
matrix:
node-version: [20.x]
node-version: [22.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- name: Generate coverage report
run: npm run coverage-ci
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
file: ./coverage/lcov.info
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# @digitalbazaar/http-client ChangeLog

## 4.2.0 - 2025-03-xx

### Changed
- Update dependencies.
- `[email protected]`.
- `[email protected]`.
- Update dev dependencies.
- Update test dependencies.

## 4.1.1 - 2024-02-21

### Fixed
Expand Down
35 changes: 17 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,39 +30,38 @@
"coverage": "cross-env NODE_ENV=test c8 npm run test-node",
"coverage-ci": "cross-env NODE_ENV=test c8 --reporter=lcovonly --reporter=text-summary --reporter=text npm run test-node",
"coverage-report": "c8 report",
"lint": "eslint --ignore-pattern rollup.config.js ."
"lint": "eslint --ext .cjs,.js --ignore-pattern rollup.config.js ."
},
"files": [
"lib/*",
"dist/*"
],
"dependencies": {
"ky": "^1.0.1",
"undici": "^6.6.2"
"ky": "^1.7.5",
"undici": "^6.21.2"
},
"devDependencies": {
"c8": "^7.13.0",
"chai": "^4.3.7",
"c8": "^10.1.3",
"chai": "^4.5.0",
"cors": "^2.8.5",
"cross-env": "^7.0.3",
"delay": "^5.0.0",
"detect-node": "^2.1.0",
"eslint": "^8.38.0",
"eslint-config-digitalbazaar": "^4.2.0",
"eslint-plugin-jsdoc": "^41.1.1",
"eslint-plugin-unicorn": "^46.0.0",
"express": "^4.18.2",
"karma": "^6.4.1",
"eslint": "^8.57.1",
"eslint-config-digitalbazaar": "^5.2.0",
"eslint-plugin-jsdoc": "^50.6.9",
"eslint-plugin-unicorn": "^56.0.1",
"express": "^4.21.2",
"karma": "^6.4.4",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^3.1.1",
"karma-chrome-launcher": "^3.2.0",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-sourcemap-loader": "^0.4.0",
"karma-webpack": "^5.0.0",
"mocha": "^10.2.0",
"rimraf": "^5.0.0",
"rollup": "^3.20.2",
"webpack": "^5.79.0"
"karma-webpack": "^5.0.1",
"mocha": "^11.1.0",
"rimraf": "^6.0.1",
"rollup": "^4.37.0",
"webpack": "^5.98.0"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion rollup.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import pkg from './package.json' assert {type: 'json'};
import pkg from './package.json' with {type: 'json'};

function preserveDynamicImportPlugin() {
return {
Expand Down
12 changes: 6 additions & 6 deletions tests/utils.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
*/
'use strict';

const {setTimeout} = require('node:timers/promises');
const cors = require('cors');
const delay = require('delay');
const express = require('express');
const fs = require('fs').promises;
const http = require('http');
const https = require('https');
const path = require('path');
const fs = require('node:fs').promises;
const http = require('node:http');
const https = require('node:https');
const path = require('node:path');

const api = {};
module.exports = api;
Expand Down Expand Up @@ -95,7 +95,7 @@ function createApp() {
});

app.get('/delay/:seconds', cors(), async (req, res) => {
await delay(req.params.seconds * 1000);
await setTimeout(req.params.seconds * 1000);
res.status(200).send();
});

Expand Down