aboutsummaryrefslogtreecommitdiff
path: root/src/bundler (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-09-20add `emitDecoratorMetadata` (#5777)Gravatar Dylan Conway 1-0/+3
* some progess * needs more tests * make tests easier to debug * get metadata for constructor arg decorators * fix some things * merge `emitDecoratorMetadata` option * remove `^` * bundler tests and get option from tsconfig earlier * remove spaces * fix tests
2023-09-16Use a better error labelGravatar Jarred Sumner 1-2/+2
2023-09-16Make this error message clearer (#5603)Gravatar Jarred Sumner 1-7/+37
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-28just kernel32 things (#4354)Gravatar Jarred Sumner 1-5/+5
* just kernel32 things * more * Update linux_c.zig * Update windows_c.zig * Add workaround Workaround https://github.com/ziglang/zig/issues/16980 * Rename http.zig to bun_dev_http_server.zig * Rename usages * more * more * more * thanks tigerbeetle * Rename `JSC.Node.Syscall` -> `bun.sys` * more * woops * more! * hmm * it says there are only 37 errors, but that's not true * populate argv * it says 32 errors! * 24 errors * fix regular build * 12 left! * Still 12 left! * more * 2 errors left... * 1 more error * Add link to Tigerbeetle * Fix the remainign error * Fix test timeout * Update syscall.zig --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-24fix buildGravatar Dylan Conway 1-1/+1
2023-08-20Fix(bundler): use different alias mappings based on the target. (#4163)Gravatar Ai Hoshino 1-1/+1
* Fix(bundler): use different alias mappings based on the target. Close: #3844 * chore: reduce duplicated code. * chore: split to two separate ComptimeStringMap.
2023-08-11Deprecate loading `node_modules.bun` (#4131)Gravatar Jarred Sumner 1-3/+1
* Deprecate loading `node_modules.bun` * realpath * regenerate schema * More * more * Update cli.zig --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-02typo (#3941)Gravatar dave caruso 1-2/+2
2023-08-02Rewrite built-in modules to use CommonJS over ESM (#3814)Gravatar dave caruso 1-7/+0
* 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-07-30Support `bun .` to run the entry point (#3891)Gravatar Jarred Sumner 1-2/+2
* Support `bun .` * Fix tests --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-23Raise redirect limit in bundlerGravatar Jarred Sumner 1-1/+1
2023-07-23Fixes #3764Gravatar Jarred Sumner 1-0/+6
2023-07-18zig upgrade (#3667)Gravatar Dylan Conway 2-95/+95
* upgrade * more fixes * Bump Zig --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-05don't unwrap react below version `18.0.0` (#3538)Gravatar Dylan Conway 1-0/+4
* don't unwrap react below version 18 * empty string * also `react-dom`
2023-07-01Use `BunString` in `SystemError` (#3485)Gravatar Jarred Sumner 1-4/+12
* Use `BunString` in SystemError * Use Bun::toStringRef when we will de-ref strings * Move `napi_create_error` to C++ to support `code` being a Symbol potentially * Update blob.zig * Make this test less flaky --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-29handle multiple redirectsGravatar Dylan Conway 1-2/+11
2023-06-29[bundler] avoid printing unnecessary declarations (#3456)Gravatar Dylan Conway 1-21/+25
* skip declarations without values * tests * deoptimize cjs when decls are needed
2023-06-26Update bundle_v2.zig (#3420)Gravatar Dylan Conway 1-1/+1
2023-06-21upgrade zig to `v0.11.0-dev.3737+9eb008717` (#3374)Gravatar Dylan Conway 2-41/+39
* progress * finish `@memset/@memcpy` update * Update build.zig * change `@enumToInt` to `@intFromEnum` and friends * update zig versions * it was 1 * add link to issue * add `compileError` reminder * fix merge * format * upgrade to llvm 16 * Revert "upgrade to llvm 16" This reverts commit cc930ceb1c5b4db9614a7638596948f704544ab8. --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-13Fix crash in CJS (#3294)bun-v0.6.9Gravatar Jarred Sumner 1-4/+4
* Fix crash in CJS * Add std.heap.ArenaAllocator * Use our arena allocator * Reduce JS parser memory usage and make HMR faster * Write some comments * fix test failure & clean up this code * Update javascript.zig * make arena usage safer --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-02[bundler] fix json imports, undo some todosGravatar Dylan Conway 1-14/+14
2023-05-31`--no-macros` flag, disable macros in node_modulesGravatar Jarred Sumner 1-0/+1
2023-05-30Fixes #3115Gravatar Jarred Sumner 1-18/+0
2023-05-29Cleanup CommonJS changes (#3112)bun-v0.6.5Gravatar Jarred Sumner 1-0/+1
* Add more GC in test * Fix handling of functions and re-assignments in CommonJS * Increase timeout --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-24Load `.env.test`, set NODE_ENV=test in `bun test`, load ↵Gravatar Jarred Sumner 1-20/+1
`.env.{test,production,development}.local` (#3037) * Support `.env.test` & `.env.{test,production,development}.local` * Fix bug preventing inlining of process.env.NODE_ENV by default * Update env_loader.zig * add env tests --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: dave caruso <me@paperdave.net>
2023-05-24fix setting `jsxImportSource`, `jsxFactory`, and `jsxFragmentFactory` (#3057)Gravatar Dylan Conway 1-1/+0
* default automatic, merge jsx flags from multiple tsconfigs * use entire package name * some tests * more tests
2023-05-21Fix assertion failureGravatar Jarred Sumner 1-1/+1
2023-05-18set `node_allocator` for sourcemap joiner (#2953)Gravatar Dylan Conway 1-17/+19
2023-05-18Fixes #2942 (#2947)Gravatar Jarred Sumner 1-1/+14
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-17Mention setting `target` to `"node"` or `"bun"` when a ResolveMessage occurs ↵Gravatar Jarred Sumner 1-2/+2
for a Node.js builtin
2023-05-17do not fail bundles on warnings (#2920)Gravatar dave caruso 1-4/+4
2023-05-16fix asset naming output paths (#2904)Gravatar Dylan Conway 1-12/+30
* rename to `src_path` and `dest_path`, use `dest_path` for output * format * option for compile
2023-05-16Fixes #2895Gravatar Jarred Sumner 1-4/+4
2023-05-16Fix running commonjs modules as entry point (#2885)Gravatar dave caruso 1-4/+4
* fix cjs run issue * use a primordial * fix behavior * fix it again * fix tste
2023-05-15[bun build] builds w/ sourcemaps get 15% fasterGravatar Jarred Sumner 1-30/+71
parallelize quoting source contents
2023-05-15Add TODOGravatar Jarred Sumner 1-0/+1
2023-05-15Set files with #! as executableGravatar Jarred Sumner 1-4/+10
2023-05-15[bun build] Automatically set target to `bun` when a hashbang is providedGravatar Jarred Sumner 1-1/+14
2023-05-15More error message cleanupGravatar Jarred Sumner 1-4/+12
2023-05-15Fix crash when importing a file with an unknown extensionGravatar Jarred Sumner 1-16/+46
2023-05-14Single-file standalone Bun executables (#2879)Gravatar Jarred Sumner 1-1/+36
* Add LIEF * Compile LIEF * Implement support for embedding files on macOS * proof of concept * Add zstd * Implement runtime support * Move some code around * Update .gitmodules * Upgrade zig https://github.com/ziglang/zig/pull/15278 * leftover * leftover * delete dead code * Fix extname * Revert "Upgrade zig" This reverts commit dd968f30bffb6c06e34302645a3a4468c957fb4e. * Revert "leftover" This reverts commit 7664de7686276cfba431103847d35b9270433dee. * Revert "leftover" This reverts commit 498005be06a8a1747d48824310e5a020b1f90d97. * various fixes * it works! * leftover * Make `zig build` a little faster * give up on code signing support * Support Linux & macOS * Finish removing LIEF * few more * Add zstd to list of deps * make it pretty --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-12`root` bundle option (#2859)Gravatar Dylan Conway 1-53/+29
* handle multiple output files and `[dir]` * get the realpath of `root_dir` * duplicate output paths * add `rootdir` to `JSBundler` * use realpath of input file * add tests for naming and root --------- Co-authored-by: Dave Caruso <me@paperdave.net>
2023-05-12[bundler] Don't wait on sourcmaps that don't existGravatar Jarred Sumner 1-1/+1
2023-05-12[bundler] De-optimize `import defaultIdentifier from './foo.cjs'`Gravatar Jarred Sumner 1-45/+17
2023-05-12[bundler] Empty ESM gets `undefined`, empty CJS gets `{}`Gravatar Jarred Sumner 1-6/+22
2023-05-12Fix importstar_ts/ReExportTypeOnlyFileES6Gravatar Jarred Sumner 1-0/+4
2023-05-12[bundler] Fix `export * from ./my-cjs-file.cjs'`Gravatar Jarred Sumner 1-4/+5
2023-05-11Fix require() on a converted fileGravatar Jarred Sumner 1-1/+4
2023-05-11Fix tree shaking flagGravatar Jarred Sumner 1-1/+5
2023-05-11enable tree shakingGravatar Jarred Sumner 1-0/+1