Jarred Sumner
e6285a1cc8
Update nodejs-apis.md
2024-01-15 23:43:52 -08:00
Meghan Denny
a064ae71ad
make node:fs/promises.open return a FileHandle and expose fdatasync ( #8141 )
...
* make node:fs/promises.open return a FileHandle and expose fdatasync
* node_fs: add fn spacing
* fix this assert usage too
* move primordial preservation higher
* use expect().toBe() instead of assert
* ensure top level node:fs/promises functions always receive fd's as a number
* add needed fixture
* [autofix.ci] apply automated fixes
* this was the wrong fix for a different thing
will look into it later
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2024-01-15 23:20:20 -08:00
dave caruso
f9e78c419f
feat: Implement using keyword (explicit resource management) ( #8151 )
...
* port 'initial support for using declarations'
1:1 port of this commit:
56a3e01244
* port 'initial support for await using declarations'
1:1 port of this commit:
1634a0b5ad
* fix cmake config for local jsc
* add global defines for symbols
* begin porting lowering implementation
based off of
https://github.com/evanw/esbuild/pull/3192
* [autofix.ci] apply automated fixes
* add some fun webkit scripts
* fix the minification bug
* refactor runtime_js, etc
* rename test file
* finished yapping
* silly silyl
* Update src/bundler.zig
* ok
* a
* Fix crash
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-01-15 23:14:41 -08:00
Jarred Sumner
0fb864e0ca
Bump WebKit
2024-01-15 20:28:05 -08:00
Jarred Sumner
a4da0acb0e
Document additions to import.meta
2024-01-15 19:53:49 -08:00
Jarred Sumner
f47def8515
Update run_command.zig
2024-01-15 19:50:05 -08:00
Jarred Sumner
14398ae27e
Upgrade to Node.js v21.6.0
2024-01-15 19:50:05 -08:00
Jarred Sumner
64d351b102
Upgrade to SQLite v3.45.0 ( #8196 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-01-15 19:45:14 -08:00
Meghan Denny
6b577a3970
implement events.on ( #8190 )
...
* exit event loop if there's unhandled errors
* move FixedQueue to a special package
* require(events) is also EventEmitter
* implement events.on
* move fixed_queue to internal and make it lazy in node:events
* use better Promise intrinsics
* move $shared to internal/shared
* make test not dependent on cwd
2024-01-15 18:54:37 -08:00
Lukas Kastern
a159850cce
fix: Bun.serve logging error when fetch returns rejected promise ( #8169 )
...
* Handle rejected promise returned from onResponse
* Add test
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-01-15 18:26:08 -08:00
Jarred Sumner
87eedc29d5
Move the standalone executable page
2024-01-15 18:13:28 -08:00
Lukas Kastern
124392ee98
fix: Report error and close event when creating WebSocket fails ( #8186 )
...
* Defer websocket error/close when websocket client is null
* Rename test
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-01-15 18:08:34 -08:00
Jarred Sumner
e5421c56b1
feat: Support import db from './my.db' with {type: "sqlite"} ( #8178 )
...
* Support SQLite imports
* Docs
* Update executables.md
* Update loaders.md
* Update js_parser.zig
* Update loaders.md
* Update CMakeLists.txt
* Update Module.ts
* JSC got rid of `$trunc`?
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-01-15 17:56:02 -08:00
Lukas Kastern
407f42718c
Only integrate loop us_loop once ( #8187 )
2024-01-15 17:37:21 -08:00
Jarred Sumner
a36355cefb
Some Windows tweaks ( #8118 )
...
* Some windows tweaks
* Make this pub
* Update bundle_v2.zig
* Fix woopsie
* Make this error better
* Add assertion for using allocator for HTTP client from another thread.
* Do fewer copies in readdir()
* Fix crash/failing tests
* Update tests
* Fix windows build
* Update loop.c
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-01-15 17:33:33 -08:00
Ashcon Partovi
2d21567271
Update debugger things ( #8180 )
...
* T
* Update Debug Adapter Protocol
* Update JSC and V8 debugger protocols
* Update inspector-frontend
* Fix empty keys not being printed in `console.log`
* Add `bun --inspect` tests and fix edge cases
* bun install --exact
2024-01-15 17:00:29 -08:00
Jarred Sumner
611b296a6a
Fixes #8170
2024-01-14 21:01:51 -08:00
Jarred Sumner
317998fdd6
Make toBunString increment the reference count ( #8146 )
...
* Make `toBunString` increment the reference count
* Fix WASI
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-01-14 05:36:31 -08:00
Jarred Sumner
ab40b0e054
Fix file descriptor leak in ipc ( #8165 )
...
* Fix file descriptor leak in ipc
* Do not assume sequential file descriptors
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-01-14 02:57:44 -08:00
Jarred Sumner
2c3dc5176b
Upgrade uWebSockets & usockets ( #8164 )
...
* Upgrade uWebSockets & usockets
* Update HttpRouter.h
* Defensively prevent sending to blocking sockets
* Add test for receiving large amounts of data
* Large data optimization
* Update loop.c
* Avoid extra system call before entering event loop
* Update internal.h
* 1 less pointer lookup
* Fix error
* Update socket-huge-fixture.js
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-01-14 02:04:30 -08:00
dave caruso
5fc4538477
windows: support bun:ffi ( #8114 )
...
* compile tcc
* initial linking
* ffi and stuff
* swag
* wala
* Update settings.json
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-01-13 19:14:29 -08:00
Meghan Denny
be0896e204
remove while loops where a for would be more efficient ( #8131 )
...
* remove while loops where a for would be more efficient
* this needs to be a stack copy
* this can use the better loop
* this was translated wrong
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-01-13 19:13:54 -08:00
Jarred Sumner
56f1e5a362
Hide some noisy stack frames ( #8148 )
...
* Hide some noisy stack frames
* Update javascript.zig
* Add `asyncModuleEvaluation` to the list
* Sort
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-01-13 19:11:01 -08:00
Jarred Sumner
702da52312
Fix rawMode regression ( #8163 )
...
* Fix rawMode regression
* arg0
* Update ProcessBindingTTYWrap.cpp
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-01-13 19:10:33 -08:00
Jarred Sumner
2a8956a268
Use one isosubspace for all generated constructors ( #8162 )
...
* Use one Isosubspace for constructors
* Update generate-classes.ts
* Update generate-classes.ts
* Update generate-classes.ts
* Update generate-classes.ts
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-01-13 18:50:09 -08:00
Jarred Sumner
86b1aa02b3
Update CMakeLists.txt
2024-01-13 00:57:45 -08:00
Meghan Denny
065eae5a95
tidy: use std.mem.zeroes instead of loop or memset ( #8138 )
...
* use std.mem.zeroes instead of loop or memset
* Update src/bun.js/api/bun.zig
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2024-01-12 23:56:51 -08:00
Meghan Denny
9fa13aec09
fix signalNumberToNameMap assignment for SIGINFO ( #8132 )
2024-01-12 23:53:35 -08:00
Jarred Sumner
3e703c4c76
For build scripts, symlink zig.exe to zig on posix ( #8147 )
...
* Add `zig.exe` as a symlink of `zig` on posix
* Update scripts/download-zig.sh
Co-authored-by: dave caruso <me@paperdave.net >
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: dave caruso <me@paperdave.net >
2024-01-12 23:52:07 -08:00
Jarred Sumner
01453be2d1
Move function from a header to a .cpp file
2024-01-12 23:48:14 -08:00
Jarred Sumner
9b32516bcb
Implement tty_wrap in process.binding ( #8130 )
...
* Implement `tty_wrap` in process.binding
Fixes #4694
* [autofix.ci] apply automated fixes
* Rename some things
---------
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>
2024-01-12 23:31:18 -08:00
Jarred Sumner
7e787d2a5a
Move console methods from exports.zig to ConsoleObject.zig ( #8145 )
...
* ZigConsoleClient -> ConsoleObject
* Rename more
* Rename more
* ZigConsoleClientFormatter -> ConsoleObject
* More renaming
* Wire up console.profile?
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-01-12 23:15:36 -08:00
dave caruso
b7a32b87ab
fix(bundler): improve external require transpilation on all targets ( #8057 )
...
* fix(build): do not emit import.meta.require for browsers/node.js
* update test snapshots
* sweep
* prefer require ref instead of `import.meta.require`
* remove option i did not use
* stuff
* remove rewrite_require_resolve
* ok
* ok
* wooooo
* [autofix.ci] apply automated fixes
* fix bugs
* ok
* [autofix.ci] apply automated fixes
* OOOOOPPPPPPPPPPPPS
* fix Bun.Transpiler regressions
* fix(bundler): make --splitting ensure --outdir
* fix final
* oops
* [autofix.ci] apply automated fixes
* use require.resolve
* revert but ... it no longer crashes there
* ok
* [autofix.ci] apply automated fixes
* fix fetch test
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com >
2024-01-12 22:15:51 -08:00
Meghan Denny
0491ff4186
tidy: remove some redundant bun.toFD calls ( #8136 )
...
* remove some redundant bun.toFD calls
* windows fix
2024-01-12 19:46:56 -08:00
Meghan Denny
943c72c8a1
allow StringOrTinyString to hold 31 bytes ( #8134 )
2024-01-12 19:43:50 -08:00
Meghan Denny
cb6f4b9f4d
tidy: remove if(false) dead block ( #8129 )
...
* remove if(false) dead block
* remove if (true) {...}
---------
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
2024-01-12 18:18:19 -08:00
Meghan Denny
45bd2264e3
more small undefined fixes ( #8133 )
2024-01-12 18:17:53 -08:00
Meghan Denny
8733748eb6
remove bun.assertDefined, comparing against undefined is UB ( #8137 )
2024-01-12 18:16:04 -08:00
Kaio Duarte
66fa317390
fix(node:url): handle url with missing host on url.parse ( #8126 )
...
* fix(node:url): handle url with missing host on `url.parse`
* lazy load punycode module
* use URL class
* add comment and also extra sanity check tests
* extra test
---------
Co-authored-by: dave caruso <me@paperdave.net >
2024-01-12 18:11:10 -08:00
Dylan Conway
ef0e96a2b2
fix(install): add warning and skip patched packages ( #8143 )
...
* add warning and skip patched packages
* also overrides
* comment
2024-01-12 18:03:30 -08:00
Meghan Denny
b0d326dfb9
zig_backend stage1 doesnt exist anymore ( #8140 )
2024-01-12 17:44:03 -08:00
Meghan Denny
517d5ecde9
remove more big endian handling ( #8139 )
2024-01-12 17:43:30 -08:00
dave caruso
072f2f15ea
ci: run windows tests and also run them concurrently ( #7758 )
2024-01-12 17:02:20 -08:00
Georgijs
0cd7fa1a63
fix(webkit:performance): correctly track size of measures map ( #8128 )
...
Co-authored-by: Georgijs Vilums <georgijs@bun.sh >
2024-01-12 14:58:05 -08:00
Ashcon Partovi
2fe0f90d36
Fix loose comparisons and incorrect tag length in semver ( #8108 )
2024-01-12 15:31:58 -07:00
Jarred Sumner
0783b4bf0e
Implement import.meta.{dirname, filename} for Node.js compatibility ( #8127 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2024-01-12 14:26:50 -08:00
Kaio Duarte
4f96bc416b
fix(bun-install): gracefully handle missing package removal ( #8091 )
...
* fix(bun-install): gracefully handle missing package removal
* update bun remove test
2024-01-12 14:08:58 -08:00
hugo-syn
f43ecd8aa2
chore: Fix multiple typos ( #8121 )
2024-01-12 14:07:40 -08:00
Ashcon Partovi
31db26b054
Fix error when null/undefined is passed to stdio in spawn/spawnSync ( #8110 )
...
* Fix error when null/undefined is passed to stdio in spawn/spawnSync
* Change conditional
2024-01-12 14:05:55 -08:00
Aayush
f5675284c7
fix(docs): prisma not installed as dev dependency ( #8119 )
2024-01-12 03:23:47 -08:00