summaryrefslogtreecommitdiff
path: root/cli/tools
AgeCommit message (Collapse)Author
2023-01-18refactor(cli): Integrate standalone mode cert handling into `Flags` (#17419)Andreu Botella
The way the standalone mode handles the `--cert` flag is different to all other modes. This is because `--cert` takes a path to the certificate file, which is directly added to the root cert store; except for compile mode, where its byte contents are stored in the standalone metadata, and they are added to the root cert store after the `ProcState` is created. This change instead changes `Flags::ca_file` (an `Option<String>`) into `Flags::ca_data`, which can represent a `String` file path or a `Vec<u8>` with the certificate contents. That way, standalone mode can create a `ProcState` whose root cert store alreay contains the certificate. This change also adds a tests for certificates in standalone mode, since there weren't any before. This refactor will help with implementing web workers in standalone mode in the future.
2023-01-16refactor(cli): fewer clones (#17450)Geert-Jan Zwiers
2023-01-16fix(repl): improve validator to mark more code as incomplete (#17443)David Sherret
Closes #17442
2023-01-16fix(cli/fmt): show filepath for InvalidData error (#17361)Leo Kettmeir
2023-01-14chore: use rustfmt imports_granularity option (#17421)Divy Srivastava
Closes https://github.com/denoland/deno/issues/2699 Closes https://github.com/denoland/deno/issues/2347 Uses unstable rustfmt features. Since dprint invokes `rustfmt` we do not need to switch the cargo toolchain to nightly. Do we care about formatting stability of our codebase across Rust versions? (I don't)
2023-01-14refactor: create enum for `--builtin` doc flag (#17423)David Sherret
2023-01-13refactor(coverage): use FileFlags struct (#17388)Geert-Jan Zwiers
2023-01-13refactor(cli/tools): reduce cloning (#17309)Geert-Jan Zwiers
2023-01-13chore: add `copyright_checker` tool and add the missing copyright (#17285)Yiyu Lin
2023-01-12fix: don't unwrap in test pipe handling logic (#17341)Leo Kettmeir
Fixes #14746
2023-01-10fix(watch): preserve `ProcState::file_fetcher` between restarts (#15466)Nayeem Rahman
This commit changes "ProcState" to store "file_fetcher" field in an "Arc", allowing it to be preserved between restarts and thus keeping the state alive between the restarts. File watchers for "deno test" and "deno bench" now reset "ProcState" between restarts.
2023-01-08fix(install): should always include `--no-config` in shim unless `--config` ↵David Sherret
is specified (#17300) Closes #17294
2023-01-07refactor(cli/tools): move flag and config logic to CliOptions (#17008)Geert-Jan Zwiers
Co-authored-by: David Sherret <dsherret@gmail.com>
2023-01-07refactor(permissions): add PermissionsContainer struct for internal ↵Bartek Iwańczuk
mutability (#17134) Turns out we were cloning permissions which after prompting were discarded, so the state of permissions was never preserved. To handle that we need to store all permissions behind "Arc<Mutex<>>" (because there are situations where we need to send them to other thread). Testing and benching code still uses "Permissions" in most places - it's undesirable to share the same permission set between various test/bench files - otherwise granting or revoking permissions in one file would influence behavior of other test files.
2023-01-05refactor(cli,core,ext,rt): remove some unnecessary `clone` or `malloc` (#17274)Yiyu Lin
2023-01-04fix: upgrade deno_ast to 0.23 (#17269)David Sherret
Closes #17172 Closes #15669 Closes #8529
2023-01-04chore(cli,ext,rt): remove some unnecessary `clone` or `malloc` (#17261)Yiyu Lin
2023-01-03fix(cli): bundle command support shebang file (#17113)Fenix
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-12-30refactor: cleanup redundant call (#17226)Geert-Jan Zwiers
2022-12-17fix(init): update comment style (#17074)Pig Fang
The output of `init` are commands, so this should be treated as a "Shell script". In Shell script, comments must start with `#`, not `//`. (This also makes the commands example easier to be copied to somewhere.)
2022-12-17chore: update to Rust 1.66.0 (#17078)linbingquan
2022-12-17fix(lint): column number for pretty reporting was off by 1 (#17107)David Sherret
Closes #17086
2022-12-16fix(repl): doing two history searches exiting with ctrl+c should not exit ↵sigmaSd
repl (#17079) fix https://github.com/denoland/deno/issues/16147
2022-12-16fix(npm): fix require resolution if using --node-modules-dir (#17087)Bartek Iwańczuk
In our `require()` implementation we use a special logic to resolve "base path" when looking for matching packages, however this logic is in contradiction to what needs to happen if there's a local "node_modules" directory used. This commit changes require implementation to be aware if we're running off of global node modules cache or a local one.
2022-12-16fix(install): use a hidden file for the lockfile and config (#17084)David Sherret
Closes #17083
2022-12-16refactor(core): allow to listen for notifications in LocalInspectorSession ↵Bartek Iwańczuk
(#17040)
2022-12-16fix(repl): errors shouldn't terminate repl (#17082)Bartek Iwańczuk
This commit changes REPL to never surface errors coming from code execution, but instead print them as errors to the REPL itself.
2022-12-14fix(upgrade/windows): correct command in windows access denied message (#17049)David Sherret
2022-12-14chore: fix recent regression with `deno upgrade` not handling redirects (#17045)David Sherret
2022-12-13feat(repl): support npm packages (#16770)Bartek Iwańczuk
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-12-12fix: always derive http client from cli flags (#17029)David Sherret
I'm not sure how to test this. It doesn't seem to have an existing test. Closes #15921
2022-12-12feat: improve download progress bar (#16984)Bartek Iwańczuk
Co-authored-by: David Sherret <dsherret@gmail.com>
2022-12-10feat(cli): support deno bench in the config file (#16608)Geert-Jan Zwiers
This PR adds the ability to set `include/exclude` fields for `deno bench` in the configuration file.
2022-12-10feat(init): Generate main_bench.ts by default (#16786)sigmaSd
This commit changes "deno init" to generate "main_bench.ts" file which scaffold two example bench cases.
2022-12-09feat(init): Use jsonc for configuration file (#17002)Bartek Iwańczuk
Generate "deno.jsonc" instead of "deno.json" when running "deno init" subcommand.
2022-12-09fix: respect the `--quiet` flag in more cases (#16998)David Sherret
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-12-08fix(cli/upgrade): properly cleanup after finished (#16930)Lino Le Van
Co-authored-by: kidonng <kidonng@users.noreply.github.com>
2022-12-08fix(compile): ensure import map is used when specified in deno config file ↵David Sherret
(#16990) Closes #14246
2022-12-08feat(init): Generate deno.json by default (#16389)Bartek Iwańczuk
Updates `deno init` subcommand to create a `deno.json` when initializing a new project. Slightly changes the output, to make it more readable.
2022-12-07feat(repl): run "deno repl" with no permissions (#16795)Bartek Iwańczuk
This commit changes "deno repl" command to run with no permissions by default and accept "--allow-*" flags. This change is dictated by the fact that currently there is no way to run REPL with limited permissions. Technically it's a breaking change in the CLI command, but there's agreement in the team that it has merit and it's a good solution. Running just "deno" command still starts the REPL with full permissions allowed, but now a banner is printed to inform users about that:
2022-12-07feat: ignore `node_modules` and `.git` folders when collecting files ↵David Sherret
everywhere (#16862) We currently only do this for fmt. This makes it so they're excluded by default, but you can still opt into these directories by explicitly specifying them.
2022-12-06refactor: remove `deno_graph::Locker` usage (#16877)David Sherret
This is just a straight refactor and doesn't make any improvements to the code that could now be made. Closes #16493
2022-12-05fix(test): improve how `--fail-fast` shuts down when hitting limit (#16956)David Sherret
Closes #15650
2022-12-02fix(upgrade/windows): show informative message on access denied error (#16887)David Sherret
Closes #16886
2022-12-01fix(upgrade): respect the `--quiet` flag (#16888)David Sherret
Also, use `ProgressBar` for upgrading.
2022-12-01fix(vendor): properly handle bare specifiers that start with http (#16885)David Sherret
2022-11-30fix(repl): respect --quiet flag (#16875)Bartek Iwańczuk
This commit changes REPL behavior to respect --quiet flag. Once this flag is present REPL will not print a banner at the start.
2022-11-29fix(coverage): Error if the emit cache is invalid (#16850)sigmaSd