aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/ModuleLoader.cpp (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-06-13Fix crash in CJS (#3294)bun-v0.6.9Gravatar Jarred Sumner 1-6/+6
* 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-11Support using `WTF::StringImpl` from Zig (#3279)Gravatar Jarred Sumner 1-19/+19
* Fix `make headers` * [JS parser] Fix bug with printing non-ascii import paths in ascii mode * Introduce `bun.String` * Add test for non-ascii imports & entry points * Add comment * Fix build issue * Support HTTP server * Make it print the same --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-29Natively support CommonJS at runtime (#3104)Gravatar Jarred Sumner 1-0/+6
* Natively support CommonJS at runtime * cleanup how getters are handled, add fast path * more consistent with node * use * As * Remove thrown modules on exception * Handle exception better --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-24Support `with { type: "macro"}` in `bun build` (#3059)Gravatar Jarred Sumner 1-1/+1
* [bun macro] Support `assert { type: "macro" }` and `with {type: "macro"}` * [bun macro] Pass through input as arguments instead of a JSNode * Fix hang when loading many entry points simultaneously with macros * do not clone --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-04-25Implement `onResolve` plugins in `Bun.build()`, support multiple onLoad and ↵Gravatar Jarred Sumner 1-119/+20
onResolve plugins (#2739) * its 2023 * WIP `onResolve` plugins * more progress * it compiles * Lots of small fixes * Seems to work excluding entry points * Update BundlerPluginBuiltins.cpp --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-04-24Support plugins in `Bun.build` (#2720)Gravatar Jarred Sumner 1-20/+119
* wip * Implement `onLoad` plugins * Support exceptions and async `onLoad` plugins * Fix filtering * Handle empty files * Fix JSON loader --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-12-17Implement `node:util/types`Gravatar Jarred Sumner 1-0/+8
Fixes #1617
2022-12-06Fix glibc symbol version issues preventing `bun install` from being used in ↵Gravatar Jarred Sumner 1-1/+1
older glibc versions (#1580) * Prevent integer overflow in connectError * Add missing deepEquals() type to Bun * fix missing glibc symbols * Fix missing symbol issues * Try this * Update glibc-versions-hack.cpp * Update glibc-versions-hack.cpp * Update glibc-versions-hack.cpp Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-11-06Automatically install npm packages when running a script in Bun's runtime ↵Gravatar Jarred Sumner 1-1/+32
(#1459) * Update bundler.zig * WIP * Update README.md * Update README.md * wip * Support running scripts without package.json * Add `--no-auto-install` and `--prefer-offline` flags * WIP * wip * Update headers-handwritten.h * WIP * Build fixes * Fix UAF * Update install.zig * Must call .allocate() * Micro-optimization: only call .timestamp() once per tick when installing packages * Support progress bar * Extend the timestamp for package staleness checks to 1 day * Add `--prefer-latest`, `-i` CLI Flags * Fix crash * Support line text manually being set on an Error instance * Add a few more fields for error messages * Fix bug when counting 8 character strings in string builder * Implement error handling for automatic package installs! * Fix crash * Make it say module when there's a slash * Update module_loader.zig * Ban dependency versions in import specifiers when a package.json is present * Remove unused field * Update README.md * Update README.md * Update README.md * Update README.md Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-09-25Implement `isatty` in `node:tty`Gravatar Jarred Sumner 1-0/+8
2022-09-06[Bun.plugin] Fix validating `loader`Gravatar Jarred Sumner 1-3/+4
2022-09-06[Bun.plugin] Throw an error when the loader is invalidGravatar Jarred Sumner 1-0/+2
2022-09-06Set a default Loader based on filenameGravatar Jarred Sumner 1-5/+7
2022-09-06Fix crash in Buffer moduleGravatar Jarred Sumner 1-8/+11
2022-09-05[Bun.plugin] Clean up exception handlingGravatar Jarred Sumner 1-6/+7
2022-09-05Support async `onLoad` callbacks in `Bun.plugin`Gravatar Jarred Sumner 1-0/+520