summaryrefslogtreecommitdiff
path: root/cli/tools/registry
AgeCommit message (Collapse)Author
2024-11-19refactor: update deno_doc, use prismjs, remove internal reference html ↵Leo Kettmeir
generation logic (#26885)
2024-11-16fix(cli): show prefix hint when installing a package globally (#26629)Miguel Rodrigues
Closes #26545 Shows a hint when a package is installed globally, otherwise fallbacks to the existing implementation.
2024-11-08fix(install): cache jsr deps from all workspace config files (#26779)Nathan Whitaker
Fixes #26772. I wasn't aware that the `imports()` method only returned the workspace root imports
2024-11-05fix(add): better error message when adding package that only has pre-release ↵Nathan Whitaker
versions (#26724) Fixes https://github.com/denoland/deno/issues/26597 A small refactor as well to reduce some code duplication
2024-11-01fix(add): only add npm deps to package.json if it's at least as close as ↵Nathan Whitaker
deno.json (#26683) Fixes https://github.com/denoland/deno/issues/26653
2024-11-01fix: improved support for cjs and cts modules (#26558)David Sherret
* cts support * better cjs/cts type checking * deno compile cjs/cts support * More efficient detect cjs (going towards stabilization) * Determination of whether .js, .ts, .jsx, or .tsx is cjs or esm is only done after loading * Support `import x = require(...);` Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-10-25fix(install): cache json exports of JSR packages (#26552)Nathan Whitaker
Fixes https://github.com/denoland/deno/issues/26509. Ended up being a `deno_graph` bug causing the error to surface. This PR updates `deno_graph` to pick up the fix and reverts the temporary workaround that skipped JSON exports.
2024-10-24fix(install): don't cache json exports of JSR packages (for now) (#26530)Nathan Whitaker
Temporary fix for #26509, so people don't get errors.
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-23fix(install): cache all exports of JSR packages listed in `deno.json` (#26501)Nathan Whitaker
Fixes #26498. This was a sort of intentional decision originally, as I wanted to avoid caching extra files that may not be needed. It seems like that behavior is unintuitive, so I propose we cache all of the exports of listed jsr packages when you run a bare `deno install`.
2024-10-22fix(install): update lockfile when using package.json (#26458)Bartek Iwańczuk
This commit makes sure that `deno add`, `deno install` and `deno remove` update the lockfile if only `package.json` file is present. Fixes https://github.com/denoland/deno/issues/26270
2024-10-21fix(install): better json editing (#26450)David Sherret
1. Respects the formatting of the file (ex. keeps four space indents or tabs). 2. Handles editing of comments. 3. Handles trailing commas. 4. Code is easier to maintain.
2024-10-17fix(install): don't attempt to cache specifiers that point to directories ↵Nathan Whitaker
(#26369) Fixes https://github.com/denoland/deno/issues/26162
2024-10-16fix(add): exact version should not have range `^` specifier (#26302)Marvin Hagemeister
Fixes https://github.com/denoland/deno/issues/26299
2024-10-16fix(cli): consolidate pkg parser for install & remove (#26298)Satya Rohith
Closes https://github.com/denoland/deno/issues/26283
2024-10-15fix(add): create deno.json when running `deno add jsr:<pkg>` (#26275)Nathan Whitaker
Fixes https://github.com/denoland/deno/issues/26119. Originally I wanted to put them in package.json if there's no deno.json, but on second thought it makes more sense to just create a deno.json
2024-10-14fix(install): support installing npm package with alias (#26246)David Sherret
Just tried this out today and it wasn't properly implemented in https://github.com/denoland/deno/pull/24156
2024-10-10fix(install): duplicate dependencies in `package.json` (#26128)Marvin Hagemeister
Fixes https://github.com/denoland/deno/issues/26120
2024-10-04fix(install): surface package.json dependency errors (#26023)David Sherret
2024-09-28refactor: extract out sloppy imports resolution from CLI crate (#25920)David Sherret
This is slow progress towards creating a `deno_resolver` crate. Waiting on: * https://github.com/denoland/deno/pull/25918 * https://github.com/denoland/deno/pull/25916
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-25fix(check): properly surface dependency errors in types file of js file (#25860)David Sherret
We weren't surfacing dependency errors in types files of js files.
2024-09-25fix(add/install): default to "latest" tag for npm packages in `deno add ↵Nathan Whitaker
npm:pkg` (#25858) Fixes #25813. I initially tried doing this in `deno_semver`, where it's a cleaner change, but that caused breakage in deno in places where we don't expect a tag (see https://github.com/denoland/deno/issues/25857). This does not fix wildcard requirements failing to choose pre-release versions. That's a little more involved and I'll do a separate PR.
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-18feat: require jsr prefix for `deno install` and `deno add` (#25698)Leo Kettmeir
2024-09-16refactor(permissions): split up Descriptor into Allow, Deny, and Query (#25508)David Sherret
This makes the permission system more versatile.
2024-09-07feat(add/install): Flag to add dev dependency to package.json (#25495)Nathan Whitaker
``` deno install --dev npm:chalk ``` Adds to `devDependencies` if a `package.json` is present, otherwise it just adds to `imports` in `deno.json`
2024-09-06feat(add): Add npm packages to package.json if present (#25477)Nathan Whitaker
Closes https://github.com/denoland/deno/issues/25321 Ended up being a larger refactoring, since we're now juggling (potentially) two config files in the same `add`, instead of choosing one. I don't love the shape of the code, but I think it's good enough Some smaller side improvements: - `deno remove` supports `jsonc` - `deno install --dev` will be a really simple change - if `deno remove` removes the last import/dependency in the `imports`/`dependencies`/`devDependencies` field, it removes the field instead of leaving an empty object
2024-09-04feat(add): strip package subpath when adding a package (#25419)Bartek Iwańczuk
These now works: ``` $ deno add @std/dotenv/load $ deno add npm:preact/hooks ``` Previously we were erroring out, because this is a "package reference" including a subpath. Closes https://github.com/denoland/deno/issues/25385 --------- Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com> Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-08-31fix(publish): ensure provenance is spec compliant (#25200)Bob Callaway
Fixes: #25199 Ensures that for the SLSA provenance document generated on publishing, `subject` is an array of ResourceDescriptor objects per the in-toto specification [requirements](https://github.com/in-toto/attestation/blob/main/spec/v1/statement.md#fields). --------- Signed-off-by: Bob Callaway <bcallaway@google.com>
2024-08-30refactor: remove DENO_FUTURE (#25314)David Sherret
2024-08-24refactor(lsp): changes for lsp_types 0.97.0 (#25169)Nayeem Rahman
2024-08-21fix(add): Handle packages without root exports (#25102)Nathan Whitaker
Fixes #24607. This PR makes the logic that caches top level dependencies (things present in import map) smarter, so we handle JSR dependencies without root exports.
2024-08-20fix(add): error when config file contains importMap field (#25115)David Sherret
The "imports" field has higher precedence than "importMap", so we should error when `deno add` goes to add an `"imports"` field. Closes https://github.com/denoland/deno/issues/24264 Closes https://github.com/denoland/deno/pull/24478
2024-08-20feat(unstable): ability to use a local copy of jsr packages (#25068)David Sherret
2024-08-18fix: make `deno add` output more deterministic (#25083)David Sherret
Will fix some flaky tests.
2024-08-16feat(publish): suggest importing `jsr:@std/` for `deno.land/std` urls (#25046)David Sherret
2024-08-16feat(config/jsr): add license field (#25056)David Sherret
1. Adds a new "license" field. 1. Adds this field by default when doing `deno init --lib`
2024-08-12feat(publish): error on missing license file (#25011)David Sherret
Closes https://github.com/denoland/deno/issues/24676
2024-08-12feat: deno remove (#24952)David Sherret
Co-authored-by: Satya Rohith <me@satyarohith.com>
2024-08-09fix(add): Better error message when missing npm specifier (#24970)Nathan Whitaker
Before: <img width="278" alt="Screenshot 2024-08-09 at 3 15 01 PM" src="https://github.com/user-attachments/assets/91b0ada6-93ee-4be6-a996-078aef98c2a9"> After: <img width="888" alt="Screenshot 2024-08-09 at 3 52 15 PM" src="https://github.com/user-attachments/assets/3c88a0e8-c761-4f70-88bf-109355ac12f0">
2024-08-08feat(install): change 'Add ...' message (#24949)Bartek Iwańczuk
Changes messages printed by `deno add` from `Add @oak/oak - jsr:@oak/oak^16.1.0` to `Add jsr:@oak/oak16.1.0`.
2024-08-07fix(compile): support workspace members importing other members (#24909)David Sherret
2024-08-06fix: update dry run success message (#24885)HasanAlrimawi
2024-08-02docs: fix typos (#24820)Andreas Deininger
This PR fixes various typos I spotted in the project.
2024-07-26fix(publish): workspace included license file had incorrect path (#24747)David Sherret
Also fixes the issue where we say a package was successfully published before it wasn't. Bug in https://github.com/denoland/deno/pull/24714
2024-07-25refactor: decouple node resolution from deno_core (#24724)David Sherret
2024-07-25fix(unstable): move sloppy-import warnings to lint rule (#24710)David Sherret
Adds a new `no-sloppy-imports` lint rule and cleans up the lint code. Closes #22844 Closes https://github.com/denoland/deno_lint/issues/1293
2024-07-25fix(workspaces/publish): include the license file from the workspace root if ↵David Sherret
not in pkg (#24714)
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