aboutsummaryrefslogtreecommitdiff
path: root/src (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-11-07[bun:test] Implement `done` callback with support for async functionsGravatar Jarred Sumner 6-19/+246
2022-11-07[bun:test] Implement `expect` in faster Zig bindingsGravatar Jarred Sumner 12-2742/+4175
2022-11-07[bindings generator] Support cached values that do not correspond to ↵Gravatar Jarred Sumner 2-80/+144
properties and support call() functions
2022-11-07Handle types which do not support getting an objectGravatar Jarred Sumner 1-1/+52
2022-11-07Fix UAF in canaryGravatar Jarred Sumner 5-81/+100
2022-11-06Automatically install npm packages when running a script in Bun's runtime ↵Gravatar Jarred Sumner 34-1786/+5288
(#1459) * Update bundler.zig * WIP * Update README.md * Update README.md * wip * Support running scripts without package.json * Add `--no-auto-install` and `--prefer-offline` flags * WIP * wip * Update headers-handwritten.h * WIP * Build fixes * Fix UAF * Update install.zig * Must call .allocate() * Micro-optimization: only call .timestamp() once per tick when installing packages * Support progress bar * Extend the timestamp for package staleness checks to 1 day * Add `--prefer-latest`, `-i` CLI Flags * Fix crash * Support line text manually being set on an Error instance * Add a few more fields for error messages * Fix bug when counting 8 character strings in string builder * Implement error handling for automatic package installs! * Fix crash * Make it say module when there's a slash * Update module_loader.zig * Ban dependency versions in import specifiers when a package.json is present * Remove unused field * Update README.md * Update README.md * Update README.md * Update README.md Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-11-06chore: remove space lookalike (#1465)Gravatar Carter Snook 2-2/+2
2022-11-06Fixes https://github.com/oven-sh/bun/issues/1451Gravatar Jarred Sumner 1-1/+7
2022-11-06Add way to explicitly coercion object to int32Gravatar Jarred Sumner 11-18/+55
2022-11-06Fix symbol error with `make headers`Gravatar Jarred Sumner 1-0/+3
cc @lawrencecchen
2022-11-06Fix bug when passing ABI Types as integersGravatar Jarred Sumner 1-3/+5
2022-11-06Fixes https://github.com/oven-sh/bun/issues/1462Gravatar Jarred Sumner 1-1/+3
2022-11-06[TypeScript] Fix `export = value`Gravatar Jarred Sumner 1-0/+1
2022-11-06feat(child_process): add node:child_process polyfill (#1424)Gravatar Derrick Farris 2-3/+1907
* feat(child_process): beginning of child_process, add ChildProcess and spawn base case * fix(child_process): remove invalid single arg array syntax (thanks Copilot) * refactor(child_process): unhack Readable.on, move stuff into node:stream * feat(child_process): add more params for spawn, refactor, add fromWeb() to Readable * feat(child_process): finish rest of exports (minus fork), refactor, add tests * cleanup(streams): remove a bunch of unnecessary stuff * cleanup(child_process): remove dead refs * fix(child_process): fix stdio * fix(child_process): change stdio to bunStdio * test(child_process): uncomment timeout test * test(child_process): fix hanging tests * test(child_process): remove stray console.log * test(child_process): fix cwd test for linux * refactor(child_process): divide paths for encoded vs raw execFile stdio * fix(child_process): fix logic for execFile slow path
2022-11-06fix(subprocess): fix typo in spawnSync (#1464)Gravatar Derrick Farris 1-2/+2
2022-11-05Fix fetch api to accept stringifier object (#1460)Gravatar zhiyuan 1-9/+9
* fetch accept stringifier object * test: update fetch params tests
2022-11-03Fix crash in setTimeout/setIntervalGravatar Jarred Sumner 1-0/+5
2022-11-03Fix incorrect exit codeGravatar Jarred Sumner 1-9/+15
2022-11-03Fix crash when reading promise value wihtout checking if nullGravatar Jarred Sumner 1-0/+1
2022-11-03Fix `which` not handling absolute paths to a binGravatar Jarred Sumner 1-3/+20
This code has not been tested.
2022-11-03Fix `cmd not found in $PATH` printing raw structGravatar Jarred Sumner 1-1/+1
2022-11-03Delete unused fileGravatar Jarred Sumner 1-97/+0
2022-11-03Introduce `import.meta.primordials` for builtin JSGravatar Jarred Sumner 4-3/+91
the `import.meta` object in Bun now has a `primordials` object which makes a handful of globals safe for access. Inside of bun: or node: modules, it is a special object (ownKeys is not implemented, so Object.keys() wont work on it) - Array - String - `isPromise` - `isCallable` - `isConstructable` - `tryGetById(foo, "bar')` which is like foo?.bar - `arrayPush` which is like `Array.prototype.push` - `Bun` - `isAbortSignal` cc @ThatOneBro @lawrencecchen
2022-11-02Update headers-handwritten.hGravatar Jarred Sumner 1-3/+3
2022-11-02Add missing headersGravatar Jarred Sumner 1-0/+3
2022-11-02Fix 4/4 failing testsGravatar Jarred Sumner 1-5/+5
2022-11-02Fix 5/9 failing testsGravatar Jarred Sumner 1-4/+6
2022-11-02Update ZigGlobalObject.cppGravatar Jarred Sumner 1-1/+1
2022-11-02Fixes #1448 #1450Gravatar Jarred Sumner 1-6/+2
2022-11-02Fix missing functionsGravatar Jarred Sumner 1-1/+8
2022-11-02FixupGravatar Jarred Sumner 1-1/+1
2022-11-02Fix memory leakGravatar Jarred Sumner 3-5/+9
2022-11-02Update ffi.exports.jsGravatar Jarred Sumner 1-2/+2
2022-11-02Add way to know if JSCallback is threadsafeGravatar Jarred Sumner 1-3/+8
2022-11-02[bun:ffi] Add `threadsafe` option to callbacksGravatar Jarred Sumner 3-3/+47
2022-11-02Update ffi.zig (#1449)Gravatar Bram Wasti 1-1/+1
2022-11-02Flip the callback orderGravatar Jarred Sumner 1-1/+1
2022-11-02[bun:ffi] Implement `JSCallback` so C can call into JSGravatar Jarred Sumner 5-86/+460
2022-11-02Improve async function handling code in setTimeout and setIntervalGravatar Jarred Sumner 1-19/+70
Should fix
2022-11-01typescript decorators round 2 (#1445)Gravatar Dylan Conway 8-4/+258
* __decorateClass, __decorateParam, lit test, wiptest test * decorator factories test * parameter decorator test * test for decorators with constructor parameter properties * Fix issue with `CryptoKey` and `SubtleCrypto` constructors * Limit concurrency for GitHub Actions due to issues with cache poisoning If multiple actions are running, sometimes the cache is poisoned from another action. We need to fix this, but this is an interim measure to make actions less flaky * Make these tests better * Move this to dependencies so the .a files upload * Fixup * temporary fix * Limit concurrency for MacOS Object actions * try againn * againn * Make `"tls"` an explicit object we pass instead of implicit top-level options cc @Electroid @colinhacks * Update server.zig * Prefer `BUN_PORT` over `PORT` * Fix typo in homebrew action * Run homebrew action when release is edited * Check published_at instead of draft in GitHub action * Implement `process.release` * Add missing dependencies to `make devcontainer` * Allow overriding node polyfills via `BUN_OVERRIDE_MODULE_PATH` * Add a stub for io_darwin on linux cc @sno2 hopefully this helps but i'm not sure * Add missing `break` * Download more RAM * feat(core): optimize zig slice (#1408) * feat(core): optimize zig slice * address concerns * Remove webcrypto from vendor-without-check * Update default tsconfig (#1418) Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu> * Enable `BUN_OVERRIDE_MODULE_PATH` in `bun wiptest` * Upgrade WebKit * space * Support getting cached values and pending activity in the bindings generator * Remove :scissors: function * constructor creation, initializers, handle static and computed fields with decorators * Updating libuwebsockets C API (#1423) * fix for repeated regex match calls and fix for '^' in character classes (#1419) * tests and formatting * fix for ^ in character class * formatting * test for repeated match and exec calls * create oniguruma regex for each exec/test * check errorCode from creating oniguruma regexp and always return {} on failure * oops * call onig_initialize once * fix incorrect escaping, removed unnecessary oniguruma settings * tests for "-" and "^" in character classes * free regex object before returns * force gc for some tests * Update React fizz server (#1432) * Update fizz server * Use production build Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu> * more decorator tests * optional setup function for loading elements, simulate clicks in lit test * fix createWriteStream (#1433) * fix createWriteStream * remove comment * Update build docs and commands for dev containers (#1438) * Update build documentation for dev containers * Add devcontainer-rebuild make target * Add make devcontainer-sh target * Fix missing .PHONY for vendor-without-check (#1437) * Fix check for ninja on Debian/Ubuntu (#1436) Even though the package is named ninja-build, the ninja binary is still named ninja, so use `which ninja` to check for it * Fix #1410 woops * await on DOMContentLoaded for elements instead of setup function * avoid lowering class if no decorators Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: Ashcon Partovi <ashcon@partovi.net> Co-authored-by: Carter Snook <cartersnook04@gmail.com> Co-authored-by: Colin McDonnell <colinmcd94@gmail.com> Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu> Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com> Co-authored-by: Lawrence Chen <54008264+lawrencecchen@users.noreply.github.com> Co-authored-by: João Paquim <jpaquim@users.noreply.github.com>
2022-11-01Fix #1410Gravatar Jarred Sumner 1-6/+0
woops
2022-11-01fix createWriteStream (#1433)Gravatar Lawrence Chen 1-9/+35
* fix createWriteStream * remove comment
2022-10-31fix for repeated regex match calls and fix for '^' in character classes (#1419)Gravatar Dylan Conway 2-116/+114
* tests and formatting * fix for ^ in character class * formatting * test for repeated match and exec calls * create oniguruma regex for each exec/test * check errorCode from creating oniguruma regexp and always return {} on failure * oops * call onig_initialize once * fix incorrect escaping, removed unnecessary oniguruma settings * tests for "-" and "^" in character classes * free regex object before returns * force gc for some tests
2022-10-30Updating libuwebsockets C API (#1423)Gravatar Ciro Spaciari 4-1008/+1436
2022-10-28Remove :scissors: functionGravatar Jarred Sumner 1-1/+0
2022-10-28Support getting cached values and pending activity in the bindings generatorGravatar Jarred Sumner 1-19/+368
2022-10-28spaceGravatar Jarred Sumner 3-3/+260
2022-10-28Upgrade WebKitGravatar Jarred Sumner 10-177/+304
2022-10-28Enable `BUN_OVERRIDE_MODULE_PATH` in `bun wiptest`Gravatar Jarred Sumner 1-0/+7
2022-10-28Update default tsconfig (#1418)Gravatar Colin McDonnell 1-5/+10
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu>