aboutsummaryrefslogtreecommitdiff
path: root/src/linker.zig (follow)
AgeCommit message (Collapse)AuthorFilesLines
2022-11-29import everything from "bun" where possibleGravatar Jarred Sumner 1-4/+4
2022-11-23possibly more reliable Bun.spawn (#1547)Gravatar Jarred Sumner 1-1/+1
* wip * wip * Fix bug with stdin * zig fmt * seems to work! * Update streams.test.js Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-11-21Handle when package version is missingGravatar Jarred Sumner 1-9/+21
2022-11-06Automatically install npm packages when running a script in Bun's runtime ↵Gravatar Jarred Sumner 1-10/+186
(#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-06Rename LinkerMap to Aliases to be less confusingGravatar Jarred Sumner 1-1/+1
2022-09-03Plugin API (#1199)Gravatar Jarred Sumner 1-4/+56
* Plugin API * Fix the bugs * Implement `"object"` loader Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2022-07-15[parser] Fix symbol collision with requireGravatar Jarred Sumner 1-34/+28
Fixes https://github.com/oven-sh/bun/issues/674 Fixes https://github.com/oven-sh/bun/issues/382
2022-06-26wip ReadableStream for HTTP(s) ServerGravatar Jarred Sumner 1-1/+1
2022-06-25Cleanup some of the require codeGravatar Jarred Sumner 1-17/+17
2022-06-24Add dynamic require supportGravatar Jarred Sumner 1-47/+50
2022-06-22Disable modules in the linkerGravatar Jarred Sumner 1-0/+6
2022-05-16`bun:sqlite` (#167)Gravatar Jarred Sumner 1-3/+2
* :scissors: * Add the slow version * draw the rest of the owl * Fix crash when allocating lots of memory * [Bun.Transipiler] Support passing objects * [JS Parser] Support passing objects to macros via Bun.Transpiler * Update JSSQLStatement.cpp * Embed SQLite * Add SQLite to Dockerfile * [sqlite] Add quick one-off queries without creating a whole object * [sqlite] Add `columnsCount`, rename raw() to `values()`, remove `rebind` * Implement `bun:sqlite` * return null * Fix updating query * Update bun.d.ts * more tests * Support variadic arguments, write tests and add types * Update sqlite.d.ts * Update sqlite.d.ts * latest * Implement `Database.loadExtension` and `Database.setCustomSQLite` * Support `require.resolve` * [napi] Improve string performance * [bun.js] Support some of `node:module` * another test * [sqlite] Support serialize & deserialize * [`bun:ffi`] Implement `CFunction` and `linkSymbols` * [bun.js] Fix crash in `Buffer.from` * Update sqlite.test.js * Document linkSymbols * docs * Update README.md
2022-05-11[bun.js] Implement `import.meta.require`Gravatar Jarred Sumner 1-26/+3
This allows synchronous dynamic loading of `.node`, `.json`, and `.toml` files. It is not a CommonJS require, but it can be used that way so long as the content is not JavaScript.
2022-05-10[napi] transpile require(*.node) into process.dlopenGravatar Jarred Sumner 1-1/+4
2022-04-29[bun:ffi] it worksGravatar Jarred Sumner 1-2/+5
2022-04-10make checking for bun modules a compile time stepGravatar Jarred Sumner 1-3/+7
2022-04-10Update linker.zigGravatar Jarred Sumner 1-2/+2
2022-04-10Fix testsGravatar Jarred Sumner 1-3/+22
2022-04-10Move some types aroundGravatar Jarred Sumner 1-0/+6
2022-04-08Fix Next.js stylesheet bugGravatar Jarred Sumner 1-85/+103
2022-03-19Remove relative_nodejs import path formatGravatar Jarred Sumner 1-24/+0
2022-03-17query_string_map -> urlGravatar Jarred Sumner 1-1/+1
2022-03-09Update linker.zigGravatar Jarred Sumner 1-12/+12
2022-03-04upgrade zigjarred/upgrade-zig-2Gravatar Jarred Sumner 1-1/+1
2022-02-24Add WASM modules but disable it for nowGravatar Jarred Sumner 1-2/+8
2022-02-18[bun dev] Fix bug with importing `node:` namespaceGravatar Jarred Sumner 1-2/+36
2022-02-15[bun test] Auto rewrite `@jest/globals` and `vitest` to `bun:test`Gravatar Jarred Sumner 1-0/+15
2022-02-10[bun dev][css] Fix loading external assetsGravatar Jarred Sumner 1-36/+17
2022-02-10[bun dev] Implement `hash:` namespace for `file` loader to improve browser ↵Gravatar Jarred Sumner 1-9/+33
cache invalidation This appends a hash to URLs and import paths In `bun dev`, this means: `/foo.woff2` => `/hash:/foo.woff2` `bun dev` simply ignores this.
2022-02-02"path" module from Node.js implementationGravatar Jarred Sumner 1-0/+7
2022-02-01[linker] Fix bug with multiple JSX runtimes introduced in ↵Gravatar Jarred Sumner 1-20/+5
5922ba29acab512ff0aab51e64199d86f148c020
2022-01-29Embed React Fast Refresh in BunGravatar Jarred Sumner 1-3/+77
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-22Update linker.zigGravatar Jarred Sumner 1-1/+1
2022-01-22Ensure we fully copy stringsGravatar Jarred Sumner 1-1/+1
2022-01-22Rename `bun:runtime` -> `bun:wrap` so it fits 8 charsGravatar Jarred Sumner 1-2/+2
2022-01-22[Bun.js] Resolve dynamic imports lazilyGravatar Jarred Sumner 1-0/+5
2022-01-22[Resolver] Improve how we detect ESMGravatar Jarred Sumner 1-13/+16
2022-01-19`fs.*Sync()`, `bun wiptest`, and More ™ (#106)Gravatar Jarred Sumner 1-19/+35
* very very wip * almost ready to fix the errors * Update identity_context.zig * Update base.zig * [bun test] It runs successfully * Remove unnecessary call * [Bun.js] Improve JS <> Zig unicode string interop This fixes longstanding unicode bugs with `console.log` & `fetch`. I believe @evanwashere reported this first awhile ago * [Bun.js] Implement `Object.is()` binding and a way to set a timeout for script execution * Update PLCrashReport.zig * [Bun.js] Make `console.log` more closely match Node.js and Deno * [Bun.js] Implement formatting specifier for console.* * Implement `console.clear()` * bug fix * Support console.clear() * Buffer stderr * [bun test] Begin implementing Node.js `fs` * Update darwin_c.zig * Implement more of `fs` * `mkdir`, `mkdir` recursive, `mkdtemp` * `open`, `read` (and pread) * Move some things into more files * Implement readdir * `readFile`, `readLink`, and `realpath` * `writeFile`, `symlink`, `chown`, `rename`, `stat`, `unlink`, `truncate` * `lutimes` * Implement `SystemError` and begin wiring up the `fs` module * `"fs"` - Most of the arguments / validation * `fs` - Rest of the arguments / validations * Begin wiring up the `fs` module * Fix all the build errors * support printing typed arrays in console.log * It...works? * Support `require("fs")`, `import fs from 'fs';`, `import * as fs from 'fs'` * Fix a couple bugs * get rid of the crash reporter for now * Update fs.exports.js * [bun.js] slight improvement to startup time * [bun.js] Improve error message printing * [Bun.js] Add `Bun.gc()` to run the garbage collector manually and report heap size * [Bun.js] Add Bun.generateHeapSnapshot to return what JS types are using memory * [Bun.js] Add `Bun.shrink()` to tell JSC to shrink the VM size * Improve encoding reader * [bun.js] Improve callback & microtask performance * Update node_fs.zig * Implement `console.assert` * simple test * [Bun.js] Prepare for multiple globals/realms to support testing * Create callbacks-overhead.mjs * Update http.zig * [Bun.js] Implement `queueMicrotask` * Add test for queueMicrotask * :sleepy: * [Bun.js] Implement `process.versions`, `process.pid`, `process.ppid`, `process.nextTick`, `process.versions`, * Implement `process.env.toJSON()` * [Bun.js] Improve performance of `fs.existsSync` * :nail_care: * [Bun.js] Implement `process.chdir(str)` and `process.cwd()`, support up to 4 args in `process.nextTick` * Make creating Zig::Process lazy * Split processi nto separte file * [Bun.js] Node.js Streams - Part 1/? * [Bun.js] Node.js streams 2/? * WIP streams * fix crash * Reduce allocations in many places * swap * Make `bun` start 2ms faster * Always use an apiLock() * libBacktrace doesn't really work yet * Fix crash in the upgrade checker * Clean up code for importing the runtime when not bundling * :camera: * Update linker.zig * 68! * backtrace * no, really backtrace * Fix * Linux fixes * Fixes on Linux * Update mimalloc * [bun test] Automatically scan for {.test,_test,.spec,_spec}.{jsx,tsx,js,cts,mts,ts,cjs}
2022-01-01[bun dev] Automatically set `origin` - improve support for proxying BunGravatar Jarred Sumner 1-20/+26
Previously, when running Bun behind a reverse proxy, you had to pass an explicit `--origin` arg and it could only run behind one proxy at a time. Now, Bun automatically determines the origin from the request if possible. It reads `Forwarded`, `X-Forwarded-Proto`, `X-Forwarded-Host`, `Origin`, and lastly `Host`. If none are available, it falls back to the `--origin` CLI arg. This change is important for usecases like Replit which shows multiple iframes in different origins.
2021-12-30Upgrade to latest Zig, remove dependency on patched version of Zig (#96)Gravatar Jarred Sumner 1-69/+18
* Prepare to upgrade zig * zig fmt * AllocGate * Update data_url.zig * wip * few files * just headers now? * I think everything works? * Update mimalloc * Update hash_map.zig * Perf improvements to compensate for Allocgate * Bump * :camera: * Update bun.lockb * Less branching * [js parser] Slightly reduce memory usage * Update js_parser.zig * WIP remove unused * [JS parser] WIP support for `with` keyword * Remove more dead code * Fix all the build errors! * cleanup * Move `network_thread` up * Bump peechy * Update README.md
2021-12-27Prepare to run unit tests & remove some dead code (#92)Gravatar Jarred Sumner 1-1/+0
* Remove some dead code * :skull: code * Fix the zig tests * [JS Printer] Print integers faster & less scientific notation on decimals * :skull: dead code * skip * Run all the unit tests
2021-12-18cross-promotionGravatar Jarred Sumner 1-1/+1
2021-12-16Disable imports which are not foundGravatar Jarred Sumner 1-1/+5
2021-12-04[resolver] Do not throw on require()/import errors when they're caught (and ↵Gravatar Jarred Sumner 1-2/+5
import is an await target)
2021-10-23[internal] :scissors: dead codeGravatar Jarred Sumner 1-2/+0
2021-10-10[fetch] Add support for gzip & deflate to the http clientGravatar Jarred Sumner 1-1/+0
Powered by Cloudflare's zlib fork
2021-10-06Fix JSX transform edgecase with static childrenGravatar Jarred Sumner 1-4/+1
2021-09-24skeleton codebun-v0.0.22Gravatar Jarred Sumner 1-3/+3
2021-09-24Remove `cache_files` since it's not used and causes slower Bun compilation timesGravatar Jarred Sumner 1-581/+577
2021-09-23Use the package_json hash for matching bundled modules instead of searching ↵Gravatar Jarred Sumner 1-76/+41
strings (should improve perf a little)