David Sherret
4d1b263e91
feat(publish): suggest importing jsr:@std/
for deno.land/std
urls ( #25046 )
2024-08-16 10:42:11 -04:00
David Sherret
57cd2951f1
feat(config/jsr): add license field ( #25056 )
...
1. Adds a new "license" field.
1. Adds this field by default when doing `deno init --lib`
2024-08-16 13:12:52 +00:00
David Sherret
39a21fd78e
feat(publish): error on missing license file ( #25011 )
...
Closes https://github.com/denoland/deno/issues/24676
2024-08-12 19:51:58 -04:00
David Sherret
085058cfff
feat: deno remove ( #24952 )
...
Co-authored-by: Satya Rohith <me@satyarohith.com>
2024-08-12 16:17:25 -04:00
Nathan Whitaker
218ee1b1ff
fix(add): Better error message when missing npm specifier ( #24970 )
...
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-09 14:29:11 +00:00
Bartek Iwańczuk
c94d1b10f8
feat(install): change 'Add ...' message ( #24949 )
...
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-08 16:25:05 +02:00
David Sherret
04473c04ed
fix(compile): support workspace members importing other members ( #24909 )
2024-08-07 07:43:05 +00:00
HasanAlrimawi
bbf23190d4
fix: update dry run success message ( #24885 )
2024-08-06 08:14:06 +00:00
Andreas Deininger
ea121c9a0e
docs: fix typos ( #24820 )
...
This PR fixes various typos I spotted in the project.
2024-08-02 13:26:54 +02:00
David Sherret
bee16c54ab
fix(publish): workspace included license file had incorrect path ( #24747 )
...
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-26 15:35:29 +00:00
David Sherret
3bf147fe28
refactor: decouple node resolution from deno_core ( #24724 )
2024-07-25 19:08:14 -04:00
David Sherret
763f05e74d
fix(unstable): move sloppy-import warnings to lint rule ( #24710 )
...
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-25 09:07:59 -04:00
David Sherret
84b7504d0f
fix(workspaces/publish): include the license file from the workspace root if not in pkg ( #24714 )
2024-07-25 01:43:30 +00:00
David Sherret
9114a2df69
fix(upgrade): do not error if config in cwd invalid ( #24689 )
...
```
> 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-23 19:00:48 -04:00
David Sherret
6055629ee7
refactor: update to use deno_package_json ( #24688 )
...
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-23 17:34:46 -04:00
David Sherret
6960637b5c
fix(publish): warn about missing license file ( #24677 )
...
Part of https://github.com/denoland/deno/issues/24676 , but just a
warning for now.
2024-07-22 15:46:37 -04:00
David Sherret
afcae364be
refactor: update to deno_config 0.25 ( #24645 )
...
- Gets rid of WorkspaceMemberContext. It's now `Workspace` and
`WorkspaceDirectory`
- Uses the workspace cache in the lsp
* https://github.com/denoland/deno_config/pull/95
* https://github.com/denoland/deno_config/pull/96
2024-07-19 15:56:07 -04:00
David Sherret
ecd4f900c6
fix(publish): surface syntax errors when using --no-check ( #24620 )
2024-07-17 23:06:30 -04:00
Bartek Iwańczuk
7b33623b1d
Reland "refactor(fetch): reimplement fetch with hyper instead of reqwest" ( #24593 )
...
Originally landed in
f6fd6619e7
.
Reverted in https://github.com/denoland/deno/pull/24574 .
This reland contains a fix that sends "Accept: */*" header for calls made
from "FileFetcher". Absence of this header made downloading source code
from JSR broken. This is tested by ensuring this header is present in the
test server that servers JSR packages.
---------
Co-authored-by: Sean McArthur <sean@seanmonstar.com>
2024-07-18 01:37:31 +02:00
David Sherret
f4b9d85862
fix(workspace): support resolving bare specifiers to npm pkgs within a workspace ( #24611 )
...
This makes bare specifiers for npm packages work when inside a
workspace, which emulates the same behaviour as when there's a
node_modules directory. The bare specifier can be overwritten by
specifying an import map entry or package.json dependency entry.
* https://github.com/denoland/deno_config/pull/88
Closes #24605
2024-07-17 09:13:22 -04:00
Ryan Dahl
e0cfc9da39
Revert "refactor(fetch): reimplement fetch with hyper instead of reqwest ( #24237 )" ( #24574 )
...
This reverts commit f6fd6619e7
.
I'm seeing a difference between canary and 1.45.2. In
`deno-docs/reference_gen` I can't download dax when running `deno task
types`
```
~/src/deno-docs/reference_gen# deno upgrade --canary
Looking up latest canary version
Found latest version f6fd6619e7
Downloading https://dl.deno.land/canary/f6fd6619e708a515831f707438368d81b0c9aa56/deno-aarch64-apple-darwin.zip
Deno is upgrading to version f6fd6619e7
Archive: /var/folders/9v/kys6gqns6kl8nksyn4l1f9v40000gn/T/.tmpb5lDnq/deno.zip
inflating: deno
Upgraded successfully
~/src/deno-docs/reference_gen# deno -v
deno 1.45.2+f6fd661
~/src/deno-docs/reference_gen# rm -rf /Users/ry/Library/Caches/deno
~/src/deno-docs/reference_gen# deno task types
Task types deno task types:deno && deno task types:node
Task types:deno deno run --allow-read --allow-write --allow-run --allow-env --allow-sys deno-docs.ts
error: JSR package manifest for '@david/dax' failed to load. expected value at line 1 column 1
at file:///Users/ry/src/deno-docs/reference_gen/deno-docs.ts:2:15
~/src/deno-docs/reference_gen# deno upgrade --version 1.45.2
Downloading https://github.com/denoland/deno/releases/download/v1.45.2/deno-aarch64-apple-darwin.zip
Deno is upgrading to version 1.45.2
Archive: /var/folders/9v/kys6gqns6kl8nksyn4l1f9v40000gn/T/.tmp3R7uhF/deno.zip
inflating: deno
Upgraded successfully
~/src/deno-docs/reference_gen# rm -rf /Users/ry/Library/Caches/deno
~/src/deno-docs/reference_gen# deno task types
Task types deno task types:deno && deno task types:node
Task types:deno deno run --allow-read --allow-write --allow-run --allow-env --allow-sys deno-docs.ts
Task types:node deno run --allow-read --allow-write=. --allow-env --allow-sys node-docs.ts
```
2024-07-13 21:08:23 +00:00
Sean McArthur
f6fd6619e7
refactor(fetch): reimplement fetch with hyper instead of reqwest ( #24237 )
...
This commit re-implements `ext/fetch` and all dependent crates
using `hyper` and `hyper-util`, instead of `reqwest`.
The reasoning is that we want to have greater control and access
to low level `hyper` APIs when implementing `fetch` API as well
as `node:http` module.
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-07-13 00:51:37 +02:00
David Sherret
8243c85a47
fix(publish): show dirty files on dirty check failure ( #24541 )
2024-07-12 15:35:57 -04:00
David Sherret
80df9aec1d
refactor: move FileCollector
to deno_config ( #24433 )
2024-07-05 17:53:09 -04:00
David Sherret
f396b3d1c8
fix(publish): unfurling should always be done with the package json ( #24435 )
...
Closes https://github.com/denoland/deno/issues/24430
2024-07-05 00:41:01 +00:00
David Sherret
147411e64b
feat: npm workspace and better Deno workspace support ( #24334 )
...
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-07-04 00:54:33 +00:00
David Sherret
0da01c0ca6
refactor: move PackageJson to deno_config ( #24348 )
2024-06-26 21:24:10 +00:00
Satya Rohith
0f48313565
chore: upgrade to rust 1.79 ( #24207 )
2024-06-14 17:10:57 +05:30
David Sherret
d74be0842a
FUTURE: support deno install <alias>@npm:<package>
( #24156 )
...
Closes #23144
2024-06-10 23:56:43 +00:00
David Sherret
7ed90a20d0
fix: better handling of npm resolution occurring on workers ( #24094 )
...
Closes https://github.com/denoland/deno/issues/24063
2024-06-05 17:04:16 +02:00
David Sherret
3341c50b6a
refactor: don't share reqwest::HttpClient
across tokio runtimes ( #24092 )
...
This also fixes several issues where we weren't properly creating http
clients with the user's settings.
2024-06-03 21:17:08 +00:00
David Sherret
448fe67b7a
feat(vendor): support modifying remote files in vendor folder without 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-28 14:58:43 -04:00
David Sherret
c4211e2ffc
fix(publish): raise diagnostics for triple-slash directives for --dry-run
instead of just publish
( #23811 )
2024-05-28 01:35:08 +00:00
David Sherret
c0e3b6ed9d
fix(publish): always include config file when publishing ( #23797 )
...
Closes https://github.com/denoland/deno/issues/23796
2024-05-14 18:15:43 +00:00
David Sherret
c6189e2070
fix(publish): error for missing version constraints on dry-publish instead of just publish ( #23798 )
...
Closes https://github.com/denoland/deno/issues/22835
2024-05-14 10:30:09 -04:00
David Sherret
47f7bed677
chore: enable clippy::print_stdout and clippy::print_stderr ( #23732 )
...
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-08 22:45:06 -04:00
Bartek Iwańczuk
4e23a5b1fc
FUTURE: deno install
changes ( #23498 )
...
This PR implements the changes we plan to make to `deno install` in deno
2.0.
- `deno install` without arguments caches dependencies from
`package.json` / `deno.json` and sets up the `node_modules` folder
- `deno install <pkg>` adds the package to the config file (either
`package.json` or `deno.json`), i.e. it aliases `deno add`
- `deno add` can also add deps to `package.json` (this is gated behind
`DENO_FUTURE` due to uncertainty around handling projects with both
`deno.json` and `package.json`)
- `deno install -g <bin>` installs a package as a globally available
binary (the same as `deno install <bin>` in 1.0)
---------
Co-authored-by: Nathan Whitaker <nathan@deno.com>
2024-05-08 12:34:46 -07:00
David Sherret
ded6afccf2
fix(publish): --dry-publish should error for gitignored excluded files ( #23540 )
...
Files that were gitignored only were not included in the diagnostic.
2024-04-24 18:52:05 +00:00
nokazn
3d841acf48
fix(cli): avoid deno add
and deno vendor
errors when deno.json is empty ( #23439 )
2024-04-18 15:48:15 -04:00
David Sherret
98077e4b3c
fix(publish): do not warn about excluded external modules in node_modules directory ( #23173 )
2024-04-11 23:52:35 +00:00
David Sherret
ade0cd5e97
fix: upgrade deno_ast related crates ( #23187 )
...
Had to revert back swc due to
https://github.com/swc-project/swc/issues/8840
Fixes:
- https://github.com/denoland/deno_lint/pull/1262
- https://github.com/denoland/deno_doc/pull/538
- https://github.com/denoland/deno_doc/pull/537
- https://github.com/denoland/deno_graph/pull/430
- https://github.com/denoland/deno_graph/pull/425
- https://github.com/denoland/deno_graph/pull/432
2024-04-11 23:00:17 +00:00
David Sherret
b8af46e007
fix(check): ignore certain diagnostics in remote modules and when publishing ( #23119 )
...
Unused locals and parameters don't make sense to surface in remote
modules. Additionally, fast check can cause these kind of diagnostics
when publishing, so they should be ignored.
Closes #22959
2024-03-31 16:39:40 -04:00
Bartek Iwańczuk
6b95c53e48
feat(add): always produce multiline config file ( #23077 )
...
This commit changes `deno add` to always produce a multiline config
file.
In v1.41.3:
```
$ mkdir foo
$ cd foo
$ deno add @std/assert
Created deno.json configuration file.
Add @std/assert - jsr:@std/assert@^0.220.0
$ cat deno.json
{ "imports": { "@std/assert": "jsr:@std/assert@^0.220.0" } }
```
Now:
```
$ mkdir foo
$ cd foo
$ deno add @std/assert
Created deno.json configuration file.
Add @std/assert - jsr:@std/assert@^0.220.0
$ cat deno.json
{
"imports": {
"@std/assert": "jsr:@std/assert@^0.220.0"
}
}
```
2024-03-26 17:40:24 -04:00
Asher Gomez
2d59372e7a
feat(publish): check for uncommitted files in deno publish --dry-run
( #22981 )
...
Closes #22936
2024-03-22 12:41:33 -07:00
David Sherret
f96f167dc8
feat(unstable/publish): error when a package's module is excluded from publishing ( #22948 )
...
Closes #22657
2024-03-21 21:42:23 +00:00
David Sherret
c10d96cb21
fix(slow-types): improved exports tracing and infer type literals in as exprs ( #22849 )
...
Several fixes in deno_graph:
* https://github.com/denoland/deno_graph/pull/411
* https://github.com/denoland/deno_graph/pull/413
* https://github.com/denoland/deno_graph/pull/414
* https://github.com/denoland/deno_graph/pull/415
* https://github.com/denoland/deno_graph/pull/416
* https://github.com/denoland/deno_graph/pull/417
Also created https://github.com/denoland/publish_smoke_tests to help
prevent regressions in the future.
Closes https://github.com/denoland/deno/issues/22829
Closes https://github.com/denoland/deno/issues/22819
Closes https://github.com/denoland/deno/issues/22802
2024-03-12 17:45:38 +00:00
David Sherret
ad6b00a2bf
chore: enable clippy unused_async rule ( #22834 )
2024-03-11 23:48:00 -04:00
David Sherret
644ac0fe43
chore: hidden tool for overwriting files with fast check output ( #22822 )
...
Not sure if we should do this, but it's a nice hidden tool that
overwrites the working tree with the fast check output.
2024-03-11 11:42:12 -04:00
David Sherret
f8543a9fd8
fix(publish): regression - publishing with vendor folder ( #22830 )
...
In
https://github.com/denoland/deno/pull/22720/files#diff-d62d85de2a7ffb816cd2fdbaa47e588352f521c7c43d058b75649bbb255e0ae1R70
, I copy and pasted from another area of the code and didn't think about
removing how it ignores the vendor folder by default.
2024-03-09 20:40:53 -05:00
David Sherret
119744c285
fix(publish): suggest using --allow-dirty
on uncommitted changes ( #22810 )
2024-03-08 22:49:15 +00:00