Jarred Sumner
ae8f2a3afb
Windows Build Fixes ( #7923 )
...
* Windows Build Fixes
* windows
* Update event_loop.zig
* Update bindings.zig
* Update event_loop.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-12-29 20:39:23 -08:00
Jarred Sumner
135039b137
Better errors for bun:sqlite ( #7906 )
...
* Better errors for bun:sqlite
* Add `byteOffset`
* Add `code` property
* Fix error
* Update test
* Add a couple more tests for errors
* Add file with sqlite error codes
* Report extra memory from `sqlite3_stmt`
* Add polyfills for macOS x64
* Use -1 when unavailable
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-12-29 18:37:16 -08:00
Jarred Sumner
05f14c8d6a
Add setMayBePrototype where it should be added ( #7922 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-12-29 18:26:33 -08:00
Otger Rogla
15755a0246
feat: implement console.table ( #7866 )
...
* feat: implement console.table
* console.table minor changes
* fix console.log for arrays after console.table changes
2023-12-29 18:04:49 -08:00
Jarred Sumner
b011fd2567
Fixes https://x.com/jeroendotdot/status/1740651288239460384?s=46&t=0Uhw6mmGT650_9M2pXUsCw ( #7910 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-12-29 15:26:06 -08:00
Lucas Coratger
5e72a27a76
feat: add toBeObject ( #7770 )
...
* feat: add toBeObject
* fix: feedbacks
* [autofix.ci] apply automated fixes
* feat: add more information on error message
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-12-29 12:37:02 -08:00
Meghan Denny
9ef7b304d9
misc: use compileError instead of unreachable for comptime-known switches ( #7905 )
2023-12-29 02:07:17 -08:00
Meghan Denny
38d5a5fe9a
tidy: bun.zig: remove switch on literal ( #7907 )
2023-12-29 02:06:56 -08:00
Jarred Sumner
70f344101b
Revert " feat(server): add server backlog parameter ( #7822 )" ( #7908 )
...
This reverts commit 411094b82d .
2023-12-28 23:44:27 -08:00
Jarred Sumner
a3a6b894c5
[bun:sqlite] Cache the structure and call the destructor ( #7904 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-12-28 21:33:55 -08:00
Meghan Denny
a5bf1216d1
cli: resolve TODO filing upstream issue ( #7903 )
2023-12-28 20:11:51 -08:00
Jarred Sumner
ae5f1b0168
Fix crash with latin1 supplemental characters in bun:sqlite query ( #7902 )
...
* Fix crash with latin1 supplemental characters in bun:sqlite queries
* Make it run from any dir
* Fix comment
* [autofix.ci] apply automated fixes
---------
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-12-28 20:00:58 -08:00
Jarred Sumner
20690403da
Fixes #7868 ( #7884 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-12-28 17:53:11 -08:00
Jarred Sumner
903a202473
Support Blob in CryptoHasher ( #7878 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-12-28 16:33:18 -08:00
Kaio Duarte
14bc121dc8
Compare error name and message on Bun.deepEquals and assert.deepStrictEqual ( #7867 )
...
* check error name and message on Bun.deepEquals
* add tests
* add test with subclass of Error
2023-12-28 16:32:49 -08:00
Malthe Borch
813afe6c53
Add 'listening' boolean property to 'net:Server' ( #7658 )
...
* Add 'listening' boolean property to 'net:Server'
* Convert to getter
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-12-28 14:20:41 -03:00
Hanaasagi
411094b82d
feat(server): add server backlog parameter ( #7822 )
...
* feat(server): add server backlog parameter
* add some tests
* Apply suggestions from code review
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com >
* fix test
* chore: fix style
---------
Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com >
2023-12-28 14:19:20 -03:00
Jarred Sumner
1f90608d66
Fixes #7827 ( #7858 )
...
* Fixes #7827
* Add some assertions and errors
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-12-27 20:22:44 -08:00
Meghan Denny
da13884295
inspect: print 'call' property in objects ( #7874 )
...
functions have separate code path now
2023-12-27 18:34:52 -08:00
Meghan Denny
8a39c02e7a
bun.js bindings: tidy with inline range ( #7875 )
2023-12-27 18:34:18 -08:00
Meghan Denny
bfc065c5cc
bun.js bindings: remove redundant as-bitcast-as ( #7876 )
2023-12-27 18:33:56 -08:00
Ciarán
4a66091491
Fixes #7740 : Change "Duplicate dependency" to warn instead of error ( #7766 )
...
* fix(#7740 ): change 'Duplicate dependency' to be warning instead of error
* chore(07740.test.ts): clean up test
* [autofix.ci] apply automated fixes
* fix(src/logger.zig): increment warnings instead of errors in addRangeWarningFmtWithNotes()
* chore(07740.test.ts): simplify package.json to avoid increasing test times
* chore(bun-install.test.ts): update test to expect 'warn' instead of 'error'
* chore(07740.test.ts): fix formatting
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-12-27 00:53:02 -08:00
Ciro Spaciari
f8159f1b36
fix(fetch) Fix fetch redirect ( #7847 )
...
* clean socket instance before closing on redirect
* fetch redirect test
* fix flask test
* oops
2023-12-26 17:37:41 -08:00
cirospaciari
1a370eb483
revert
2023-12-26 11:33:30 -03:00
cirospaciari
f12ff9d1e5
clean client ref from socket before close
2023-12-26 11:22:12 -03:00
Jarred Sumner
4d6219eda4
Revert "whitelist nuxt ( #7840 )"
...
This reverts commit a3630dde2e .
`nuxt` does not list any scripts in their package.json
2023-12-25 23:39:57 -08:00
Larry Williamson
a3630dde2e
whitelist nuxt ( #7840 )
2023-12-25 23:27:56 -08:00
Ryan
c6ba32b850
Add purescript and spago to default-trusted-dependencies.txt ( #7838 )
...
These are two important packages for purescript development, purescript is the language (including a binary file that must be installed), and spago is the purescript package manager (also including a binary file that must be installed).
2023-12-25 22:58:32 -08:00
Omar
05984d405f
Whitelist Railway CLI ( #7832 )
...
https://railway.app
Railway CLI is used to deploy Railway services. The CLI npm package requires running postinstall scripts.
9de89415f0/package.json (L17)
2023-12-25 20:32:16 -05:00
Jarred Sumner
b399deebdd
15% faster crypto.randomUUID ( #7824 )
...
* Fixes #7811
* [autofix.ci] apply automated fixes
* Update src/bun.js/webcore.zig
Co-authored-by: Markus Staab <maggus.staab@googlemail.com >
---------
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>
Co-authored-by: Markus Staab <maggus.staab@googlemail.com >
2023-12-25 01:25:35 -08:00
Jarred Sumner
09d51486e9
Enable forceConsistentCasingInFileNames in bun init
2023-12-24 06:18:25 -08:00
Jarred Sumner
ead3bdf947
Make the tsconfig.json used in bun init sloppier
2023-12-24 06:16:44 -08:00
Arnaud Barré
6077ace528
Update init template & TS documentation ( #7813 )
...
* Update init template & TS documentation
* [autofix.ci] apply automated fixes
---------
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-12-24 06:13:53 -08:00
Jarred Sumner
a119e8d636
fs.readFile & fs.writeFile encoding + simplify string handling + fix memory leak ( #7797 )
...
* Simplify string handling code
* add extra + external
* Update fs.test.ts
* Bump
* woopsie
* prettier
* Rename stats() to resourceUsage()
* Fix leak
* Fix more leaks
* Setup malloc heap breakdown
* Thread safety
* Fix bug when creating buffer from utf-16 string
cc @dylan-conway
* Use global allocator
* More new
* Update fs.test.ts
* Update setTimeout.test.js
* Fix UAF in HTMLRewriter
* More bun.new
* Remove logs
* Un-skip test which no longer is flaky
* Even more `bun.new`
* Fix memory leak in HTMLRewriter.
Fixes #2325
* Don't accept Buffer for now
* Fix issue with node-fetch polyfill
* Don't destruct the response value too soon
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-12-24 06:10:46 -08:00
vitalspace
72eb607e21
FIx "Inconsistent script not found error message" ( #7799 )
2023-12-23 01:37:58 -08:00
Ciro Spaciari
26325aca95
fix(setTimeout) fix high CPU usage ( #7792 )
...
* fix timers CPU usage
* add stats to subprocess
* fix issue number
* add ResourceUsage
* better names on ResourceUsage
* add wait4 for macOS
* better names 2
* add types
* change comments style
* BigInt
2023-12-22 16:59:00 -08:00
Dylan Conway
906f86d6fd
always set name ( #7783 )
2023-12-21 23:46:32 -08:00
Omar
9fdd1068da
whitelist lightningcss-cli ( #7782 )
...
lightningcss is a popular css library with over 0.5 million weekly downloads. It also offers a cli tool that requires postinstall script to run.
https://www.npmjs.com/package/lightningcss
https://www.npmjs.com/package/lightningcss-cli?activeTab=code
2023-12-21 23:42:57 -08:00
Jarred Sumner
7e59f287a1
Fix bug in bun upgrade --canary ( #7777 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-12-21 20:18:02 -08:00
Jarred Sumner
c5436c09ab
Fix setInterval regression ( #7776 )
...
* Fix setInterval regression
* Add some comments
* Add another test
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-12-21 18:00:24 -08:00
Jarred Sumner
a93f467a74
NAPI fixes ( #7765 )
...
* napi fixes
* Make bcrypt work
* Always return this
* Fixes #7685
* [autofix.ci] apply automated fixes
* Update napi.cpp
* Make it clearer what this is doing
---------
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-12-21 15:55:58 -08:00
Jarred Sumner
2428da9354
Fix formatting error
2023-12-20 21:18:19 -08:00
Jarred Sumner
65e11c48b6
Fix hashing consistency issue ( #7757 )
...
* Fix color issue in `bun test`
* Fix hashing consistentcy issue
* Fix Windows build failure
* Update types.zig
* Fix build
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-12-20 20:57:20 -08:00
dave caruso
6b549ee592
fix: random improvements to bun.String ( #7695 )
...
* make bun.String.createUninitialized harder to mess up
* remove toJSConst
* Update src/bun.js/bindings/BunString.cpp
* ok
* aaaaaaaa
* fix ucs2 encoding oopsies
* a
* [autofix.ci] apply automated fixes
* fix baseline build
* hello
* remove commented code
* aaa
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2023-12-20 19:18:32 -08:00
Jarred Sumner
5b538fb076
Fix Windows build failure
2023-12-20 19:09:53 -08:00
Vlad Sirenko
7e511f55de
4415 es5 class http.Server ( #7705 )
2023-12-20 15:55:30 -08:00
Jarred Sumner
c271c6c38e
perf: More efficient setTimeout and setInterval ( #7715 )
...
* Use timer heap for `setTimeout`
* Further efficiency improvement to timers
* Fix assertion
* Make this test less flaky?
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-12-20 15:13:23 -08:00
dave caruso
00955c712e
fix: crash in bun init by renaming string function to be more consistant ( #7746 )
2023-12-20 13:44:53 -08:00
dave caruso
00e745ec2c
fix(windows): use path normalizer in bun run index.ts ( #7723 )
...
* cleanup stuff
* hi
* fix building on posix
* a
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-12-20 13:42:09 -08:00
Alex Martin
6ee812d63d
Handle holey arrays console log edge case ( #7751 )
...
", " was only being written when appropriate before "empty item", and not
"N x empty items".
2023-12-20 13:36:28 -08:00