-
Notifications
You must be signed in to change notification settings - Fork 13
Description
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
bad import is here:
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?