summaryrefslogtreecommitdiff
path: root/cli/main.rs
AgeCommit message (Collapse)Author
2023-05-13fix(lsp): increase default max heap size to 3Gb (#19115)Bartek Iwańczuk
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-05-03perf: use jemalloc as global allocator (#18957)Bartek Iwańczuk
Follow up to https://github.com/denoland/deno/pull/18875 that enables `jemalloc` as a global allocator for the Deno CLI.
2023-05-01refactor(cli): remove ProcState - add CliFactory (#18900)David Sherret
This removes `ProcState` and replaces it with a new `CliFactory` which initializes our "service structs" on demand. This isn't a performance improvement at the moment for `deno run`, but might unlock performance improvements in the future.
2023-04-19fix(compile): write bytes directly to output file (#18777)David Sherret
1. Adds cli/standalone folder 2. Writes the bytes directly to the output file. When adding npm packages this might get quite large, so let's not keep the final output in memory just in case.
2023-04-14refactor: break up `ProcState` (#18707)David Sherret
1. Breaks up functionality within `ProcState` into several other structs to break out the responsibilities (`ProcState` is only a data struct now). 2. Moves towards being able to inject dependencies more easily and have functionality only require what it needs. 3. Exposes `Arc<T>` around the "service structs" instead of it being embedded within them. The idea behind embedding them was to reduce the verbosity of needing to pass around `Arc<...>`, but I don't think it was exactly working and as we move more of these structs to be more injectable I don't think the extra verbosity will be a big deal.
2023-04-13refactor(cli): add `Emitter` struct (#18690)David Sherret
Removes the functions in the `emit` module and replaces them with an `Emitter` struct that can have "ctor dependencies" injected rather than using functions to pass along the dependencies. This is part of a long term refactor to move more functionality out of proc state.
2023-04-12refactor: `ProcState::build` -> `ProcState::from_flags` (#18672)David Sherret
2023-03-26chore: upgrade clap to v4 (#17333)Leo Kettmeir
2023-03-22feat(cli): --ext parameter for run, compile, and bundle (#17172)Cre3per
Adds `--ext` to `deno run`, closes #5088 Additionally - Adds `--ext` to `deno compile` and `deno bundle`
2023-02-15refactor: use deno_graph's semver and npm structs (#17791)David Sherret
2023-02-15refactor: make resolver required (#17783)David Sherret
Makes the resolver required and prints a warning when vendoring and a dynamic import can't be resolved. Closes #16522
2023-01-31refactor(semver): generalize semver related structs (#17605)David Sherret
- Generalizes the npm version code (ex. `NpmVersion` -> `Version`, `NpmVersionReq` -> `VersionReq`). This is a slow refactor towards extracting out this code for deno specifiers and better usage in deno_graph. - Removes `SpecifierVersionReq`. Consolidates `NpmVersionReq` and `SpecifierVersionReq` to just `VersionReq` - Removes `NpmVersionMatcher`. This now just looks at `VersionReq`. - Paves the way to allow us to create `NpmPackageReference`'s from a package.json's dependencies/dev dependencies (`VersionReq::parse_from_npm`).
2023-01-27chore: upgrade to Rust 1.67 (#17548)David Sherret
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-25feat(cli): add `DENO_V8_FLAGS` env var (#17313)Leo Kettmeir
Closes #5669
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-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-12-19fix: hide progress bars when showing permission prompt (#17130)David Sherret
Also adds download bytes progress when downloading remote specifiers. Closes #16860
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-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(compile): ensure import map is used when specified in deno config file ↵David Sherret
(#16990) Closes #14246
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-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-11-28refactor: create util folder, move nap_sym to napi/sym, move http_cache to ↵David Sherret
cache folder (#16857)
2022-11-26refactor: `DenoDir` - move to cache folder and make `root_dir` private (#16823)David Sherret
2022-11-25refactor: move cdp.rs to tools/repl (#16821)David Sherret
2022-11-25refactor: move dts files, diagnostics.rs, and tsc.rs to tsc folder (#16820)David Sherret
2022-11-25refactor: move lockfile.rs to args module (#16818)David Sherret
This should be in the `args` folder as it's similar to `config_file`.
2022-11-24feat(cli): add warning for incorrectly ordered flags (#16734)Asher Gomez
This code checks if permission flags are incorrectly defined after the module name (e.g. `deno run mod.ts --allow-read` instead of the correct `deno run --allow-read mod.ts`). If so, a simple warning is displayed.
2022-11-21feat(core): Ability to create snapshots from existing snapshots (#16597)Bartek Iwańczuk
Co-authored-by: crowlkats <crowlkats@toaxl.com>
2022-11-18chore: use Rust 1.65.0 (#16688)Aaron O'Mullan
2022-11-14fix(install): support npm specifiers (#16634)David Sherret
Supports npm specifiers for `deno install`. This will by default always use a lockfile (which is generated on first run) unless `--no-lock` is specified.
2022-11-14fix(bundle): explicit error when using an npm specifier with deno bundle ↵David Sherret
(#16637)
2022-11-11perf: more efficient `deno cache` and npm package info usage (#16592)David Sherret
1. There was a lot of cloning going on with `NpmPackageInfo`. This is now stored in an `Arc<NpmPackageInfo>` and cloning only happens on the individual version. 2. The package cache is now cleared from memory after resolution. 3. This surfaced a bug in `deno cache` and I noticed it can be more efficient if we have multiple root specifiers if we provide all the specifiers as roots.
2022-11-02refactor: Combine ImportMapResolver and JsxResolver (#16508)Bartek Iwańczuk
These resolvers are used in `deno_graph` APIs. Combining them removes a lot of code and unblocks me on https://github.com/denoland/deno/pull/16157
2022-10-28refactor(npm): reorganize initialization of compat layer (#16471)Bartek Iwańczuk
Ensures that "std/node" graph is analyzed only once.
2022-10-28refactor: move `deno info` functionality from deno_graph to CLI (#16434)David Sherret
Closes #16423
2022-10-26fix(compile): show an error when using npm specifiers (#16430)David Sherret
Closes #16427
2022-10-25fix(npm): add support for npm packages in lock files (#15938)Bartek Iwańczuk
This commit adds support for npm packages in the lock file.
2022-10-25fix: upgrade swc_ecma_parser to 0.122.19 - deno_ast 0.20 (#16406)David Sherret
2022-10-21feat(unstable/npm): initial type checking of npm specifiers (#16332)David Sherret
2022-10-21feat(update): prompt for new version once per day (#16375)Bartek Iwańczuk
<!-- Before submitting a PR, please read http://deno.land/manual/contributing 1. Give the PR a descriptive title. Examples of good title: - fix(std/http): Fix race condition in server - docs(console): Update docstrings - feat(doc): Handle nested reexports Examples of bad title: - fix #7123 - update docs - fix bugs 2. Ensure there is a related issue and it is referenced in the PR text. 3. Ensure there are tests that cover the changes. 4. Ensure `cargo test` passes. 5. Ensure `./tools/format.js` passes without changing files. 6. Ensure `./tools/lint.js` passes. -->
2022-10-20feat(cli): check for updates in background (#15974)Bert Belder
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2022-10-05feat(npm): implement Node API (#13633)Divy Srivastava
This PR implements the NAPI for loading native modules into Deno. Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: DjDeveloper <43033058+DjDeveloperr@users.noreply.github.com> Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
2022-10-03feat(unstable): add support for npm specifier cli arguments for 'deno cache' ↵Bartek Iwańczuk
(#16141) This commit adds support for npm specifier in "deno cache" subcommand. ``` $ deno cache --unstable npm:vite npm:chalk https://deno.land/std/http/file_server.ts ``` Besides downloading requested npm package(s), it will also download necessary code from "std/node/".
2022-09-28feat: implement Web Cache API (#15829)Satya Rohith
2022-09-13refactor(npm): create general use `NpmPackageResolver` (#15882)David Sherret
2022-09-09feat: download progress bar (#15814)Bartek Iwańczuk
2022-09-03BREAKING(unstable): remove --compat mode (#15678)Bartek Iwańczuk
This commit removes "compat" mode. We shipped support for "npm:" specifier support in v1.25 and that is preferred way to interact with Node code that we will iterate and improve upon.
2022-09-03feat(info): add information about npm modules cache (#15750)Bartek Iwańczuk