Really, really nice and ergonomic. Made a few utility scripts today and enjoyed it much better than bash.
#!/usr/bin/env -S deno run
import { z } from "npm:zod";
import { Webview } from "jsr:@webview/webview";> If no node_modules directory is found in the working directory or higher, Bun will abandon Node.js-style module resolution in favor of the Bun module resolution algorithm.
> Under Bun-style module resolution, all imported packages are auto-installed on the fly into a global module cache during execution (the same cache used by bun install).
/s
> pnpm's symlink feature addresses this problem by allowing different versions of the same package to be installed side-by-side, and linking them to their dependents through symlinks. This helps to ensure that the correct version of a package is used for each dependent, reducing the chances of compatibility issues and making it easier to manage dependencies.
From the last issue linked in the PR (https://github.com/oven-sh/bun/issues/1760)
Jarred•6mo ago
There is a Windows-only bug in the isolated install mode blocking us from using isolated installs ourselves in the bun repo, and we need to fix that before we can release this.
If you want to try this early, you can run `bun upgrade --canary` and `bun install --linker=isolated` or put `install.linker = "isolated"` in bunfig.toml.
Isolated installs are a significant performance improvement on Windows (10x, sometimes 20x faster installs) and a minor positive or neutral performance impact on macOS and Linux. More importantly, they make using bun install in monorepos a lot more reliable by preventing dependencies from loading versions of other dependencies they did not specify in their own package.json.
Happy to answer any questions about Bun
gedy•6mo ago
8n4vidtmkvmk•6mo ago
FYI, there seems to be some bugs with installs yet that cause bun to crash. Might be related to having an old package-lock or old node_modules or switching back and forth between WSL and Windows proper. Bun just crashes. Deleting all lock files (bun and npms) and node modules usually fixes it.
jpgvm•6mo ago