Skip to content

Commit dd04c48

Browse files
Drarig29sofisl
andauthored
chore(deps): replace ent with html-entities (#813)
Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com>
1 parent d3e04a8 commit dd04c48

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

core/common/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@
3636
"@google-cloud/promisify": "^4.0.0",
3737
"arrify": "^2.0.1",
3838
"duplexify": "^4.1.1",
39-
"ent": "^2.2.0",
4039
"extend": "^3.0.2",
4140
"google-auth-library": "^9.0.0",
41+
"html-entities": "^2.5.2",
4242
"retry-request": "^7.0.0",
4343
"teeny-request": "^9.0.0"
4444
},

core/common/src/util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import {
2020
replaceProjectIdToken,
2121
MissingProjectIdError,
2222
} from '@google-cloud/projectify';
23-
import * as ent from 'ent';
23+
import * as htmlEntities from 'html-entities';
2424
import * as extend from 'extend';
2525
import {AuthClient, GoogleAuth, GoogleAuthOptions} from 'google-auth-library';
2626
import {CredentialBody} from 'google-auth-library';
@@ -291,7 +291,7 @@ export class ApiError extends Error {
291291
if (errors && errors.length) {
292292
errors.forEach(({message}) => messages.add(message!));
293293
} else if (err.response && err.response.body) {
294-
messages.add(ent.decode(err.response.body.toString()));
294+
messages.add(htmlEntities.decode(err.response.body.toString()));
295295
} else if (!err.message) {
296296
messages.add('A failure occurred during this request.');
297297
}

0 commit comments

Comments
 (0)