summaryrefslogtreecommitdiff
path: root/cli/tools
AgeCommit message (Collapse)Author
2024-02-23refactor(cli): clean up test runner channels (#22422)Matt Mastracci
Gets us closer to solving #20707. Rewrites the `TestEventSender`: - Allow for explicit creation of multiple streams. This will allow for one-std{out,err}-per-worker - All test events are received along with a worker ID, allowing for eventual, proper parallel threading of test events. In theory this should open up proper interleaving of test output, however that is left for a future PR. I had some plans for a better performing synchronization primitive, but the inter-thread communication is tricky. This does, however, speed up the processing of large numbers of tests 15-25% (possibly even more on 100,000+). Before ``` ok | 1000 passed | 0 failed (32ms) ok | 10000 passed | 0 failed (276ms) ``` After ``` ok | 1000 passed | 0 failed (25ms) ok | 10000 passed | 0 failed (230ms) ```
2024-02-23feat: infer dependencies from package.json (#22563)Marvin Hagemeister
<!-- Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/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. 7. Open as a draft PR if your work is still in progress. The CI won't run all steps, but you can add '[ci]' to a commit message to force it to. 8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label. --> This PR enhances the `deno publish` command to infer dependencies from `package.json` if present.
2024-02-23feat(publish): respect .gitignore during `deno publish` (#22514)Divy Srivastava
Files from `.gitignore`, global git config, `.git/info/exclude` and `deno.json`'s `exclude` are ignored.
2024-02-21fix(compile): respect compiler options for emit (#22521)Bartek Iwańczuk
`deno compile` was ignoring configuration file and thus not applying `compilerOptions` to influence the way files were emitted.
2024-02-21feat(publish): type check on publish (#22506)David Sherret
Supersedes #22501 and also fixes that issue.
2024-02-20perf(jsr): fast check cache and lazy fast check graph (#22485)David Sherret
2024-02-20fix(publish): print files that will be published (#22495)Luca Casonato
2024-02-19fix(publish): ignore .DS_Store while publishing (#22478)Luca Casonato
2024-02-19feat(unstable/lint): no-slow-types for JSR packages (#22430)David Sherret
1. Renames zap/fast-check to instead be a `no-slow-types` lint rule. 1. This lint rule is automatically run when doing `deno lint` for packages (deno.json files with a name, version, and exports field) 1. This lint rules still occurs on publish. It can be skipped by running with `--no-slow-types`
2024-02-19chore(fs): rename `op_fs_file_stat_{async/sync}` ops (#22476)Asher Gomez
Renames `op_fs_fstat_{sync/async}` to `op_fs_file_stat_{async/sync}` in preparation of the upcoming removal of `Deno.fstat()` in v2.
2024-02-19fix: write lockfile in `deno info` (#22272)Luca Casonato
2024-02-16refactor: remove module graph setup from ModuleLoader (#22442)David Sherret
`ModuleLoader` was doing too much duplicate work.
2024-02-16refactor(cli): move op sanitizer to Rust (#22413)Matt Mastracci
The format of the sanitizers will change a little bit: - If multiple async ops leak and traces are on, we repeat the async op header once per stack trace. - All leaks are aggregated under a "Leaks detected:" banner as the new timers are eventually going to be added, and these are neither ops nor resources. - `1 async op` is now `An async op` - If ops and resources leak, we show both (rather than op leaks masking resources) Follow-on to https://github.com/denoland/deno/pull/22226
2024-02-16chore(ext/web): refactor timer ops before landing op sanitizer (#22435)Matt Mastracci
Splitting the sleep and interval ops allows us to detect an interval timer. We also remove the use of the `op_async_void_deferred` call. A future PR will be able to split the op sanitizer messages for timers and intervals.
2024-02-15feat(unstable): single checksum per JSR package in the lockfile (#22421)David Sherret
This changes the lockfile to not store JSR specifiers in the "remote" section. Instead a single JSR integrity is stored per package in the lockfile, which is a hash of the version's `x.x.x_meta.json` file, which contains hashes for every file in the package. The hashes in this file are then compared against when loading. Additionally, when using `{ "vendor": true }` in a deno.json, the files can be modified without causing lockfile errors—the checksum is only checked when copying into the vendor folder and not afterwards (eventually we should add this behaviour for non-jsr specifiers as well). As part of this change, the `vendor` folder creation is not always automatic in the LSP and running an explicit cache command is necessary. The code required to track checksums in the LSP would have been too complex for this PR, so that all goes through deno_graph now. The vendoring is still automatic when running from the CLI.
2024-02-14chore: rename DENO_REGISTRY_URL to JSR_URL (#22414)Nayeem Rahman
2024-02-14feat(unstable): define config in publish url (#22406)Leo Kettmeir
2024-02-13chore: deno_core bump (#22407)Matt Mastracci
- Adding `None` flag for warmup script. - Modify opcall trace interface to match new Rust implementation
2024-02-13feat: denort binary for `deno compile` (#22205)Divy Srivastava
This introduces the `denort` binary - a slim version of deno without tooling. The binary is used as the default for `deno compile`. Improves `deno compile` final size by ~2.5x (141 MB -> 61 MB) on Linux x86_64.
2024-02-12chore: update to Rust 1.76 (#22376)林炳权
Update to Rust 1.76
2024-02-10fix: cache bust jsr deps on constraint failure (#22372)David Sherret
Removes the `FileFetcher`'s internal cache because I don't believe it's necessary (we already cache this kind of stuff in places like deno_graph or config files in different places). Removing it fixes this bug because this functionality was already implemented in deno_graph and lowers memory usage of the CLI a little bit.
2024-02-09fix: upgrade to deno_ast 0.33 (#22341)David Sherret
* Uses diagnostics from deno_ast * Real fix for https://github.com/denoland/deno/pull/22310 * Moves `deno lint --json` code here * Upgrades swc Closes #22117 Closes #22109 Closes #21927 Closes #20993
2024-02-07refactor: extract out `runtime::colors` to `deno_terminal::colors` (#22324)David Sherret
2024-02-07chore: upgrade deno_core to 0.259.0 (#22311)Bartek Iwańczuk
This update brings number of ops available to user code down to 45.
2024-02-06fix(publish): lazily parse sources (#22301)David Sherret
Closes #22290
2024-02-06chore(ws): remove unused op_ws_send_pong (#22283)Divy Srivastava
2024-02-05refactor(cli): Move op descriptions into Rust and prepare for op import (#22271)Matt Mastracci
This moves the op sanitizer descriptions into Rust code and prepares for eventual op import from `ext:core/ops`. We cannot import these ops from `ext:core/ops` as the testing infrastructure ops are not always present. Changes: - Op descriptions live in `cli` code and are currently accessible via an op for the older sanitizer code - `phf` dep moved to workspace root so we can use it here - `ops.op_XXX` changed to to `op_XXX` to prepare for op imports later on.
2024-02-05Reland refactor(cli): use new sanitizer for resources (#22226)Matt Mastracci
Originally in #22125 Reverted in #22153 because of #22148 Fixed in deno_core https://github.com/denoland/deno_core/pull/538 Test plan: 1. Check out: https://github.com/poolifier/poolifier-deno.git 2. `PATH=.../deno/target/release/:$PATH deno task test` 3. `ok | 13 passed (188 steps) | 0 failed (18s)`
2024-02-05refactor(cli): Add TestFailureDescription (#22267)Matt Mastracci
Extract zero-risk changes from #22226
2024-02-01fix(publish): use lighter crate for opening browser (#22224)Bartek Iwańczuk
Alternative to https://github.com/denoland/deno/pull/22223 which switches `webbrowser` crate to `open` (https://crates.io/crates/open) which is lighterweight.
2024-02-01fix(publish): add node specifiers (#22213)Leo Kettmeir
2024-02-01fix(install): forward granular --unstable-* flags (#22164)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/22154
2024-02-01refactor: load bytes in deno_graph (#22212)David Sherret
Upgrades deno_graph to 0.64 where deno_graph is now responsible for turning bytes into a string. This is in preparation for Wasm modules.
2024-02-01fix(publish): rename --no-fast-check to --no-zap (#22214)Bartek Iwańczuk
Also prints an information about the flag when there are `zap` errors.
2024-01-31chore(publish): try to automatically open the web browser (#22208)Bartek Iwańczuk
2024-01-31chore: update deno_doc (#22174)Leo Kettmeir
2024-01-31chore(publish): add --no-fast-check flag (#22203)Bartek Iwańczuk
2024-01-30fix: canary for arm64 macos (#22187)Luca Casonato
This doesn't actually trigger the arm64 build job nightly yet. I'll do that in a follow up.
2024-01-27Revert "refactor(cli): use new sanitizer for resources (#22125)" (#22153)Bartek Iwańczuk
2024-01-26refactor(cli): use new sanitizer for resources (#22125)Matt Mastracci
Step 1 of the Rustification of sanitizers, which unblocks the faster timers. This replaces the resource sanitizer with a Rust one, using the new APIs in deno_core.
2024-01-24feat(publish): error on invalid external imports (#22088)Luca Casonato
2024-01-24feat(publish): give diagnostic on invalid package files (#22082)Luca Casonato
2024-01-24feat(publish): exclude and include (#22055)Luca Casonato
2024-01-24chore: improve unanalyzable dynamic import diagnostic (#22051)Luca Casonato
2024-01-24feat: TC39 decorator proposal support (#22040)Bartek Iwańczuk
This commit adds support for [TC39 Decorator Proposal](https://github.com/tc39/proposal-decorators). These decorators are only available in transpiled sources - ie. non-JavaScript files (because of lack of support in V8). This entails that "experimental TypeScript decorators" are not available by default and require to be configured, with a configuration like this: ``` { "compilerOptions": { "experimentalDecorators": true } } ``` Closes https://github.com/denoland/deno/issues/19160 --------- Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: crowlkats <crowlkats@toaxl.com> Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-01-24refactor: set removal version for `deno bundle` (#22062)Asher Gomez
This change sets the removal version for the `deno bundle` sub-command for Deno v2. The warnings appear when `deno bundle` is run and in the `--help` menu.
2024-01-23feat(cli): improved diagnostics printing (#22049)Luca Casonato
This initially uses the new diagnostic printer in `deno lint`, `deno doc` and `deno publish`. In the limit we should also update `deno check` to use this printer.
2024-01-23refactor: use parsed source cache when unfurling import map (#22001)Luca Casonato
2024-01-23chore: update deno_ast and deno_graph (#22033)Bartek Iwańczuk
This upgrade unblocks support for ES decorator proposal. Co-authored-by: crowlkats <crowlkats@toaxl.com>
2024-01-23fix(info): return proper exit code on error (#21952)Anwesh