Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

refactor(deps)!: Remove html-entities dependency #1907

Open

Description

@danielbankhead

Remove ent & @types/ent dependencies - they do not seem necessary given the context of its usage.

Perhaps decodeURI would work as an alternative.

Activity

  1. added
    type: cleanupAn internal cleanup or hygiene concern.
    priority: p3Desirable enhancement or fix. May not be included in next release.
    on May 5, 2022
  2. changed the title [-]refactor(deps): `ent` dependency[/-] [+]refactor(deps): Remove `ent` dependency[/+] on May 5, 2022
  3. ddelgrosso1 commented on Aug 2, 2022

    @ddelgrosso1
    Contributor

    I do not believe this to be easy to remove. The reason it is imported is that under certain situations (rate limiting if I remember correctly) the GCS API will return a response in HTML. Currently Ent is used to decode the returned HTML. I spoke with other client library owners and while they do not parse the HTML like Node does, if we were to remove this it would be a breaking change. We have two choices, close this issue as will not fix or move it until our next major release which is tentatively scheduled for Spring 2023.

  4. changed the title [-]refactor(deps): Remove `ent` dependency[/-] [+]refactor(deps)!: Remove `ent` dependency[/+] on Aug 12, 2022
  5. luc122c commented on Nov 18, 2023

    @luc122c

    Hi, I think this needs revisting. ent relies on the deprecated punycode module. This is now causing issues in Node v21.x.

  6. ddelgrosso1 commented on Nov 19, 2023

    @ddelgrosso1
    Contributor

    Hi @luc122c thanks for the heads up. I will take another look and see if there is a way we can remove ent without causing a breaking change.

  7. drichardson commented on Jan 11, 2024

    @drichardson

    Not sure if it's a drop in replacement, but perhaps https://www.npmjs.com/package/entities could be used to replace ent (which hasn't been updated in 9 years).

  8. ddelgrosso1 commented on Jan 11, 2024

    @ddelgrosso1
    Contributor

    @drichardson thanks for the heads up. I will poke around in entities to see if it meets our needs.

  9. drichardson commented on Jan 11, 2024

    @drichardson

    @ddelgrosso1 Whoops I just saw your note after making a branch using a different library called he which is pretty old and boring which seemed good for this 😄.

  10. cfdavidpetter commented on Apr 18, 2024

    @cfdavidpetter

    @luc122c @ddelgrosso1
    I'm having trouble with this in today's latest version.

    FROM node:latest

  11. ddelgrosso1 commented on Apr 18, 2024

    @ddelgrosso1
    Contributor

    @cfdavidpetter this issue for removing ent which has not been done. If you are having another issue please feel free to open a new one.

  12. cfdavidpetter commented on Apr 18, 2024

    @cfdavidpetter

    @ddelgrosso1 my problem is this:

    (node:8) [DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead. at node:punycode:3:9 at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:398:7) at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:337:10) at loadBuiltinModule (node:internal/modules/helpers:104:7) at Module._load (node:internal/modules/cjs/loader:999:17) at Module.require (node:internal/modules/cjs/loader:1230:19) at require (node:internal/modules/helpers:179:18) at Object.<anonymous> (/app/node_modules/whatwg-url/lib/url-state-machine.js:2:18) at Module._compile (node:internal/modules/cjs/loader:1368:14) at Module._extensions..js (node:internal/modules/cjs/loader:1426:10)

    dependencies:
    "@google-cloud/storage": "^7.10.0",
    
  13. ddelgrosso1 commented on Apr 18, 2024

    @ddelgrosso1
    Contributor

    Thanks @cfdavidpetter we are aware of the deprecation of punycode and plan to remove ent in the next major version of the storage library.

  14. danielbankhead commented on Apr 27, 2024

    @danielbankhead
    ContributorAuthor
  15. ddelgrosso1 commented on Apr 29, 2024

    @ddelgrosso1
    Contributor

    Thanks @danielbankhead this is probably a good stop gap before next major version where I hope to remove the dependency altogether.

  16. ddelgrosso1 commented on Apr 29, 2024

    @ddelgrosso1
    Contributor
  17. ddelgrosso1 commented on Apr 29, 2024

    @ddelgrosso1
    Contributor

    Ent has been replaced with html-entities for the time being. I still intend to remove this functionality in the next major version. Going to update the title of this issue accordingly.

  18. changed the title [-]refactor(deps)!: Remove `ent` dependency[/-] [+]refactor(deps)!: Remove `html-entities` dependency[/+] on Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    api: storageIssues related to the googleapis/nodejs-storage API.next major: breaking changethis is a change that we should wait to bundle into the next major versionpriority: p3Desirable enhancement or fix. May not be included in next release.type: cleanupAn internal cleanup or hygiene concern.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions