1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-22 15:24:46 -05:00
denoland-deno/cli
Marvin Hagemeister 8608105208
fix(node): duplicate node_module suffixes (#19222)
Noticed that we're checking more module paths than necessary. In
particular the module path array contains a couple of entries with a
duplicated `node_modules/node_modules` suffix.

```js
[
    // ... more entries before here, where some also contain duplicate suffixes
    "/Users/marvinhagemeister/dev/preact-render-to-string/node_modules/.deno/node_modules",
    "/Users/marvinhagemeister/dev/preact-render-to-string/node_modules/node_modules", // <-- duplicate suffix
    "/Users/marvinhagemeister/dev/preact-render-to-string/node_modules",
    "/Users/marvinhagemeister/dev/node_modules",
    "/Users/marvinhagemeister/node_modules",
    "/Users/node_modules",
    "/node_modules",
    "/node_modules"  // <-- duplicate entry
]
```

This was caused by a misunderstanding in how Rust's
[`Path::ends_with()`](https://doc.rust-lang.org/std/path/struct.Path.html#method.ends_with)
works. It's designed to match on whole path segments and the suffix
`/node_modules` is not that, except for the root entry. This meant that
our check for if the path already ended with `node_module` always
returned `false`. Removing the leading slash fixes that.

While we're at it, we can remove the last condition where we explicitly
added the root `/node_modules` entry since the while loop prior to that
takes care of it already.
2023-05-23 12:46:14 +02:00
..
args feat: add support for globs in the config file and CLI arguments for files (#19102) 2023-05-23 03:39:59 +02:00
bench perf(core): async op pseudo-codegen and performance work (#18887) 2023-04-30 08:50:24 +00:00
cache refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056) 2023-05-14 15:40:01 -06:00
js fix(ext/web): improve timers resolution for 0ms timeouts (#19212) 2023-05-22 14:09:31 +02:00
lsp feat(lsp): support lockfile and node_modules directory (#19203) 2023-05-22 21:28:36 -04:00
napi chore: forward v1.33.4 release commit to main (#19181) 2023-05-18 20:44:10 +02:00
npm feat(lsp): support lockfile and node_modules directory (#19203) 2023-05-22 21:28:36 -04:00
ops refactor(node): move most of cli/node to ext/node (#18797) 2023-04-21 21:02:46 -04:00
schemas feat: add support for globs in the config file and CLI arguments for files (#19102) 2023-05-23 03:39:59 +02:00
standalone fix(npm): store npm binary command resolution in lockfile (#19219) 2023-05-22 16:55:04 -04:00
tests fix(node): duplicate node_module suffixes (#19222) 2023-05-23 12:46:14 +02:00
tools fix(npm): store npm binary command resolution in lockfile (#19219) 2023-05-22 16:55:04 -04:00
tsc docs: be explicit in the unit of time of delay in setTimeout (#19207) 2023-05-22 14:04:28 +00:00
util refactor(core): bake single-thread assumptions into spawn/spawn_blocking (#19056) 2023-05-14 15:40:01 -06:00
auth_tokens.rs chore: upgrade to Rust 1.67 (#17548) 2023-01-27 10:43:16 -05:00
build.rs fix(cli): upgrade to Typescript 5.0.4 (#19090) 2023-05-11 14:12:58 +00:00
Cargo.toml feat: add support for globs in the config file and CLI arguments for files (#19102) 2023-05-23 03:39:59 +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 chore: forward v1.33.4 release commit to main (#19181) 2023-05-18 20:44:10 +02:00
emit.rs refactor: break up ProcState (#18707) 2023-04-14 16:22:33 -04:00
errors.rs feat: TypeScript 5.0.2 (except decorators) (#18294) 2023-03-21 15:46:40 +00:00
factory.rs fix(npm): store npm binary command resolution in lockfile (#19219) 2023-05-22 16:55:04 -04:00
file_fetcher.rs feat(unstable): add more options to Deno.createHttpClient (#17385) 2023-05-21 03:43:54 +02:00
graph_util.rs feat(compile): unstable npm and node specifier support (#19005) 2023-05-10 20:06:59 -04:00
http_util.rs feat(unstable): add more options to Deno.createHttpClient (#17385) 2023-05-21 03:43:54 +02:00
js.rs refactor(core): Improve ergonomics of managing ASCII strings (#18498) 2023-04-04 06:46:31 -06:00
main.rs Revert "perf: use jemalloc as global allocator (#18957)" (#19187) 2023-05-19 09:10:33 -04:00
module_loader.rs fix(npm): store npm binary command resolution in lockfile (#19219) 2023-05-22 16:55:04 -04:00
node.rs refactor(ext/node): allow injecting NodeFs from CLI (#18829) 2023-04-24 19:44:35 -04:00
README.md docs(cli): do not need gen doc for cli (#17260) 2023-01-04 13:19:58 +01:00
resolver.rs feat(compile): unstable npm and node specifier support (#19005) 2023-05-10 20:06:59 -04:00
version.rs refactor: make version and user_agent &'static str (#18400) 2023-03-23 23:27:58 +01:00
watcher.rs refactor(cli): remove ProcState - add CliFactory (#18900) 2023-05-01 14:35:23 -04:00
worker.rs fix(npm): store npm binary command resolution in lockfile (#19219) 2023-05-22 16:55:04 -04: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.