summaryrefslogtreecommitdiff
path: root/cli/args/lockfile.rs
AgeCommit message (Collapse)Author
2024-10-02feat(byonm): support `deno run npm:<package>` when package is not in ↵David Sherret
package.json (#25981) Closes https://github.com/denoland/deno/issues/25905
2024-09-18feat: suggest `deno install --entrypoint` instead of `deno cache` (#25228)Asher Gomez
Hides `deno cache` from `--help` output. --------- Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com> Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-08-30refactor: remove DENO_FUTURE (#25314)David Sherret
2024-08-28feat: improve lockfile v4 to store normalized version constraints and be ↵David Sherret
more terse (#25247) Stores normalized version constraints in the lockfile, which will improve reproducibility and will fix a bug with duplicate specifiers ending up in the lockfile. Also, gets rid of some duplicate data in the specifiers area of the lockfile.
2024-08-28feat: remove `--lock-write` flag (#25214)Bartek Iwańczuk
This commit remove `--lock-write` that was deprecated in v1.45 release. Closes https://github.com/denoland/deno/issues/24167. --------- Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-08-26feat: lockfile v4 by default (#25165)David Sherret
This won't be fully stabilized until 2.0 is released.
2024-08-20feat(config): Support frozen lockfile config option in deno.json (#25100)Nathan Whitaker
Closes #24544
2024-08-19feat(FUTURE): terse lockfile (v4) (#25059)David Sherret
2024-07-23fix(upgrade): do not error if config in cwd invalid (#24689)David Sherret
``` > deno upgrade error: Unsupported lockfile version 'invalid'. Try upgrading Deno or recreating the lockfile. V:\scratch > V:\deno\target\debug\deno upgrade Looking up latest version Local deno version 1.45.3 is the most recent release ``` Closes #24517 Closes #20729
2024-07-12fix(config): regression - should not discover npm workspace for nested ↵David Sherret
deno.json not in workspace (#24559) Closes #24554
2024-07-05feat: Deprecate --lock-write flag (#24436)Bartek Iwańczuk
This commit deprecates `--lock-write` flag by removing it from the help output and printing a warning message when it's used. Users should use `--frozen=false` instead which was added in https://github.com/denoland/deno/pull/24355. Towards https://github.com/denoland/deno/issues/24167.
2024-07-02feat(cli): Add `--frozen` flag to error out if lockfile is out of date (#24355)Nathan Whitaker
Closes #18296. Adds a `--frozen` (alias `--frozen-lockfile`) flag that errors out if the lockfile is out of date. This is useful for running in CI (where an out of date lockfile is usually a mistake) or to prevent accidental changes in dependencies. ![Screenshot 2024-06-26 at 7 11 13 PM](https://github.com/denoland/deno/assets/17734409/538404b8-b422-4f05-89e8-4c9b1c248576)
2024-06-28refactor(cli): Create wrapper around `deno_lockfile::Lockfile` (#24366)Nathan Whitaker
As suggested in https://github.com/denoland/deno/pull/24355#discussion_r1657875422. I wasn't able to hide the mutex stuff as much as I'd like (ended up just adding an escape hatch `inner()` method that locks the inner mutex), because you can't return references to the inner fields through a mutex. This is mostly motivated by the frozen lockfile changes
2024-05-31fix: retry writing lockfile on failure (#24052)David Sherret
Ran into this running the deno_graph ecosystem tests where many processes writing to the same path at the same time would cause an error.
2024-05-28chore: set lockfile as having no content changes after write (#24023)David Sherret
Slight perf regression when updating deno_lockfile in https://github.com/denoland/deno/pull/23979
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-23fix(cli): Support deno.lock with only package.json present + fix DENO_FUTURE ↵Nathan Whitaker
install interactions with lockfile (#23918) Fixes #23571. Previously, we required a `deno.json` to be present (or the `--lock` flag) in order for us to resolve a `deno.lock` file. This meant that if you were using deno in an npm-first project deno wouldn't use a lockfile. Additionally, while I was fixing that, I discovered there were a couple bugs keeping the future `install` command from using a lockfile. With this PR, `install` will actually resolve the lockfile (or create one if not present), and update it if it's not up-to-date. This also speeds up `deno install`, as we can use the lockfile to skip work during npm resolution.
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-10-02refactor(npm): make `NpmCache`, `CliNpmRegistryApi`, and `NpmResolution` ↵David Sherret
internal to `npm::managed` (#20764)
2023-08-08refactor(cli): move `snapshot_from_lockfile` function to `deno_npm` (#20024)Yusuke Tanaka
This commit moves `snapshot_from_lockfile` function to [deno_npm crate](https://github.com/denoland/deno_npm). This allows this function to be called outside Deno CLI (in particular, Deno Deploy).
2023-07-13chore: update to Rust 1.71 (#19822)Matt Mastracci
2023-06-08refactor(compile): store the npm snapshot in the eszip (#19343)David Sherret
2023-05-24refactor: upgrade to deno_npm 0.6 (#19244)David Sherret
2023-05-22feat(lsp): support lockfile and node_modules directory (#19203)David Sherret
This adds support for the lockfile and node_modules directory to the lsp. In the case of the node_modules directory, it is only enabled when explicitly opted into via `"nodeModulesDir": true` in the configuration file. This is to reduce the language server automatically modifying the node_modules directory when the user doesn't want it to. Closes #16510 Closes #16373
2023-05-17fix(npm): improved optional dependency support (#19135)David Sherret
Note: If the package information has already been cached, then this requires running with `--reload` or for the registry information to be fetched some other way (ex. the cache busting). Closes #15544 --------- Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-04-13refactor: upgrade to deno_npm 0.3.0 (#18671)David Sherret
This allows us to specify the `@types/node` version constraint in the CLI instead of in deno_npm.
2023-04-12fix(npm): eagerly reload package information when version from lockfile not ↵David Sherret
found locally (#18673) Closes #18624
2023-04-06fix(npm): reload an npm package's dependency's information when version not ↵David Sherret
found (#18622) This reloads an npm package's dependency's information when a version/version req/tag is not found. This PR applies only to dependencies of npm packages. It does NOT yet cause npm specifiers to have their dependency information cache busted. That requires a different solution, but this should help cache bust in more scenarios. Part of #16901, but doesn't close it yet
2023-04-06refactor(npm): use deno_npm and deno_semver (#18602)David Sherret
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-01-23refactor: Move lockfile to a separate crate (#17503)Bartek Iwańczuk
Moves the lockfile implementation to a separate crate so other projects like Deploy can use it as well.
2023-01-06fix(npm): support old packages and registries with no integrity, but with a ↵David Sherret
sha1sum (#17289) Closes #17281
2023-01-05refactor(cli,core,ext,rt): remove some unnecessary `clone` or `malloc` (#17274)Yiyu Lin
2023-01-05refactor(cli): clean up clones (#17268)Geert-Jan Zwiers
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-12-20fix: ignore local lockfile for deno install and uninstall (#17145)David Sherret
Closes #17116
2022-12-08feat(cli): support configuring the lock file in the config file (#16781)Roj
This allows the user to completely opt out from the lock file or rename it without having to use `--no-lock` and/or `--lock` in all commands. ## Don’t Use Lock File ```json { "lock": false } ``` ## Use Lock File With a Different Name ```json { "lock": "deno2.lock" } ``` The CLI args `--no-lock` and `--lock` will always override what is in the config file. Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
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-25refactor: move lockfile.rs to args module (#16818)David Sherret
This should be in the `args` folder as it's similar to `config_file`.