0
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-01 09:24:20 -04:00
denoland-deno/cli/tools/vendor
Bartek Iwańczuk 4d1a14ca7f
feat: auto-discover package.json for npm dependencies (#17272)
This commits adds auto-discovery of "package.json" file when running
"deno run" and "deno task" subcommands. In case of "deno run" the
"package.json" is being looked up starting from the directory of the
script that is being run, stopping early if "deno.json(c)" file is found
(ie. FS tree won't be traversed "up" from "deno.json").

When "package.json" is discovered the "--node-modules-dir" flag is
implied, leading to creation of local "node_modules/" directory - we
did that, because most tools relying on "package.json" will expect
"node_modules/" directory to be present (eg. Vite). Additionally 
"dependencies" and "devDependencies" specified in the "package.json"
are downloaded on startup. 

This is a stepping stone to supporting bare specifier imports, but
the actual integration will be done in a follow up commit.

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
2023-02-20 19:14:06 +01:00
..
analyze.rs chore: update copyright year to 2023 (#17247) 2023-01-02 21:00:42 +00:00
build.rs refactor: make resolver required (#17783) 2023-02-15 11:30:54 -05:00
import_map.rs refactor: make resolver required (#17783) 2023-02-15 11:30:54 -05:00
mappings.rs refactor: deno_graph 0.43 upgrade (#17692) 2023-02-09 22:00:23 -05:00
mod.rs feat: auto-discover package.json for npm dependencies (#17272) 2023-02-20 19:14:06 +01:00
specifiers.rs chore: upgrade to Rust 1.67 (#17548) 2023-01-27 10:43:16 -05:00
test.rs feat: auto-discover package.json for npm dependencies (#17272) 2023-02-20 19:14:06 +01:00