Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bun gets a new bundler #2312

Merged
merged 276 commits into from
Apr 8, 2023
Merged
Show file tree
Hide file tree
Changes from 233 commits
Commits
Show all changes
276 commits
Select commit Hold shift + click to select a range
220f8ab
Merge branch 'main' into jarred/new-bundler
Jarred-Sumner Mar 1, 2023
417c303
alright now just gotta try running it
Jarred-Sumner Mar 1, 2023
49553f4
fix a gajillion compiler errors
Jarred-Sumner Mar 1, 2023
32c9f11
even more code
Jarred-Sumner Mar 1, 2023
41ad006
okay i fixed more errors
Jarred-Sumner Mar 1, 2023
abaa8e9
Merge branch 'main' into jarred/new-bundler
Jarred-Sumner Mar 3, 2023
38daf43
wip
Jarred-Sumner Mar 3, 2023
a3745ec
Update launch.json
Jarred-Sumner Mar 3, 2023
c892ce9
Update string_builder.zig
Jarred-Sumner Mar 3, 2023
fe53991
`fast_debug_build_mode` makes debug build 2x faster
Jarred-Sumner Mar 4, 2023
97e1930
Update bundle_v2.zig
Jarred-Sumner Mar 4, 2023
3bd3d63
more code!
Jarred-Sumner Mar 4, 2023
0194f8e
It bundles!
Jarred-Sumner Mar 5, 2023
f5ef301
Merge branch 'main' into jarred/new-bundler
Jarred-Sumner Mar 6, 2023
f527cba
Rename `Bun.Transpiler` to `Bun.Bundler`
Jarred-Sumner Mar 6, 2023
8e004c5
`import()` expressions almost work
Jarred-Sumner Mar 7, 2023
fc2cfa6
wip attempt to get import() expr to work
Jarred-Sumner Mar 7, 2023
a963037
Bundle namespace imports
Jarred-Sumner Mar 7, 2023
5db1e30
Attempt to fix the issue with import() unsuccessfully
Jarred-Sumner Mar 8, 2023
f4ea29c
consider current working directory when resolving relative paths (#2313)
alexlamsl Mar 5, 2023
843ac05
support `expect().toThrow(/pattern/)` (#2314)
alexlamsl Mar 6, 2023
80d5fdd
fix missing `Blob` error messages on Linux (#2315)
alexlamsl Mar 6, 2023
deeebf4
fix & clean up tests (#2318)
alexlamsl Mar 6, 2023
2e0118e
feat(tty): add some `tty.WriteStream` methods to `process.{stdout, st…
ThatOneBro Mar 6, 2023
8294166
Fix docker install command
Electroid Mar 6, 2023
fae236c
`bun test` on macOS in GitHub Actions (#2322)
alexlamsl Mar 6, 2023
d3a93c4
Fixes #2323
Jarred-Sumner Mar 7, 2023
a218e18
throw invalid parameter errors in `crypto.scryptSync` (#2331)
dylan-conway Mar 7, 2023
d7f5898
Add reference documentation for bun:test (#2327)
Electroid Mar 7, 2023
c8c2b62
Reorganize tests (#2332)
Electroid Mar 7, 2023
0b5e19d
Fix html-rewriter.test.js
Electroid Mar 7, 2023
176ac69
fix the wrong thing being incremented in hmr example (#2334)
pfgithub Mar 7, 2023
9f8cf19
Add more test harness
Electroid Mar 8, 2023
7a97020
Improve Benchmarking page, small fixes (#2339)
colinhacks Mar 8, 2023
f4a2f04
Fix typo
colinhacks Mar 8, 2023
05a0d4a
Fix links
colinhacks Mar 8, 2023
f780ac3
run prettier
Jarred-Sumner Mar 8, 2023
ac5874b
Document openInEditor
colinhacks Mar 8, 2023
bd1e76c
improve `Buffer` compatibility with Node.js (#2341)
alexlamsl Mar 8, 2023
80b7f80
run `bun test` after macOS builds (#2343)
alexlamsl Mar 8, 2023
c04f582
"binary" is an alias of "latin1"
Jarred-Sumner Mar 8, 2023
f97c8ac
More spec compliant `Blob.prototype.type` (#2340)
Jarred-Sumner Mar 8, 2023
003a0a7
Fix bug in test runner
Jarred-Sumner Mar 8, 2023
795a6fa
Support `import()` expressions
Jarred-Sumner Mar 9, 2023
a318f71
Implement `require()`
Jarred-Sumner Mar 10, 2023
ee435c6
clean up bit_set.zig slightly
Jarred-Sumner Mar 10, 2023
505b1ac
Move some things around
Jarred-Sumner Mar 10, 2023
bcff518
misc cleanup
Jarred-Sumner Mar 10, 2023
080f229
Cleanup some things
Jarred-Sumner Mar 10, 2023
48838f8
Fix a lot of stuff
Jarred-Sumner Mar 10, 2023
4dd8f1a
Fix `module.exports.fn = fn;` in ESM entry point
Jarred-Sumner Mar 10, 2023
733ff12
Fix crash due when printing file
Jarred-Sumner Mar 10, 2023
b397950
Fix issue with class names
Jarred-Sumner Mar 10, 2023
ff2cf5b
Fix issue with `export default identifier`
Jarred-Sumner Mar 10, 2023
0e0e2e7
Update js_parser.zig
Jarred-Sumner Mar 10, 2023
983f3c5
optimization: inline single-property object acceses and arrays
Jarred-Sumner Mar 10, 2023
c83a9a0
Fix undefined memory in renamed symbols list
Jarred-Sumner Mar 10, 2023
86c00e2
Handle call target
Jarred-Sumner Mar 10, 2023
7158c48
wip
Jarred-Sumner Mar 10, 2023
7bd3647
Inline it
Jarred-Sumner Mar 10, 2023
324ecbb
Fix undefined memory issue when reclaiming blocks in ast
Jarred-Sumner Mar 12, 2023
7e1605a
Halt linking on any parse errors
Jarred-Sumner Mar 12, 2023
f9273aa
alias
Jarred-Sumner Mar 12, 2023
597faf6
Rename `enable_bundling` to `enable_legacy_bundling`
Jarred-Sumner Mar 12, 2023
7ae0cdb
Workaround anonymous struct literal zig bug
Jarred-Sumner Mar 12, 2023
a115015
Use slower approach (without bitset) because it doesn't break after 8…
Jarred-Sumner Mar 12, 2023
0613551
Fix incorrectly-renaming statically defined symbols
Jarred-Sumner Mar 12, 2023
ab3d347
Handle more edgecases in our bit_set fork
Jarred-Sumner Mar 12, 2023
731fc46
Reduce number of allocations for `define`
Jarred-Sumner Mar 12, 2023
493b1bd
Do not rename unbound symbols
Jarred-Sumner Mar 12, 2023
1b1570a
Clean up dot defines a little more
Jarred-Sumner Mar 12, 2023
2284578
Make the generated names prettier
Jarred-Sumner Mar 12, 2023
6288584
Workaround runtime symbol missing issue
Jarred-Sumner Mar 12, 2023
efaa427
Merge branch 'main' into jarred/new-bundler
Jarred-Sumner Mar 13, 2023
42e69a9
Fail the build on errors
Jarred-Sumner Mar 13, 2023
9406f84
Support export * from
Jarred-Sumner Mar 13, 2023
b6733d0
Support `--outfile`
Jarred-Sumner Mar 13, 2023
8aae575
partially fix renaming
Jarred-Sumner Mar 13, 2023
410434f
fanicer symbol renaming impl
Jarred-Sumner Mar 13, 2023
dc7fd5e
misc, extremely revertible cleanup
Jarred-Sumner Mar 13, 2023
60d5054
Fix up some bugs with symbol renaming
Jarred-Sumner Mar 13, 2023
124d045
formatting
Jarred-Sumner Mar 13, 2023
8af6f28
Update launch.json
Jarred-Sumner Mar 14, 2023
54f0a52
Merge branch 'main' into jarred/new-bundler
Jarred-Sumner Mar 14, 2023
38dfe59
Parse `__PURE__` comments
Jarred-Sumner Mar 14, 2023
a733b0c
clean up simd code for pure comments
Jarred-Sumner Mar 14, 2023
9d258a1
Merge branch 'main' into jarred/new-bundler
Jarred-Sumner Mar 15, 2023
4f02860
changes to merge
Jarred-Sumner Mar 15, 2023
692712d
workaround runtime issue
Jarred-Sumner Mar 15, 2023
5473f22
Fix issue with `export * as` not propagating correctly
Jarred-Sumner Mar 15, 2023
f8ac1d2
Make all top-level declarations `var` when bundling
Jarred-Sumner Mar 15, 2023
0a83a22
Fix missing prefix
Jarred-Sumner Mar 15, 2023
33b6195
Fix assigning to stack copy
Jarred-Sumner Mar 15, 2023
0e48779
Fix missing runtime symbol
Jarred-Sumner Mar 15, 2023
9a8128e
Fix bug with namespace exports
Jarred-Sumner Mar 15, 2023
0091426
Dramatically reduce allocations
Jarred-Sumner Mar 15, 2023
3f8175a
Update launch.json
Jarred-Sumner Mar 15, 2023
ef9fe5b
Add missing flags
Jarred-Sumner Mar 16, 2023
060937e
Update js_parser.zig
Jarred-Sumner Mar 16, 2023
7f50747
small cleanup
Jarred-Sumner Mar 16, 2023
313b48a
Make the export name better
Jarred-Sumner Mar 16, 2023
e97eeb1
Fix unnecessary `var foo = foo`
Jarred-Sumner Mar 16, 2023
6f59bc7
Merge branch 'main' into jarred/new-bundler
Jarred-Sumner Mar 16, 2023
f296813
Implement CommonJS -> ESM conversion
Jarred-Sumner Mar 17, 2023
077f4be
Implement module redirects
Jarred-Sumner Mar 17, 2023
7fd37b9
Port esbuild bundler tests for new bundler (#2380)
paperdave Mar 17, 2023
f0ee781
Fixups for test runner
Jarred-Sumner Mar 17, 2023
40e9f7c
Hoist imports & exports
Jarred-Sumner Mar 17, 2023
a8c72e8
Fix test
Jarred-Sumner Mar 17, 2023
539d703
Hoist classes
Jarred-Sumner Mar 17, 2023
2f60d7a
bundler test refining, 51/835
paperdave Mar 17, 2023
c0ef262
Fix runtime require
Jarred-Sumner Mar 17, 2023
8f408b1
bundler test refining, 81/835
paperdave Mar 17, 2023
6bf4e38
bundler test refining, 93/835
paperdave Mar 19, 2023
d7bba11
Make the test work in any timezone
Jarred-Sumner Mar 16, 2023
6ee3446
feat(expect): update toBeInstanceOf (#2396)
zhiyuang Mar 16, 2023
29d8849
Rename `expectObjectTypeCount` to `expectMaxObjectTypeCount`
Jarred-Sumner Mar 16, 2023
0112e78
Fix socket tests with connection errors (#2403)
dylan-conway Mar 16, 2023
adc9ab1
remove trailing comma
dylan-conway Mar 16, 2023
e9c09f8
Organize Dockerfiles for official status
Electroid Mar 16, 2023
b3f3bd9
Remove test Dockerfile
Electroid Mar 16, 2023
0366c6e
Remove old Docker workflow
Electroid Mar 16, 2023
18808b5
Feat(test): add toMatch (#2404)
zhiyuang Mar 17, 2023
dade9f4
Fix various fetch/response/request tests (#2416)
dylan-conway Mar 18, 2023
c2b7704
Fix several bugs (#2418)
dylan-conway Mar 18, 2023
4842cef
:nail_care:
dylan-conway Mar 18, 2023
fa4a914
docs: Use correct url in the 'Issues' link in README header (#2420)
kamilogorek Mar 18, 2023
c36e6e0
Fix crash when rendering error page and the server or network is slow
Jarred-Sumner Mar 18, 2023
2ab591b
[fetch] Make the default body value `null` when unspecified
Jarred-Sumner Mar 18, 2023
4e85aa6
Make node-net tests less flaky
Jarred-Sumner Mar 18, 2023
cde94c5
[node:net] Fix issue with `listen` callback firing before it's listening
Jarred-Sumner Mar 18, 2023
2631874
Always clear timers in node test harness
Jarred-Sumner Mar 18, 2023
65c5458
Fix out of bounds access
Jarred-Sumner Mar 18, 2023
8b491f0
Update UWS
Jarred-Sumner Mar 18, 2023
2c8eeb0
Make this test more thorough
Jarred-Sumner Mar 18, 2023
730911e
Hanging abort test
Jarred-Sumner Mar 19, 2023
db85898
0 length body is a null stream
Jarred-Sumner Mar 19, 2023
7091b6f
Several bug fixes (#2427)
Jarred-Sumner Mar 19, 2023
dbbe985
Remove usages of port numbers in tests
Jarred-Sumner Mar 19, 2023
da5cf71
Set -O2 and -fno-rtti
Jarred-Sumner Mar 20, 2023
7791166
Remove -g
Jarred-Sumner Mar 20, 2023
908c9dd
Prevent undefined memory access
Jarred-Sumner Mar 20, 2023
d73068f
[bun test] Implement `--rerun-each` flag to run each test N times
Jarred-Sumner Mar 20, 2023
3ccb9f0
Reduce number of module scopes created
Jarred-Sumner Mar 20, 2023
fa13f4c
add some extra abort checks into streams (#2430)
cirospaciari Mar 20, 2023
45a6897
remove unnecessary check (#2432)
cirospaciari Mar 20, 2023
ca8e981
Fix bug with scoped aliased dependencies in bun install on macOS
Jarred-Sumner Mar 20, 2023
4aec513
remove `addLog`, remove `--prominent-compile-errors`
dylan-conway Mar 19, 2023
e92fc6b
Finish the upgrade
Jarred-Sumner Mar 20, 2023
7583a70
Merge branch 'main' into jarred/new-bundler
Jarred-Sumner Mar 21, 2023
f92ad0b
Optional chaining flag
Jarred-Sumner Mar 21, 2023
3a34bef
Implement same_target_becomes_destructuring optimization
Jarred-Sumner Mar 21, 2023
cd6576f
bundler test refining, 109/835
paperdave Mar 21, 2023
583c799
Reset bindings
Jarred-Sumner Mar 21, 2023
20b20f7
Support multiple entry points
Jarred-Sumner Mar 22, 2023
17e10e2
Implement `--entry-names` flag
Jarred-Sumner Mar 22, 2023
c9a803a
Use a tempdir with a better name
Jarred-Sumner Mar 22, 2023
6c55652
prettier
Jarred-Sumner Mar 22, 2023
a07c09a
Merge branch 'main' into jarred/new-bundler
Jarred-Sumner Mar 22, 2023
e1edb21
Log file name
Jarred-Sumner Mar 22, 2023
d1ee4b5
Update js_parser.zig
Jarred-Sumner Mar 22, 2023
f0324ba
Mark all bun builtins as external
Jarred-Sumner Mar 22, 2023
52cbb6e
Make resolve errors actually errors
Jarred-Sumner Mar 22, 2023
fca853f
Update bundler_default.test.ts
Jarred-Sumner Mar 22, 2023
277e8fe
Merge branch 'main' into jarred/new-bundler
Jarred-Sumner Mar 22, 2023
9411847
Fix `await import(foo)`
Jarred-Sumner Mar 22, 2023
a6e12fc
WIP react server components
Jarred-Sumner Mar 22, 2023
389dad2
Do more stuff at runtime
Jarred-Sumner Mar 22, 2023
e5f110b
:scissors:
Jarred-Sumner Mar 22, 2023
43b5535
Support automatic JSX imports
Jarred-Sumner Mar 23, 2023
62483a5
Use a module cache for now
Jarred-Sumner Mar 23, 2023
091e5cc
Merge branch 'main' into jarred/new-bundler
Jarred-Sumner Mar 23, 2023
789e1be
Merge remote-tracking branch 'origin' into jarred/new-bundler
Jarred-Sumner Mar 23, 2023
09e3efb
Update tsconfig.base.json
Jarred-Sumner Mar 23, 2023
8863848
Fix ThisOutsideFunctionNotRenamed
Jarred-Sumner Mar 23, 2023
c71aea8
woopsie
Jarred-Sumner Mar 23, 2023
89b04eb
moar cpu
Jarred-Sumner Mar 23, 2023
18721ff
clamp it
Jarred-Sumner Mar 23, 2023
0e7eb32
fixup
Jarred-Sumner Mar 23, 2023
7b7c252
Add a bunch of assertions
Jarred-Sumner Mar 23, 2023
840a828
Bun uses automatic runtime by default
Jarred-Sumner Mar 23, 2023
09880fa
Parse Import Attributes
Jarred-Sumner Mar 23, 2023
1bc887c
Add a note about Valgrind
Jarred-Sumner Mar 23, 2023
977b616
Update developing.md
Jarred-Sumner Mar 23, 2023
6336241
Fix up code splitting for React Server Components
Jarred-Sumner Mar 24, 2023
344b4c2
Implement client component manifest
Jarred-Sumner Mar 24, 2023
595e701
Fix crash with --react-server-components and no client components
Jarred-Sumner Mar 25, 2023
fcfcac3
Backport https://github.com/ziglang/zig/commit/4d31e3c917a05541394c54…
Jarred-Sumner Mar 25, 2023
a97576f
Update launch.json
Jarred-Sumner Mar 27, 2023
35500f1
Fix for latest zig
Jarred-Sumner Mar 27, 2023
2e91cbd
Workaround bug with ?[]const string
Jarred-Sumner Mar 28, 2023
fd84f2a
switch to regular slice
Jarred-Sumner Mar 28, 2023
b80399b
Avoid initializing named_imports and named_exports as undefined
Jarred-Sumner Mar 28, 2023
3ca16c6
Reduce usages of `undefined`
Jarred-Sumner Mar 28, 2023
0b8b3b2
Add more assertions
Jarred-Sumner Mar 28, 2023
b32e021
--watch wip
Jarred-Sumner Mar 28, 2023
aa196b4
Merge branch 'main' into jarred/new-bundler
Jarred-Sumner Mar 29, 2023
3294bb8
Update javascript.zig
Jarred-Sumner Mar 29, 2023
b7aa1be
Possibly fix the race condition
Jarred-Sumner Mar 29, 2023
2ec4bbf
Faster `do`
Jarred-Sumner Mar 30, 2023
9e15e9d
bump allocator
Jarred-Sumner Mar 30, 2023
c223d8e
Reduce the size of `Symbol` slightly
Jarred-Sumner Mar 30, 2023
d6017fc
Alphabetically sort runtime import symbols, for determinism
Jarred-Sumner Mar 30, 2023
88b1ff6
Prepare for code splitting
Jarred-Sumner Mar 30, 2023
49a1356
handle overlapping stdout
Jarred-Sumner Mar 30, 2023
dd1ad95
pure
Jarred-Sumner Mar 30, 2023
229d3de
clean up some things
Jarred-Sumner Mar 30, 2023
343328f
Fix bug with `$$typeof`
Jarred-Sumner Mar 31, 2023
427714c
Address CommonJS -> ESM hoisting bug
Jarred-Sumner Mar 31, 2023
34def7d
Support `"use server"` in manifest
Jarred-Sumner Mar 31, 2023
16c388c
Implement `"use server"`
Jarred-Sumner Mar 31, 2023
a7c5682
Fix importing bun builtins when bundling
Jarred-Sumner Mar 31, 2023
b249874
Make `commonjs_to_esm` a feature flag, fix some splitting bugs
Jarred-Sumner Mar 31, 2023
4743a4a
:scissors:
Jarred-Sumner Apr 1, 2023
6c48f76
fixme remove this
Jarred-Sumner Apr 1, 2023
abf9468
Fix crash in longestCommonPath
Jarred-Sumner Apr 3, 2023
dcae71e
Chunking! Just need to do import paths now.
Jarred-Sumner Apr 3, 2023
a6d4144
Import paths work...now trying to figure out how to make runtime symb…
Jarred-Sumner Apr 3, 2023
1925876
add workaround
Jarred-Sumner Apr 3, 2023
0e091cd
Replace `bun bun` with `bun build`
Jarred-Sumner Apr 4, 2023
4128545
Fix crash with dual package hazard
Jarred-Sumner Apr 4, 2023
48eab97
Fix many CommonJS <> ESM interop bugs
Jarred-Sumner Apr 4, 2023
cd82782
Support package.json `"sideEffects"`
Jarred-Sumner Apr 4, 2023
ea6e1f1
add a not good --watch implementation
Jarred-Sumner Apr 4, 2023
f4269c5
Merge branch 'main' into jarred/new-bundler
Jarred-Sumner Apr 4, 2023
23364cd
bundler test refining, 140/831
paperdave Apr 6, 2023
5b55fe8
Merge branch 'main' into jarred/new-bundler
Jarred-Sumner Apr 6, 2023
5b4d7f0
remove accidentally committed file
paperdave Apr 6, 2023
238ddf0
do not return status code 1 on successful bundles
paperdave Apr 6, 2023
567c7a0
bundler test refining, 159/830
paperdave Apr 7, 2023
72a1f27
pass exit code to exitOrWatch
paperdave Apr 7, 2023
51743d5
clean up help menu
paperdave Apr 7, 2023
7f06f3f
importstar is fully ported
paperdave Apr 7, 2023
81fea74
wip
Jarred-Sumner Apr 7, 2023
86e8e75
you can run code in this branch now
Jarred-Sumner Apr 7, 2023
05ce8ae
Merge branch 'main' into jarred/new-bundler
Jarred-Sumner Apr 7, 2023
f15ebdf
Disable this transform
Jarred-Sumner Apr 7, 2023
0839663
organize and document bundler tests
paperdave Apr 7, 2023
e8ebb1e
Fix double import
Jarred-Sumner Apr 7, 2023
30636fb
Fix sloppy mode function declarations
Jarred-Sumner Apr 7, 2023
987df8b
Disable our CommonJS transform for now
Jarred-Sumner Apr 7, 2023
fa1f0b6
add `assertNotPresent` to make splitting cases easier
paperdave Apr 7, 2023
24ba636
Bump!
Jarred-Sumner Apr 7, 2023
ee813e5
Merge branch 'main' into jarred/new-bundler
Jarred-Sumner Apr 7, 2023
68b4235
Update bun.d.ts
Jarred-Sumner Apr 7, 2023
e724d8b
use import.meta.require in runtime code
Jarred-Sumner Apr 7, 2023
8f98787
Disable this again
Jarred-Sumner Apr 7, 2023
1937c1b
Fix dirname
Jarred-Sumner Apr 7, 2023
81be1b4
Fix ESM -> CJS wrapper
Jarred-Sumner Apr 7, 2023
1294ac4
:nail_care:
Jarred-Sumner Apr 7, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
"/home/ubuntu/vscode-zig.vsix",
"vadimcn.vscode-lldb",
"esbenp.prettier-vscode",
"xaver.clang-format"
"xaver.clang-format",
"bierner.comment-tagged-templates"
],
"postCreateCommand": "cd /build/bun; bash /build/getting-started.sh; cat /build/README.md",

Expand Down
8 changes: 7 additions & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
{
"recommendations": ["ziglang.vscode-zig", "esbenp.prettier-vscode", "xaver.clang-format", "vadimcn.vscode-lldb"]
"recommendations": [
"ziglang.vscode-zig",
"esbenp.prettier-vscode",
"xaver.clang-format",
"vadimcn.vscode-lldb",
"bierner.comment-tagged-templates"
]
}
31 changes: 29 additions & 2 deletions .vscode/launch.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"zig.zls.enableInlayHints": false,

"[jsx]": {
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
Expand All @@ -44,7 +46,7 @@
"editor.unicodeHighlight.ambiguousCharacters": false,
"editor.unicodeHighlight.invisibleCharacters": false,
"diffEditor.ignoreTrimWhitespace": false,
"editor.defaultFormatter": "yzhang.markdown-all-in-one",
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true,
"editor.wordWrap": "on",
"editor.quickSuggestions": {
Expand Down
21 changes: 19 additions & 2 deletions docs/project/developing.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

Configuring a development environment for Bun usually takes 30-90 minutes depending on your operating system.

## Linux/Windows
Expand Down Expand Up @@ -206,4 +205,22 @@ While Bun is in beta, you can modify them at runtime in release builds via the e

## Troubleshooting

If you encounter `error: the build command failed with exit code 9` during the build process, this means you ran out of memory or swap. Bun currently needs about 22 GB of RAM to compile.
If you encounter `error: the build command failed with exit code 9` during the build process, this means you ran out of memory or swap. Bun currently needs about 8 GB of RAM to compile.

## Valgrind

On Linux, valgrind can help find memory issues.

Keep in mind:

- JavaScriptCore doesn't support valgrind. It will report spurious errors.
- Valgrind is slow
- Mimalloc will sometimes cause spurious errors when debug build is enabled

You'll need a very recent version of Valgrind due to DWARF 5 debug symbols. You may need to manually compile Valgrind instead of using it from your Linux package manager.

`--fair-sched=try` is necessary if running multithreaded code in Bun (such as the bundler). Otherwise it will hang.

```bash
valgrind --fair-sched=try --track-origins=yes bun-debug <args>
```
9 changes: 8 additions & 1 deletion packages/bun-types/bun.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ declare module "bun" {
*
*/

export class Transpiler {
export class Bundler {
constructor(options?: TranspilerOptions);

/**
Expand Down Expand Up @@ -925,6 +925,13 @@ declare module "bun" {
scanImports(code: StringOrBuffer): Import[];
}

/**
* Bun.Transpiler was renamed to Bun.Bundler in Bun v0.6
*
* See {@link Bun.Bundler}
*/
export const Transpiler: typeof Bundler;

export interface Import {
path: string;

Expand Down
1 change: 1 addition & 0 deletions root.zig
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
pub usingnamespace @import("src/main.zig");
pub const bun = @import("src/bun.zig");
pub const content = struct {
pub const error_js_path = "packages/bun-error/dist/index.js";
pub const error_js = @embedFile(error_js_path);
Expand Down
75 changes: 0 additions & 75 deletions src/api/bundle_v2.peechy

This file was deleted.

23 changes: 23 additions & 0 deletions src/api/schema.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading