Closed 0xOlias closed 8 months ago
This should be fixed in https://github.com/oven-sh/bun/pull/5346
I have just updated bun to version 1.0.2, but when I run bunx create-stdf@latest
, it still doesn't use the latest version and instead uses the cached version.
me too.
I still have this issue with bunx @latest on bun version 1.0.2 as well.
I have just updated bun to version 1.0.2, but when I run bunx create-stdf@latest, it still doesn't use the latest version and instead uses the cached version.
I still hope that the command bun create
has the same logic as pnpm and uses the latest version directly when it is not specified, which is a much-needed feature.
What version of Bun is running?
1.0.0+822a00c4d508b54f650933a73ca5f4a3af9a7983
What platform is your computer?
Darwin 21.6.0 arm64 arm
What steps can reproduce the bug?
create-thing
package at a specific (non-latest) versionbun create thing@latest
Bun will use the latest cached version instead of checking the registry, which I think is very unexpected.
What is the expected behavior?
For reference, here's my understanding of how the other package managers handle this:
npm create
uses the latest globally installed version. If the@latest
tag is specified, npm fetches the latest version from the registry and uses that.Bun's current behavior is most similar to npm, except Bun does not fetch the latest version from the registry even if you specify it. I'm guessing this is just a bug and would be a quick fix, but I'd like to propose a step futher:
IMO, Bun should (by default) behave like pnpm - if the user does not specify a tag, download and use the latest version from the registry when using the
bun create
shortcut. It would also be lovely to log a "Using create-vite@4.4.1" line similar to whatbun install
produces. This would save a lot of headache and bug reports for authors ofcreate-*
packages like myself.What do you see instead?
No response
Additional information
No response