summaryrefslogtreecommitdiff
path: root/tests/specs/add
AgeCommit message (Collapse)Author
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-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-18fix(npm): ensure scoped package name is encoded in URLs (#26390)Marvin Hagemeister
Fixes https://github.com/denoland/deno/issues/26385
2024-10-16fix(add): exact version should not have range `^` specifier (#26302)Marvin Hagemeister
Fixes https://github.com/denoland/deno/issues/26299
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-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: require jsr prefix for `deno install` and `deno add` (#25698)Leo Kettmeir
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-31chore: remove DENO_FUTURE=1 from spec tests (#25329)Bartek Iwańczuk
Towards https://github.com/denoland/deno/issues/25241
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-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-08fix(add): Support dist tags in deno add (#24960)Nathan Whitaker
Fixes #24956.