Skip to content

🐛 BUG: deprecated dependencies #6189

Description

@benmccann

Which Cloudflare product(s) does this pertain to?

Wrangler core

What version(s) of the tool(s) are you using?

3.62.0

What version of Node are you using?

No response

What operating system and version are you using?

any

Describe the Bug

Wrangler has deprecated packages in its dependency tree, which causes deprecation warnings for us when doing pnpm install

https://npmgraph.js.org/?q=wrangler

Screenshot from 2024-07-02 11-09-38

It looks like you need to switch from @esbuild-plugins/node-modules-polyfill to esbuild-plugin-polyfill-node

Please provide a link to a minimal reproduction

pnpm install wrangler

Please provide any relevant error logs

 WARN  2 deprecated subdependencies found: rollup-plugin-inject@3.0.2, sourcemap-codec@1.4.8

Activity

  1. petebacondarwin commented on Jul 8, 2024

    @petebacondarwin
    Contributor

    This was discussed at some length in #1232.
    The current plan is to move to a completely new approach to node-compat that uses unenv and built-in run time modules.
    We don't plan to update these plugins.

  2. benmccann commented on Jul 8, 2024

    @benmccann
    ContributorAuthor

    Can we update the plugins in the meantime instead of serving deprecated versions to all of our users?

    What's the release timeline for wrangler 4?

  3. benmccann commented on Jul 8, 2024

    @benmccann
    ContributorAuthor

    I found this fixed as the last commit in the v4 branch four months ago: #5209. But there have been no further updates to the branch since then

  4. petebacondarwin commented on Jul 8, 2024

    @petebacondarwin
    Contributor

    These are just warnings. Do you actually have a bug in the node_compat feature that would be resolved by changing these dependencies?

  5. benmccann commented on Jul 8, 2024

    @benmccann
    ContributorAuthor

    There's no bug and I get that they're just warnings, but I don't want to teach our users to ignore warnings nor do we want to ignore them in our own projects. Users file bugs against us everytime we have deprecation warnings, it causes our audit checks to fail, and it's just not consistent with the quality of our offering to generate warnings for years while telling users to ignore them.

  6. added
    breaking-changeChange(s) that will result in breaking existing behavior
    on Aug 19, 2024
  7. RamIdeas commented on Aug 19, 2024

    @RamIdeas
    Contributor

    To provide an update here we have a new node compat feature about to launch soon which will become our primary recommendation for node polyfills but we cannot remove the old node compat feature without a breaking change.

    Since this issue pertains to warnings caused by deprecated dependencies needed for the old node compat feature, I've applied a breaking change label.

    Although, if we wanted to fix this without a breaking change, we could consider vendoring the deprecated packages into our repo.

  8. moved this from Untriaged to Backlog in workers-sdkon Aug 19, 2024
  9. removed
    breaking-changeChange(s) that will result in breaking existing behavior
    on Aug 19, 2024
  10. benmccann commented on Aug 19, 2024

    @benmccann
    ContributorAuthor

    Another idea might be to make the implementation pluggable so that users can choose which implementation to use without pulling in dependencies for the implementation(s) they're not using. That would still be a breaking change, but a pretty small one that would be easy enough to handle while upgrading.

  11. irvinebroque commented on Aug 19, 2024

    @irvinebroque
    Contributor

    Vendoring makes sense to me

  12. DominiqueComte commented on Nov 14, 2024

    @DominiqueComte

    after reading #1232 and #3612 this bug should have the "Wrangler v4" milestone, right ?

  13. added this to the Wrangler v4 milestone on Nov 19, 2024
  14. penalosa commented on Dec 3, 2024

    @penalosa
    Contributor

    Closed by #7336

  15. moved this from Backlog to Done in workers-sdkon Dec 3, 2024
  16. benmccann commented on Mar 13, 2025

    @benmccann
    ContributorAuthor

    I wanted to share a huge thank you to everyone here who worked on the new wrangler 4 that is out now for working to fix this!!

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions