diff --git a/LATEST b/LATEST index 243e79a0735b8..fae04a2a19450 100644 --- a/LATEST +++ b/LATEST @@ -1 +1 @@ -1.1.27 \ No newline at end of file +1.1.29 \ No newline at end of file diff --git a/docs/guides/install/from-npm-install-to-bun-install.md b/docs/guides/install/from-npm-install-to-bun-install.md new file mode 100644 index 0000000000000..31e69238cd7d2 --- /dev/null +++ b/docs/guides/install/from-npm-install-to-bun-install.md @@ -0,0 +1,214 @@ +--- +name: Migrate from npm install to bun install +--- + +`bun install` is a Node.js compatible npm client designed to be an incredibly fast successor to npm. + +We've put a lot of work into making sure that the migration path from `npm install` to `bun install` is as easy as running `bun install` instead of `npm install`. + +- **Designed for Node.js & Bun**: `bun install` installs a Node.js compatible `node_modules` folder. You can use it in place of `npm install` for Node.js projects without any code changes and without using Bun's runtime. +- **Automatically converts `package-lock.json`** to bun's `bun.lockb` lockfile format, preserving your existing resolved dependency versions without any manual work on your part. You can secretly use `bun install` in place of `npm install` at work without anyone noticing. +- **`.npmrc` compatible**: bun install reads npm registry configuration from npm's `.npmrc`, so you can use the same configuration for both npm and Bun. +- **Hardlinks**: On Windows and Linux, `bun install` uses hardlinks to conserve disk space and install times. + +```bash +# It only takes one command to migrate +$ bun i + +# To add dependencies: +$ bun i @types/bun + +# To add devDependencies: +$ bun i -d @types/bun + +# To remove a dependency: +$ bun rm @types/bun +``` + +--- + +## Run package.json scripts faster + +Run scripts from package.json, executables from `node_modules/.bin` (sort of like `npx`), and JavaScript/TypeScript files (just like `node`) - all from a single simple command. + +| NPM | Bun | +| ------------------ | ---------------- | +| `npm run