Commit Graph

70 Commits

Author SHA1 Message Date
dave caruso
c2a77cf7ec Rewrite built-in modules to use CommonJS over ESM (#3814)
* stfdsafsd

sadffdsa

stuff

finish commonjs stuff

asdf

not done but work

not done but work

not done yet but this is how far i am

remove files

lol

update built files

uncomment everything in events lol

export default

stuff

* afdsafsd

* its not perfect but almost done

* okay

* cool

* remove temp file

* finish rebase

* revert settings.json

* a

* ch-ch-ch-ch-changes

* okay

* remove this check in release for now

* sxdcfghnjm,

* lkjhgf

* fmt

* filename can be null

* Update NodeModuleModule.h

* weee

* fmt

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-02 16:27:36 -07:00
dave caruso
9b6dc49575 Implement AsyncLocalStorage (#3089)
* work to get async local storage working.

* a

* a

* everything but queueMicrotask

* sdfghj

* .

* finish

* tests

* test

* ok

* done

* im so stupid

* Upgrade WebKit

* refactor

* refactor

* changes requested

* oops

* cool

* fix runInAsyncScope
2023-07-19 17:20:00 -07:00
Ciro Spaciari
b2af1984ed [eventsource] SSE Client (#3074)
* fix flush

* remove logs

* add HTTP/1.1 eventsource

* fix parse spec

* multiple data in one event

* get lastEventId for reconnection

* fix parsing add reconnect

* fix reconnection retry

* add retry option

* move eventsource to builtins

* remove duplicate interface on globals.d.ts

* move test to TS

* fmt

* allow no Content-Length or Transfer Encoding

* udpate builtins

* hardcoded

* merge

* revert /src/out

* updated

* Update .gitignore

* Make the tests fail

* Cleanup EventSource getter

* fixup

* fixup TS

* fmt

* update builtins

* fix tests

* Clear existing timeouts

* Add `ref` and `unref` methods

* Use `super` to make prototype pollution slightly harder

* Reduce test timeout

* Regenerate builtins

* prettier + ref/unref

* Outdated

* forgot to commit this

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-17 20:54:50 -07:00
dave caruso
4df1d37ddc Bundle and minify .exports.js files. (#3036)
* move all exports.js into src/js

* finalize the sort of this

* and it works

* add test.ts to gitignore

* okay

* convert some to ts just to show

* finish up

* fixup makefile

* minify syntax in dev

* finish rebase

* dont minify all modules

* merge

* finish rebase merge

* flaky test that hangs
2023-06-01 18:16:47 -07:00
Jarred Sumner
9d7ecf7909 [misctools] Add cold jsc start test 2023-05-05 20:01:26 -07:00
Plecra
98209b8e10 Reduce friction for building with npm (#2723)
This was the only dependency on bun that I encountered while building the
project, and the change to the gitignore ensures that it's easy to
make changes after an npm based build
2023-04-24 04:23:38 -07:00
dave caruso
461ae27d31 Rewrite Developer Docs, Improve DX for new users, moving away from Devcontainer (#2588)
* new docs starting point. missing alot of information

* very experimental idea: make setup

* run on ubuntu 20

* builds on ubuntu 20 (wsl) now

* add release instructions

* add valgrind note from jarred/new-bundler branch, just in case it gets lost when rebasing

* changes requested
2023-04-08 02:23:11 -07:00
Dylan Conway
1fa7c1f79e Generate dependency files in make bindings (#2510)
* generate dependency files, include in makefile

* move `make webcrypto` to `make bindings`

* update more references to `make webcrypto`

* remove `-lwebcrypto`
2023-03-30 19:34:20 -07:00
Ashcon Partovi
f7e4eb8369 Reorganize tests (#2332) 2023-03-07 12:22:34 -08:00
Jarred Sumner
0b4e7179b5 dump failing tests to disk 2023-03-04 18:58:10 -08:00
Jarred Sumner
f087388ebc Support running WASI (WebAssembly) files using bun run (#1929)
* another micro bench

* Support running WASI

---------

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-01-28 23:23:26 -08:00
Jarred Sumner
6424ce6397 Update .gitignore 2023-01-21 20:54:31 -08:00
Jarred Sumner
87983464d8 Implement DNS module (#1691)
* Boilerplate for DNS stuff

* Add c-ares

* lookup

* make

* Implement dns.lookup

* Create c-ares

* wip

* normalize

* repro

* Revert "repro"

This reverts commit 8b93e0c295b335b8882a9601da47720348549beb.

* Implement macOS `getaddrinfo_async_start`

* embiggen

* Update string_immutable.zig

* Update Makefile

* alright

* Update .gitignore

* Add types

* more ccache

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update bun.d.ts

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-01-07 07:09:48 -08:00
Jarred Sumner
9fd3b5587b Auto-install and link webkit 2023-01-02 11:29:22 -08:00
Simon He
7c2180194c chore: add eslintcache (#1586) 2022-12-07 22:03:11 -08:00
Jarred Sumner
275a635ad7 Update .gitignore 2022-12-03 23:57:50 -08:00
Jarred Sumner
d7dbe6f329 Remove code that doesn't work 2022-08-28 21:46:47 -07:00
dave caruso
ccc22bb968 fix(makefile): devcontainer install (#933) 2022-07-31 01:09:42 -07:00
Jarred Sumner
43de33afc7 Web Streams API (#176)
* [bun.js] `WritableStream`, `ReadableStream`, `TransformStream`, `WritableStreamDefaultController`, `ReadableStreamDefaultController` & more

* Implement `Blob.stream()`

* Update streams.test.js

* Fix sourcemaps crash

* [TextEncoder] 3x faster in hot loops

* reading almost works

* start to implement native streams

* Implement `Blob.stream()`

* Implement `Bun.file(pathOrFd).stream()`

* Add an extra function

* [fs.readFile] Improve performance

* make jsc bindings a little easier to work with

* fix segfault

* faster async/await + readablestream optimizations

* WebKit updates

* More WebKit updates

* Add releaseWEakrefs binding

* `bun:jsc`

* More streams

* Update streams.test.js

* Update Makefile

* Update mimalloc

* Update WebKit

* Create bun-jsc.test.js

* Faster ReadableStream

* Fix off by one & exceptions

* Handle empty files/blobs

* Update streams.test.js

* Move streams to it's own file

* temp

* impl #1

* take two

* good enough for now

* Implement `readableStreamToArray`, `readableStreamToArrayBuffer`, `concatArrayBuffers`

* jsxOptimizationInlining

* Fix crash

* Add `jsxOptimizationInline` to Bun.Transpiler

* Update Transpiler types

* Update js_ast.zig

* Automatically choose production mode when NODE_ENV="production"

* Update cli.zig

* [jsx] Handle defaultProps when inlining

* Update transpiler.test.js

* uncomment some tests

Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-06-07 22:32:46 -07:00
Jarred Sumner
958fc3d4f5 Update .gitignore 2022-05-30 03:50:35 -07:00
Alexander Kuznetsov
ca21c00f86 Remove generated files from git index (#182) 2022-05-30 01:13:12 -07:00
Jarred Sumner
2d39e44520 Update .gitignore 2022-04-25 16:47:33 -07:00
Jarred Sumner
612fad706f fix wasm build take 2 (one more thing is broken) 2022-04-18 20:51:10 -07:00
Jarred Sumner
bb79687f8e Even More Comments 2022-04-13 04:44:05 -07:00
Jarred Sumner
857e9bee00 Embed React Fast Refresh in Bun
Fixes https://github.com/Jarred-Sumner/bun/issues/62

If the project has it's own copy of react fast refresh and is bundling, it will use that instead.
2022-01-29 23:48:39 -08:00
Jarred Sumner
8706f77eb7 Update .gitignore 2022-01-04 16:26:12 -08:00
Jarred Sumner
0960f3d6d1 Implement a crash reporter and improve some error handling in bun install 2022-01-03 22:17:34 -08:00
Jarred Sumner
536d6ab302 github actions (#91)
* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update Dockerfile

* switch

* 😯

* Update bun.yml

* Update Dockerfile

* Update Dockerfile

* wip

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* cache is broken

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update bun.yml

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update bun.yml

* Update Dockerfile

* Update Dockerfile

* Update bun.yml

* bust it

* Update Dockerfile

* jm

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update Dockerfile

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* wip

* Update bun.yml

* Update Dockerfile

* Update Dockerfile

* Update Makefile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* pass executablePath

* alright

* Update Makefile

* Update Dockerfile

* Update Dockerfile

* Update Makefile

* Update Makefile

* Update Dockerfile

* lets try that

* Update Dockerfile

* Update bun.yml

* hm

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* not interactive

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* simplify this

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* missing

* Update Dockerfile

* Update Dockerfile

* wrong dir

* Update Dockerfile

* Update bun.yml

* Update Dockerfile

* Update Dockerfile

* Update bun.yml

* ordering

* Update Dockerfile

* Update bun.yml

* run-test file

* pass github workspace

* hm

* Update bun.yml

* copy the file

* Update run-test.sh

* Update bun.yml

* Update bun.yml

* Update bun.yml

* try this way

* Update bun.yml

* maybe?

* Update bun.yml

* maybe taht's it?

* maybe this

* cache

* up

* Update bun.yml

* Update bun.yml

* try this one i guess

* okay that might do it

* Update Dockerfile

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update chrome.json

* Update chrome.json

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* hm

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* fix caching I think

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* Update bun.yml

* maybe

* Update bun.yml

* fixup

* Update bun.yml

* Update bun.yml

* Update bun.yml

* maybe this time

* Update bun.yml

* Update Dockerfile

* random name

* ok

* explicit runner

* Update bun.yml

* Update bun.yml

* try deleting the files so the layer caching doesn't happen

* 🏃

* Update bun.yml

* Update bun.yml

* Update Dockerfile

* Update Dockerfile

* Update Dockerfile

* Dockerfile.base

* node.js

* Update bun.yml

* Update Dockerfile

* Update Dockerfile.base

* cleanup
2021-12-26 01:40:37 -08:00
Jarred Sumner
a1167d80b2 Update .gitignore 2021-12-16 19:18:51 -08:00
Jarred Sumner
809c1e46d8 [npm install] starting to look good! 2021-12-16 19:18:51 -08:00
Jarred Sumner
f8f85430c0 [internal] gitignore blobs for identifier cache 2021-10-30 01:49:19 -07:00
Jarred Sumner
a44cb9708f New subcommand: bun upgrade. It upgrades bun to the latest version. 2021-10-28 05:34:38 -07:00
Jarred Sumner
309298fa42 Fix bug with MutableString.ensureValidIdentifier 2021-10-23 22:54:39 -07:00
Jarred SUmner
92e489760d Linux build fixes 2021-10-15 22:33:36 -07:00
Jarred Sumner
deafd3d0d4 Cleanup makefile to get libiconv setup for linux 2021-10-15 20:25:23 -07:00
Jarred Sumner
756bfc9077 Add fetch CLI test app 2021-10-12 16:26:57 -07:00
Jarred Sumner
0db7af6166 [fetch] Add support for gzip & deflate to the http client
Powered by Cloudflare's zlib fork
2021-10-10 23:41:18 -07:00
Jarred Sumner
ae7b91efe2 Add CSS HMR benchmark 2021-10-07 21:27:47 -07:00
Jarred Sumner
5dbbad5cc4 Support installing bun from npm 2021-09-14 16:59:21 -07:00
Jarred Sumner
e43d3e995f package.json
Former-commit-id: 2299f44cc9092dad2ef48ea54af2555c192a723e
2021-09-05 14:27:00 -07:00
Jarred Sumner
a90760b597 Fix logging in bun bun + bump
Former-commit-id: 19275a07342879d9b02b9d9527b762c8bfadb9e6
2021-09-03 13:01:36 -07:00
Jarred Sumner
d009e02c1d latest
Former-commit-id: 1086d4f894611c1171f57d9eaf82f9170e9de2d1
2021-09-02 15:54:07 -07:00
Jarred Sumner
029ba1ea44 Fix scoped packages with bun bun
Former-commit-id: c29ff9ff602aeed4f9b19e4f003a20effcf70c0a
2021-08-25 19:08:11 -07:00
Jarred Sumner
a703afeddd gitignore
Former-commit-id: 34571e473cf4e83a92ea778f551f51598ed91ac5
2021-08-17 21:20:22 -07:00
Jarred Sumner
6585226de7 Ignore
Former-commit-id: b2c4fce705222612b0457481657db3f42db41d1c
2021-08-17 21:19:45 -07:00
Jarred Sumner
574be79253 alright thats the rename
Former-commit-id: 0faf61249e76382dfb1aa8721249474eae920753
2021-08-17 01:44:30 -07:00
Jarred Sumner
10b4b872a2 This is alot
Former-commit-id: 4b2a396611ec03270dc768b70e488b0f5eee2a37
2021-08-10 18:26:16 -07:00
Jarred Sumner
e914c5f3d2 most of the bindings!
Former-commit-id: a8a4f28046
2021-07-21 02:07:07 -07:00
Jarred Sumner
79cd2fbfe0 WIP bindings
Former-commit-id: 74e75d6925
2021-07-18 02:12:58 -07:00
Jarred Sumner
7b549c6551 g
Former-commit-id: 88ac58962e
2021-06-20 17:38:44 -07:00