### What does this PR do?
Support sqlite in the Bun.sql API
Fixes#18951Fixes#19701
### How did you verify your code works?
tests
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
### What does this PR do?
fixes#6409
This PR implements `bun install` automatic migration from yarn.lock
files to bun.lock, preserving versions exactly. The migration happens
automatically when:
1. A project has a `yarn.lock` file
2. No `bun.lock` or `bun.lockb` file exists
3. User runs `bun install`
### Current Status: ✅ Complete and Working
The yarn.lock migration feature is **fully functional and
comprehensively tested**. All dependency types are supported:
- ✅ Regular npm dependencies (`package@^1.0.0`)
- ✅ Git dependencies (`git+https://github.com/user/repo.git`,
`github:user/repo`)
- ✅ NPM alias dependencies (`alias@npm:package@version`)
- ✅ File dependencies (`file:./path`)
- ✅ Remote tarball URLs (`https://registry.npmjs.org/package.tgz`)
- ✅ Local tarball files (`file:package.tgz`)
### Test Results
```bash
$ bun bd test test/cli/install/migration/yarn-lock-migration.test.ts
✅ 4 pass, 0 fail
- yarn-lock-mkdirp (basic npm dependency)
- yarn-lock-mkdirp-no-resolved (npm dependency without resolved field)
- yarn-lock-mkdirp-file-dep (file dependency)
- yarn-stuff (all complex dependency types: git, npm aliases, file, remote tarballs)
```
### How did you verify your code works?
1. **Comprehensive test suite**: Added 4 test cases covering all
dependency types
2. **Version preservation**: Verified that package versions are
preserved exactly during migration
3. **Real-world scenarios**: Tested with complex yarn.lock files
containing git deps, npm aliases, file deps, and remote tarballs
4. **Migration logging**: Confirms migration with log message `[X.XXms]
migrated lockfile from yarn.lock`
### Key Implementation Details
- **Core parser**: `src/install/yarn.zig` handles all yarn.lock parsing
and dependency type resolution
- **Integration**: Migration is built into existing lockfile loading
infrastructure
- **Performance**: Migration typically completes in ~1ms for most
projects
- **Compatibility**: Preserves exact dependency versions and resolution
behavior
The implementation correctly handles edge cases like npm aliases, git
dependencies with commits, file dependencies with transitive deps, and
remote tarballs.
---------
Co-authored-by: Jarred-Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: Claude Bot <claude-bot@bun.sh>
Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: RiskyMH <git@riskymh.dev>
Co-authored-by: RiskyMH <56214343+RiskyMH@users.noreply.github.com>
* random acts of cleanup to tests
* nerf the watchFile test, is CI slow?
* more things
* [autofix.ci] apply automated fixes
* a
* remove a log
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
* fix(win/upgrade): do not show powershell expand-archive info while upgrading
* start working bun run
* experiment: `bun.new`
* you can now bun run
* Update src/install/install.zig
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
* Update src/install/install.zig
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
* stuff
* fix stuff
* fix this
* farther but not really
* sadfs
* path hell
not sure how much worse or better this makes things. its a mess. windows path handlign is a mess aaaaaaaaaaaaaaaa
* path.resolve bs
* remove old build system stuff from pr
* a
* fix some path.parse/join cases
* path closer not perfect
* normalize and join tests tests done
* paths
* implement path.relative
* ,
* stuff
* assert
* fix compile
* hate
* the code isnt great
* stuff
* housekeeping for build system
* blah
* explain windows sitaution in docs
* some progress? not much though
* zig compiler crashes here
* fix
* yippee
* ok
* a
* ala wala
* fix builds on stuff
* clean
* the tests now run
* a
* aa
* dedupe uv event loop
* fix fs test accuracy
* stuff
* [autofix.ci] apply automated fixes
* huge updat e
* [autofix.ci] apply automated fixes
* url
* [autofix.ci] apply automated fixes
* start windows spawnSync
* [autofix.ci] apply automated fixes
* add --webkit for update submodules
* add better err message for `bun setup`
* fix unix platform build
* .
* [autofix.ci] apply automated fixes
* un-upgrade libarchive
* z
* asdfghj
* wrk
* todo -> panic
* ok
* a
* [autofix.ci] apply automated fixes
* fix build scripts l ol
* dfghj
* fa
* [autofix.ci] apply automated fixes
* aaaa
* a
* l
* [autofix.ci] apply automated fixes
* more logs
* [autofix.ci] apply automated fixes
* j
* fix init_command
* CORE DUMP HELL
* i swear im being pranked by the github actions gods
* fadsjkfdshjkhjkdfsahjkdfshjksdafjkhhjkfdsahfsdkjhfsdjkahf
* thanks IAS
* this is the correct fix
* personal review
* ddisablbe these
* revisions!
* ok
* fix submodule
* stuff
* fix libarchive
* [autofix.ci] apply automated fixes
* stuff
* [autofix.ci] apply automated fixes
* a
* fix addressToJS on windows
* make dns async again
* dx: add flag to update submodules ps1 to clone webkit
* dns error case for libuv
* dx improvements on windows
* newline
* obvious fix
* install steps
* extra note
* fix fs test
* Update building-windows.md
* fix builtins bundler to support \r\n line endnigs
* better
* some windows stuff
* a
* a
* a
* aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
* [autofix.ci] apply automated fixes
* bunfile text works
* fix build on the mac
* hellooooooooooo
* install steps
* ci for baseline?
* fix
* aaa
* wow
* install script revamp
* bug
* OK
* ok
* aaaaaaaaaaaaaa
* okay
* fix the node test runner lol
* fix napi stuff
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: cirospaciari <ciro.spaciai@gmail.com>
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>
* Use debug mode by default
* Enable build with assertions enabled
* Update cli.zig
* Update bun-linux-build.yml
* Fixes
* Fix `ASSERT_ENABLED`
* try this
* Update Dockerfile
* mimalloc debug
* Update CMakeLists.txt
* `Bun.deepMatch` - fix assertion failures
cc @dylan-conway, looks like we need to use `putDirectMayBeIndex` and check for `isCell` more carefully.
* Object.create support in code generator and callbacks wrapper
* Remove unused file
* zig upgrade
* zls
* Fix various errors
* Support `BuiltinAccessor` in create_hash_table script
* Fix assertion failure in `process.mainModule`
* Fix assertion failure in `onerror`
* Fix assertion failure when creating a Worker
* Fix asssertion failure when loading lots of files in bun test
* Fix assertion failure when termating a `Worker`
* Add helper for converting BunString to a WTFString
* Fix assertion failure in notifyNeedTermination
* Add more debug logs in `bun test`
* Fix compiler warning in usockets
* Fix assertion failure with `Worker` termination (another)
* Fix assertion failure in `coerceToInt64`
* Fix assertion failure in `BroadcastChannel`
* Fix assertion failure in `Headers.prototype.getAll`
* Fixes#7067
* Add heap analyzer label for CommonJS modules
* Fix assertion failure in module.require && module.require.resolve
* Remove unused code
* Fix assertion failure in debugger
* Fix crash in debugger
* Fix assertion failures in bun:sqlite
* Bump zig
* Bump WebKit
* Fix assertion failure in JSPromise::reject && JSInternalPromise::reject
* Fix assertion failure in ReadableStream::cancel
* Fix assertion failure in AsyncContextFrame::create
* Fix assertion failure in bun:sqlite
* Fix assertion failure in mocks
* Fix assertion failure in ServerWebSocket.close
* Fix assertion failure in N-API with subclasses
* [napi] Make promises cheaper
* undo
* Don't check for exceptions in ObjectInitializationScope
* Add separate entry point for test runner that doesn't generate code
* Don't deref builtin code
* Fix preload test
* Fix assertion failure in memoryUsage()
* Fix preload test, part 2
* Ensure that the env map for a Worker is empty after it is used
* The pointer for the Arena allocator used in parsing should not change
* Terminate thread on exit
* Start to implement scriptExecutionStatus
* Update worker.test.ts
* Fix Dirent.name setter
* Update settings.json
* Fix assertion failure in node:http
* Use correct value for `JSFinalObject::maxInlineCapacity`
* JSFinalObject::maxInlineCapacity x2
* Don't strip when assertions are enabled
* Make `m_wasTerminated` atomic
* Preserve directives in the transpiler
cc @ctjlewis
* Workaround assertion failure in ServerWebSocket.sendBinary and ServerWebSocket.sendText
* windows
* Buffer lockfile serialization in-memory
* PR feedback
* PR feedback
* PR feedback
* Windows
* quotes
* Update CMakeLists.txt
* Update bun-linux-build.yml
* Update bun-linux-build.yml
* Move this code to BunString.cpp
* Update BunString.cpp
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>