aboutsummaryrefslogtreecommitdiff
path: root/src/cli (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-08-11Deprecate loading `node_modules.bun` (#4131)Gravatar Jarred Sumner 6-35/+23
* Deprecate loading `node_modules.bun` * realpath * regenerate schema * More * more * Update cli.zig --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-10don't check for trailing slash, var streamGravatar Dylan Conway 1-2/+1
2023-08-10run files without extensions (#4113)Gravatar Dylan Conway 1-0/+17
* run script without extension * process stdio write fix
2023-08-07implement `bun update` (#4046)Gravatar Alex Lam S.L 1-0/+8
- analogous to `npm update` - `bun update <name>` to refresh specified package under `package.json` - `bun update` to refresh all package to latest versions
2023-08-06Fixes #4020Gravatar Jarred Sumner 1-1/+2
2023-08-06Running missing scripts exits with non-0 (#4026)Gravatar Yash Sharma 1-1/+1
Co-authored-by: Yash Sharma <yashsharma@Yashs-MacBook-Air.local>
2023-08-06Code coverage for `bun test` (#3975)Gravatar Jarred Sumner 1-3/+157
* WIP code coverage initial commit * almost works * one approach * Code Coverage * Update WebKit * it works but is not yet accurate * skip double ascii check * wrapper * it works but i'm not sure what to do about blocks * hide blocks for now * Update ZigSourceProvider.cpp * Create coverage.md * Update nav.ts --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-06Implement --test-name-pattern (#3998)Gravatar dave caruso 1-0/+2
* Fix end not being emitted all the time * stuff * Implement -t * Undo js_printer changes * Undo http changes * Update InternalModuleRegistryConstants.h * Delete unrelated test --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-08-05Fix(cli/init): support subpath entrypoint. (#4002)Gravatar Ai Hoshino 1-1/+8
2023-08-04[install] store resolved workspace path in lockfile (#3974)Gravatar Alex Lam S.L 1-2/+2
- resolve cwd consistently - speed up package diff - update `test/bun.lockb` fixes #3685 fixes #3958
2023-07-30Support `bun .` to run the entry point (#3891)Gravatar Jarred Sumner 1-2/+21
* Support `bun .` * Fix tests --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-22Unified event loop (#3741)Gravatar Jarred Sumner 1-1/+0
* Unified event loop * Update WebKit, add test for es-module-lexer * Update README.md * Use async wasm * Explicitly set whether concurrenttask should be deinit'd * Update package.json --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-19Implement `AsyncLocalStorage` (#3089)Gravatar dave caruso 1-1/+0
* work to get async local storage working. * a * a * everything but queueMicrotask * sdfghj * . * finish * tests * test * ok * done * im so stupid * Upgrade WebKit * refactor * refactor * changes requested * oops * cool * fix runInAsyncScope
2023-07-18zig upgrade (#3667)Gravatar Dylan Conway 8-46/+46
* upgrade * more fixes * Bump Zig --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-07-16Add `--smol` flagGravatar Jarred Sumner 1-0/+1
2023-07-13Impl. fix (#3630)Gravatar Tiramify (A.K. Daniel) 1-1/+1
2023-07-12feat(bun/test): Implement "bail" option for "bun test" (#3253)Gravatar Tiramify (A.K. Daniel) 1-3/+25
* Implement bun test --bail * Fixes * move printSummary() (more readable) * Fixes 2 * idk why it got deleted * Fixes 3 * fmt this better * Update test_command.zig * Fix "0 files" * track number of files so bailing out early prints the right number --------- Co-authored-by: dave caruso <me@paperdave.net>
2023-07-07Add assertionGravatar Jarred Sumner 1-0/+3
2023-06-26docs: add troubleshooting section to installation page (#3389)Gravatar Peter Weinberg 1-1/+1
* docs: add troubleshooting section to installation page * Add note for unzip * Update msg in install.sh --------- Co-authored-by: Colin McDonnell <colinmcd94@gmail.com>
2023-06-25Support reading embedded files in compiled executables (#3405)Gravatar Jarred Sumner 1-0/+1
* Support reading embedded files in compiled executables * :nail_care: --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-06-22`expect().resolves` and `expect().rejects` (#3318)Gravatar Ashcon Partovi 1-1/+1
* 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>
2023-06-21upgrade zig to `v0.11.0-dev.3737+9eb008717` (#3374)Gravatar Dylan Conway 9-37/+38
* 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-13`mock` type changes (#3305)Gravatar Colin McDonnell 1-7/+1
* Update mock types and set bun-types@latest in bun init * Remove mockfn methods from toplevel mock * Remove comments
2023-06-13workaround quote escape issues for `bun run` (#3290)Gravatar Alex Lam S.L 1-0/+18
fixes #53
2023-06-11add --save argument to install (#3277)Gravatar Keyhan Vakil 1-3/+3
2023-05-31Small improvements to `bun test` (#3071)Gravatar Ashcon Partovi 1-20/+58
* Change status icon for skipped tests from "-" to "»" * Show file path instead of filename in `bun test` * Emit collapsable logs when running `bun test` in Github Actions https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines * Add fallback for test icons when emojis are not available * Only check for GITHUB_ACTIONS when running `bun test` * Emit error annotations when running `bun test` in Github Actions https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-an-error-message * Remove ANSI output from Github annotation, it doesn't work * Remove outdated code from internal test runner * Add GithubActionFormatter to handle cases where error name or message is already ANSI * Fix formatting of test * Fix #3070 * Implement `bun test --run-todo` By default, `test.todo()` is no longer run, unless `--run-todo` is specified. * Fix test that relies on test.todo() being run * Support vitest-style test options * Disable GITHUB_ACTION in test harness * Add types for TestOptions * Fix bug where test.skip() actually ran * Implement `test.skipIf()` and `describe.skipIf()` * Implement `test.runIf()` * Move DiffFormatter to its own file * Fix bug where Bun.inspect() would emit a Github annotation * Introduce `bun test --only`, rename `--run-todo` to `--todo` * Implement `test.if()`, `describe.if()`, and other test fixes * Remove unwanted files from last commit * Fix last reference to --run-todo * Fix memory issues with printing github actions text * Update bindings.zig * Fix bug with `test.only()` * Remove debug test * Make the github annotations better * Improve .vscode/launch.json * Implement `expect().toBeNil()` * Remove .only() from test * Implement toBeBoolean(), toBeTrue(), toBeFalse() * Add lots of matchers * toBeNil() * toBeBoolean() * toBeTrue() * toBeFalse() * toBeNumber() * toBeInteger() * toBeFinite() * toBePositive() * toBeNegative() * toBeWithin() * toBeSymbol() * toBeFunction() * toBeDate() * toBeString() * toInclude() * toStartWith() * toEndWith() * Fix #3135 * Reduce verbosity of test * Fix snapshot bug --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-31`--no-macros` flag, disable macros in node_modulesGravatar Jarred Sumner 1-2/+8
2023-05-27Implement process.env.npm_lifecycle_event (#3097)Gravatar Tiramify (A.K. Daniel) 1-0/+1
* 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-26Fix crash in test.todo + remove JSC C API usages in bun:test (#3079)Gravatar Jarred Sumner 1-1/+1
* Fix crash in test.todo * remove usages of JSC C API in bun:test * Remove additional JSC-C API usages * fix `make headers` * URLSearchParams.length * FormData length * URLSearchParams length * Fix `make headers` * very fancy length * Fix bug with exceptions being ignored sometimes * Add tests for extension toHaveLength --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-25jsx runtime from env (#3076)Gravatar Dylan Conway 1-0/+3
* use `NODE_ENV` for jsx mode * check env after `configureRouter` * get `NODE_ENV` from `options.production`
2023-05-24Load `.env.test`, set NODE_ENV=test in `bun test`, load ↵Gravatar Jarred Sumner 2-3/+5
`.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-23Implement `bun test --timeout` (#3040)Gravatar Ashcon Partovi 1-0/+1
You can change the default per-test timeout in `bun test`: > bun test --timeout 10 The default timeout is 5000.
2023-05-23fix bun init and update node vm docs (#3014)Gravatar dave caruso 1-3/+2
2023-05-23[bun:test] Don't schedule the GC aggressively on every fileGravatar Jarred Sumner 1-1/+10
We already run the GC automatically whenever heap size grows, so this is mostly unnecessary In one benchmark, this is an 83% performance improvement at a cost of 9% more memory
2023-05-23Support setting a timezone with `process.env.TZ` and `Bun.env.TZ` (#3018)Gravatar Jarred Sumner 1-0/+13
* Support setting a timezone via `process.env.TZ` * Implement `setTimeZone` in `bun:jsc` module * [breaking] `bun:test` now defaults to `Etc/UTC` timezone --------- Co-authored-by: Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com>
2023-05-20[bun:test] `preload` now supports `beforeAll`, `beforeEach`, `afterAll`, ↵Gravatar Jarred Sumner 1-2/+11
`afterEach` hooks Towards #198
2023-05-20Implement `test.todo` (#2961)Gravatar Degreat 1-5/+44
* Implement `test.todo` * remove skip condition * Allow callbacks in .todo * Add descriptive comment * Log todos * Include tests in title * edit test.todo tests --------- Co-authored-by: dave caruso <me@paperdave.net>
2023-05-17do not fail bundles on warnings (#2920)Gravatar dave caruso 1-1/+1
2023-05-16fix asset naming output paths (#2904)Gravatar Dylan Conway 1-10/+13
* rename to `src_path` and `dest_path`, use `dest_path` for output * format * option for compile
2023-05-15[bun build] Automatically set target to `bun` when a hashbang is providedGravatar Jarred Sumner 1-0/+1
2023-05-15More error message cleanupGravatar Jarred Sumner 1-74/+121
2023-05-15Make `bun build --compile` a little more resilient, output better errors, ↵Gravatar Jarred Sumner 1-5/+11
and clean up files
2023-05-14Single-file standalone Bun executables (#2879)Gravatar Jarred Sumner 1-10/+187
* 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 1-2/+29
* 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-12[bundler] Fix --transpile --outfileGravatar Jarred Sumner 1-2/+8
2023-05-11bundler tests and improve `Bun.build` return type (#2833)Gravatar dave caruso 1-1/+1
* 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-11[bun test] Add timings to successful testsGravatar Jarred Sumner 1-7/+16
2023-05-10feat(fetch) add redirect: 'error' support (#2845)Gravatar Ciro Spaciari 2-6/+6
* add redirect: 'error' support * fix typo * fix typo * refactor FetchRedirect enum * fix FetchRedirect * updated
2023-05-10Implement `BuildArtifact`Gravatar Jarred Sumner 1-10/+10
2023-05-09`bun build --transform` should not run the module resolverGravatar Jarred Sumner 1-1/+4