1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-24 15:19:26 -05:00
denoland-deno/cli
Nayeem Rahman d592cf07d6
refactor(lsp): store test definitions in adjacency list (#20330)
Previously:
```rust
pub struct TestDefinition {
  pub id: String,
  pub name: String,
  pub range: SourceRange,
  pub steps: Vec<TestDefinition>,
}

pub struct TestDefinitions {
  pub discovered: Vec<TestDefinition>,
  pub injected: Vec<lsp_custom::TestData>,
  pub script_version: String,
}
```
Now:
```rust
pub struct TestDefinition {
  pub id: String,
  pub name: String,
  pub range: Option<Range>,
  pub is_dynamic: bool, // True for 'injected' module, not statically detected but added at runtime.
  pub parent_id: Option<String>,
  pub step_ids: HashSet<String>,
}

pub struct TestModule {
  pub specifier: ModuleSpecifier,
  pub script_version: String,
  pub defs: HashMap<String, TestDefinition>,
}
```

Storing the test tree as a literal tree diminishes the value of IDs,
even though vscode stores them that way. This makes all data easily
accessible from `TestModule`. It unifies the interface between
'discovered' and 'injected' tests. This unblocks some enhancements wrt
syncing tests between the LSP and extension, such as this TODO:
61f08d5a71/client/src/testing.ts (L251-L259)
and https://github.com/denoland/vscode_deno/issues/900. We should also
get more flexibility overall.

`TestCollector` is cleaned up, now stores a `&mut TestModule` directly
and registers tests as it comes across them with
`TestModule::register()`. This method ensures sanity in the redundant
data from having both of `TestDefinition::{parent_id,step_ids}`.

All of the messy conversions between `TestDescription`,
`LspTestDescription`, `TestDefinition`, `TestData` and `TestIdentifier`
are cleaned up. They shouldn't have been using `impl From` and now the
full list of tests is available to their implementations.
2023-08-31 14:04:15 +02:00
..
args chore(core): bump and trim deps (#20265) 2023-08-31 14:02:40 +02:00
bench chore: remove third_party submodule (#20201) 2023-08-21 18:23:28 +05:30
cache chore(cli): remove atty crate (#20275) 2023-08-31 14:02:39 +02:00
js fix(bench): explicit timers don't force high precision measurements (#20272) 2023-08-31 14:02:40 +02:00
lsp refactor(lsp): store test definitions in adjacency list (#20330) 2023-08-31 14:04:15 +02:00
napi fix(napi): ignore tsfn recv error (#20324) 2023-08-31 14:04:15 +02:00
npm chore: update to Rust 1.72 (#20258) 2023-08-31 14:02:40 +02:00
ops build: allow disabling snapshots for dev (#20048) 2023-08-06 01:47:15 +02:00
schemas feat(ext/kv): connect to remote database (#20178) 2023-08-31 14:01:18 +02:00
standalone chore: update to Rust 1.72 (#20258) 2023-08-31 14:02:40 +02:00
tests chore(cli): use NPM_CONFIG_REGISTRY for all tests (#20320) 2023-08-31 14:04:14 +02:00
tools refactor(lsp): store test definitions in adjacency list (#20330) 2023-08-31 14:04:15 +02:00
tsc test(bench): mark explicit timer test as flaky (#20304) 2023-08-31 14:04:06 +02:00
util chore: update to Rust 1.72 (#20258) 2023-08-31 14:02:40 +02:00
auth_tokens.rs chore: upgrade to Rust 1.67 (#17548) 2023-01-27 10:43:16 -05:00
build.rs build: remove redundant rerun-if-changed for compiler snapshot (#20094) 2023-08-08 09:21:54 +02:00
Cargo.toml refactor(runtime): factor out code between build.rs and worker.rs (#20299) 2023-08-31 14:04:07 +02:00
deno.ico fix(cli): add icon and metadata to deno.exe on Windows (#6693) 2020-07-15 21:54:38 +02:00
deno_std.rs 1.36.3 (#20268) 2023-08-24 10:01:52 -06:00
emit.rs refactor(lsp): move config file related code to config.rs (#19790) 2023-07-10 21:45:09 +00:00
errors.rs feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
factory.rs refactor: use "deno_config" crate (#20260) 2023-08-24 09:01:53 -06:00
file_fetcher.rs chore: update to Rust 1.72 (#20258) 2023-08-31 14:02:40 +02:00
graph_util.rs feat(unstable): optional deno_modules directory (#19977) 2023-08-02 00:49:09 +00:00
http_util.rs feat(unstable): add more options to Deno.createHttpClient (#17385) 2023-05-21 03:43:54 +02:00
js.rs build: allow disabling snapshots for dev (#20048) 2023-08-06 01:47:15 +02:00
main.rs fix(ext/web): add stream tests to detect v8slice split bug (#20253) 2023-08-24 09:01:07 -06:00
module_loader.rs chore: rename some helpers on the Fs trait (#20097) 2023-08-08 16:28:18 -04:00
node.rs chore: rename some helpers on the Fs trait (#20097) 2023-08-08 16:28:18 -04:00
README.md docs(cli): do not need gen doc for cli (#17260) 2023-01-04 13:19:58 +01:00
resolver.rs refactor: upgrade deno_ast 0.28 and deno_semver 0.4 (#20193) 2023-08-21 18:23:28 +05:30
version.rs refactor: make version and user_agent &'static str (#18400) 2023-03-23 23:27:58 +01:00
worker.rs chore: update to Rust 1.72 (#20258) 2023-08-31 14:02:40 +02:00

Deno CLI Crate

crates

This provides the actual deno executable and the user-facing APIs.

The deno crate uses the deno_core to provide the executable.