Skip to content

Commit

Permalink
Node v22+ is now alerting about deprecation of util._extend and sug…
Browse files Browse the repository at this point in the history
…gests using Object.assign instead.
  • Loading branch information
morta committed Feb 4, 2025
1 parent 9cae043 commit 689c7d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/agent/check.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@

const http = require('http');
const url = require('url');
const util = require('util');

const ocsp = require('@techteamer/ocsp');
const rfc2560 = require('asn1.js-rfc2560');
Expand All @@ -57,7 +56,7 @@ function getResponse(uri, req, cb) {
uri = url.parse(uri);

const timeout = process.env.SF_OCSP_TEST_OCSP_RESPONDER_TIMEOUT || 10000;
const options = util._extend({
const options = Object.assign({
timeout: Number(timeout),
method: 'POST',
headers: {
Expand Down
3 changes: 1 addition & 2 deletions lib/agent/ocsp_response_cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

const http = require('http');
const url = require('url');
const util = require('util');

const path = require('path');
const fs = require('fs');
Expand Down Expand Up @@ -270,7 +269,7 @@ function OcspResponseCache() {

const uri = url.parse(OCSP_URL);
const timeout = process.env.SF_OCSP_TEST_OCSP_RESPONSE_CACHE_SERVER_TIMEOUT || 5000;
const options = util._extend({
const options = Object.assign({
timeout: Number(timeout),
method: 'GET',
agent: proxyAgent,
Expand Down

0 comments on commit 689c7d0

Please sign in to comment.