Skip to content

Commit

Permalink
chore(deps): replace ent with html-entities to avoid punycode depreca…
Browse files Browse the repository at this point in the history
…tion warnings (#2451)
  • Loading branch information
ddelgrosso1 committed May 3, 2024
1 parent 4e5726f commit 13e29f7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@
"abort-controller": "^3.0.0",
"async-retry": "^1.3.3",
"duplexify": "^4.1.3",
"ent": "^2.2.0",
"fast-xml-parser": "^4.3.0",
"gaxios": "^6.0.2",
"google-auth-library": "^9.6.3",
"html-entities": "^2.5.2",
"mime": "^3.0.0",
"p-limit": "^3.0.1",
"retry-request": "^7.0.0",
Expand All @@ -95,7 +95,6 @@
"@grpc/grpc-js": "^1.0.3",
"@grpc/proto-loader": "^0.7.0",
"@types/async-retry": "^1.4.3",
"@types/ent": "^2.2.1",
"@types/mime": "^3.0.0",
"@types/mocha": "^9.1.1",
"@types/mockery": "^1.4.29",
Expand Down
4 changes: 2 additions & 2 deletions src/nodejs-common/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import {
replaceProjectIdToken,
MissingProjectIdError,
} from '@google-cloud/projectify';
import * as ent from 'ent';
import * as htmlEntities from 'html-entities';
import {AuthClient, GoogleAuth, GoogleAuthOptions} from 'google-auth-library';
import {CredentialBody} from 'google-auth-library';
import * as r from 'teeny-request';
Expand Down Expand Up @@ -311,7 +311,7 @@ export class ApiError extends Error {
if (errors && errors.length) {
errors.forEach(({message}) => messages.add(message!));
} else if (err.response && err.response.body) {
messages.add(ent.decode(err.response.body.toString()));
messages.add(htmlEntities.decode(err.response.body.toString()));
} else if (!err.message) {
messages.add('A failure occurred during this request.');
}
Expand Down

0 comments on commit 13e29f7

Please sign in to comment.