Ai Hoshino
b94433ce86
Fix using uninitialized variable when formatting config_path. ( #4129 )
...
Close : #4128
2023-08-11 22:14:08 -07:00
Jarred Sumner
43ebffedcd
Support TypeScript's export type * as Foo from 'bar' ( #4125 )
...
* [TypeScript] Support `export type * as Foo from 'bar'`
* Update js_parser.zig
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-11 18:06:48 -07:00
Jarred Sumner
c6d3b375b8
async realpath ( #4117 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-10 22:15:07 -07:00
Jacques
e65535cc05
bun test: format description of test.each ( #4092 )
...
* bun test: format description
* add tests for tests
* only
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-08-10 13:29:53 -07:00
dave caruso
74f9fabd01
add util.formatWithOptions ( #4090 )
...
* Add formatWithOptions
* tests and tweaks
* adjust
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-08-10 13:09:03 -07:00
jhmaster
40befd8770
Sync bun-polyfills branch ( #4081 )
...
* bun-polyfills: initial impl. & baseline refactor
* move @types/ws dep from root to /test/
* bun-types: remove ReadableStream.forEach method
(this does not exist, probably added by mistake)
* bun-polyfills: remove extraneous stream utils
* bun-polyfills: add types syncing file
* bun-polyfills: re-arrange global polyfills
* bun-polyfills: fix FileBlob streams types again
* bun-polyfills: sync all of @types/node
* bun-polyfills: typeguard all current polyfills
* bun-polyfills: fix import paths
* bun-polyfills: switch to wasm impl. of farmhash
* bun-polyfills: support default import of bun obj
* bun-polyfills: transpiler placeholder file
* bun-polyfills: loaderless import.meta polyfill
* bun-polyfills: refactor import.meta polyfill
* bun-polyfills: repl entrypoint & todo list index
* bun-types: Add null to return type of Bun.which
* bun-types: match Bun.sha with Bun.hash.SHA512_256
* bun-polyfills: new "repl" package.json script
* bun-polyfills: full refactor of toplevel hashes
* bun-polyfills: these are fixed
* bun-types: NODE_ENV is optional
* bun-polyfills: fix Bun.env types
* bun-types+polyfills: fix HeapSnapshot.version type
* bun-polyfills: fix some web streams type conflicts
* bun-polyfills: update internal FileBlob.slice
* bun-polyfills: fix subproc stdin conversions
* bun-polyfills: better internal fileblob types
* bun-polyfills: try to sync global performance type
* bun-polyfills: working zig wasm polyfills setup
* bun-polyfills: update scripts
* bun-polyfills: fix wasm file location resolution
* bun-polyfills: goodbye farmhash (replaced by zig)
* bun-polyfills: move all Bun.hash polyfills to zig
* bun-polyfills: reimpl. seeding of seeded hashes
* bun-polyfills: impl. undocumented murmur32v2
* bun-polyfills: switch zighash from jsdoc to .d.ts
* bun-types: partial fix of Hash types
* bun-polyfills: documented Hash.murmur32v2
* bun-polyfills: misc updates
* bun-polyfills: enable sourcemaps
* bun-polyfills: handle empty inputs to hash funcs
* bun-types: narrow down hash func types
* bun-polyfills: remove unnecessary bigint casts
* bun-polyfills: impl. Bun.isMainThread
* bun-polyfills: impl. Bun.sleep and fix sleepSync
* bun-polyfills: impl. indexOfLine
* bun-polyfills: impl. Bun.peek.status
* bun-types: fix hashing test
---------
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-08-10 12:17:39 -07:00
Jarred Sumner
6718950a39
Fix test
2023-08-10 12:08:05 -07:00
Yash Sharma
8717303a80
Add support for bun --revision ( #4027 )
...
Co-authored-by: Yash Sharma <yashsharma@Yashs-MacBook-Air.local >
2023-08-09 10:43:04 -07:00
Ai Hoshino
385d440694
Fix constructing buffer from a UTF16 string with the Latin1 encoding. ( #4086 )
...
Close : #3914
2023-08-09 09:45:50 -07:00
Jarred Sumner
5d7c77aab0
Update main-worker-file.js
2023-08-08 23:02:45 -07:00
Jarred Sumner
2c70837ae7
Run prettier
2023-08-08 23:01:03 -07:00
Jacques
63f58f4026
feat(bun:test) add support for test.each() and describe.each() ( #4047 )
...
* rename callback to func
* update testscope to handle function arguments
* works
* big cleanup
* works in debug, not release
* fix memory issue & update tests
* catch & str test
* write types for each() & switch tests to ts
* rm & typo
* move some code around & support describe
* review changes
2023-08-08 22:25:32 -07:00
dave caruso
009fe18fa2
worker tests ( #4058 )
...
Co-authored-by: Jarred Sumner <jarred@jarredsumner.com >
2023-08-08 22:19:46 -07:00
Tiramify (A.K. Daniel)
40d00a961e
feat(bun/test): Implement "toSatisfy" & "toIncludeRepeated" (fwup) ( #3651 )
...
* Fix merge issues
* oop
* make codegen
* Fix build issues
---------
Co-authored-by: dave caruso <me@paperdave.net >
2023-08-08 22:14:30 -07:00
dave caruso
1941dbbd71
Set exports to {} in user-constructed CommonJSModuleRecords ( #4076 )
2023-08-08 19:37:36 -07:00
dave caruso
320cdcf97e
Fix require("console") #3820 ( #4073 )
...
* Fix #3820
* Add Module (#4074 )
2023-08-08 18:23:33 -07:00
Ai Hoshino
511f6bdf79
1. Check if the argument is an empty string in path.format. ( #4064 )
...
2. Avoid duplicating '/' at the beginning of the path.
Close : #4005
2023-08-08 07:03:18 -07:00
Jarred Sumner
320ee6b6b7
import bun ( #4055 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-08 01:42:44 -07:00
Jarred Sumner
38df5b146f
Enable Headers.prototype.getSetCookie
...
Fixes #4057
2023-08-08 01:18:36 -07:00
dave caruso
5497accbdb
Add env option for node:worker_threads ( #4052 )
...
* almost works
* env stuff
* test fixes
* wtfmove
* ok
* ok
* ref by default
* it now does the ref stuff by default
* cool
2023-08-07 23:58:38 -07:00
jhmaster
182e600eb7
Fix Bun.hash functions ( #4054 )
...
* fix `Bun.hash` functions to behave as expected
* update Bun.hash tests
* properly test the returned hash
* include murmur32v2
* update Bun.hash docs
* run fmt
2023-08-07 23:30:05 -07:00
Dylan Conway
2fe6a965af
implement fetching data urls ( #4000 )
...
* fetch data urls
* `byteSlice`
* deinit slice
* allocate `mime_type` string if needed
* `content_type_allocated` and uncomment tests
* `str_`
* createAtom and slice decode result
2023-08-07 20:15:53 -07:00
Alex Lam S.L
a32097aa9f
implement bun update ( #4046 )
...
- analogous to `npm update`
- `bun update <name>` to refresh specified package under `package.json`
- `bun update` to refresh all package to latest versions
2023-08-07 20:11:32 -07:00
Dylan Conway
1239c9460a
fix iterating headers with set-cookie ( #4048 )
...
* fix iterating headers with `set-cookie`
* a test
* move work to `HTTPHeaderMap::set`
* append set-cookie after sort
* remove compare function
2023-08-07 19:32:23 -07:00
Jarred Sumner
f2f227720b
WASM test analyzer ( #4043 )
...
* wasm
* WASM test scanner
* Update Makefile
* Update Makefile
* Configurable heap limit
* slightly better error
* Update js_parser.zig
* Update path.test.js
* Update node.mjs
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-07 18:51:16 -07:00
Ai Hoshino
5ce393aab8
Fix path.normalize edge case. ( #4042 )
...
Close : #4041
2023-08-07 06:44:04 -07:00
Jarred Sumner
00a907c7de
Fixes #4001 ( #4034 )
...
* Avoid a utf8 conversion in isDetached
* Fixes #4001
* hit the long url codepath
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-06 22:49:10 -07:00
Jarred Sumner
0665733b03
Fixes #4029 and fixes #4022 ( #4032 )
...
* Fixes #4029 and Fixes #4022
Fixes #4029
Fixes #4022
* Add test for all the fetches
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-06 20:39:40 -07:00
Jarred Sumner
8297fb0d2f
Bind require.resolve() ( #4030 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-06 18:06:18 -07:00
Yash Sharma
3185ca2d95
Running missing scripts exits with non-0 ( #4026 )
...
Co-authored-by: Yash Sharma <yashsharma@Yashs-MacBook-Air.local >
2023-08-06 17:43:24 -07:00
Alex Lam S.L
b93f304c06
[install] handle bun add of existing peerDependencies correctly ( #4028 )
2023-08-06 17:42:08 -07:00
Jarred Sumner
fa4e5d033e
Fixes #3129 ( #4018 )
...
* Fixes #3129
* add CloseEvent
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-06 07:35:07 -07:00
Jarred Sumner
1462445419
Code coverage for bun test ( #3975 )
...
* WIP code coverage initial commit
* almost works
* one approach
* Code Coverage
* Update WebKit
* it works but is not yet accurate
* skip double ascii check
* wrapper
* it works but i'm not sure what to do about blocks
* hide blocks for now
* Update ZigSourceProvider.cpp
* Create coverage.md
* Update nav.ts
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-06 06:30:23 -07:00
Ai Hoshino
ecdf2ffa6c
feat: impl dns.getServers ( #3982 )
...
* feat: impl `dns.getServers`
Close : #3981
* check return value of `ares_inet_ntop`
2023-08-06 06:16:54 -07:00
Dylan Conway
6bdee80cfc
fix macro string escaping ( #3967 )
...
* handle macro escaping
* remove printer
* use `js_lexer.decodeEscapeSequences`
2023-08-04 19:34:09 -07:00
Jarred Sumner
637a38f394
Fixes #3991
...
Fixes #3991
2023-08-04 18:54:08 -07:00
Alex Lam S.L
190ba6b743
[install] handle workspace:* correctly ( #3994 )
...
- parse as path so it works on unversioned workspaces
- fix missed storage of workspace version
fixes #3985
2023-08-04 18:21:13 -07:00
dave caruso
d196aa2de6
FFI typo ( #3973 )
...
* FFI typo
* add tests
* it was a newline
2023-08-04 16:08:50 -07:00
Yifei Wang
bdbc21ff7b
Buffer.copy should ignore out-of-range sourceEnd ( #3971 )
2023-08-04 16:08:25 -07:00
Alex Lam S.L
ff315a3bf2
[install] store resolved workspace path in lockfile ( #3974 )
...
- resolve cwd consistently
- speed up package diff
- update `test/bun.lockb`
fixes #3685
fixes #3958
2023-08-04 23:28:42 +03:00
Jarred Sumner
9beccc3305
Fix thread safety issue in async fs functions file paths ( #3964 )
...
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-03 20:09:05 -07:00
Jarred Sumner
717f0a2f42
Make the test better
2023-08-03 18:23:57 -07:00
Jarred Sumner
c2ebdf812b
Test for Module.wrap()
2023-08-03 18:22:45 -07:00
Dylan Conway
9574db355f
allow bundling builtins for browser ( #3959 )
...
* Update resolver.zig
* bundle resolve error for non-existent builtins
* tests
2023-08-03 16:27:45 -07:00
Ai Hoshino
a4d996c337
Fix edge case in path.relative. ( #3952 )
...
Close : #3924
2023-08-03 15:40:37 -07:00
Ashcon Partovi
08cf0d562a
Bunch of fixes ( #3516 )
...
* Fix #3497
* Fix #3497
* Run prettier
* Fix package.json
* remove this too
* yeah
* Fix missing tests
* Use native for utf-8-validate
* Add module ID names to builtins
* Defer evaluation of ESM & CJS modules until link time
* Use builtin name for exports in plugins
* Add module IDs to builtins
* Update JSC build with new flag
* WebKit upgrade fixes
* Update WebKit
* prettier
* Upgrade WebKit
* bump
* Update once again
* Add visitAdditionalChildren, remove .fill() usage
* Update process.test.js
* Update fs.test.ts
---------
Co-authored-by: dave caruso <me@paperdave.net >
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
2023-08-03 15:31:55 -07:00
Alex Lam S.L
9a2c3dea88
[install] fix stale bun.lockb on workspaces ( #3945 )
...
- handle workspaces under `--production` correctly
- fix `Makefile`
2023-08-03 12:37:29 -07:00
Ai Hoshino
30dde62521
Fix the string encoding in path.extname. ( #3949 )
...
Close : #3948
2023-08-03 12:34:41 -07:00
dave caruso
e83058cfe7
Fix http write ( #3939 )
...
* Fix encoding problem when uploading a binary file.
Close : #3116
* use BufferList
* Finish rebase
---------
Co-authored-by: Hanaasagi <ambiguous404@gmail.com >
2023-08-02 18:56:41 -07:00
Jarred Sumner
207c7eb509
Implement node:worker_threads ( #3923 )
...
* Start to implement `worker_threads`
* more
* more!!
* more
* Update bundle_v2.zig
* delete outdated tests
* `receiveMessageOnPort`
* props test and export default
* fix merge
* not implemented tests
* individual imports
* `receiveMessageOnPort` tests
---------
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com >
Co-authored-by: Dylan Conway <dylan.conway567@gmail.com >
2023-08-02 18:12:12 -07:00