aboutsummaryrefslogtreecommitdiff
path: root/test/bundler (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-07-07Unmark as TODOGravatar Jarred Sumner 1-2/+0
2023-07-07Update testGravatar Jarred Sumner 1-6/+7
2023-07-06add `[dir]` to defaultGravatar Dylan Conway 1-2/+2
2023-06-29[bundler] avoid printing unnecessary declarations (#3456)Gravatar Dylan Conway 1-0/+71
* skip declarations without values * tests * deoptimize cjs when decls are needed
2023-06-28use main field over module for runtime (#3448)Gravatar Dylan Conway 1-0/+200
* use main field over module for runtime * move flag to `Resolver` * set `prefer_module_field` in `initWithModuleGraph`
2023-06-24Rewrite Bun's runtime CommonJS loader (#3379)Gravatar Jarred Sumner 1-7/+10
* wip changes for CommonJS * this rewrite is almost complete * even more code * wip * Remove usages of `import.meta.require` from builtins * Remove usages of require * Regenerate * :scissors: builtin rewrite commonjs in printer * Use lazy custom getters for import.meta * fixups * Remove depd * ugh * still crashing * fixup undici * comment out import.meta.require.resolve temporarily not a real solution but it stops the crashes * Redo import.meta.primordials * Builtins now have a `builtin://` protocol in source origin * Seems to work? * Finsih getting rid of primordials * switcharoo * No more function * just one more bug * Update launch.json * Implement `require.main` * :scissors: * Bump WebKit * Fixup import cycles * Fixup improt cycles * export more things * Implement `createCommonJSModule` builtin * More exports * regenerate * i broke some stuff * some of these tests work now * We lost the encoding * Sort of fix zlib * Sort of fix util * Update events.js * bump * bump * bump * Fix missing export in fs * fix some bugs with builtin esm modules (stream, worker_threads, events). its not perfect yet. * fix some other internal module bugs * oops * fix some extra require default stuff * uncomment this file but it crsahes on my machine * tidy code here * fixup tls exports * make simdutf happier * Add hasPrefix binding * Add test for `require.main` * Fix CommonJS evaluation order race condition * Make node:http load faster * Add missing exports to tls.js * Use the getter * Regenerate builtins * Fix assertion failure in Bun.write() * revamp dotEnv parser (#3347) - fixes `strings.indexOfAny()` - fixes OOB array access fixes #411 fixes #2823 fixes #3042 * fix tests for `expect()` (#3384) - extend test job time-out for `darwin-aarch64` * `expect().resolves` and `expect().rejects` (#3318) * Move expect and snapshots to their own files * expect().resolves and expect().rejects * Fix promise being added to unhandled rejection list * Handle timeouts in expect(<promise>) * wip merge * Fix merge issue --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> * fixup min/memcopy (#3388) * Fix crash in builtins * Don't attempt to evaluate modules with no source code * Update WebCoreJSBuiltins.cpp * Update WebCoreJSBuiltins.cpp * Update WebCoreJSBuiltins.cpp * Fix crash * cleanup * Fix test cc @paperdave * Fixup Undici * Fix issue in node:http * Create util-deprecate.mjs * Fix several bugs * Use the identifier * Support error.code in `util.deprecate` * make the CJs loader slightly more resilient * Update WebCoreJSBuiltins.cpp * Fix macros --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: dave caruso <me@paperdave.net> Co-authored-by: Alex Lam S.L <alexlamsl@gmail.com> Co-authored-by: Ashcon Partovi <ashcon@partovi.net> Co-authored-by: Ciro Spaciari <ciro.spaciari@gmail.com>
2023-06-20record jsx factory symbols in classic mode (#3360)Gravatar Dylan Conway 2-1/+77
* record jsx factory symbols * merge factory/fragment when more than one part * update test * use existing functions, use, `memberListToComponentsIfDifferent` * missing file * fix defaults
2023-06-16don't remove const if referenced before declaration (#3337)Gravatar Dylan Conway 1-0/+42
2023-06-12handle unwrapping `require` in any expression (#3292)Gravatar Dylan Conway 1-0/+64
2023-06-09Fixes #3206 (#3262)Gravatar Jarred Sumner 1-0/+3
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-05add a test for lodash-es (#3217)Gravatar dave caruso 3-1/+64
* add bundling tests for lodash-es * add isBuffer tests
2023-06-03Add test case (#3186)Gravatar dave caruso 1-0/+27
2023-06-02[bundler] fix json imports, undo some todosGravatar Dylan Conway 3-10/+4
2023-06-02use NODE_ENV for react-jsx or react-jsxdev (#3184)Gravatar Dylan Conway 2-6/+122
2023-06-02Update macro/test docs (#3180)Gravatar Colin McDonnell 1-0/+28
* Add test and fix plugin type * Update docs and config pages
2023-06-02continue if import is standalone (#3178)Gravatar Dylan Conway 1-3/+0
2023-06-01mark currently known test fails as `.todo` (#3052)Gravatar dave caruso 19-202/+253
* start this * commit * mark all failing tests as todo * fasdfad * bundler tests * tests * adjust failing tests to todo * comment out some more tests * png as test
2023-05-29Rename this file so we know what it isGravatar Jarred Sumner 1-0/+0
2023-05-25update jsx test for classic runtimeGravatar Dylan Conway 1-1/+2
2023-05-24fix setting `jsxImportSource`, `jsxFactory`, and `jsxFragmentFactory` (#3057)Gravatar Dylan Conway 1-43/+163
* default automatic, merge jsx flags from multiple tsconfigs * use entire package name * some tests * more tests
2023-05-21Fix testGravatar Jarred Sumner 1-10/+10
2023-05-19resolve rope string for multipart template (#2963)Gravatar Dylan Conway 1-1/+29
* resolve rope for multipart template * fix tests * clone template part if it is `e_string` and folded * clone string only * don't clone data again
2023-05-19Add tests for `--compile` tests (#2901)Gravatar dave caruso 4-112/+300
* add compile test support * add react ssr test * add tests * Fix flaky compile test @paperdave we can't pass a non-zero port or it will be flaky --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-18Fixes #2946 (#2949)Gravatar Jarred Sumner 1-0/+43
* Fixes #2946 * Update string_mutable.zig * Fixes #2948 --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-18Fixes #2942 (#2947)Gravatar Jarred Sumner 1-0/+140
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-18use raw template contents for tagged templates (#2937)Gravatar Dylan Conway 1-2/+1
* use raw template contents when tagged * use union for template contents * pointer to cooked contents * raw if suffix * fix and don't skip test
2023-05-17do not fail bundles on warnings (#2920)Gravatar dave caruso 4-26/+60
2023-05-16resolve rope before pushing to previous string (#2909)Gravatar Dylan Conway 1-0/+52
2023-05-16Fix segfault on passing undefined to bun.build (#2902)Gravatar dave caruso 1-0/+10
2023-05-15handle printing missing expressions and add tests (#2872)Gravatar Dylan Conway 2-2/+129
* handle missing expressions and add tests * minify missing expression blocks in parser
2023-05-15bundler testing (#2886)Gravatar dave caruso 11-122/+2008
* bundler testing * add requireVarThenExport test * work towards adding more esbuild tests * tests * remove this file
2023-05-15Change the debug id suffix to hex encoded "bun!bun!" (#2890)Gravatar dave caruso 1-0/+3
2023-05-15More DCEGravatar Jarred Sumner 1-0/+17
2023-05-14Single-file standalone Bun executables (#2879)Gravatar Jarred Sumner 2-2/+2
* 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 5-31/+319
* 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-12sort moreGravatar Jarred Sumner 1-1/+1
2023-05-12Fix a couple testsGravatar Jarred Sumner 1-7/+3
2023-05-12Add a couple testsGravatar Jarred Sumner 1-0/+51
2023-05-12handle errors + sort thingsGravatar Jarred Sumner 1-15/+21
2023-05-12Fix testGravatar Jarred Sumner 1-1/+6
2023-05-11Allow reading config from within plugins, and partially implement esbuild ↵Gravatar dave caruso 2-45/+117
`initialOptions` (#2861) * Implement plugin build.config and initialOptions * update types * default initialoptions entrypoints
2023-05-11bundler tests and improve `Bun.build` return type (#2833)Gravatar dave caruso 18-94/+777
* importstar_ts * tests * run acorn test suite * bench tweaks * test * bun.build tests very incomplete * remove dataurl and base64 loaders from tests since they dont work yet * tests * stuff * stuff * add errors and array of blobs * work so far * docs * requested changes * fix overwrite docs * remove this file
2023-05-10Update testGravatar Jarred Sumner 1-1/+1
2023-05-08Fixes #2807Gravatar Dylan Conway 1-0/+23
we will look at the minify tests for uglifyjs too
2023-05-08implement build api `define` and `loaders` (#2805)Gravatar dave caruso 16-676/+1535
* parse error logs * clean up types * remove --jsx-production. use NODE_ENV instead * add define to js api * add loaders to js api * fixups * sourcemap * typo fix * remove label, comment dir just for now * test tweaks * test work * make optional enums actually optional. allows `sourcemap: undefined` * overload host ram test * string tests * tests * test for 2815 * requested changes * sort this list * remove this test file now that it passes * oops * add --format * finish ts tests * doc typos related to define and loader
2023-05-08Fix bug in Bun.build() where it wouldn't pick up changes to directories on ↵Gravatar Jarred Sumner 2-0/+58
rebuilds (#2824) Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-03Fix code splitting for server componentsGravatar Jarred Sumner 1-0/+7
2023-05-03Fix broken testGravatar Jarred Sumner 1-1/+1
2023-05-01Fix testGravatar Jarred Sumner 1-7/+7
2023-04-30test default condition (#2776)Gravatar dave caruso 2-2/+52