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

Can't use npmUpgradeProvider with bun #736

Open
rubenfiszel opened this issue Sep 6, 2024 · 1 comment
Open

Can't use npmUpgradeProvider with bun #736

rubenfiszel opened this issue Sep 6, 2024 · 1 comment

Comments

@rubenfiszel
Copy link
Contributor

rubenfiszel commented Sep 6, 2024

Compiled package with dnt

npm upgrade provider works fine on node but on bun:

▶ bun /git/windmill/cli/npm/esm/main.js upgrade 
87 |             }
88 |         });
89 |     }),
90 |     get writable() {
91 |         if (stdoutWritable == null) {
92 |             stdoutWritable = node_stream_1.default.Writable.toWeb(process.stdout);

                  ^
TypeError: undefined is not a function
      at node:stream:3045:33
      at writable (/git/windmill/cli/npm/node_modules/@deno/shim-deno/dist/deno/stable/variables/std.js:92:61)
      at start (/git/windmill/cli/npm/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.5/upgrade/spinner.js:153:95)
      at /git/windmill/cli/npm/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.5/upgrade/upgrade_command.js:86:22
      at /git/windmill/cli/npm/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.5/upgrade/upgrade_command.js:77:30
      at /git/windmill/cli/npm/esm/deps/jsr.io/@cliffy/command/1.0.0-rc.5/command.js:970:2

and that's because bun is missing toWeb: https://github.com/oven-sh/bun/issues/3927

Is there a way to write the upgrade provider such that it doesn't rely on that api (after shimmed by dnt)

@rubenfiszel
Copy link
Contributor Author

Commenting this line is enough:
https://github.com/c4spar/deno-cliffy/blob/main/command/upgrade/spinner.ts#L201

Maybe removing the spinner as an option would solve the issue for now?

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

No branches or pull requests

1 participant