Luca Casonato
7a41a93997
fix(ext/http): gracefully handle Response.error responses ( #25712 )
...
Fixes #14371
2024-09-18 21:14:40 +02:00
Bartek Iwańczuk
48ea4e3c92
feat(check): turn on noImplicitOverride ( #25695 )
...
Closes https://github.com/denoland/deno/issues/11836
Ref https://github.com/denoland/deno/issues/25162
2024-09-18 14:49:30 +01:00
Luca Casonato
45b1794778
tests: re-enable WebGPU tests on macOS aarch64 ( #25702 )
2024-09-18 14:08:08 +02:00
Asher Gomez
51d926ac30
chore(fs): undeprecate Deno.FsWatcher.prototype.return()
( #25623 )
2024-09-17 07:57:53 +10:00
David Sherret
62e952559f
refactor(permissions): split up Descriptor into Allow, Deny, and Query ( #25508 )
...
This makes the permission system more versatile.
2024-09-16 21:39:37 +01:00
Luca Casonato
74069add3f
fix(runtime): don't error child.output()
on consumed stream ( #25657 )
...
This fixes the fast path for `readableStreamCollectIntoUint8Array` to
only trigger if the readable stream has not yet been disturbed -
because otherwise we may not be able to close it if the
read errors.
2024-09-16 14:23:40 +02:00
Marvin Hagemeister
597f2d8d4d
feat: print Listening on
messages on stderr instead of stdout ( #25491 )
...
Fixes https://github.com/denoland/deno/issues/25114
---------
Signed-off-by: Leo Kettmeir <crowlkats@toaxl.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: crowlkats <crowlkats@toaxl.com>
Co-authored-by: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com>
2024-09-14 23:30:06 +02:00
David Sherret
af2d992ecd
feat: TypeScript 5.6 and npm:@types/node@22
( #25614 )
2024-09-14 11:58:47 +01:00
Ian Bull
606b7b17c6
refactor(runtime): align error messages ( #25563 )
...
Aligns the error messages in the runtime folder to be in-line with the
Deno style guide.
https://github.com/denoland/deno/issues/25269
2024-09-13 11:38:45 +02:00
MujahedSafaa
4983f763d4
fix(ext/console): prevent duplicate error printing when the cause is assigned ( #25327 )
...
This commit fixes the error format when the cause is assigned
separately, ensuring that the cause is only printed once instead of
twice.
The fix addresses issue
[#21651 ](https://github.com/denoland/deno/issues/21651 ).
2024-09-12 05:02:32 -07:00
Asher Gomez
3285801429
test: remove DENO_FUTURE
( #25587 )
2024-09-12 11:30:12 +10:00
Asher Gomez
4865ae13e1
BREAKING(net): remove Deno.[Tls]Listener.prototype.rid
( #25556 )
...
Towards #22079
---------
Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-11 01:14:50 +02:00
Asher Gomez
ace1202227
BREAKING(net): remove Deno.ConnectTlsOptions.{certChain,certFile,privateKey}
and Deno.ListenTlsOptions.certChain,certFile,keyFile}
( #25525 )
...
Towards #22079
2024-09-10 21:55:42 +00:00
Asher Gomez
a69b1e699e
BREAKING(fs): remove Deno.FsFile.prototype.rid
( #25499 )
...
Towards #22079
---------
Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-11 07:19:34 +10:00
Luca Casonato
7bfcb4dd10
feat(cli): use NotCapable error for permission errors ( #25431 )
...
Closes #7394
---------
Co-authored-by: snek <snek@deno.com>
2024-09-10 11:12:24 -07:00
Bartek Iwańczuk
9a169e3cf1
test: remove usage of --unstable
flag ( #25549 )
...
This commit removes all occurrences of `--unstable` flag
from all the tests that are run in CI.
Turns out none of the tests actually required that flag
anymore.
2024-09-10 11:28:59 +00:00
Asher Gomez
a445ebd74f
BREAKING(fs): remove Deno.fsync[Sync]()
( #25448 )
...
Towards #22079
---------
Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-09 22:39:56 +00:00
Asher Gomez
aadcf3346c
BREAKING(io): remove Deno.{Reader,Writer}[Sync]
and Deno.Closer
( #25524 )
2024-09-10 07:07:12 +10:00
Asher Gomez
39f2704bd7
BREAKING(fs): remove Deno.fdatasync[Sync]()
( #25520 )
2024-09-09 21:09:57 +10:00
Asher Gomez
a9ed06b832
BREAKING(net): remove Deno.{Conn,TlsConn,TcpConn,UnixConn}.prototype.rid
( #25446 )
...
Towards #22079
---------
Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-06 23:01:36 +00:00
Asher Gomez
5bac4075c3
chore: soft-remove Deno.{stdin,stderr,stdout}.rid
( #25479 )
...
Towards #22079
2024-09-07 08:37:35 +10:00
Marvin Hagemeister
73ab32c551
fix: invalid ipv6 hostname on deno serve
( #25482 )
...
This PR fixes an invalid URL being printed when running `deno serve`
Before: invalid URL
```sh
$ deno serve --host localhost
deno serve: Listening on http://::1:8000/
```
After: valid URL
```sh
$ deno serve --host localhost
deno serve: Listening on http://[::1]:8000/
```
2024-09-06 09:22:52 +00:00
Asher Gomez
d8f3123c36
BREAKING(buffer): remove Deno.Buffer
( #25441 )
...
Towards #22079
---------
Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-06 18:28:05 +10:00
Asher Gomez
7937ae3f2f
chore(net): soft-remove Deno.serveHttp()
( #25451 )
...
Towards #22079
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-09-06 08:15:00 +10:00
David Sherret
15fce5b290
feat(check): turn on useUnknownInCatchVariables ( #25465 )
...
Part of #25162
Closes #11826
2024-09-05 15:22:31 +02:00
Yoshiya Hinosawa
b01578ae1f
chore(tests): reduce the use of --unstable
flag in test util ( #25443 )
2024-09-05 18:34:12 +09:00
Ian Bull
17b5e98b82
refactor(ext/cron): align error messages ( #25300 )
...
Aligns the error messages in the cron extension to be in-line with the
Deno style guide.
https://github.com/denoland/deno/issues/25269
2024-09-05 08:27:58 +02:00
Asher Gomez
713ed065e7
BREAKING(fs): remove Deno.File
( #25447 )
...
Towards #22079
2024-09-05 16:22:47 +10:00
Yoshiya Hinosawa
e799c2857c
fix(ext/http): do not set localhost to hostname unnecessarily ( #24777 )
...
This commit changes when to cause the hostname substition of `0.0.0.0` ->
`localhost`.
Currently we substitute `localhost` to the hostname on windows before
calling `options.onListen`, which prevents the users to do more advanced
thing using hostname string like
https://github.com/denoland/std/issues/5558 . This PR changes it not to
substitute it when the user provide `onListen` callback.
closes #24776
unblocks https://github.com/denoland/std/issues/5558
2024-09-05 14:13:06 +09:00
Asher Gomez
195b17ae12
BREAKING(types): soft-remove Deno.run()
( #25403 )
...
Towards #22079
2024-09-05 08:45:55 +10:00
David Sherret
5400f1af6c
fix(windows): Deno.Command - align binary resolution with linux and mac ( #25429 )
2024-09-04 16:03:09 +01:00
David Sherret
74fc66da11
fix: lock down allow-run permissions more ( #25370 )
...
`--allow-run` even with an allow list has essentially been
`--allow-all`... this locks it down more.
1. Resolves allow list for `--allow-run=` on startup to an absolute
path, then uses these paths when evaluating if a command can execute.
Also, adds these paths to `--deny-write`
1. Resolves the environment (cwd and env vars) before evaluating
permissions and before executing a command. Then uses this environment
to evaluate the permissions and then evaluate the command.
2024-09-04 14:51:24 +02:00
Asher Gomez
7e11dbb3ac
BEAKING(buffer): remove Deno.readAll[Sync]()
( #25386 )
...
Towards #22079
Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-04 08:54:50 +00:00
Asher Gomez
ac33fc2892
chore(tty): soft-remove Deno.isatty()
( #25410 )
...
Towards #22079
2024-09-04 18:12:11 +10:00
Ian Bull
939c23f9fe
refactor(cli/js): align error messages ( #25406 )
...
Aligns the error messages in the cli/js folder to be in-line with the
Deno style guide.
2024-09-04 09:19:55 +02:00
Asher Gomez
072bf5d379
BREAKING(buffer): remove Deno.writeAll[Sync]()
( #25407 )
2024-09-04 17:16:48 +10:00
Ian Bull
ce6b675102
refactor(ext/fetch): align error messages ( #25374 )
...
Aligns the error messages in the ext/fetch folder to be in-line with the
Deno style guide.
https://github.com/denoland/deno/issues/25269
2024-09-04 09:05:29 +02:00
Asher Gomez
b72d1a7256
BREAKING(fs): remove Deno.fstat[Sync]()
( #25351 )
...
Towards #22079
Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-04 01:28:15 +00:00
Asher Gomez
03d8e474d7
BREAKING(io): remove Deno.copy()
( #25345 )
...
Towards #22079
---------
Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-09-03 10:46:13 +00:00
Luca Casonato
5cf97f539b
BREAKING(permissions): remove --allow-hrtime ( #25367 )
...
Remove `--allow-hrtime` and `--deny-hrtime`. We are doing this because
it is already possible to get access to high resolution timers through
workers and SharedArrayBuffer.
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-09-03 11:24:25 +02:00
Bartek Iwańczuk
71e4ac774b
BREAKING(unstable): drop support for Deno.run.{clearEnv,gid,uid} ( #25371 )
...
These are unstable options and the APIs is now deprecated. To limit
amount of unstable flags we elected to have these APIs removed.
2024-09-03 11:07:02 +02:00
Asher Gomez
9bf10aa1e0
chore(fs): remove Deno.flock[Sync]()
( #25350 )
...
Towards #22079
2024-09-03 18:39:37 +10:00
Asher Gomez
45c1737531
BREAKING(io): remove Deno.iter[Sync]()
( #25346 )
...
Towards #22079
2024-09-03 18:35:54 +10:00
Asher Gomez
259752537f
BREAKING: remove Deno.close()
( #25347 )
...
Towards #22079
2024-09-03 18:33:26 +10:00
Asher Gomez
b536ed1a74
chore(fs): remove Deno.futime[Sync]()
( #25252 )
2024-08-31 13:13:23 +10:00
Asher Gomez
8e478a1a7d
chore: remove Deno.resources()
( #25251 )
2024-08-31 09:34:09 +10:00
Bartek Iwańczuk
b1c6142f74
BREAKING: DENO_FUTURE=1
by default, or welcome to Deno 2.0 ( #25213 )
...
This commit effectively turns Deno into Deno 2.0.
This is done by forcing `DENO_FUTURE=1` env var, that was available in
the past few months to try Deno 2 changes.
This commit contains several breaking changes scheduled for Deno 2:
- all deprecated JavaScript APIs are not available any more, mostly
`Deno.*` APIs
- `window` global is removed
- FFI, WebGPU and FS APIs are now stable and don't require
`--unstable-*` flags
- import assertions are no longer supported
- "bring your own node modules" is enabled by default
This is the first commit in a series that are scheduled before the Deno
2 release.
Follow up work is tracked in
https://github.com/denoland/deno/issues/25241 .
---------
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Nayeem Rahman <nayeemrmn99@gmail.com>
Co-authored-by: Nathan Whitaker <nathan@deno.com>
2024-08-30 13:58:58 -04:00
David Sherret
c6793f52b9
fix(permissions): disallow any LD_
or DYLD_
prefixed env var without full --allow-run permissions ( #25271 )
...
Follow up to https://github.com/denoland/deno/pull/25221
I looked into what the list was and it was quite extensive, so I think
as suggested in
https://github.com/denoland/deno/issues/11964#issuecomment-2314585135 we
should disallow this for any `LD_` prefixed env var.
2024-08-28 21:11:37 -04:00
Marvin Hagemeister
b6dbe1e256
chore: ignore lint warning in test ( #25234 )
...
Noticed this when working on another PR. The test code predates the
addition of our `no-console` rule.
2024-08-27 08:48:15 +00:00
Bartek Iwańczuk
ba58628601
Reland "test: run unit tests with DENO_FUTURE=1" ( #25212 )
...
Reverted in https://github.com/denoland/deno/pull/25060
2024-08-26 23:58:28 +02:00