Skip to content

[Bug] punycode deprecation warning #235

@ChrisCrossKudos

Description

@ChrisCrossKudos

Current Behavior
importing transifex from @transifex/native dependency immediately results in punycode deprecation warnings showing in console whenever our app initializes. This is incredibly annoying and makes people think something is broken when it isn't.

Expected Behavior
Transifex should update its dependencies on node-fetch to a newer version OR change the way it bundles node-fetch or cross-fetch so that developers can override the version via yarn resolutions or npm overrides in their package.json file.

Steps to Reproduce
Using node version v22.8.0

Image

bad import is here:

Image

in file: node_modules/@transifex/native/dist/node.native.js

Possible Solution
I'm not an expert in library packaging, but it looks like transfiex bundles a minified version of node-fetch at build time which contains require('punycode') instead of require('punycode/'). A newer version of node-fetch exists which has the fix, but because of this packaging mechanism i cannot override it.

Possible Implementation
I don't have an implementation i'm afraid. Upgrading node-fetch may loose support for older node versions, but just publish a new major version so clients that aren't using ancient tooling don't have to pay the price?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions