aboutsummaryrefslogtreecommitdiff
path: root/test/bun.js (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-11-10:scissors:Gravatar Jarred Sumner 2-3/+0
2022-11-10Implement `napi_create_external` and `napi_get_value_external`Gravatar Jarred Sumner 5-0/+214
2022-11-09Update websocket-server.test.tsGravatar Jarred Sumner 1-1/+2
2022-11-09Implement Server.publish()Gravatar Jarred Sumner 1-0/+36
Fixes https://github.com/oven-sh/bun/issues/1417
2022-11-09fix(child_process): fix execFileSync options.input (#1479)Gravatar Derrick Farris 2-1/+19
* fix(child_process): fix execFileSync options.input * fix(child_process): debug err, check for Uint8Array too * fix(child_process): fix ArrayBufferIsView call * test(child_process): fix missing toString() call on test result * refactor(child_process): change options.input to input to getter calls
2022-11-09Add bun-types, add typechecking, add `child_process` types (#1475)Gravatar Colin McDonnell 69-1036/+3949
* Add bun-types to packages * Improve typing * Fix types in tests * Fix dts tests * Run formatter * Fix all type errors * Add strict mode, fix type errors * Add ffi changes * Move workflows to root * Add workflows * Remove labeler * Add child_process types * Fix synthetic defaults issue * Remove docs * Move scripts * Run prettier * Include examples in typechecking * captureStackTrace types * moved captureStackTrace types to globals * Address reviews Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu> Co-authored-by: Dylan Conway <dylan.conway567@gmail.com>
2022-11-09Fix #1354Gravatar Jarred Sumner 1-1/+23
2022-11-09Support TypeScript `satisfies`Gravatar Jarred Sumner 1-0/+84
Credit: @magic-akari, almost identical diff in https://github.com/evanw/esbuild/pull/2509/files#diff-ccc0bde7223236d93490b727b272f15765a2674be12a4c310b83b9555bef8816
2022-11-09Error.captureStackTrace implementation (#1476)Gravatar Dylan Conway 1-0/+303
* capture stack trace formatting, tests * fix callsite methods, stack formatting or undefined * isNative, tests for callsite methods * Update src/bun.js/bindings/ZigGlobalObject.cpp * Update src/bun.js/bindings/ZigGlobalObject.cpp * template and macros for visitchildren * static strings, handle infinity and clamp stacktracelimit Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2022-11-08Fixes #1426Gravatar Jarred Sumner 1-2/+19
2022-11-08Fix `Buffer.from(text, "base64")` and `Buffer.toString("base64")`Gravatar Jarred Sumner 1-0/+22
2022-11-08Fix child_process tests (#1471)Gravatar Derrick Farris 6-233/+482
* test(child_process): fix broken tests, add our-assert pkg for testing * test(child_process): replace console.log with debug() * test(child_process): rename our-assert -> node-test-helpers, use Bun.peek for subproc.exited
2022-11-08Add a test for DOMJIT call version of TextDecoderGravatar Jarred Sumner 1-0/+8
2022-11-08Add a couple more tests for `typeof`Gravatar Jarred Sumner 1-0/+4
2022-11-08Fix failing transpiler testsGravatar Jarred Sumner 1-2/+6
2022-11-08Stack allocate arguments to make it actually threadsafeGravatar Jarred Sumner 2-4/+1
2022-11-08Fix Buffer.slice and Buffer.subarrayGravatar Jarred Sumner 1-0/+78
2022-11-07Fix newline normalizationGravatar Jarred Sumner 1-0/+7
credit: @Validark
2022-11-07Fix peek testGravatar Jarred Sumner 1-0/+2
2022-11-07Fix a couple failing testsGravatar Jarred Sumner 1-24/+21
2022-11-07Maybe fix bug with onExit callback?Gravatar Jarred Sumner 1-0/+29
2022-11-07Support unlimited arguments in process.nextTickGravatar Jarred Sumner 1-0/+13
2022-11-07[bun:test] Implement `done` callback with support for async functionsGravatar Jarred Sumner 1-0/+38
2022-11-06Fixes https://github.com/oven-sh/bun/issues/1462Gravatar Jarred Sumner 1-3/+25
2022-11-06PrettierGravatar Jarred Sumner 1-1/+1
2022-11-06[TypeScript] Fix `export = value`Gravatar Jarred Sumner 1-0/+4
2022-11-06feat(child_process): add node:child_process polyfill (#1424)Gravatar Derrick Farris 2-0/+849
* 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-05Fix fetch api to accept stringifier object (#1460)Gravatar zhiyuan 1-2/+16
* fetch accept stringifier object * test: update fetch params tests
2022-11-03Add minified prod build of react-dom/server.bun (#1458)Gravatar Colin McDonnell 2-6819/+138
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu>
2022-11-03Introduce `import.meta.primordials` for builtin JSGravatar Jarred Sumner 1-0/+4
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-02Add failing testGravatar Jarred Sumner 1-2/+36
2022-11-02Add failing wildcard testGravatar Jarred Sumner 1-0/+20
2022-11-02[bun:ffi] Add `threadsafe` option to callbacksGravatar Jarred Sumner 1-11/+26
2022-11-02[bun:ffi] Implement `JSCallback` so C can call into JSGravatar Jarred Sumner 3-127/+109
2022-11-02Improve async function handling code in setTimeout and setIntervalGravatar Jarred Sumner 1-0/+16
Should fix
2022-11-01typescript decorators round 2 (#1445)Gravatar Dylan Conway 1-0/+787
* __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 createWriteStream (#1433)Gravatar Lawrence Chen 1-0/+69
* fix createWriteStream * remove comment
2022-10-31Update React fizz server (#1432)Gravatar Colin McDonnell 1-1750/+6686
* Update fizz server * Use production build Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu>
2022-10-31fix for repeated regex match calls and fix for '^' in character classes (#1419)Gravatar Dylan Conway 1-43/+239
* 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-27Implement `process.release`Gravatar Jarred Sumner 1-0/+9
2022-10-26Make these tests betterGravatar Jarred Sumner 1-2/+2
2022-10-25Fix crash in TCP serverGravatar Jarred Sumner 1-2/+2
2022-10-25TCP & TLS Socket API (#1374)Gravatar Jarred Sumner 1-0/+114
* TCP Socket API * Wip * Add snippet for StringDecoder * Rename `close` to `stop`, replace `close` with `end` * Add a tcp echo server test * Some docs * Update README.md * Fix build * Update README.md Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-10-24oniguruma regex lookbehind and multibyte hex fix (#1363)Gravatar Dylan Conway 1-9/+223
* handle multibyte hex characters * non extended strings used for toString() and source * add hasIndices flags * more tests for lookbehinds, unicode, and hex characters * handled case when hex doesnt have enough digit, more tests * fix adding characters out of bounds * backslash in character class * compile() returns object * escape special characters in oniguruma character class
2022-10-24`Bun.peek`Gravatar Jarred Sumner 1-0/+40
2022-10-23Fix `ReadableStream.prototype.tee`Gravatar Jarred Sumner 1-1/+48
2022-10-23Add Web Crypto API (#1384)Gravatar Jarred Sumner 1-0/+83
* Add Web Crypto API * Duplicate symbols * Update c_cpp_properties.json Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-10-22Fix spawn exitcode (#1371)Gravatar zhiyuan 1-0/+22
2022-10-21Add test for `fs.createReadStream`Gravatar Jarred Sumner 1-0/+43
2022-10-21Add test for ResolveError.position being inspectableGravatar Jarred Sumner 2-0/+12