Implement simple workspaces glob support in bun install (#2435)

* [bun install] Implement `packages/*`-style globs

* Fix incorrect assertion

* 💅

* remove extraneous console.log

* Fix pointer to stack memory

* Add a test with a scoped package name from a glob workspace

* Fixup

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
This commit is contained in:
Jarred Sumner
2023-03-20 05:57:23 -07:00
committed by GitHub
parent 343721627e
commit 1a25af5e3d
5 changed files with 409 additions and 218 deletions

View File

@@ -3192,7 +3192,7 @@ pub fn indexOfCharZ(sliceZ: [:0]const u8, char: u8) ?u63 {
const pos = @ptrToInt(ptr) - @ptrToInt(sliceZ.ptr);
if (comptime Environment.allow_assert)
std.debug.assert(@ptrToInt(sliceZ.ptr) >= @ptrToInt(ptr) and
std.debug.assert(@ptrToInt(sliceZ.ptr) <= @ptrToInt(ptr) and
@ptrToInt(ptr) < @ptrToInt(sliceZ.ptr + sliceZ.len) and
pos <= sliceZ.len);