summaryrefslogtreecommitdiff
path: root/cli/file_fetcher.rs
AgeCommit message (Collapse)Author
2024-11-15fix: update message for unsupported schemes with npm and jsr (#26884)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/26596
2024-10-24fix: `.npmrc` settings not being passed to install/add command (#26473)Marvin Hagemeister
We weren't passing the resolved npmrc settings to the install commands. This lead us to always fall back to the default registry url instead of using the one from npmrc. Fixes https://github.com/denoland/deno/issues/26139 Fixes https://github.com/denoland/deno/issues/26033 Fixes https://github.com/denoland/deno/issues/25924 Fixes https://github.com/denoland/deno/issues/25822 Fixes https://github.com/denoland/deno/issues/26152 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-17refactor(ext/web): use concrete error types (#26185)Leo Kettmeir
2024-10-01BREAKING: rename "deps" remote cache folder to "remote" (#25969)David Sherret
Closes https://github.com/denoland/deno/issues/25967 Closes #25968
2024-09-28refactor: use deno_path_util (#25918)David Sherret
2024-09-26feat: add `--allow-import` flag (#25469)Bartek Iwańczuk
This replaces `--allow-net` for import permissions and makes the security sandbox stricter by also checking permissions for statically analyzable imports. By default, this has a value of `--allow-import=deno.land:443,jsr.io:443,esm.sh:443,raw.githubusercontent.com:443,gist.githubusercontent.com:443`, but that can be overridden by providing a different set of hosts. Additionally, when no value is provided, import permissions are inferred from the CLI arguments so the following works because `fresh.deno.dev:443` will be added to the list of allowed imports: ```ts deno run -A -r https://fresh.deno.dev ``` --------- Co-authored-by: David Sherret <dsherret@gmail.com>
2024-09-18feat: default to TS for file extension and support ext flag in more ↵Leo Kettmeir
scenarios (#25472) Closes #11220 Currently does lint, fmt, and repl
2024-09-16refactor(permissions): split up Descriptor into Allow, Deny, and Query (#25508)David Sherret
This makes the permission system more versatile.
2024-08-26perf(cache): single cache file for remote modules (#24983)David Sherret
This changes the global cache to store the cache file for remote modules in one file instead of two.
2024-06-06refactor: remove `PermissionsContainer` in deno_runtime (#24119)David Sherret
Also removes permissions being passed in for node resolution. It was completely useless because we only checked it for reading package.json files, but Deno reading package.json files for resolution is perfectly fine. My guess is this is also a perf improvement because Deno is doing less work.
2024-06-03refactor: don't share `reqwest::HttpClient` across tokio runtimes (#24092)David Sherret
This also fixes several issues where we weren't properly creating http clients with the user's settings.
2024-05-28feat(vendor): support modifying remote files in vendor folder without ↵David Sherret
checksum errors (#23979) Includes: * https://github.com/denoland/deno_graph/pull/486 * https://github.com/denoland/deno_graph/pull/488 * https://github.com/denoland/deno_lockfile/pull/25 * https://github.com/denoland/deno_lockfile/pull/22 * https://github.com/denoland/deno_graph/pull/483 * https://github.com/denoland/deno_graph/pull/470
2024-05-08chore: enable clippy::print_stdout and clippy::print_stderr (#23732)David Sherret
1. Generally we should prefer to use the `log` crate. 2. I very often accidentally commit `eprintln`s. When we should use `println` or `eprintln`, it's not too bad to be a bit more verbose and ignore the lint rule.
2024-05-03refactor(lsp): cleanup cache and module registry update (#23620)Nayeem Rahman
2024-04-19refactor: move redirect handling into deno_graph (#23444)David Sherret
2024-03-15fix: handle cache body file not existing when using etag (#22931)David Sherret
2024-03-01feat(unstable/pm): support version contraints in 'deno add' (#22646)Nayeem Rahman
2024-02-29feat(lsp): jsr specifier completions (#22612)Nayeem Rahman
2024-02-15feat(unstable): single checksum per JSR package in the lockfile (#22421)David Sherret
This changes the lockfile to not store JSR specifiers in the "remote" section. Instead a single JSR integrity is stored per package in the lockfile, which is a hash of the version's `x.x.x_meta.json` file, which contains hashes for every file in the package. The hashes in this file are then compared against when loading. Additionally, when using `{ "vendor": true }` in a deno.json, the files can be modified without causing lockfile errors—the checksum is only checked when copying into the vendor folder and not afterwards (eventually we should add this behaviour for non-jsr specifiers as well). As part of this change, the `vendor` folder creation is not always automatic in the LSP and running an explicit cache command is necessary. The code required to track checksums in the LSP would have been too complex for this PR, so that all goes through deno_graph now. The vendoring is still automatic when running from the CLI.
2024-02-10fix: cache bust jsr deps on constraint failure (#22372)David Sherret
Removes the `FileFetcher`'s internal cache because I don't believe it's necessary (we already cache this kind of stuff in places like deno_graph or config files in different places). Removing it fixes this bug because this functionality was already implemented in deno_graph and lowers memory usage of the CLI a little bit.
2024-02-01refactor: load bytes in deno_graph (#22212)David Sherret
Upgrades deno_graph to 0.64 where deno_graph is now responsible for turning bytes into a string. This is in preparation for Wasm modules.
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-11-17chore: fix and deflake cert store fetch tests (#21241)Matt Mastracci
2023-09-07feat: support import attributes (#20342)David Sherret
2023-08-26chore: update to Rust 1.72 (#20258)林炳权
<!-- Before submitting a PR, please read https://deno.com/manual/contributing 1. Give the PR a descriptive title. Examples of good title: - fix(std/http): Fix race condition in server - docs(console): Update docstrings - feat(doc): Handle nested reexports Examples of bad title: - fix #7123 - update docs - fix bugs 2. Ensure there is a related issue and it is referenced in the PR text. 3. Ensure there are tests that cover the changes. 4. Ensure `cargo test` passes. 5. Ensure `./tools/format.js` passes without changing files. 6. Ensure `./tools/lint.js` passes. 7. Open as a draft PR if your work is still in progress. The CI won't run all steps, but you can add '[ci]' to a commit message to force it to. 8. If you would like to run the benchmarks on the CI, add the 'ci-bench' label. --> As the title. --------- Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-08-08refactor: use deno_cache_dir crate (#20092)David Sherret
Uses https://github.com/denoland/deno_cache/pull/26
2023-08-02feat(unstable): optional `deno_modules` directory (#19977)David Sherret
Closes #15633
2023-08-01fix: retry module download once if server errored (#17252)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/17251 Closes #19970 This commits adds logic to retry failed module downloads once. Both request and server errors are handled and the retry is done after 50 ms wait time.
2023-07-08refactor: abstract away file system to be buried inside HttpCache (#19760)David Sherret
This improves the HttpCache to make it being stored on the file system an implementation detail.
2023-07-02Reland "fix(cli): don't store blob and data urls in the module cache" (#18581)Nayeem Rahman
Relands #18261 now that https://github.com/lucacasonato/esbuild_deno_loader/pull/54 is landed and used by fresh. Fixes #18260.
2023-06-10chore(tests): test_util - Add `PathRef` (#19450)David Sherret
This adds a new `PathRef` struct to test_util for making it easier to work with paths in test code. I'm going to expand on this more in the future.
2023-05-21feat(unstable): add more options to Deno.createHttpClient (#17385)Leo Kettmeir
2023-05-01perf: lazily create RootCertStore (#18938)David Sherret
2023-04-23tests: update tests relying on deno.land (#18811)Leo Kettmeir
2023-04-03Revert "fix(cli): don't store blob and data urls in the module cache ↵Yoshiya Hinosawa
(#18261)" (#18572) This reverts commit b4c61c146a50dea0c4a53d8d505a4308ea7da279. cc @nayeemrmn
2023-03-26fix(cli): don't store blob and data urls in the module cache (#18261)Nayeem Rahman
2023-03-23refactor: make version and user_agent &'static str (#18400)Bartek Iwańczuk
These caused a bunch of unnecessary allocations on each startup.
2023-03-21feat: TypeScript 5.0.2 (except decorators) (#18294)David Sherret
This upgrades TypeScript to 5.0.2, but does not have ES decorator support because swc does not support that yet.
2023-03-13refactor: Remove call sites of "deno_core::resolve_url_or_path" (#18169)Bartek Iwańczuk
These call sites didn't need to use "resolve_url_or_path". Towards landing https://github.com/denoland/deno/pull/15454
2023-01-27chore: upgrade to Rust 1.67 (#17548)David Sherret
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-01-26refactor(lsp): fewer clones (#17551)Geert-Jan Zwiers
2023-01-25fix: support import map specified as data uri (#17531)David Sherret
2023-01-07refactor(permissions): add PermissionsContainer struct for internal ↵Bartek Iwańczuk
mutability (#17134) Turns out we were cloning permissions which after prompting were discarded, so the state of permissions was never preserved. To handle that we need to store all permissions behind "Arc<Mutex<>>" (because there are situations where we need to send them to other thread). Testing and benching code still uses "Permissions" in most places - it's undesirable to share the same permission set between various test/bench files - otherwise granting or revoking permissions in one file would influence behavior of other test files.
2023-01-04chore(cli,ext,rt): remove some unnecessary `clone` or `malloc` (#17261)Yiyu Lin
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-12-19fix: hide progress bars when showing permission prompt (#17130)David Sherret
Also adds download bytes progress when downloading remote specifiers. Closes #16860
2022-12-15fix(regression): ensure progress information is shown when downloading ↵David Sherret
remote modules (#17069)
2022-12-14chore: fix recent regression with `deno upgrade` not handling redirects (#17045)David Sherret
2022-11-28refactor: create util folder, move nap_sym to napi/sym, move http_cache to ↵David Sherret
cache folder (#16857)
2022-11-18fix(npm): use an http client with connection pool (#16705)David Sherret
Should make downloading npm packages faster and more reliable.