Commit Graph

717 Commits

Author SHA1 Message Date
jhmaster2000
aa606b23df polyfills: fix which options.cwd handling 2023-12-08 15:46:29 -03:00
jhmaster2000
6f01ddc38d polyfills: fix unsafe.arrayBufferToString 2023-12-08 15:31:40 -03:00
jhmaster2000
b63fc096bf polyfills: sleep/Sync fix 2023-12-08 06:16:50 -03:00
jhmaster2000
93b32aef29 polyfills: impl reportError + spawnSync fix 2023-12-08 06:09:28 -03:00
jhmaster2000
e7019186cd polyfills: fix FileBlob.exists() + more tests 2023-12-08 04:40:42 -03:00
jhmaster2000
b55994b059 polyfills: test runner adjustments 2023-12-08 03:47:39 -03:00
jhmaster2000
57b5e00e64 polyfills: more spawn/Sync fixes 2023-12-08 03:46:56 -03:00
jhmaster2000
db7cb6fa98 polyfills: fix spawn/Sync stdout/stdin io handling 2023-12-07 19:55:13 -03:00
jhmaster2000
9342cf2080 polyfills: Bun/import.meta resolve(Sync) fixes 2023-12-07 15:44:52 -03:00
jhmaster2000
ce129594a6 polyfills: minor test runner fixes 2023-12-07 14:42:08 -03:00
jhmaster2000
666c13f964 polyfills: refactor FileBlob & Bun.write 2023-12-07 14:41:32 -03:00
jhmaster2000
71d99f5658 polyfills: stub out gc error in test runner 2023-12-06 18:34:15 -03:00
jhmaster2000
798ca1ff8c polyfills: 1.0.15 fixes 2023-12-06 18:05:39 -03:00
jhmaster2000
989a670682 bun-polyfills: bun:jsc tweaks 2023-12-02 02:29:54 -03:00
jhmaster2000
62cdc58acf polyfills: Bun.file fix & --expose-gc 2023-12-02 01:52:41 -03:00
jhmaster2000
7c841d1aa3 polyfills: bun:ffi bugfixes 2023-12-02 01:30:45 -03:00
jhmaster2000
47ee87d7e0 polyfills: fix off-by-2 error lines in test runner 2023-12-01 20:55:50 -03:00
jhmaster2000
9f0faf48db polyfills: load Bun global into test runner 2023-12-01 19:48:05 -03:00
jhmaster2000
519d53a16b polyfills: Bun.dns improvements 2023-12-01 19:26:21 -03:00
jhmaster2000
ee72c14957 polyfills: load test fns into global scope (fix*) 2023-12-01 01:13:11 -03:00
jhmaster2000
5062c2bc3a polyfills: node's --input-type flag is something 2023-12-01 00:19:47 -03:00
jhmaster2000
2d002297ce polyfills: fix Bun.spawn stdin cleanup 2023-11-30 23:57:10 -03:00
jhmaster2000
19cee77e8b polyfills: add jest-extended matchers to bun:test 2023-11-30 23:55:46 -03:00
jhmaster2000
fbdbf297e1 polyfills: fix console async iterator 2023-11-30 23:54:51 -03:00
jhmaster2000
3550d4e94c polyfills: load globals into test runner 2023-11-30 21:27:08 -03:00
jhmaster2000
f82c6013b1 polyfills: bun:sqlite 2023-11-30 21:15:41 -03:00
jhmaster2000
ee14093325 polyfills: bun:test 2023-11-30 20:42:45 -03:00
jhmaster2000
694f679817 polyfills: rework test runner 2023-11-30 20:36:17 -03:00
jhmaster2000
000c0a2109 polyfills: semver & TOML 2023-11-30 12:31:56 -03:00
jhmaster2000
10f4a4e73c polyfills: full process.versions & build fixes 2023-11-17 18:56:29 -03:00
jhmaster2000
6b5f2b3442 Merge branch 'main' into bun-polyfills 2023-11-17 16:45:28 -03:00
DidaS
fbff18a723 fix(types): Change Bun.serve types to allow void when using websockets (#7160)
* `Response` -> `any`

* Revert previous commit & allow void in ws fetch

* Added type test to check if you can upgrade connection without returning

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-11-17 05:34:05 -08:00
Jarred Sumner
f4d14c02c7 Implement process.report.getReport() (#7171)
* Prevent assertion failure

* Implement process.report.getReport()

* Update process.test.js

* }

* Update BunProcess.cpp

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-11-17 03:35:35 -08:00
Mathias Wulff
d1ec8f86f3 Add license to bun-types (#7149) 2023-11-16 09:18:46 -08:00
Colin McDonnell
31814934f3 CLI flags (#6395)
* WIP

* WIP

* Improve helptext

* WIP

* WIP

* WIP

* WIP

* Clean up, implement warn_on_unrecognized_flag

* Fix struct

* Tweaks

* Fix bunx test

* Address reviews

* Init and create

* Updates

* bunx

* Tweaks

* Lockfile

* tweak

* tweak

* tweak

* tweak

* Remove comments

* Add back origin and port

* Remove logging

* Updates

* fmt

* fix rebasing mistakes

* bruh

* expose node builtins for -e

* add tests and fix it on windows

* a

* lol

* okay

* finish things up

* Update src/deps/zig-clap/clap/streaming.zig

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>

---------

Co-authored-by: dave caruso <me@paperdave.net>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
2023-11-15 18:15:10 -08:00
Jarred Sumner
b43a8b54cf Implement expect.unreachable(msg?: string | Error) (#7131)
* Implement `expect.unreachable`

* UIse expect.unreachable() in some tests

* Use more unreachable

* More unreachable

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-11-15 16:14:13 -08:00
Jarred Sumner
e6e4ffb4ae Fixes #6789 (#7129)
* `zig fmt`

* Fixes #6879

* Update bun-test.d.ts

* More tests

* Bump WebKit

* [autofix.ci] apply automated fixes

* woops

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-11-14 21:00:28 -08:00
Ashcon Partovi
547ed6d74d Add workflow that fixes PRs that do not match formatting (#7098) 2023-11-14 08:51:19 -08:00
Jarred Sumner
7a4e0158d6 Lots of stuff (#7027)
* Use debug mode by default

* Enable build with assertions enabled

* Update cli.zig

* Update bun-linux-build.yml

* Fixes

* Fix `ASSERT_ENABLED`

* try this

* Update Dockerfile

* mimalloc debug

* Update CMakeLists.txt

* `Bun.deepMatch` - fix assertion failures

cc @dylan-conway, looks like we need to use `putDirectMayBeIndex` and check for `isCell` more carefully.

* Object.create support in code generator and callbacks wrapper

* Remove unused file

* zig upgrade

* zls

* Fix various errors

* Support `BuiltinAccessor` in create_hash_table script

* Fix assertion failure in `process.mainModule`

* Fix assertion failure in `onerror`

* Fix assertion failure when creating a Worker

* Fix asssertion failure when loading lots of files in bun test

* Fix assertion failure when termating a `Worker`

* Add helper for converting BunString to a WTFString

* Fix assertion failure in notifyNeedTermination

* Add more debug logs in `bun test`

* Fix compiler warning in usockets

* Fix assertion failure with `Worker` termination (another)

* Fix assertion failure in `coerceToInt64`

* Fix assertion failure in `BroadcastChannel`

* Fix assertion failure in `Headers.prototype.getAll`

* Fixes #7067

* Add heap analyzer label for CommonJS modules

* Fix assertion failure in module.require && module.require.resolve

* Remove unused code

* Fix assertion failure in debugger

* Fix crash in debugger

* Fix assertion failures in bun:sqlite

* Bump zig

* Bump WebKit

* Fix assertion failure in JSPromise::reject && JSInternalPromise::reject

* Fix assertion failure in ReadableStream::cancel

* Fix assertion failure in AsyncContextFrame::create

* Fix assertion failure in bun:sqlite

* Fix assertion failure in mocks

* Fix assertion failure in ServerWebSocket.close

* Fix assertion failure in N-API with subclasses

* [napi] Make promises cheaper

* undo

* Don't check for exceptions in ObjectInitializationScope

* Add separate entry point for test runner that doesn't generate code

* Don't deref builtin code

* Fix preload test

* Fix assertion failure in memoryUsage()

* Fix preload test, part 2

* Ensure that the env map for a Worker is empty after it is used

* The pointer for the Arena allocator used in parsing should not change

* Terminate thread on exit

* Start to implement scriptExecutionStatus

* Update worker.test.ts

* Fix Dirent.name setter

* Update settings.json

* Fix assertion failure in node:http

* Use correct value for `JSFinalObject::maxInlineCapacity`

* JSFinalObject::maxInlineCapacity x2

* Don't strip when assertions are enabled

* Make `m_wasTerminated` atomic

* Preserve directives in the transpiler

cc @ctjlewis

* Workaround assertion failure in ServerWebSocket.sendBinary and ServerWebSocket.sendText

* windows

* Buffer lockfile serialization in-memory

* PR feedback

* PR feedback

* PR feedback

* Windows

* quotes

* Update CMakeLists.txt

* Update bun-linux-build.yml

* Update bun-linux-build.yml

* Move this code to BunString.cpp

* Update BunString.cpp

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-11-13 22:10:09 -08:00
Antonin CLAUZIER
f63eba952e Fixes output path for build command (#7026) 2023-11-11 02:13:23 -08:00
Ashcon Partovi
f0cbc79d8b Implement server.url (#7043)
* Implement `server.url`

* Fix memory leak
2023-11-10 23:00:27 -08:00
Joseph Yu
520845217e Fix toBeNaN's misleading JSDoc comment (#7019) 2023-11-10 11:25:08 -08:00
jhmaster2000
05e5a5c95d polyfills: upgrade deps 2023-11-10 09:34:06 -03:00
jhmaster2000
e2bd31c9fe polyfills: add TOML and semver to the todo list 2023-11-10 09:27:10 -03:00
jhmaster2000
c4ee70ae84 Merge branch 'main' into bun-polyfills 2023-11-10 09:22:45 -03:00
Brett Goulder
42d8a0b44b Fix util.formatWithOptions typings. (#7002) 2023-11-10 03:29:02 -08:00
Dylan Conway
f7f6233ea8 fix semver edge cases and buffer used for prerelease comparisons (#6981)
* use different buf for group and manifest versions

* tests

* tests for installs that should fail

* allow `<=<prerelease-version`

* `Bun.semver.satisfies`

* one

* stringify

* symbol tests

* deinit

* arena

* more tests

* fix test

* version always on the left

* `Bun.semver.order`

* handle more edge cases, more tests

* whitespace

* more
2023-11-08 03:36:17 -08:00
cirospaciari
cbba20804e revert 2023-11-08 00:19:49 +01:00
cirospaciari
91c2edc0f2 really fix 2023-11-08 00:19:49 +01:00
cirospaciari
11e7937c3c cleanup 2023-11-08 00:19:49 +01:00