aboutsummaryrefslogtreecommitdiff
path: root/src/env_loader.zig (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-09-27real fix was #5679 (#6123)Gravatar Dylan Conway 1-2/+2
2023-09-18Encode slashes in package names in the registry manifest request (#5716)Gravatar Jarred Sumner 1-1/+6
* Encode slashes in package names in the registry manifest request Co-Authored-By: Max Brosnahan <1177034+gingermusketeer@users.noreply.github.com> * Update dummy.registry.ts * Fix tests * Add guide for Azure Artifacts * Update azure-artifacts.md * Update azure-artifacts.md * Typo --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: Max Brosnahan <1177034+gingermusketeer@users.noreply.github.com>
2023-09-18fix: provide empty string to 0 length process environment variables (#5679)Gravatar Liz 1-9/+3
* fix: provide empty string to len 0 process env vars For process loaded env vars, its a bug to give them the literal value '""' if the provided length is 0. * fix: add test and remove unneeded branch Removes the redundant branch for empty env vars and adds a test for the process specific case. * fix: remove empty_string_value Removes the constant in favor of using the empty values or passing the literal "". * style: format env.test.ts
2023-09-18Add a way to disable the GC timer (#5656)Gravatar Jarred Sumner 1-0/+7
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-09-15fix(proxy): allow empty string `http_proxy` env. (#5464)Gravatar Ai Hoshino 1-3/+9
Close: #5380
2023-09-11add NODE_TLS_REJECT_UNAUTHORIZED (#4829)Gravatar Ciro Spaciari 1-0/+9
2023-09-11fix loading env from `.env.production` and friends (#4630)Gravatar Dylan Conway 1-30/+59
* reload conditional vars * test * change `get` and `put` methods * dont clone empty env variables
2023-08-28just kernel32 things (#4354)Gravatar Jarred Sumner 1-6/+19
* 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-24update zig to 0.11.0 (#4233)Gravatar Jason 1-8/+8
* WIP * backup * more change * json related error sovled * number related issue solved * revert WriterType changed before * destroy -> free * jsonStringify related issues solved * fix mem.free expected []T or *[_]T, passed [*]const u8 * fix expected []T or *[_]T, passed [*:0]const u8 * fix build script * fix build script, for real * replace 0.11.0-dev.4006+bf827d0b5 to 0.12.0-dev.161+6a5463951 * fix build on macOS, COPYFILE.DATA -> COPYFILE_DATA * fix the last destroy on [*]ptr issue --------- Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>
2023-08-01Fix expanding on .env files (#3918)Gravatar Ciro Spaciari 1-5/+8
* fix expanding * refactor locks * bound checks * fix comment * one more test * oops
2023-07-21fix #3716 (#3733)Gravatar Dylan Conway 1-6/+17
* don't break on comments for process env variables * break for `\r` and `\n` * don't parse process env vars
2023-07-19Fixes #3670 (#3698)Gravatar Jarred Sumner 1-4/+17
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-18zig upgrade (#3667)Gravatar Dylan Conway 1-12/+12
* upgrade * more fixes * Bump Zig --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-22revamp dotEnv parser (#3347)Gravatar Alex Lam S.L 1-420/+247
- fixes `strings.indexOfAny()` - fixes OOB array access fixes #411 fixes #2823 fixes #3042
2023-06-21upgrade zig to `v0.11.0-dev.3737+9eb008717` (#3374)Gravatar Dylan Conway 1-18/+18
* 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-20Fix crash with .env files that are exactly 159 bytes long (#3369)Gravatar Jarred Sumner 1-6/+9
* Fix crash with .env files that are exactly 158 bytes and a newline character * Update env_loader.zig --------- 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-19/+87
`.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-04-20Symbol minification (#2695)Gravatar Dylan Conway 1-7/+1
* minify * Update renamer.zig * --minify-whitespace * Speed up minification a little * handle private names * 5% faster minification * use helper function * fix nested scope slots * `bun build --minify` gets another +8% faster * print semicolons afterwards * print semicolon after checking error * after all error checking * Delete code for generating legacy bundes * remove extra whitespace around if statements * print space before import identifier * Use `@constCast` * Make `S.Local#decls` use `BabyList(Decl)` * Add `fromSlice` helper to `BabyList` * Remove unnecessary optional chains * minify `undefined, true, false` * Another @constCast * Implement merge adjacent local var * Support --minify in `bun build --transform` * skip comments when counting character frequencies * Don't wrap commonjs with --transform on (unless targeting bun) * Support --minify in the runtime * Fix edgecase with import * as * don't infinite loop * --trnasform shouldn't mess with require * Only track comments when minifying --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-04-19Fix broken autocompleteGravatar Jarred Sumner 1-2/+2
2023-03-19Several bug fixes (#2427)Gravatar Jarred Sumner 1-1/+1
* Fix test * Fix segfault when unexpected type is passed in `expect().toThrow` * Fix issues with request constructor * Don't bother cloning headers when its empty * woops * more tests * fix incorrect test * Make the fetch error messages better * Update response.zig * Fix test that failed on macOS * Fix test * Remove extra hash table lookups * Support running dummy registry directly cc @alexlamsl * Update test * Update test * fixup * Workaround crash in test runner * Fixup test * Fixup test * Update os.test.js --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-02-24prefer `bun.copy()` over `std.mem.copy()` (#2152)Gravatar Alex Lam S.L 1-2/+2
2023-02-23Upgrade Zig (#2151)Gravatar Dylan Conway 1-6/+6
* fixup * Upgrade Zig * Remove bad assertion * strings * bump * mode -> optimize * optimize * Linux build * Update bindgen.zig
2023-02-19Fixes #2108Gravatar Jarred Sumner 1-0/+5
2023-01-18micro-optimize loading process environment variablesGravatar Jarred Sumner 1-1/+3
2023-01-17feat(cli): Support `HTTPS_PROXY`, `HTTP_PROXY`, and `NO_PROXY` #1440 (#1814)Gravatar Ciro Spaciari 1-0/+41
* WIP: http_proxy implemented, first steps for https_proxy #1440 * add HTTP_PROXY support to upgrade_command and WIP: tunneling * WIP async handshake, stuck on WANT_READ, try to defer + check * create and upgrade with proxy working, TLS and non-TLS to proxy TLS working * bun install/upgrade/create working with http(s)_proxy #1440 * add NO_PROXY support #1440 * remove commented code and add TODO * fix getHttpProxy no_proxy * fix formatting * refactor catch and getHttpProxy, fix empty strngs in env for proxy * allow optimization for handleResponseBody
2023-01-13move more thingsGravatar Jarred SUmner 1-1/+1
2022-12-28Upgrade to latest Zig (#1610)Gravatar Jarred Sumner 1-6/+6
* @min and @max * builtins and some trivial ones * Most of them * more * more! * More Progress * wip * Update tagged_pointer.zig * Update http_client_async.zig * Most of the iterable dir changes * alright * Remove usages of deprecated formatters * :camera: * fmt * Update shimmer.zig * wip * wip * wip * progress * more * Latest * stuck on error * latest * workaround stage2 * wip * Update string_immutable.zig * wip * Migrate `Dirent` and `require("fs')` to use JSC<>Zig bindings * Fix build errors * Fixup most of the test failures * Fix `make headers` * Fix "outside package path" error * Fixup aligned alloc * Add missing file * linux * More linux fixes * use latest peechy * Fix transpiler test failure * Forgot about these * Fixup test failure * Update node-timers.test.ts * [node:htt] Fix `undefined is not an object` error Fixes https://github.com/oven-sh/bun/issues/1618 * Update http.exports.js * Make this test less flaky * fix hashes * Fix hex formatting and zls issues * Download zig version * Update Dockerfile * Update Dockerfile * Update uws * Update Dockerfile * Set llvm version * Update README.md * Update uws * Update Dockerfile * Update io_linux.zig * Update bun.zig * Log output * workaround strange @cInclude error * Make ffi tests better * Don't use cImport * Update c.zig * Update c-bindings.cpp * call setOutputDir * Update Dockerfile * Use a longer name * latest * Update serve.test.ts Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> Co-authored-by: Veikka Tuominen <git@vexu.eu>
2022-12-15[bun run] Introduce `--bun` flag to run in bun instead of nodeGravatar Jarred Sumner 1-5/+9
2022-12-04[internal] Make string comparisons fasterGravatar Jarred Sumner 1-2/+2
2022-12-04Mildly faster startup timeGravatar Jarred Sumner 1-1/+1
2022-11-29import everything from "bun" where possibleGravatar Jarred Sumner 1-2/+2
2022-11-07castGravatar Jarred Sumner 1-1/+1
2022-11-07Remove improper coercion of environment variables (#1256)Gravatar Niles Salter 1-156/+1
2022-09-25wipGravatar Jarred Sumner 1-0/+20
2022-09-20Allow .env files to define the same key multiple timesGravatar Jarred Sumner 1-32/+55
Fixes https://github.com/oven-sh/bun/issues/1262
2022-09-17extremely minor perf nitbun-v0.1.12Gravatar Jarred Sumner 1-1/+1
2022-09-17feat: env loader nested values with curly braces (#1246)Gravatar Kit PANG 1-1/+46
* [env loader] Add support for nested value with curly braces does not support default values for nested values, e.g., ${undefined:default}, ${undefined:-default}, or ${undefined-default} * fix: minor fix and add more test * [env loader] Improve nested value parsing performance remove unnecessary branching Co-authored-by: Like <like@ekil.sh>
2022-08-21[env loader] Don't panic when .env fails to load for unexpected reasonsGravatar Jarred Sumner 1-0/+9
2022-07-17[bun install] Forgot to commit `isCI` functionGravatar Jarred Sumner 1-0/+7
2022-07-13fix(env_loader): Off by one error (#668)Gravatar Finn R. Gärtner 1-1/+1
2022-07-12fix(env_loader): Ignore spaces before equals sign (#602)Gravatar Finn R. Gärtner 1-0/+9
* fix(env_loader): Ignore spaces before equals sign * fix(env_loader): Change the type of key_end to usize
2022-07-10Update GitHub URL to match new repo URL (#547)Gravatar Aurora Luna Takemi 1-1/+1
* Update repo URLs * GitHub URL update * Revert accidental URL changes
2022-07-09fix: update build files to latest Zig versionGravatar sno2 1-6/+6
2022-05-05E.String gets a RopeGravatar Jarred Sumner 1-6/+6
2022-03-08rename _global -> bunGravatar Jarred Sumner 1-11/+11
2022-03-04upgrade zigjarred/upgrade-zig-2Gravatar Jarred Sumner 1-1/+1
2022-03-02[bun run] Set more environment variablesGravatar Jarred Sumner 1-0/+24
2022-02-18Simple dead code eliminationGravatar Jarred Sumner 1-3/+151
2022-02-11[bun install] Implement bunfig.toml configGravatar Jarred Sumner 1-0/+15
2021-12-30Upgrade to latest Zig, remove dependency on patched version of Zig (#96)Gravatar Jarred Sumner 1-16/+19
* 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