Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove isomorphic-fetch dependency #1904

Open
hattyhattington17 opened this issue Nov 17, 2024 · 1 comment · May be fixed by #1908
Open

Remove isomorphic-fetch dependency #1904

hattyhattington17 opened this issue Nov 17, 2024 · 1 comment · May be fixed by #1908

Comments

@hattyhattington17
Copy link

Isomorphic-fetch is no longer being maintained and is causing a deprecation warning on node v22.11.0 by pulling in punycode.

From the zkapp-cli:

> node --trace-deprecation src/bin/index.js project test
? Create an accompanying UI project too? …  (node:2145) [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:399:7)
    at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:338:10)
    at loadBuiltinModule (node:internal/modules/helpers:114:7)
    at Function._load (node:internal/modules/cjs/loader:1100:17)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:218:24)
    at Module.require (node:internal/modules/cjs/loader:1340:12)
    at require (node:internal/modules/helpers:141:16)
    at Object.<anonymous> (zkapp-cli/node_modules/whatwg-url/lib/url-state-machine.js:2:18)

> npm ls whatwg-url
[email protected]
└─┬ [email protected]
  └─┬ [email protected]
    └─┬ [email protected]
      └── [email protected]

When this is done, remove the whatwg-url version override from zkapp-cli's package.json o1-labs/zkapp-cli#707

@mitschabaude
Copy link
Collaborator

yup, and we can simply remove isomorphic-fetch because all it does is add a shim for fetch() in node versions lower than 18. In node >= 18, fetch() is a builtin global that we should be able to use directly. I don't think we care about lower node versions anymore

@boray boray linked a pull request Nov 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants