Jarred Sumner
70f89b1bfc
Add another test
2022-11-20 01:44:27 -08:00
Jarred Sumner
4f5f01a748
Fix flaky test
2022-11-20 01:44:18 -08:00
Jarred Sumner
2f1e9b2eb8
[streams] Fix exception in WritableStream
...
cc @Electroid
2022-11-19 23:37:52 -08:00
Jarred Sumner
bea44d948e
Fix freezing test due to calling GC 36,000 times
2022-11-19 22:35:16 -08:00
Jarred Sumner
e024116b77
Add a couple more tests for redirects
2022-11-19 22:23:45 -08:00
Jarred Sumner
17fa4211ac
Introduce Bun.unsafe.gcAggressionLevel API
2022-11-19 22:21:35 -08:00
Jarred Sumner
1806322554
Fix failing test
2022-11-19 04:16:31 -08:00
Dylan Conway
43b4e1b67b
bun test matchers and tests ( #1526 )
...
* ignore webkit for cherry-pick
* toContain and toBeTruthy
* toBe null, undefined, falsy, toHaveProperty, .not
* markBindings
* remove toHaveProperty, undo ignore webkit, more tests
* undo ignore webkit
* remove bad tests
* check if length property exists for toHaveLength()
* fix call signature
* handle argument that is not an integer
* getLengthOfArray returns u64
* switch to truncate
* toHaveLength() edge cases
* add toBooleanSlow()
* infinity, nan, negative
2022-11-18 23:03:39 -08:00
Jarred Sumner
bf6b174233
Make node:http.createServer work better
2022-11-16 04:42:33 -08:00
Jarred Sumner
996e5dd235
Add test for non-standard Headers API additions
2022-11-15 18:31:22 -08:00
Jarred Sumner
a63fe2be24
Add a test with decently large headers
2022-11-15 00:12:34 -08:00
Jarred Sumner
436b8e1461
Fix crashiness with process.env
...
This also makes it a lot slower
2022-11-14 17:53:15 -08:00
Jarred SUmner
20eff9f6d2
Bugfixes and perf improvements to child_process
2022-11-14 04:08:36 -08:00
Jarred Sumner
4a8bbc2216
Add an e2e test
2022-11-13 20:51:27 -08:00
Jarred Sumner
b18e4064a2
Make node streams faster ( #1502 )
...
* Make node streams faster
* Fix for macOS, improve performance, handle ref and unref
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2022-11-13 19:14:44 -08:00
Jarred SUmner
a78b6f920d
Fix infinite write loop on Linux
2022-11-12 20:28:10 -08:00
Jarred SUmner
1cce9da80a
Fix memory leak in gzip pool + add test for gzip'd data
2022-11-12 18:32:53 -08:00
Jarred Sumner
21bf3ddaf2
Redo how we poll pipes ( #1496 )
...
* Fix pipe
* Handle unregistered
* Fix failing test
2022-11-12 18:30:12 -08:00
Jarred Sumner
514f2a8edd
Add test that fails on linux
2022-11-11 16:02:35 -08:00
Jarred Sumner
7b4c8802a1
✂️
2022-11-10 15:07:12 -08:00
Jarred Sumner
dddbce8a41
Implement napi_create_external and napi_get_value_external
2022-11-10 15:05:23 -08:00
Jarred Sumner
7deca69820
Update websocket-server.test.ts
2022-11-09 23:57:24 -08:00
Jarred Sumner
8753c483ff
Implement Server.publish()
...
Fixes https://github.com/oven-sh/bun/issues/1417
2022-11-09 23:54:56 -08:00
Derrick Farris
7f5022db0c
fix(child_process): fix execFileSync options.input ( #1479 )
...
* 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-09 18:10:29 -08:00
Colin McDonnell
f7f1b60444
Add bun-types, add typechecking, add child_process types ( #1475 )
...
* 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-09 15:40:40 -08:00
Jarred Sumner
da257336b0
Fix #1354
2022-11-09 15:11:14 -08:00
Jarred Sumner
565996a087
Support TypeScript satisfies
...
Credit: @magic-akari, almost identical diff in https://github.com/evanw/esbuild/pull/2509/files#diff-ccc0bde7223236d93490b727b272f15765a2674be12a4c310b83b9555bef8816
2022-11-09 01:30:02 -08:00
Dylan Conway
047a8d3f0d
Error.captureStackTrace implementation ( #1476 )
...
* 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-09 00:37:57 -08:00
Jarred Sumner
cb41d77d2a
Fixes #1426
2022-11-08 22:27:22 -08:00
Jarred Sumner
af3931371e
Fix Buffer.from(text, "base64") and Buffer.toString("base64")
2022-11-08 21:30:54 -08:00
Derrick Farris
9ccc455f8d
Fix child_process tests ( #1471 )
...
* 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-08 15:33:47 -08:00
Jarred Sumner
fac4efb9b9
Add a test for DOMJIT call version of TextDecoder
2022-11-08 15:28:30 -08:00
Jarred Sumner
f17080df7f
Add a couple more tests for typeof
2022-11-08 15:27:55 -08:00
Jarred Sumner
2077e563b7
Fix failing transpiler tests
2022-11-08 15:26:29 -08:00
Jarred Sumner
3e9bb6859b
Stack allocate arguments to make it actually threadsafe
2022-11-08 00:28:14 -08:00
Jarred Sumner
38db5f1c83
Fix Buffer.slice and Buffer.subarray
2022-11-08 00:07:25 -08:00
Jarred Sumner
bb8c803bdf
Fix newline normalization
...
credit: @Validark
2022-11-07 21:43:38 -08:00
Jarred Sumner
52eac73726
Fix peek test
2022-11-07 20:49:19 -08:00
Jarred Sumner
5005188a13
Fix a couple failing tests
2022-11-07 15:20:47 -08:00
Jarred Sumner
8189f78eed
Maybe fix bug with onExit callback?
2022-11-07 14:57:47 -08:00
Jarred Sumner
2eb19a96b1
Support unlimited arguments in process.nextTick
2022-11-07 14:14:19 -08:00
Jarred Sumner
c00359a521
[bun:test] Implement done callback with support for async functions
2022-11-07 04:49:10 -08:00
Jarred Sumner
1f174b9d95
Fixes https://github.com/oven-sh/bun/issues/1462
2022-11-06 16:14:46 -08:00
Jarred Sumner
40160ec6d6
Prettier
2022-11-06 15:35:35 -08:00
Jarred Sumner
1cb5a73243
[TypeScript] Fix export = value
2022-11-06 15:26:12 -08:00
Derrick Farris
be108c0fea
feat(child_process): add node:child_process polyfill ( #1424 )
...
* 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-06 13:43:42 -08:00
zhiyuan
9d3f1e0d26
Fix fetch api to accept stringifier object ( #1460 )
...
* fetch accept stringifier object
* test: update fetch params tests
2022-11-05 18:51:02 -07:00
Colin McDonnell
d04c0d51fe
Add minified prod build of react-dom/server.bun ( #1458 )
...
Co-authored-by: Colin McDonnell <colinmcd@alum.mit.edu >
2022-11-03 18:10:42 -07:00
Jarred Sumner
6142715c06
Introduce import.meta.primordials for builtin JS
...
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-03 00:18:26 -07:00
Jarred Sumner
09434f1486
Add failing test
2022-11-02 20:44:49 -07:00