summaryrefslogtreecommitdiff
path: root/cli/args/package_json.rs
AgeCommit message (Collapse)Author
2024-10-04fix(install): surface package.json dependency errors (#26023)David Sherret
2024-09-09fix: remove recently added deno.json node_modules aliasing (#25542)David Sherret
This was initially added in #25399 in order to make transitioning over from package.json to deno.json more easy, but it causes some problems that are shown in the issue and it also means that the output of `deno install` would have different resolution than `npm install`. Overall, I think it's too much complexity to be smarter about this and it's probably best to not do it. If someone needs an aliased folder then they should keep using a package.json Closes #25538
2024-09-04fix(byonm): resolve npm deps of jsr deps (#25399)David Sherret
This allows using npm deps of jsr deps without having to add them to the root package.json. Works by taking the package requirement and scanning the `node_modules/.deno` directory for the best matching package, so it relies on deno's node_modules structure. Additionally to make the transition from package.json to deno.json easier, Deno now: 1. Installs npm deps in a deno.json at the same time as installing npm deps from a package.json. 2. Uses the alias in the import map for `node_modules/<alias>` for better package.json compatiblity.
2024-07-23refactor: update to use deno_package_json (#24688)David Sherret
This is in preparation for extracting out node resolution code from ext/node (which is something I'm going to do gradually over time). Uses https://github.com/denoland/deno_package_json
2024-07-15fix(workspace): do not resolve to self for npm pkg depending on matching req ↵David Sherret
(#24591) Closes #24584
2024-07-04feat: npm workspace and better Deno workspace support (#24334)David Sherret
Adds much better support for the unstable Deno workspaces as well as support for npm workspaces. npm workspaces is still lacking in that we only install packages into the root node_modules folder. We'll make it smarter over time in order for it to figure out when to add node_modules folders within packages. This includes a breaking change in config file resolution where we stop searching for config files on the first found package.json unless it's in a workspace. For the previous behaviour, the root deno.json needs to be updated to be a workspace by adding `"workspace": ["./path-to-pkg-json-folder-goes-here"]`. See details in https://github.com/denoland/deno_config/pull/66 Closes #24340 Closes #24159 Closes #24161 Closes #22020 Closes #18546 Closes #16106 Closes #24160
2024-06-26refactor: move PackageJson to deno_config (#24348)David Sherret
2024-06-13fix(npm): use more relaxed package.json version constraint parsing (#24202)David Sherret
2024-01-22feat(lockfile): track JSR and npm dependencies in config file (#22004)David Sherret
See overview in https://github.com/denoland/deno_lockfile/pull/13
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-10-04refactor(node): combine node resolution code for resolving a package subpath ↵David Sherret
from external code (#20791) We had two methods that did the same functionality.
2023-08-21refactor: upgrade deno_ast 0.28 and deno_semver 0.4 (#20193)David Sherret
2023-07-26fix(check): should bust check cache when json module or npm resolution ↵David Sherret
changes (#19941) A small part of #19928.
2023-05-10feat(compile): unstable npm and node specifier support (#19005)David Sherret
This is the initial support for npm and node specifiers in `deno compile`. The npm packages are included in the binary and read from it via a virtual file system. This also supports the `--node-modules-dir` flag, dependencies specified in a package.json, and npm binary commands (ex. `deno compile --unstable npm:cowsay`) Closes #16632
2023-04-06refactor(npm): use deno_npm and deno_semver (#18602)David Sherret
2023-03-15fix(npm): "not implemented scheme" message should properly show the scheme ↵David Sherret
(#18209)
2023-03-03fix: lazily surface errors in package.json deps parsing (#17974)David Sherret
Closes #17941
2023-02-25fix(npm): skip analyzing more specifiers in package.json (#17938)David Sherret
2023-02-24fix: ignore workspace specifiers in package.json (#17934)David Sherret
Part of #17916
2023-02-23fix(npm): support bare specifiers in package.json having a path (#17903)David Sherret
For example `import * as test from "package/path.js"`
2023-02-23feat(npm): support bare specifiers from package.json in more subcommands and ↵David Sherret
language server (#17891)
2023-02-20feat: auto-discover package.json for npm dependencies (#17272)Bartek Iwańczuk
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>