aboutsummaryrefslogtreecommitdiff
path: root/test/cli/run (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-10-03Support `bun run --if-present` (#6248)Gravatar Ashcon Partovi 1-0/+119
* Support --if-present Closes #5670 * More robust tests, handle more cases
2023-09-22fix(runtime): exclude unevaluated module in `require.cache` (#5903)Gravatar Ai Hoshino 1-0/+1
Close: #5898
2023-09-21Implement module.parent (#5889)bun-v1.0.3Gravatar dave caruso 2-0/+17
* Make module.parent work * yay * oops * yay
2023-09-21Hide env elapsed time when loglevel=info (#5882)Gravatar Colin McDonnell 1-1/+1
* Hide env elapsed time when loglevel=info * Updates * Update * Fix test
2023-09-20fix(run): interpret extensionless files as typescript (#5711)Gravatar dave caruso 2-1/+32
* test * gadsgsagdsa * add better err msg * r * oops * ok
2023-09-18`bun run` fix missing script error on empty file (#5025)Gravatar Julian 2-0/+15
* Fix empty file not found bug * Add tests * fix test --------- Co-authored-by: Jeremy Funk <jeremy@kombo.dev> Co-authored-by: dave caruso <me@paperdave.net>
2023-09-18fix: provide empty string to 0 length process environment variables (#5679)Gravatar Liz 1-0/+10
* 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-13fix(runtime): require cache should not include unevaluated ESM modules. (#5233)Gravatar dave caruso 2-0/+33
2023-09-11fix loading env from `.env.production` and friends (#4630)Gravatar Dylan Conway 1-1/+42
* reload conditional vars * test * change `get` and `put` methods * dont clone empty env variables
2023-08-06Bind require.resolve() (#4030)Gravatar Jarred Sumner 1-3/+5
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-02Rewrite built-in modules to use CommonJS over ESM (#3814)Gravatar dave caruso 1-23/+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-08-01Fix expanding on .env files (#3918)Gravatar Ciro Spaciari 1-1/+67
* fix expanding * refactor locks * bound checks * fix comment * one more test * oops
2023-07-21fix #3716 (#3733)Gravatar Dylan Conway 1-0/+8
* 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-0/+12
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-14structured clone (#3637)Gravatar Dylan Conway 1-3/+2
* copy `SerializedScriptValue` * format * make `SerializedScriptValue` compile * add `transfer` option * tests * serialize/deserialize blobs * tests for blobs * serialize/deserialize file blobs * more tests * small cleanup * format * small changes + serialize offset * slice helper * map and set test
2023-07-13Impl. fix (#3630)Gravatar Tiramify (A.K. Daniel) 1-2/+17
2023-07-02fix zero length env var (#3496)Gravatar dave caruso 1-0/+10
2023-06-25Add `process.mainModule`Gravatar Jarred Sumner 1-0/+5
2023-06-24Rewrite Bun's runtime CommonJS loader (#3379)Gravatar Jarred Sumner 2-0/+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-22revamp dotEnv parser (#3347)Gravatar Alex Lam S.L 1-8/+74
- fixes `strings.indexOfAny()` - fixes OOB array access fixes #411 fixes #2823 fixes #3042
2023-06-20Fix crash with .env files that are exactly 159 bytes long (#3369)Gravatar Jarred Sumner 1-0/+23
* 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-06-19Fix bug that breaks `bunx prisma init` when node is not installed (#3362)Gravatar Jarred Sumner 2-0/+21
* tweak cjs * Handle more cases, add a test --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-13workaround quote escape issues for `bun run` (#3290)Gravatar Alex Lam S.L 1-0/+15
fixes #53
2023-06-01Implement `__dirname` and `__filename`, allow direct eval in CommonJS (#3164)Gravatar Jarred Sumner 2-1/+15
* Implement `__dirname` and `__filename`, allow direct eval in CommonJS * Fixup dirname and add test --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-01mark currently known test fails as `.todo` (#3052)Gravatar dave caruso 3-51/+26
* 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-29Cleanup CommonJS changes (#3112)bun-v0.6.5Gravatar Jarred Sumner 1-0/+9
* 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-28[node:net] fix createConnection options passing (#3101)Gravatar Ciro Spaciari 1-2/+2
* fixup createConnection * fix comment * fixup comment * also fix it on tls
2023-05-27Implement process.env.npm_lifecycle_event (#3097)Gravatar Tiramify (A.K. Daniel) 2-43/+17
* Update run_command.zig * Update env.test.ts * Add files via upload * Update run-process-env.test.ts * Update env.test.ts * Update harness.ts
2023-05-24Load `.env.test`, set NODE_ENV=test in `bun test`, load ↵Gravatar Jarred Sumner 1-0/+256
`.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-24Implement `require.cache` (#3045)Gravatar Jarred Sumner 3-0/+39
Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-16Update run-cjs.test.tsGravatar Jarred Sumner 1-1/+0
2023-05-16Fix running commonjs modules as entry point (#2885)Gravatar dave caruso 1-0/+60
* fix cjs run issue * use a primordial * fix behavior * fix it again * fix tste
2023-03-22Fix types (#2453)Gravatar Colin McDonnell 1-1/+1
* WIP * WIP * WIP * WIP * Improve typechecking in type files * Fix typechecking * Update * Update submodule * CI for typechecking * Add ci * Update commands * Format after build * Dont use bunx * Rename job * Use nodemodules prettier * Update workflow * Use symlink * Debug * Debug * Clean up and rename jobs
2023-03-07Reorganize tests (#2332)Gravatar Ashcon Partovi 2-0/+279