Commit Graph

13603 Commits

Author SHA1 Message Date
Alistair Smith
8a8a23c5d6 xchanges 2025-09-22 21:49:38 -07:00
Alistair Smith
10551fcc90 chages 2025-09-22 21:49:38 -07:00
Alistair Smith
2c0f8f29b6 rule 2025-09-22 21:49:38 -07:00
alii
0d9ca788c6 bun run prettier 2025-09-22 21:49:38 -07:00
Alistair Smith
832b74a239 Update .vscode/settings.json
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2025-09-22 21:49:38 -07:00
Alistair Smith
cd67a3a024 move 2025-09-22 21:49:38 -07:00
Alistair Smith
5f0c054160 worker lifecycle port test 2025-09-22 21:49:38 -07:00
Alistair Smith
3e64050b67 notifyNeedTermination() 2025-09-22 21:49:38 -07:00
alii
5326514afc bun run clang-format 2025-09-22 21:49:38 -07:00
Alistair Smith
a2bd8ea622 revert 2025-09-22 21:49:38 -07:00
Alistair Smith
836fbfefe8 and here 2025-09-22 21:49:38 -07:00
Alistair Smith
b105877790 fix piscina@5 exactly 2025-09-22 21:49:38 -07:00
Alistair Smith
daf21ad44d dont drain microtasks queue during spawnSync() 2025-09-22 21:49:38 -07:00
Alistair Smith
2d01a3d1e7 unnecessary 2025-09-22 21:49:38 -07:00
Alistair Smith
a10e268584 delegate ref to subprocess 2025-09-22 21:49:38 -07:00
Alistair Smith
3bc5724ff4 better stub child_process channel 2025-09-22 21:49:38 -07:00
Alistair Smith
b6d4a15496 always dispatch close 2025-09-22 21:49:38 -07:00
alii
1d1e88faa7 bun run clang-format 2025-09-22 21:49:38 -07:00
Alistair Smith
54788db012 rm/clean 2025-09-22 21:49:38 -07:00
Alistair Smith
59d2941e25 rm 2025-09-22 21:49:38 -07:00
Alistair Smith
9276453ca4 . 2025-09-22 21:49:38 -07:00
Alistair Smith
c192b8e474 pass identifier not ptr 2025-09-22 21:49:38 -07:00
Alistair Smith
b0f756777c use .fetch_or() 2025-09-22 21:49:38 -07:00
Alistair Smith
6640b4dde4 only close MessagePort if message listeners 2025-09-22 21:49:38 -07:00
Alistair Smith
a9a4d483aa rm 2025-09-22 21:49:38 -07:00
Alistair Smith
fe95423dd8 rm 2025-09-22 21:49:38 -07:00
Alistair Smith
5e79575215 rm 2025-09-22 21:49:38 -07:00
Alistair Smith
9f74448006 fix timeouts? 2025-09-22 21:49:38 -07:00
alii
93650f7317 bun run clang-format 2025-09-22 21:49:38 -07:00
Alistair Smith
aa32166827 some logs 2025-09-22 21:49:38 -07:00
Alistair Smith
72e7177fff move 2025-09-22 21:42:24 -07:00
Alistair Smith
63b9d04a38 msg 2025-09-22 21:42:24 -07:00
Alistair Smith
006cdf353b plenty of debug logs 2025-09-22 21:42:24 -07:00
Alistair Smith
919454ea30 we should test p.destroy() 2025-09-22 21:42:24 -07:00
Alistair Smith
b736d6b364 this back 2025-09-22 21:42:24 -07:00
Alistair Smith
39f9aeb500 rm 2025-09-22 21:42:24 -07:00
Alistair Smith
0f5e9b2dcd testing pass? 2025-09-22 21:42:24 -07:00
alii
4c44a553d3 bun run clang-format 2025-09-22 21:42:24 -07:00
Alistair Smith
2ec4f39747 changes 2025-09-22 21:42:24 -07:00
Alistair Smith
236ff12a2d be clear about async operation order 2025-09-22 21:42:24 -07:00
Alistair Smith
b1e5826ad6 10s is ok 2025-09-22 21:42:24 -07:00
Alistair Smith
b06997e2b1 rm 2025-09-22 21:42:24 -07:00
Alistair Smith
4e6c44d5bc notifyPortClosed 2025-09-22 21:42:24 -07:00
Alistair Smith
1884a8197e simples piscina third party suite 2025-09-22 21:42:13 -07:00
Dylan Conway
285143dc66 fix(install): change semver core numbers to u64 (#22889)
### What does this PR do?
Sometimes packages will use very large numbers exceeding max u32 for
major/minor/patch (usually patch). This pr changes each core number in
bun to u64.

Because we serialize package information to disk for the binary lockfile
and package manifests, this pr bumps the version of each. We don't need
to change anything other than the version for serialized package
manifests because they will invalidate and save the new version. For old
binary lockfiles, this pr adds logic for migrating to the new version.
Even if there are no changes, migrating will always save the new
lockfile. Unfortunately means there will be a one time invisible diff
for binary lockfile users, but this is better than installs failing to
work.

fixes #22881
fixes #21793
fixes #16041
fixes #22891

resolves BUN-7MX, BUN-R4Q, BUN-WRB

### How did you verify your code works?
Manually, and added a test for migrating from an older binary lockfile.

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-09-22 19:28:26 -07:00
Don Isaac
beae53e81b fix(test): add EXPECTED_COLOR and RECEIVED_COLOR aliases (#22862)
### What does this PR do?
This PR does two things.

First, it fixes a bug when using
[`jest-dom`](https://github.com/testing-library/jest-dom) where
expectation failures would break as `RECEIVED_COLOR` and
`EXPECTED_COLOR` are not properties of `ExpectMatcherContext`.
<img width="1216" height="139" alt="image"
src="https://github.com/user-attachments/assets/26ef87c2-f763-4a46-83a3-d96c4c534f3d"
/>

Second, it adds some existing timer mock functions that were missing
from the `vi` object.

### How did you verify your code works?

I've added a test.
2025-09-22 18:43:28 -07:00
pfg
0d6a27d394 Remove remnants of '--only' flag in documentation (#22168) 2025-09-22 16:07:44 -07:00
Jarred Sumner
0b549321e9 Start using test.concurrent in our tests (#22823)
### What does this PR do?

### How did you verify your code works?

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Claude Bot <claude-bot@bun.sh>
2025-09-22 05:30:34 -07:00
robobun
33fdc2112f feat: add --cpu and --os flags to bun install for filtering optional dependencies (#22850)
## Summary

Implements `--cpu` and `--os` flags for `bun install` to filter optional
dependencies based on target architecture and operating system. This
allows developers to control which platform-specific optional
dependencies are installed.

## What Changed

### Core Implementation
- Added `--cpu` and `--os` flags to `bun install` command that accept
multiple values
- Multiple values combine with bitwise OR (e.g., `--cpu x64 --cpu arm64`
matches packages for either architecture)
- Updated `isDisabled` methods throughout the codebase to accept custom
CPU/OS targets
- Removed deprecated `isMatch` methods in favor of `isMatchWithTarget`
for consistency

### Files Modified
- `src/install/npm.zig` - Removed `isMatch` methods, standardized on
`isMatchWithTarget`
- `src/install/PackageManager/CommandLineArguments.zig` - Parse and
validate multiple flag values
- `src/install/PackageManager/PackageManagerOptions.zig` - Pass CPU/OS
options through
- `src/install/lockfile/Package.zig` & `Package/Meta.zig` - Updated
`isDisabled` signatures
- `src/install/lockfile/Tree.zig` & `lockfile.zig` - Updated call sites

## Usage Examples

```bash
# Install only x64 dependencies
bun install --cpu x64

# Install dependencies for both x64 and arm64
bun install --cpu x64 --cpu arm64

# Install Linux-specific dependencies
bun install --os linux

# Install for multiple platforms
bun install --cpu x64 --cpu arm64 --os linux --os darwin
```

## Test Plan

 All 10 tests pass in `test/cli/install/bun-install-cpu-os.test.ts`:
- CPU architecture filtering
- OS filtering
- Combined CPU and OS filtering
- Multiple CPU architectures support
- Multiple operating systems support
- Multiple CPU and OS combinations
- Error handling for invalid values
- Negated CPU/OS support (`!arm64`, `!linux`)

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2025-09-22 03:27:09 -07:00
Michael H
aa4e4f18a4 vscode extention - don't require start " " in test name pattern (#22844)
### What does this PR do?

#22534 made `--test-name-pattern` more logical and not start with empty
` ` (space), so fixing the built regex to make it work still for old and
new bun

The other main issue that that pr did was make start events for filtered
out names which means it appears to rerun them all even when in reality
it doesn't as they are skipped

Also in theory with concurrent test, if there's an error after another
started it would be assigned to the wrong test because we don't get test
id's in the error event, so its just assumed its from the last started
one which with parallel means it isn't correct.

### How did you verify your code works?
2025-09-21 01:14:38 -07:00