1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00
Commit graph

6568 commits

Author SHA1 Message Date
Nathan Whitaker
48da3c17ea
fix(add): Handle packages without root exports (#25102)
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-21 15:23:32 -07:00
Nayeem Rahman
c22ff197db
fix(lsp): resolve jsx import source with types mode (#25064) 2024-08-21 20:00:23 +01:00
David Sherret
1d4169204c
fix: warn about import assertions when using typescript (#25135)
1. On emit, checks for the prescence of import assertions.
1. Warns and doesn't store the parsed source in the emit cache in this
case.
2024-08-21 17:12:56 +00:00
Divy Srivastava
e2c50f7e8a
fix(upgrade): better error message when check_exe fails (#25133)
Fixes https://github.com/denoland/deno/issues/24971

Fixes the panic. We can give a more personalized error by checking the
macOS version but probably not worth the effort.
2024-08-21 19:55:17 +05:30
Nayeem Rahman
76990df6fa
chore(lsp): use 'install' terminology for jsr and npm packages (#25119) 2024-08-21 15:10:28 +01:00
Leo Kettmeir
7139337083
feat(flags): improve help output and make deno run list tasks (#25108)
- rewrite flag help
- use gray for indentation
- reorganize permission flags and split them up
- make help subcommand act like help flag
- `deno run` outputs list of tasks
- Fixes #25120

error handling for `deno run` in case of no config file being found
needs to be improved

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-08-21 06:54:59 -07:00
David Sherret
37279e0b0a
fix(add): error when config file contains importMap field (#25115)
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-20 16:32:01 -04:00
David Sherret
a7c002ae63
chore: enable no-console dlint rule (#25113) 2024-08-20 15:14:37 -04:00
Bartek Iwańczuk
7bfb93135d
chore(release): Release Deno v1.46.0-rc.3 (#25112) 2024-08-20 21:02:26 +02:00
Nayeem Rahman
acba2cd48c
fix(lsp): include scoped import map keys in completions (#25047) 2024-08-20 19:38:47 +01:00
Yazan AbdAl-Rahman
a7c8bb1596
feat: glob and directory support for deno check and deno cache cli arg paths (#25001)
Closes #24668
Closes #20813

---------

Co-authored-by: David Sherret <dsherret@gmail.com>
2024-08-20 18:38:06 +00:00
Bartek Iwańczuk
1f47248143
fix: adjust suggestion for lockfile regeneration (#25107)
Ref https://github.com/denoland/deno/pull/24436#issuecomment-2288568645
2024-08-20 20:13:17 +02:00
HasanAlrimawi
0704454755
feat: Print deprecation message for npm packages (#24992)
This commit adds ability to print deprecation notices
for npm packages that have been marked as deprecated.

Closes #24013
2024-08-20 19:53:53 +02:00
Nathan Whitaker
5168700be6
feat(config): Support frozen lockfile config option in deno.json (#25100)
Closes #24544
2024-08-20 14:55:47 +00:00
David Sherret
f1c58ec041
feat(unstable): ability to use a local copy of jsr packages (#25068) 2024-08-20 14:11:43 +00:00
Hajime-san
19bcb40059
feat(cli/tools): add a subcommand --hide-stacktraces for test (#24095) 2024-08-20 01:27:36 +00:00
Yazan AbdAl-Rahman
4f49f703c1
fix(cli): update permission prompt message for compiled binaries (#24081)
Co-authored-by: David Sherret <dsherret@gmail.com>
2024-08-20 01:20:06 +00:00
melbourne2991
0eba180fdb
fix(repl): Prevent panic on broken pipe (#21945) 2024-08-20 00:21:12 +00:00
Bartek Iwańczuk
1c4db2aca9
chore(release): Release Deno v1.46.0-rc.2 (#25101) 2024-08-19 21:13:04 +00:00
Yazan AbdAl-Rahman
4285cb339d
fix(lint): support linting tsx/jsx from stdin (#24955)
Co-authored-by: David Sherret <dsherret@users.noreply.github.com>
2024-08-19 20:42:13 +00:00
Bartek Iwańczuk
b5051e25c2
feat: Deprecate "import assertions" with a warning (#24743)
This commit deprecates "import assertions" proposal that has been
replaced with "import attributes".

Any time an import assertion is encountered a warning will be printed
to the terminal. This warning will be printed for both local and 
remote files (ie. user code and dependencies).

Import assertions support will be removed in Deno 2.
2024-08-19 22:36:35 +02:00
Łukasz Czerniawski
0f2e47dd69
feat(watch): add watch paths to test subcommand (#24771) 2024-08-19 17:09:51 +00:00
David Sherret
c9edb15f15
fix(compile): make output more deterministic (#25092)
Closes https://github.com/denoland/deno/issues/25084
2024-08-19 16:41:11 +00:00
David Sherret
a20418e2e8
fix(fmt): regression with pipe in code blocks in tables (#25098) 2024-08-19 16:35:51 +00:00
Bartek Iwańczuk
c94c5cddb1
feat(upgrade): support deno upgrade 1.46.0 (#25096)
This commit changes `deno upgrade` subcommand to accept
a positional argument that can be either a version, release channel
name or a git hash, making invocations of `deno upgrade` much
more concise:

```
# before
$ deno upgrade --version 1.46.0
# after 
$ deno upgrade 1.46.0
```

```
# before
$ deno upgrade --canary
# after
$ deno upgrade canary
```

```
# specific canary version before
$ deno upgrade --canary --version f042c39180
# after
$ deno upgrade f042c39180
```

Old flags are still supported, but hidden from the help output.
2024-08-19 17:05:10 +02:00
snek
c0aa68a1e2
feat: upgrade deno_core (#25042)
- Update ffi turbocall to use revised fast call api
- Remove `v8_version` function calls
- `*mut OwnedIsolate` is no longer stored in OpCtx gotham store
2024-08-19 14:51:16 +00:00
David Sherret
526f39fbb9
feat(FUTURE): terse lockfile (v4) (#25059) 2024-08-19 03:01:39 +00:00
David Sherret
28bebce544
chore: Rust 1.80.1 (#25089) 2024-08-18 22:24:56 -04:00
Bartek Iwańczuk
5c69b4861b
fix(upgrade): support RC release with --version flag (#25091)
This commit fixes scenarios like:
```
$ deno upgrade --version=v1.46.0-rc.0
Downloading https://github.com/denoland/deno/releases/download/v1.46.0-rc.0/deno-aarch64-apple-darwin.zip
Download could not be found, aborting
```

Now:
```
$ target/debug/deno upgrade --version=v1.46.0-rc.0
Downloading https://dl.deno.land/release/v1.46.0-rc.0/deno-aarch64-apple-darwin.zip
Deno is upgrading to version 1.46.0-rc.0

Upgraded successfully to Deno v1.46.0-rc.0

```

Also some unneeded code was removed.
2024-08-19 00:27:06 +00:00
David Sherret
52681a2a29
fix: correct JSON config schema to show vendor option as stable (#25090)
This has been considered stable for some time now.
2024-08-18 22:54:07 +00:00
Luca Casonato
9bc2dd29ad
fix: clean up flag help output (#24686)
Permission flags are unified in a clearer and concise output.
Unstable flags are hidden by default with exception of the `unstable`
flag itself. the remaining unstable flags can be seen with a
`--help=unstable`.
This also cleans up to show unstable flags only for subcommands that
actually need them.
Also sorts flags alphabetically, and gorups various flags together in a
set of categories.

---------

Co-authored-by: crowlkats <crowlkats@toaxl.com>
2024-08-18 15:39:53 -07:00
Bartek Iwańczuk
1ec12a8c5d
chore(release): Release Deno v1.46.0-rc.1 (#25088)
Just bumping the version to test out `deno upgrade --rc` some more.
2024-08-19 00:30:45 +02:00
Bartek Iwańczuk
f003d6498c
fix(upgrade): correctly compute latest version based on current release channel (#25087)
This commit fixes computation of the latest available version
by taking into account which release channel the current
binary is on.

Before this commit, if user was on "RC" channel, calling
`deno upgrade` would not switch back to the "stable"
channel.
2024-08-19 00:29:59 +02:00
HasanAlrimawi
2e9d3b688c
fix: log current version when using deno upgrade (#25079)
This PR addresses a suggestion in issue #21417

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-08-18 22:07:54 +00:00
David Sherret
4cd95589ec
fix: make deno add output more deterministic (#25083)
Will fix some flaky tests.
2024-08-18 23:02:32 +02:00
David Sherret
35a17f38f6
fix(fmt): upgrade to dprint-plugin-markdown 0.17.4 (#25075)
Closes https://github.com/denoland/deno/issues/20917
Closes https://github.com/denoland/deno/issues/21285
2024-08-17 12:51:36 +02:00
Bartek Iwańczuk
2eeea0a1d2
ci: add script to promote to RC release (#25072)
This commits add a CI script that allows to promote a certain
canary build to a "Release Candidate" release.

This is done using `libsui` and `patchver` utilities.
2024-08-16 23:59:10 +02:00
Bartek Iwańczuk
db75462bd6
refactor: show release channel in deno --version (#25061)
Also simplifies handling of various release channels in `deno upgrade`
subcommand.
2024-08-16 22:42:19 +02:00
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
Yoshiya Hinosawa
105d27bc7d
fix(ext/node): improve shelljs compat with managed npm execution (#24912)
This change improves the Node.js compatibility in managed npm resolution
mode by disabling the discovery of `node_modules` when the
main specifier is inside of `DENO_DIR`.

closes #22732
closes #24589
2024-08-16 12:48:48 +09:00
Bartek Iwańczuk
2bb013f9ba
refactor: version module exports a single const struct (#25014)
This commit rewrites the internal `version` module that exported
various information about the current executable. Instead of exporting
several consts, we are now exporting a single const structure that 
contains all the necessary information.

This is the first step towards cleaning up how we use this information
and should allow us to use SUI to be able to patch this information
in already produced binary making it easier to cut new releases.

---------

Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-08-15 23:47:16 +02:00
Nathan Whitaker
5ec3c5c3a4
feat(lint): Add lint for usage of node globals (with autofix) (#25048)
From upgrading `deno_lint`.

Previously if you had a node project that used a bunch of node globals
(`process.env`, etc), you would have to fix the errors by hand. This PR
includes a new lint that detects usages of node globals (`process`,
`setImmediate`, `Buffer`, etc.) and provides an autofix to import the
correct value. For instance:

```ts
// main.ts
const _foo = process.env.FOO;
```

`deno lint` gives you

```ts
error[no-node-globals]: NodeJS globals are not available in Deno
 --> /home/foo.ts:1:14
  |
1 | const _foo = process.env.FOO;
  |              ^^^^^^^
  = hint: Add `import process from "node:process";`

  docs: https://lint.deno.land/rules/no-node-globals


Found 1 problem (1 fixable via --fix)
Checked 1 file
```
And `deno lint --fix` adds the import for you:

```ts
// main.ts
import process from "node:process";
const _foo = process.env.FOO;
```
2024-08-15 20:43:04 +00:00
Bartek Iwańczuk
e8d57cd3fe
refactor: remove version::is_canary(), use ReleaseChannel instead (#25053)
In preparation for https://github.com/denoland/deno/pull/25014, this
commit removes public `is_canary()` method and instead uses an enum
`ReleaseChannel` to be able to designate more "kinds" of builds.
2024-08-15 21:59:16 +02:00
Divy Srivastava
7ca95fc999
feat: deno compile --icon <ico> (#25039)
Add `--icon` flag to set deno compile'd executable icon on Windows.

```
deno compile --icon icon.ico game.tsx
```

Depends on https://github.com/denoland/sui/pull/24

<img width="447" alt="image"
src="https://github.com/user-attachments/assets/7f6f3aa0-6872-4975-ae9d-06701b7684b8">

Closes https://github.com/denoland/deno/issues/8912
2024-08-15 10:12:23 +05:30
Nathan Whitaker
e92a05b551
feat(serve): Opt-in parallelism for deno serve (#24920)
Adds a `parallel` flag to `deno serve`. When present, we spawn multiple
workers to parallelize serving requests.


```bash
deno serve --parallel main.ts
```

Currently on linux we use `SO_REUSEPORT` and rely on the fact that the
kernel will distribute connections in a round-robin manner.

On mac and windows, we sort of emulate this by cloning the underlying
file descriptor and passing a handle to each worker. The connections
will not be guaranteed to be fairly distributed (and in practice almost
certainly won't be), but the distribution is still spread enough to
provide a significant performance increase.

---
(Run on an Macbook Pro with an M3 Max, serving `deno.com`

baseline::
```
❯ wrk -d 30s -c 125 --latency http://127.0.0.1:8000
Running 30s test @ http://127.0.0.1:8000
  2 threads and 125 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   239.78ms   13.56ms 330.54ms   79.12%
    Req/Sec   258.58     35.56   360.00     70.64%
  Latency Distribution
     50%  236.72ms
     75%  248.46ms
     90%  256.84ms
     99%  268.23ms
  15458 requests in 30.02s, 2.47GB read
Requests/sec:    514.89
Transfer/sec:     84.33MB
```

this PR (`with --parallel` flag)
```
❯ wrk -d 30s -c 125 --latency http://127.0.0.1:8000
Running 30s test @ http://127.0.0.1:8000
  2 threads and 125 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   117.40ms  142.84ms 590.45ms   79.07%
    Req/Sec     1.33k   175.19     1.77k    69.00%
  Latency Distribution
     50%   22.34ms
     75%  223.67ms
     90%  357.32ms
     99%  460.50ms
  79636 requests in 30.07s, 12.74GB read
Requests/sec:   2647.96
Transfer/sec:    433.71MB
```
2024-08-14 22:26:21 +00:00
Nayeem Rahman
4eff1e8ec4
fix(lsp): import map lookup for jsr subpath auto import (#25025) 2024-08-14 22:38:18 +01:00
Pig Fang
3a3315cc7f
feat(fmt): support HTML, Svelte, Vue, Astro and Angular (#25019)
This commit adds capability to format HTML, Svelte, Vue, Astro and Angular
files.

"--unstable-html" is required to format HTML files, and "--unstable-component"
flag is needed to format other formats. These can also be specified in the config
file.

Close #25015
2024-08-14 22:58:48 +02:00
Asher Gomez
f89b531149
feat(node): support username and _password in .npmrc file (#24793)
Closes #23950
2024-08-14 18:53:15 +02:00
Luca Casonato
130a2592f1
fix(cli): support --watch when running cjs npm packages (#25038) 2024-08-14 15:21:11 +02:00
Bartek Iwańczuk
b325bf0a35
feat(clean): add progress bar (#25026)
Closes https://github.com/denoland/deno/issues/25020
2024-08-14 13:04:07 +02:00
Łukasz Czerniawski
e2faf50375
feat(coverage): add breadcrumbs to deno coverage --html report (#24860) 2024-08-14 16:37:19 +09:00
Bartek Iwańczuk
8537c4537b
fix(upgrade): use proper version display (#25029)
This commit fixes output of `deno upgrade` subcommand,
by displaying proper version numbers. Before this PR we were
prepending "v" before the canary version hash, which was
obviously wrong.
2024-08-13 22:32:20 +00:00
Bartek Iwańczuk
25bb59d2ce
fix(tls): print a warning if a system certificate can't be loaded (#25023)
This commit changes how system certificates are loaded on startup.

Instead of hard erroring if a certificate can't be decoded, we are now
printing a warning and bumping a hex representation of the certificate
and continue execution.

Ref https://github.com/denoland/deno/issues/24137
2024-08-13 16:12:45 +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
Bartek Iwańczuk
631e175498
fix(upgrade): return no RC versions if fetching fails (#25013)
This commit fixes errors on CI like this:
```
---- upgrade::upgrade_prompt stdout ----
command /home/runner/work/deno/deno/target/release/deno run --log-level=debug main.js
command cwd /tmp/deno-cli-testqDw5UR
command /home/runner/work/deno/deno/target/release/deno run --log-level=debug main.js
command cwd /tmp/deno-cli-testqDw5UR
------ Start Full Text ------
"DEBUG RS - deno::args:620 - No .npmrc file found\r\nDEBUG RS - deno::args:909 - Finished config loading.\r\nDEBUG RS - deno::cache::cache_db:168 - Opening cache /tmp/deno-cli-testMKnYXP/dep_analysis_cache_v2...\r\nDEBUG RS - deno::cache::cache_db:168 - Opening cache /tmp/deno-cli-testMKnYXP/node_analysis_cache_v2...\r\nDEBUG RS - deno::cache::cache_db:168 - Opening cache /tmp/deno-cli-testMKnYXP/v8_code_cache_v2...\r\nDEBUG RS - deno::js:10 - Deno isolate init with snapshots.\r\nDEBUG RS - deno::worker:183 - main_module file:///tmp/deno-cli-testqDw5UR/main.js\r\nDEBUG RS - deno::module_loader:158 - Preparing module load.\r\nDEBUG RS - deno::module_loader:162 - Building module graph.\r\nDEBUG RS - deno::file_fetcher:573 - FileFetcher::fetch_no_follow_with_options - specifier: file:///tmp/deno-cli-testqDw5UR/main.js\r\nDEBUG RS - deno::module_loader:208 - Prepared module load.\r\nDEBUG RS - deno_runtime::worker:739 - received module evaluate Ok(\r\n    (),\r\n)\r\nDEBUG RS - deno::module_loader:831 - Updating V8 code cache for ES module: file:///tmp/deno-cli-testqDw5UR/main.js, [1577979522354460122]\r\n"
------- End Full Text -------
Next text: "DEBUG RS - deno::args:620 - No .npmrc file found\r\nDEBUG RS - deno::args:909 - Finished config loading.\r\nDEBUG RS - deno::cache::cache_db:168 - Opening cache /tmp/deno-cli-testMKnYXP/dep_analysis_cache_v2...\r\nDEBUG RS - deno::cache::cache_db:168 - Opening cache /tmp/deno-cli-testMKnYXP/node_analysis_cache_v2...\r\nDEBUG RS - deno::cache::cache_db:168 - Opening cache /tmp/deno-cli-testMKnYXP/v8_code_cache_v2...\r\nDEBUG RS - deno::js:10 - Deno isolate init with snapshots.\r\nDEBUG RS - deno::worker:183 - main_module file:///tmp/deno-cli-testqDw5UR/main.js\r\nDEBUG RS - deno::module_loader:158 - Preparing module load.\r\nDEBUG RS - deno::module_loader:162 - Building module graph.\r\nDEBUG RS - deno::file_fetcher:573 - FileFetcher::fetch_no_follow_with_options - specifier: file:///tmp/deno-cli-testqDw5UR/main.js\r\nDEBUG RS - deno::module_loader:208 - Prepared module load.\r\nDEBUG RS - deno_runtime::worker:739 - received module evaluate Ok(\r\n    (),\r\n)\r\nDEBUG RS - deno::module_loader:831 - Updating V8 code cache for ES module: file:///tmp/deno-cli-testqDw5UR/main.js, [1577979522354460122]\r\n"
thread 'upgrade::upgrade_prompt' panicked at tests/integration/upgrade_tests.rs:251:9:
Timed out.
```

These errors are caused by the fact that the test server doesn't have an
endpoint to return
RC releases. Which in turn causes an error to be raised which later just
short-circuits logic
for checking the version and storing it in file. Since fetching from a
remote host is always
fallible I elected to just return an empty vec of "rc" versions instead
of erroring. This might
lead to a slight mismatch in some situation when the request actually
failed and user is
prompted that there's a new canary version, but that is better than not
displaying
prompt at all. This issue will be fixed more robustly once we move to
using SUI for
specifying version of the binary.
2024-08-12 23:44:14 +00:00
David Sherret
085058cfff
feat: deno remove (#24952)
Co-authored-by: Satya Rohith <me@satyarohith.com>
2024-08-12 16:17:25 -04:00
Leo Kettmeir
b1036e4d9c
fix: update deno_doc (#24972)
For Better HTML titles and custom JSDoc module resolving
2024-08-12 12:57:50 -07:00
Bartek Iwańczuk
3c70b9435a
feat: deno upgrade --rc (#24905)
This commit adds the "--rc" flag to "deno upgrade" subcommand.

This flag allows to upgrade to the latest "release candidate" release.

The update checker was also updated to take this into account.
2024-08-12 18:32:53 +00:00
Kenta Moriuchi
76f4f202e7
chore: update the copyright of c, mjs, and jsx (#25005) 2024-08-12 12:41:32 -04:00
Leo Kettmeir
e5f0058b74
feat: better help output (#24958) 2024-08-12 08:55:33 -07:00
Nayeem Rahman
9bdab6fb6b
fix(lsp): directly use file referrer when loading document (#24997) 2024-08-12 15:45:27 +01:00
Bartek Iwańczuk
004b74c8c6
feat: Rename --unstable-hmr to --watch-hmr (#24975)
This commit stabilizes HMR functionality and renames
`--unstable-hmr` to `--watch-hmr`. The `--unstable-hmr`
flag is still working, but hidden from the help output.
It will be removed in Deno 2.

Once https://github.com/denoland/deno/pull/24958 lands
we should improve grouping of `--watch` and `--watch-hmr`
flags.
2024-08-12 00:10:55 +02:00
Pig Fang
82884348cb
feat(fmt): support CSS, SCSS, Sass and Less (#24870)
This PR integrates [Malva](https://github.com/g-plane/malva) into `deno
fmt`, which introduces the ability to format CSS, SCSS, Sass and Less
files.

On Linux x64 6.10, this PR increases about 800KiB:

```                                                                                                                                                                      
❯ wc -c target/release/deno
125168728 target/release/deno

❯ wc -c target/release/deno
124349456 target/release/deno
```
2024-08-09 18:52:23 +02: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
Nathan Whitaker
854c7ba198
fix(install): Properly handle dist tags when setting up node_modules (#24968)
Fixes https://github.com/denoland/deno/issues/24966.
Fixes https://github.com/denoland/deno/issues/24932.
2024-08-09 13:35:54 +00:00
Bartek Iwańczuk
c9f626e251
refactor(upgrade): cleanup pass (#24954)
No functional changes, just factoring out some helpers to make it easier
to update and test.
2024-08-09 09:44:21 +00:00
David Sherret
c21f42c825
fix(lsp): don't always use byonm resolver when DENO_FUTURE=1 (#24865)
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
2024-08-09 09:50:37 +02:00
David Sherret
fb16868593
fix(add): better error message providing scoped pkg missing leading @ symbol (#24961)
* https://github.com/denoland/deno_semver/pull/30
2024-08-08 23:23:28 +02:00
Bartek Iwańczuk
ffe1bfd54c
feat: deno init --serve (#24897)
This commit adds "--serve" flag to "deno init" subcommand,
that provides a template for quick starting a project using
"deno serve".

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-08-08 16:54:39 +00:00
Nathan Whitaker
3f692bed0a
fix(add): Support dist tags in deno add (#24960)
Fixes #24956.
2024-08-08 16:45:41 +00:00
Marvin Hagemeister
18b9b43c36
chore: change property order in generated deno.json (#24953)
This moves all package-specific object keys right next to each other.
2024-08-08 14:28:18 +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
Leo Kettmeir
e7be763690
feat: treat bare deno command with run arguments as deno run (#24887)
removes the necessity for the `run` subcommand to run scripts

fixes #24493
2024-08-08 07:22:28 -07:00
Bartek Iwańczuk
6e8612f319
feat: refresh "Download" progress bar with a spinner (#24913)
This commit adds a spinner to "Download" progress bar and makes
it multiline, showing up to 4 lines of documents being downloaded.
2024-08-08 13:54:29 +00:00
Birk Skyum
4c56353594
feat(cli): Add --env-file as alternative to --env (#24555) 2024-08-08 06:50:57 -07:00
Ryan Dahl
1d5927aaf2
feat: support short flags for permissions (#24883)
This commit adds short CLI flags for following permission flags:
- "-R" for "--allow-read"
- "-W" for "--allow-write"
- "-E" for "--allow-env"
- "-N" for "--allow-net"
- "-S" for "--allow-sys"

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-08-08 15:46:10 +02:00
David Sherret
e9e3ab4628
feat: deno clean (#24950)
Co-authored-by: Satya Rohith <me@satyarohith.com>
2024-08-08 13:22:18 +00:00
David Sherret
2f6da40bd6
fix: cache bust jsr meta file when version not found in dynamic branches (#24928)
Test and code change in deno_graph.

* https://github.com/denoland/deno_graph/pull/511

Closes https://github.com/denoland/deno/issues/23965
2024-08-08 14:54:30 +02:00
David Sherret
6fce23c54e
perf: skip saving to emit cache after first failure (#24896) 2024-08-08 09:41:30 +00:00
Nathan Whitaker
507e5b74ff
fix: Don't shell out to unzip in deno upgrade/compile (#24926)
Use the `zip` crate instead

Fixes #23988.
2024-08-08 00:19:05 -07:00
Yusuke Tanaka
4e4c96bf66
fix(ext/fetch): include URL and error details on fetch failures (#24910)
This commit improves error messages that `fetch` generates on failure.

Fixes #24835
2024-08-07 23:18:33 -07:00
Marvin Hagemeister
9d6da1036d
fix: rename watch event missing (#24893)
This PR ensures that we forward a `rename` event in our file watcher.
The rust lib we use combines that with the `modify` event.

This fixes a compatibility issue with Node too, which sends the `rename`
event as well.

Fixes https://github.com/denoland/deno/issues/24880
2024-08-07 18:15:57 +02:00
David Sherret
59c9bd0800
chore(progress): handle position greater than total size (#24924) 2024-08-07 14:01:16 +02:00
Bartek Iwańczuk
f150a9c2d9
feat(upgrade): refresh output (#24911)
This commit updates the output of "deno upgrade" subcommand.
2024-08-07 13:59:12 +02:00
Bartek Iwańczuk
fe64cbd88b
fix(upgrade): fallback to Content-Length header for progress bar (#24923)
If the "size hint" does not provide a value, fall back to using a
"Content-Length" header.
2024-08-07 09:16:27 +00:00
Bartek Iwańczuk
d1b2a9822d
refactor(upgrade): make fetching latest version async (#24919)
Additionally some renames in preparation to support "LTS" and "RC"
channels.
2024-08-07 10:29:23 +02:00
David Sherret
04473c04ed
fix(compile): support workspace members importing other members (#24909) 2024-08-07 07:43:05 +00:00
Nayeem Rahman
9a83efa04b
feat(lsp): node specifier completions (#24904) 2024-08-06 16:30:34 +01:00
Satya Rohith
b3f1f3ba04
feat: deno run <task> (#24891)
This PR updates `deno run` to fallback to executing tasks when there is
no script with the specified name. If there are both script and a task
with the same name then `deno run` will prioritise executing the script.
2024-08-06 20:35:30 +05:30
Divy Srivastava
c0e9512b39
BREAKING(webgpu/unstable): Replace async .requestAdapterInfo() with sync .info (#24783)
Closes https://github.com/denoland/deno/issues/24779

Ref https://github.com/gpuweb/gpuweb/pull/4662
2024-08-06 15:30:32 +05:30
HasanAlrimawi
bbf23190d4
fix: update dry run success message (#24885) 2024-08-06 08:14:06 +00:00
Nayeem Rahman
30a97d1e51
perf(lsp): remove fallback config scopes for workspace folders (#24868) 2024-08-06 01:10:02 +01:00
Bartek Iwańczuk
3e1f98236f
feat: Add Deno.ServeDefaultExport type (#24879)
Closes https://github.com/denoland/deno/issues/23725
2024-08-05 23:19:09 +02:00
David Sherret
3f79db1486
fix(unstable): panic when running deno install with DENO_FUTURE=1 (#24866)
Not bothering to add a test for this because we're going to change this
to be the default in a couple weeks.
2024-08-05 10:36:09 +02:00
Ryan Dahl
e24aa6bbec
docs: category should be 'Subprocess', not 'Sub Process' (#24852) 2024-08-02 14:19:47 +00:00
David Sherret
0da81205d5
feat(unstable/fmt): move yaml formatting behind unstable flag (#24848)
This moves YAML formatting behind an unstable flag for Deno 1.46. This
will make it opt-in to start and then we can remove the flag to make it
on by default in version of Deno after that.

This can be specified by doing `deno fmt --unstable-yaml` or by
specifying the following in a deno.json file:

```json
{
  "unstable": ["fmt-yaml"]
}
```
2024-08-02 13:52:48 +00:00
i-api
2aad92c30b
fix(cli): shorten examples in help text (#24374) 2024-08-02 13:38:15 +00:00
Luca Casonato
84ff418265
feat(test): rename --allow-none to --permit-no-files (#24809) 2024-08-02 13:18:59 +00:00
Pig Fang
124a13280e
feat(fmt): support YAML (#24717) 2024-08-02 12:12:51 +00:00