Skip to content

Commit 13e29f7

Browse files
authored
chore(deps): replace ent with html-entities to avoid punycode deprecation warnings (#2451)
1 parent 4e5726f commit 13e29f7

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@
7878
"abort-controller": "^3.0.0",
7979
"async-retry": "^1.3.3",
8080
"duplexify": "^4.1.3",
81-
"ent": "^2.2.0",
8281
"fast-xml-parser": "^4.3.0",
8382
"gaxios": "^6.0.2",
8483
"google-auth-library": "^9.6.3",
84+
"html-entities": "^2.5.2",
8585
"mime": "^3.0.0",
8686
"p-limit": "^3.0.1",
8787
"retry-request": "^7.0.0",
@@ -95,7 +95,6 @@
9595
"@grpc/grpc-js": "^1.0.3",
9696
"@grpc/proto-loader": "^0.7.0",
9797
"@types/async-retry": "^1.4.3",
98-
"@types/ent": "^2.2.1",
9998
"@types/mime": "^3.0.0",
10099
"@types/mocha": "^9.1.1",
101100
"@types/mockery": "^1.4.29",

src/nodejs-common/util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
replaceProjectIdToken,
2323
MissingProjectIdError,
2424
} from '@google-cloud/projectify';
25-
import * as ent from 'ent';
25+
import * as htmlEntities from 'html-entities';
2626
import {AuthClient, GoogleAuth, GoogleAuthOptions} from 'google-auth-library';
2727
import {CredentialBody} from 'google-auth-library';
2828
import * as r from 'teeny-request';
@@ -311,7 +311,7 @@ export class ApiError extends Error {
311311
if (errors && errors.length) {
312312
errors.forEach(({message}) => messages.add(message!));
313313
} else if (err.response && err.response.body) {
314-
messages.add(ent.decode(err.response.body.toString()));
314+
messages.add(htmlEntities.decode(err.response.body.toString()));
315315
} else if (!err.message) {
316316
messages.add('A failure occurred during this request.');
317317
}

0 commit comments

Comments
 (0)