summaryrefslogtreecommitdiff
path: root/cli/tools/mod.rs
AgeCommit message (Collapse)Author
2024-09-03BREAKING: remove `deno vendor` (#25343)Asher Gomez
2024-09-02BREAKING: remove `deno bundle` (#25339)Asher Gomez
`deno bundle` now produces: ``` error: ⚠️ `deno bundle` was removed in Deno 2. See the Deno 1.x to 2.x Migration Guide for migration instructions: https://docs.deno.com/runtime/manual/advanced/migrate_deprecations ``` `deno bundle --help` now produces: ``` ⚠️ `deno bundle` was removed in Deno 2. See the Deno 1.x to 2.x Migration Guide for migration instructions: https://docs.deno.com/runtime/manual/advanced/migrate_deprecations Usage: deno bundle [OPTIONS] Options: -q, --quiet Suppress diagnostic output --unstable Enable all unstable features and APIs. Instead of using this flag, consider enabling individual unstable features To view the list of individual unstable feature flags, run this command again with --help=unstable ```
2024-08-14feat(serve): Opt-in parallelism for `deno serve` (#24920)Nathan Whitaker
Adds a `parallel` flag to `deno serve`. When present, we spawn multiple workers to parallelize serving requests. ```bash deno serve --parallel main.ts ``` Currently on linux we use `SO_REUSEPORT` and rely on the fact that the kernel will distribute connections in a round-robin manner. On mac and windows, we sort of emulate this by cloning the underlying file descriptor and passing a handle to each worker. The connections will not be guaranteed to be fairly distributed (and in practice almost certainly won't be), but the distribution is still spread enough to provide a significant performance increase. --- (Run on an Macbook Pro with an M3 Max, serving `deno.com` baseline:: ``` ❯ wrk -d 30s -c 125 --latency http://127.0.0.1:8000 Running 30s test @ http://127.0.0.1:8000 2 threads and 125 connections Thread Stats Avg Stdev Max +/- Stdev Latency 239.78ms 13.56ms 330.54ms 79.12% Req/Sec 258.58 35.56 360.00 70.64% Latency Distribution 50% 236.72ms 75% 248.46ms 90% 256.84ms 99% 268.23ms 15458 requests in 30.02s, 2.47GB read Requests/sec: 514.89 Transfer/sec: 84.33MB ``` this PR (`with --parallel` flag) ``` ❯ wrk -d 30s -c 125 --latency http://127.0.0.1:8000 Running 30s test @ http://127.0.0.1:8000 2 threads and 125 connections Thread Stats Avg Stdev Max +/- Stdev Latency 117.40ms 142.84ms 590.45ms 79.07% Req/Sec 1.33k 175.19 1.77k 69.00% Latency Distribution 50% 22.34ms 75% 223.67ms 90% 357.32ms 99% 460.50ms 79636 requests in 30.07s, 12.74GB read Requests/sec: 2647.96 Transfer/sec: 433.71MB ```
2024-08-14feat(clean): add progress bar (#25026)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/25020
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-11-23feat(unstable): tar up directory with deno.json (#21228)Bartek Iwańczuk
Co-authored-by: David Sherret <dsherret@gmail.com> Co-authored-by: Luca Casonato <lucacasonato@yahoo.com> Co-authored-by: Luca Casonato <hello@lcas.dev>
2023-09-16feat: Add "deno jupyter" subcommand (#20337)Bartek Iwańczuk
This commit adds "deno jupyter" subcommand which provides a Deno kernel for Jupyter notebooks. The implementation is mostly based on Deno's REPL and reuses large parts of it (though there's some clean up that needs to happen in follow up PRs). Not all functionality of Jupyter kernel is implemented and some message type are still not implemented (eg. "inspect_request") but the kernel is fully working and provides all the capatibilities that the Deno REPL has; including TypeScript transpilation and npm packages support. Closes https://github.com/denoland/deno/issues/13016 --------- Co-authored-by: Adam Powers <apowers@ato.ms> Co-authored-by: Kyle Kelley <rgbkrk@gmail.com>
2023-05-10feat(compile): unstable npm and node specifier support (#19005)David Sherret
This is the initial support for npm and node specifiers in `deno compile`. The npm packages are included in the binary and read from it via a virtual file system. This also supports the `--node-modules-dir` flag, dependencies specified in a package.json, and npm binary commands (ex. `deno compile --unstable npm:cowsay`) Closes #16632
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-12-09refactor: cleanup main.rs (#16996)David Sherret
1. Extracts out some code from main.rs 2. Inlines all the `x_command` functions in main.rs
2022-10-28refactor: move `deno info` functionality from deno_graph to CLI (#16434)David Sherret
Closes #16423
2022-09-02refactor: extract out check code from emit (#15729)David Sherret
Closes #15535
2022-08-20feat: add "deno init" subcommand (#15469)Leo Kettmeir
This adds an init subcommand to that creates a project starter similar to cargo init. ``` $ deno init my_project Project initialized Run these commands to get started: cd my_project deno run main.ts deno run main_test.ts $ deno run main.ts Add 2 + 3 5 $ cat main.ts export function add(a: number, b: number): number { return a + b; } if (import.meta.main) { console.log("Add 2 + 3", add(2, 3)); } $ cat main_test.ts import { assertEquals } from "https://deno.land/std@0.151.0/testing/asserts.ts"; import { add } from "./main.ts"; Deno.test(function addTest() { assertEquals(add(2, 3), 5); }); ``` Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2022-07-12perf: use emit from swc instead of tsc (#15118)David Sherret
2022-04-19perf(fmt/lint): incremental formatting and linting (#14314)David Sherret
2022-03-11feat: "deno bench" subcommand (#13713)Bartek Iwańczuk
This commit adds "deno bench" subcommand and "Deno.bench()" API that allows to register bench cases. The API is modelled after "Deno.test()" and "deno test" subcommand. Currently the output is rudimentary and bench cases and not subject to "ops" and "resource" sanitizers. Co-authored-by: evan <github@evan.lol>
2022-03-10feat: "deno task" subcommand (#13725)Bartek Iwańczuk
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-02-16feat: deno vendor (#13670)David Sherret
2022-01-07chore: update copyright to 2022 (#13306)Ryan Dahl
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
2021-08-26refactor(cli): introduce module specifier test modes (#11769)Casper Beyer
This commit merges the two vectors of specifiers into a single one introducing the concept of a "TestMode" which is a tri-state enum specifying how a specifier is to be tested (as documentation, as an executable module or as both). This is determined during the collection phase and determines how a specifier will be executed based on how the specifier was collected (directly or not) and if it has an eligible media_type when fetched. For example "deno test README.md" is marked as documentation because, while it is a direct inclusion it is not an executable media type therefore will only have the fenced code blocks that can be parsed from it tested.
2021-02-25feat(cli/doc): use type definitions "deno doc" if available (#8459)Liam Murphy
This commit adds support for type definitions in "deno doc"; with this change "deno doc" is able to leverage the same directives as TS compiler. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2021-01-11chore: update copyright to 2021 (#9092)Yusuke Tanaka
2021-01-08feat: denort binary (#9041)Luca Casonato
This commit adds new binary target called "denort". It is a "lite" version of "deno" binary that can only execute code embedded inside the binary itself. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2020-11-19refactor(cli): move tooling to cli/tools/ (#8424)Bartek Iwańczuk
This commit moves following tools into a single "tools" module located at "cli/tools/mod.rs": - formatter - linter - test runner - coverage collector - installer - binary upgrader - repl