summaryrefslogtreecommitdiff
path: root/cli/tools/info.rs
AgeCommit message (Collapse)Author
2023-03-14refactor(core): resolve_url_or_path and resolve_url_or_path_deprecated (#18170)Bartek Iwańczuk
This commit changes current "deno_core::resolve_url_or_path" API to "resolve_url_or_path_deprecated" and adds new "resolve_url_or_path" API that requires to explicitly pass the directory from which paths should be resolved to. Some of the call sites were updated to use the new API, the reminder of them will be updated in a follow up PR. Towards landing https://github.com/denoland/deno/pull/15454
2023-03-13fix(info/doc): add missing `--no-lock` and `--lock` flags (#18166)David Sherret
Closes #18159
2023-02-22fix(npm): resolve node_modules dir relative to package.json instead of cwd ↵David Sherret
(#17885)
2023-02-22feat: support bare specifier resolution with package.json (#17864)Bartek Iwańczuk
This commit enables resolution of "bare specifiers" (eg. "import express from 'express';") if a "package.json" file is discovered. It's a step towards being able to run projects authored for Node.js without any changes. With this commit we are able to successfully run Vite projects without any changes to the user code. --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2023-02-22refactor: use deno_graph for npm specifiers (#17858)David Sherret
This changes npm specifiers to be handled by deno_graph and resolved to an npm package name and version when the specifier is encountered. It also slightly changes how npm specifier resolution occurs—previously it would collect all the npm specifiers and resolve them all at once, but now it resolves them on the fly as they are encountered in the module graph. https://github.com/denoland/deno_graph/pull/232 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-02-21fix(npm): improve peer dependency resolution (#17835)David Sherret
This PR fixes peer dependency resolution to only resolve peers based on the current graph traversal path. Previously, it would resolve a peers by looking at a graph node's ancestors, which is not correct because graph nodes are shared by different resolutions. It also stores more information about peer dependency resolution in the lockfile.
2023-02-17refactor: add `NpmPackageId` back from deno_graph as `NpmPackageNodeId` (#17804)David Sherret
The `NpmPackageId` struct is being renamed to `NpmPackageNodeId`. In a future PR it will be moved down into only npm dependency resolution and a `NpmPackageId` struct will be introduced in `deno_graph` that only has the name and version of the package (no peer dependency identifier information). So a `NpmPackageReq` will map to an `NpmPackageId`, which will map to an `NpmPackageNodeId` in the npm resolution.
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-02-09refactor: deno_graph 0.43 upgrade (#17692)David Sherret
2023-02-08perf: disable fetching graph cache info except for `deno info` (#17698)David Sherret
2023-01-27chore: upgrade to Rust 1.67 (#17548)David Sherret
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-24refactor(deno_graph): remove unused Resolved::Ok#kind usage (#17504)David Sherret
See https://github.com/denoland/deno_graph/pull/205 for more details.
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-12-17chore: update to Rust 1.66.0 (#17078)linbingquan
2022-12-08fix(compile): ensure import map is used when specified in deno config file ↵David Sherret
(#16990) Closes #14246
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-17fix(info): handle circular npm dependencies (#16692)David Sherret
2022-11-08feat(unstable/npm): support peer dependencies (#16561)David Sherret
This adds support for peer dependencies in npm packages. 1. If not found higher in the tree (ancestor and ancestor siblings), peer dependencies are resolved like a dependency similar to npm 7. 2. Optional peer dependencies are only resolved if found higher in the tree. 3. This creates "copy packages" or duplicates of a package when a package has different resolution due to peer dependency resolution—see https://pnpm.io/how-peers-are-resolved. Unlike pnpm though, duplicates of packages will have `_1`, `_2`, etc. added to the end of the package version in the directory in order to minimize the chance of hitting the max file path limit on Windows. This is done for both the local "node_modules" directory and also the global npm cache. The files are hard linked in this case to reduce hard drive space. This is a first pass and the code is definitely more inefficient than it could be. Closes #15823
2022-10-31feat(unstable/npm): `deno info --json` support for npm specifiers (#16472)David Sherret
2022-10-28feat: support npm specifiers in `deno info` for display text output only ↵David Sherret
(#16470)
2022-10-28refactor: move `deno info` functionality from deno_graph to CLI (#16434)David Sherret
Closes #16423