Commit graph

443 commits

Author SHA1 Message Date
Dean Srebnik 6b5c9764ac
chore: fix Deno.UnsafeWindowSurface typings (#22081)
- changed `Deno.UnsafeWindowSurface` typings from accepting
`Deno.UnsafePointerView` to `Deno.PointerValue`
- added width and height to `GPUCanvasConfiguration`
2024-01-24 21:17:28 +05:30
Asher Gomez a5a973e93c
feat: deprecate Deno.write() and Deno.writeSync() (#22064)
For removal in Deno v2.
2024-01-24 16:36:13 +01:00
Asher Gomez 62786cfebb
feat: deprecate Deno.close() (#22066)
For removal in Deno v2.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-01-24 15:59:55 +01:00
Asher Gomez 4af121687c
feat: deprecate Deno.ftruncate() and Deno.ftruncateSync() (#22069)
For removal in Deno 2.0.
2024-01-24 15:12:22 +01:00
Bartek Iwańczuk 064a6c048a
feat: Add warnings for more deprecated APIs (#21992)
Follow up to https://github.com/denoland/deno/pull/21939 that adds
deprecation warnings to more `Deno` APIs:

- `Deno.copy()`
- `Deno.iter()`
- `Deno.iterSync()`
- `new Deno.Buffer()`
- `Deno.readAll()`
- `Deno.readAllSync()`
- `Deno.writeAll()`
- `Deno.writeAllSync()`
- `Deno.FsWatcher.return`
- `Deno.serveHttp()`
- `Deno.metrics()`

---------

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-01-24 14:57:54 +01:00
Asher Gomez aac0ad32bd
feat: deprecate Deno.FsFile constructor and Deno.FsFile.rid (#22072) 2024-01-24 13:36:35 +01:00
Asher Gomez c98ab51746
feat: deprecate Deno.read() and Deno.readSync() (#22063)
For removal in Deno v2.
2024-01-24 09:42:03 +05:30
Asher Gomez ea48bee3f7
feat: deprecate Deno.seek() and Deno.seekSync() (#22065)
For removal in Deno v2.
2024-01-24 09:39:56 +05:30
Asher Gomez 4c5ce90883
chore: update Deno.{fsync,fsyncSync}() deprecation notices (#22071)
To align with other deprecations.
2024-01-24 09:38:59 +05:30
Asher Gomez 47620641e7
feat: FsFile.sync() and FsFile.syncSync() (#22017)
This change:
1. Implements `Deno.FsFile.sync()` and `Deno.FsFile.syncSync()`.
2. Deprecates `Deno.fsync()` and `Deno.fsyncSync()` for removal in Deno
v2, in favour of the above corresponding methods.

Related #21995

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-01-24 01:07:06 +01:00
Asher Gomez 2f47ec6c3a
feat: Deno.FsFile.dataSync() and Deno.FsFile.dataSyncSync() (#22019)
This change:
1. Implements `Deno.FsFile.dataSync()` and `Deno.FsFile.dataSyncSync()`.
2. Deprecates `Deno.fdatasync()` and `Deno.fdatasyncSync()` for removal
in Deno v2, in favour of the above corresponding methods.
3. Replaces use of `Deno.fdatasync()` and `Deno.fdatasyncSync()` with
the above instance methods.

Related #21995
2024-01-24 00:31:52 +01:00
Asher Gomez 947ce41e99
feat: deprecate Deno.resources() (#22059)
Most uses of `Deno.resources()` within tests, as they previously checked
for leaked resources. This is not needed as the test runner does this
automatically. Other internal uses of this API have been replaced with
the internal `Deno[Deno.internal].core.resources()`.
2024-01-24 00:27:29 +01:00
Asher Gomez 4eedac3604
feat: Deno.{stdin,stdout,stderr}.isTerminal(), deprecate Deno.isatty() (#22011)
This change:
1. Implements `Deno.stdin.isTerminal()`, `Deno.stdout.isTerminal()` and
`Deno.stderr.isTerminal()`.
2. Deprecates `Deno.isatty()` for removal in Deno v2, in favour of the
above instance methods.
3. Replaces use of `Deno.isatty()` with the above instance methods.

Related #21995

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2024-01-24 00:01:56 +01:00
Bartek Iwańczuk 60688c563e
feat: import.meta.filename and import.meta.dirname (#22061)
This commit adds `import.meta.filename` and `import.meta.dirname` APIs.

These APIs return string representation of filename and containing
dirname.
They are only defined for local modules (modules that have `file:///`
scheme).

Example:

```ts
console.log(import.meta.filename, import.meta.dirname)
```

Unix:
```
$ deno run /dev/my_module.ts
/dev/my_module.ts /dev/
```

Windows:
```
$ deno run C:\dev\my_module.ts
C:\dev\my_module.ts C:\
```
2024-01-23 23:51:07 +01:00
Bartek Iwańczuk 13d5c6420e
chore: upgrade deno_core to 0.249.0 (#22058) 2024-01-23 22:56:56 +01:00
Asher Gomez 5aa25f08be
feat: Add deprecation warning for Deno.customInspect (#22027)
This change sets the removal version of `Deno.customInspect` for Deno
v2.

Towards #22021

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2024-01-23 21:46:59 +00:00
Asher Gomez d6d437c4dc
BREAKING(unstable): remove Deno.cron() overload (#22035)
This change removes the currently deprecated `Deno.cron()` overload with
`options` as a potential last argument.

This might be fine to do now, in a major release, as `Deno.cron()` is an
unstable API. I thought of doing this while working on #22021. If this
is not ready to remove, I can instead set the removal version of this
overload for Deno v2.

Note: this overload was deprecated in Deno v1.38.2 (#21225). So it's
been deprecated for over 2 months.
2024-01-23 17:37:54 +05:30
Bartek Iwańczuk 01b6e38baf
feat: Stabilize Deno.listen for 'unix' transport (#21938) 2024-01-23 17:32:25 +05:30
Asher Gomez 7e4145df25
refactor: set removal version for Deno.RequestEvent, Deno.HttpConn and Deno.serveHttp() (#22034)
This change:
1. Sets the removal version for `Deno.RequestEvent`, `Deno.HttpConn` and
`Deno.serveHttp()` for Deno v2. I thought it might be worth calling
`warnOnDeprecatedApi()` within `Deno.Request` and `Deno.HttpConn`
methods, but I thought just having it called within `Deno.serveHttp()`
might be sufficient.
2. Removes some possibly unneeded related benchmarks.

Towards #22021
2024-01-23 03:24:03 +00:00
Asher Gomez 6059731594
refactor: set removal version for Deno.Server (#22024)
This change sets the removal version for the deprecated `Deno.Server`
interface for Deno 2.0.

Towards #22021
2024-01-23 02:19:49 +01:00
Bartek Iwańczuk 71551c80a1
feat(unstable): remove Deno.upgradeHttp API (#21856)
Closes https://github.com/denoland/deno/issues/21828.

This API is a huge footgun. And given that "Deno.serveHttp" is a
deprecated API that is discouraged to use (use "Deno.serve()" 
instead); it makes no sense to keep this API around.

This is a step towards fully migrating to Hyper 1.
2024-01-22 21:35:39 +00:00
Leo Kettmeir 8f76762793
feat(web): ImageBitmap (#21898) 2024-01-22 12:08:01 +01:00
Asher Gomez 983c745d4f
chore: use FsFile[Symbol.dispose]() (#22007)
This change takes advantage of explicit resources management for
`FsFile` instances and tweaks documentation to encourage the use of it.

---------

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2024-01-22 00:20:59 +01:00
Asher Gomez 35fc6f3ab9
chore: use Deno.readTextFile() where appropriate (#22018) 2024-01-21 23:41:28 +01:00
Asher Gomez e58462dbb9
chore: use Deno.writeTextFile() where appropriate (#22008) 2024-01-21 21:58:24 +01:00
Divy Srivastava 1b9f0cb452
chore: add types for Deno.UnsafeWindowSurface (#22010) 2024-01-21 21:51:45 +01:00
Jérôme Benoit 99f9fa5556
fix(types): align global deno worker type with deno.worker/webworker one (#21936)
Transpiler doing type checking such as the ones used in dnt or bundler
fail because of incompatible Worker types if env like browser are
targeted.

Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
2024-01-18 22:42:04 +00:00
king8fisher 7d29eb0f63
docs(ns): add a notice on file order returned by readDir (#21953) 2024-01-16 13:57:06 +09:00
Bartek Iwańczuk 5143b9e7d3
feat(unstable): add Temporal API support (#21738)
This commit adds support for [Stage 3 Temporal API
proposal](https://tc39.es/proposal-temporal/docs/).

The API is available when `--unstable-temporal` flag is passed.

---------

Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: David Sherret <dsherret@gmail.com>
Co-authored-by: Kenta Moriuchi <moriken@kimamass.com>
2024-01-15 01:26:57 +01:00
Asher Gomez f46c03d6b4
chore: define removal version for Deno.metrics() (#21872)
Sets the removal version for `Deno.metrics()` to be v2.
2024-01-15 00:50:08 +01:00
Bartek Iwańczuk fc17ddbcc4
feat: Stabilize Deno.connect for 'unix' transport (#21937) 2024-01-14 21:50:58 +00:00
Asher Gomez 658b559657
chore: define removal version for Deno.run() (#21863)
This change sets the removal for `Deno.run()` in v2.
2024-01-14 22:25:23 +01:00
Bartek Iwańczuk a25055356c
feat: Deprecate 'Deno.serveHttp' API (#21874)
`Deno.serveHttp` is now deprecated. 

Users should migrate to `Deno.serve` API.
2024-01-14 22:17:50 +01:00
Bartek Iwańczuk 0d51c1f90e
feat: remove conditional unstable type-checking (#21825)
This commit removes conditional type-checking of unstable APIs.

Before this commit `deno check` (or any other type-checking command and
the LSP) would error out if there was an unstable API in the code, but not
`--unstable` flag provided.

This situation hinders DX and makes it harder to configure Deno. Failing
during runtime unless `--unstable` flag is provided is enough in this case.
2024-01-14 18:29:17 +01:00
Bartek Iwańczuk f3bb0a1a0e
feat: stabilize Deno.connectTls options and Deno.TlsConn.handshake (#21889) 2024-01-14 17:06:26 +00:00
Bartek Iwańczuk 7471587d29
feat: "rejectionhandled" Web event and "rejectionHandled" Node event (#21875)
This commit adds support for "rejectionhandled" Web Event and
"rejectionHandled" Node event.

```js
import process from "node:process";

process.on("rejectionHandled", (promise) => {
  console.log("rejectionHandled", reason, promise);
});

window.addEventListener("rejectionhandled", (event) => {
  console.log("rejectionhandled", event.reason, event.promise);
});
```

---------

Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-01-12 22:10:42 +00:00
David Sherret 70ac06138c
feat(unstable): fast subset type checking of JSR dependencies (#21873) 2024-01-10 22:40:30 +00:00
Nayeem Rahman 0234eb23dd
fix(lsp): implement host.getGlobalTypingsCacheLocation() (#21882) 2024-01-10 13:16:30 +00:00
cions 881a62869d
fix: android support (#19437)
<!--
Before submitting a PR, please read https://deno.com/manual/contributing

1. Give the PR a descriptive title.

  Examples of good title:
    - fix(std/http): Fix race condition in server
    - docs(console): Update docstrings
    - feat(doc): Handle nested reexports

  Examples of bad title:
    - fix #7123
    - update docs
    - fix bugs

2. Ensure there is a related issue and it is referenced in the PR text.
3. Ensure there are tests that cover the changes.
4. Ensure `cargo test` passes.
5. Ensure `./tools/format.js` passes without changing files.
6. Ensure `./tools/lint.js` passes.
7. Open as a draft PR if your work is still in progress. The CI won't
run
   all steps, but you can add '[ci]' to a commit message to force it to.
8. If you would like to run the benchmarks on the CI, add the 'ci-bench'
label.
-->

---------

Signed-off-by: Matt Mastracci <matthew@mastracci.com>
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2024-01-10 06:04:14 -07:00
Nayeem Rahman ee45d5bf8f
perf(lsp): use host-owned cache for auto-import completions (#21852) 2024-01-08 17:05:05 +00:00
Asher Gomez 1af0daa487
chore: define removal version in deprecated IO APIs (#21702)
This defines the removal version of v2 for the following APIs that
favour the Streams API:
* `Deno.copy()`
* `Deno.File`
* `Deno.iter()`
* `Deno.Buffer`
* `Deno.readAll()`
* `Deno.readAllSync()`
* `Deno.writeAll()`
* `Deno.writeAllSync()`
* `Deno.FsWatcher.return()`
2024-01-06 16:38:25 +01:00
Kitson Kelly 49d8320e45
fix(kv): improve .listenQueue types (#21781)
Fixes: #21780
2024-01-06 14:42:14 +01:00
林炳权 96b581bdd2
chore: update to Rust 1.75 (#21731) 2024-01-01 23:22:48 +01:00
David Sherret 7e72f3af61
chore: update copyright to 2024 (#21753) 2024-01-01 19:58:21 +00:00
Joel Walker 4740929950
fix: Object.groupBy return type should be a partial (#21680)
Signed-off-by: Joel Walker <joelwalker1995@gmail.com>
2023-12-30 00:41:40 +01:00
Nayeem Rahman 48dae2441c
perf(lsp): use LanguageServiceHost::getProjectVersion() (#21719) 2023-12-28 00:13:57 +00:00
Asher Gomez a3fc93a4cb
chore: deprecate Deno.Reader, Deno.ReaderSync, Deno.Writer, Deno.WriterSync and Deno.Closer (#21465)
This change deprecates `Deno.Reader`, `Deno.ReaderSync`, `Deno.Writer`,
`Deno.WriterSync` and `Deno.Closer` in favour of the [Web Streams
API](https://developer.mozilla.org/en-US/docs/Web/API/Streams_API).
After discussing with Yoshiya, we both thought now might be the right
time to deprecate these interfaces with v2 getting closer.
2023-12-13 10:55:39 -07:00
Heyang Zhou 10ab8c1ef1
feat(unstable): append commit versionstamp to key (#21556) 2023-12-14 00:58:20 +08:00
Igor Zinkovsky 86769b0d1c
feat(ext/kv) add backoffSchedule to enqueue (#21474)
Also reduces the time to run `kv_queue_undelivered_test.ts` test from
100 seconds down to 3 seconds.

closes #21437
2023-12-12 22:51:23 -08:00
Nayeem Rahman 7d88e48296
perf(lsp): use null types instead of stub modules (#21541) 2023-12-12 10:26:27 +00:00
Bartek Iwańczuk 7bf267c197
perf(lsp): simplify some of the startup code (#21538)
Remove some dead code in "99_main_compiler.js". Eagerly start the LSP
TSC host, it was adding some not needed complexity around the TSC thread code.
2023-12-11 16:59:09 +01:00
Leo Kettmeir 393abed387
feat: bring back WebGPU (#20812)
Signed-off-by: Leo Kettmeir <crowlkats@toaxl.com>
Co-authored-by: Kenta Moriuchi <moriken@kimamass.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-12-09 01:19:16 +01:00
David Sherret 68d356eed9
feat: TypeScript 5.3 (#21480)
https://github.com/denoland/TypeScript/pull/9
2023-12-06 18:49:34 -05:00
Bartek Iwańczuk a931a47511
feat: stabilize Deno.HttpServer.shutdown and Unix socket support (#21463)
This commit stabilizes "Deno.HttpServer.shutdown" API as well as
Unix socket support in "Deno.serve" API.

---------

Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>
2023-12-06 23:43:01 +00:00
Yusuke Tanaka dadd8b3d66
feat(ext/fetch): allow Deno.HttpClient to be declared with using (#21453)
This commit adds a method of `Symbol.dispose` to the object returned
from `Deno.createHttpClient`, so we can make use of [explicit resource
management](https://github.com/tc39/proposal-explicit-resource-management)
by declaring it with `using`.
2023-12-06 16:52:59 +09:00
David Sherret ce83a849a4
docs: fix description of FileInfo's mode property (#21366) 2023-12-05 10:23:19 -05:00
Luca Casonato 74e39a927c
feat(unstable): kv.watch() (#21147)
This commit adds support for a new `kv.watch()` method that allows
watching for changes to a key-value pair. This is useful for cases
where you want to be notified when a key-value pair changes, but
don't want to have to poll for changes.

---------

Co-authored-by: losfair <zhy20000919@hotmail.com>
2023-12-05 21:21:46 +08:00
Bartek Iwańczuk 39c7d8dafe
refactor: faster args for op_load in TSC (#21438)
This commit changes the argument that "op_load" accepts, from
a serde struct to "&str". This should equal to a slightly better
performance.
2023-12-03 02:07:04 +00:00
Nayeem Rahman 0f990d9d92
perf(lsp): fix redundant serialization of sources (#21435) 2023-12-02 23:28:46 +00:00
Asher Gomez d2b5254c33
chore: update std to 0.208.0 (#21318)
Re-attempt at #21284. I was more thorough this time.

---------

Signed-off-by: Asher Gomez <ashersaupingomez@gmail.com>
2023-12-02 03:20:06 +01:00
Bartek Iwańczuk ec0207e9b1
perf(lsp): better op performance logging (#21423) 2023-12-01 22:57:52 +01:00
Igor Zinkovsky 5f6181df4a
fix(cron): move deprecated Deno.cron overload (#21407)
Moving the deprecated `Deno.cron` overload to be the last one.
2023-11-30 15:52:48 -08:00
Raashid Anwar ab755a07d8
feat(cron): added the support for json type schedule to cron api (#21340)
Added the support for JSON type schedule to cron API; previously it was string only.
fixes #21122
2023-11-30 13:51:56 -08:00
Bartek Iwańczuk c803c0eaab
perf(lsp): remove throttling of cancellation token (#21395)
This commit removes "ThrottledCancellationToken" in favor of
"CancellationToken".

Since calling into Rust to check if Tokio's cancellation token has
already been canceled is really cheap, there's no need for us to 
throttle this check and let TSC burn up CPU with heavy computation.
2023-11-30 15:43:35 +00:00
Yusuke Tanaka 00e4c47890
fix(dts): Deno.ChildProcess actually implements AsyncDisposable (#21326)
What `Deno.ChildProcess` actually implements is `AsyncDisposable`, but the type
declaration says it's `Disposable`. This PR fixes the type declaration to match
the actual implementation.
2023-11-25 13:26:24 +09:00
Asher Gomez cc5d6df50b
docs: update Deno.* deprecation notices (#21283)
This PR updates the deprecation notices to point to the same replacement
APIs that the Standard Library points to. I've also tweaked the notices
to be a little more presentable/navigatable.

In particular, a follow-up PR in std will be made that documents the use
of `toArrayBuffer()`.

Closes #21193
Towards #20976
2023-11-22 03:20:27 +01:00
Jérôme Benoit 0205cff834
docs: typo fixlet in worker type comment (#21268) 2023-11-20 17:04:01 +05:30
Igor Zinkovsky b572abfcb3
feat(ext/cron) modify Deno.cron API to make handler arg last (#21225)
This PR changes the `Deno.cron` API:
* Marks the existing function as deprecated
* Introduces 2 new overloads, where the handler arg is always last:
```ts
Deno.cron(
  name: string,
  schedule: string,
  handler: () => Promise<void> | void,
)

Deno.cron(
  name: string,
  schedule: string,
  options?: { backoffSchedule?: number[]; signal?: AbortSignal },
  handler: () => Promise<void> | void,
)
```

This PR also fixes a bug, when other crons continue execution after one
of the crons was closed using `signal`.
2023-11-16 14:19:00 -08:00
David Sherret 9fed7b9caf
chore: remove duplicate esnext.dispoable (#21184) 2023-11-13 22:43:12 +01:00
btoo 09dc5f36d9
fix small Deno.createHttpClient typo in lib.deno.unstable.d.ts (#21115) 2023-11-08 19:34:57 -07:00
Luca Casonato 777c142d39
docs: improve some JSDoc (#20841)
Minor improvements to the documentation for https://deno.com/api
2023-11-07 00:35:22 +00:00
Jesse Jackson 68a964346d
fix(core/types): Promise.withResolvers: Unmark callback param as optional (#21085)
See discussion on merged commit:
1d19b1011b (r131604700)

Signed-off-by: Jesse Jackson <jsejcksn@users.noreply.github.com>
2023-11-05 23:40:56 +01:00
Matt Mastracci 485fade0b6
chore: migrate to new deno_core and metrics (#21057)
- Uses the new OpMetrics system for sync and async calls
- Partial revert of #21048 as we moved Array.fromAsync upstream to
deno_core
2023-11-05 14:27:36 -07:00
Igor Zinkovsky 1097de3e1d
fix(cron): update Deno.cron doc example (#21078)
Signed-off-by: Igor Zinkovsky <igor@deno.com>
2023-11-04 14:04:13 -07:00
Bartek Iwańczuk 621440017a
chore: Add 'jupyter' category for Deno.jupyter APIs (#21061) 2023-11-02 22:43:02 +00:00
Asher Gomez d7348c870a
fix: add missing Object.groupBy() and Map.groupBy() types (#21050) 2023-11-01 23:18:41 +00:00
Bartek Iwańczuk ab72019a17
feat: enable Array.fromAsync (#21048) 2023-11-01 22:25:18 +00:00
Bartek Iwańczuk 587f2e0800
feat: precompile JSX (#20962)
Co-authored-by: Marvin Hagemeister <marvin@deno.com>
2023-11-01 20:30:23 +00:00
Luca Casonato d42f154312
feat: disposable Deno resources (#20845)
This commit implements Symbol.dispose and Symbol.asyncDispose for
the relevant resources.

Closes #20839

---------

Signed-off-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-11-01 20:26:12 +01:00
Bartek Iwańczuk 1d19b1011b
chore: upgrade deno_core (#21036)
Updated to deno_core 0.224.0 and V8 12.0.

---------

Co-authored-by: Aapo Alasuutari <aapo.alasuutari@gmail.com>
2023-11-01 20:25:09 +01:00
Igor Zinkovsky 01d3e0f317
feat(cron) implement Deno.cron() (#21019)
This PR adds unstable `Deno.cron` API to trigger execution of cron jobs.

* State: All cron state is in memory. Cron jobs are scheduled according
to the cron schedule expression and the current time. No state is
persisted to disk.
* Time zone: Cron expressions specify time in UTC.
* Overlapping executions: not permitted. If the next scheduled execution
time occurs while the same cron job is still executing, the scheduled
execution is skipped.
* Retries: failed jobs are automatically retried until they succeed or
until retry threshold is reached. Retry policy can be optionally
specified using `options.backoffSchedule`.
2023-11-01 11:57:55 -07:00
Bartek Iwańczuk e7abb705f9
Revert "chore: update deno_std submodule (#20994)" (#21001)
This reverts commit 6e2abb2b13.
2023-10-28 01:24:37 +00:00
Bartek Iwańczuk 6e2abb2b13
chore: update deno_std submodule (#20994) 2023-10-27 10:34:30 -04:00
Luca Casonato 9a97edce05
feat: rename Deno.Server to Deno.HttpServer (#20842)
Keeps the old name around for backwards compat.

Closes #20840
2023-10-27 14:35:31 +02:00
Jérôme Benoit 9df36b33c6
docs(event): fixlets to code comments (#20944) 2023-10-23 14:34:37 +02:00
Kyle Kelley 48e695a2c8
feat(unstable): add Deno.jupyter.display API (#20819)
This brings in [`display`](https://github.com/rgbkrk/display.js) as part
of the `Deno.jupyter` namespace. 

Additionally these APIs were added:
- "Deno.jupyter.md"
- "Deno.jupyter.html"
- "Deno.jupyter.svg"
- "Deno.jupyter.format"

These APIs greatly extend capabilities of rendering output in Jupyter
notebooks.

---------

Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
2023-10-12 22:32:38 +00:00
Bartek Iwańczuk c464cd7073
refactor: FeatureChecker integration in ext/ crates (#20797)
Towards https://github.com/denoland/deno/issues/20779.
2023-10-12 15:55:50 +00:00
Leo Kettmeir 8ba1242a05
feat(WebSocketStream): rename connection to opened (#20878) 2023-10-11 07:31:05 +02:00
Bartek Iwańczuk dfc254cd57
fix: define window.name (#20804)
Closes https://github.com/denoland/deno/issues/20750

This matches what browsers do:
https://developer.mozilla.org/en-US/docs/Web/API/Window/name

In the future we might want to change the behavior to actually update
the process name, but that needs a bit of discussion regarding if
it needs a permission flag (that would make polyfiling `process.title`
setter really easy too).
2023-10-08 22:12:59 +00:00
Bartek Iwańczuk d41d3b8e2f
refactor: migrate last tsc op to op2 macro (#20816) 2023-10-08 21:00:41 +02:00
David Sherret 820e93e3e7
refactor(npm): add referrer when resolving npm package sub path from deno module (#20800)
Adds a `referrer` parameter to this function instead of using a fake
one.
2023-10-05 20:18:29 +00:00
Asher Gomez fd4fc2d818
docs: update alternative APIs for write(), writeSync(), read() and readSync() (#20792)
Closes #20701
2023-10-05 10:44:37 +02:00
Trevor Manz 9a46a824bd
feat(jupyter): send binary data with Deno.jupyter.broadcast (#20755)
Adds `buffers` to the `Deno.jupyter.broadcast` API to send binary data
via comms. This affords the ability to send binary data via websockets
to the jupyter widget frontend.
2023-10-04 13:05:20 +02:00
Yoshiya Hinosawa da0b945804
feat(unstable): add unix domain socket support to Deno.serve (#20759) 2023-10-04 11:37:39 +09:00
David Sherret 8c1677ecbc
refactor(npm): break up NpmModuleLoader and move more methods into the managed CliNpmResolver (#20777)
Part of https://github.com/denoland/deno/issues/18967
2023-10-03 19:05:06 -04:00
Nayeem Rahman 6fd2d08418
refactor(lsp): clean up tsc requests (#20743) 2023-10-02 07:32:05 +01:00
Trevor Manz 7bcf1211a1
feat(jupyter): send Jupyter messaging metadata with Deno.jupyter.broadcast (#20714)
Exposes
[`metadata`](https://jupyter-client.readthedocs.io/en/latest/messaging.html#metadata)
to the `Deno.jupyter.broadcast` API.

```js
await Deno.jupyter.broadcast(msgType, content, metadata);
```

The metadata is required for
[`"comm_open"`](https://github.com/jupyter-widgets/ipywidgets/blob/main/packages/schema/messages.md#instantiating-a-widget-object-1)
for with `jupyter.widget` target.
2023-09-30 00:24:09 +02:00
David Sherret 5edd102f3f
refactor(cli): make CliNpmResolver a trait (#20732)
This makes `CliNpmResolver` a trait. The terminology used is:

- **managed** - Deno manages the node_modules folder and does an
auto-install (ex. `ManagedCliNpmResolver`)
- **byonm** - "Bring your own node_modules" (ex. `ByonmCliNpmResolver`,
which is in this PR, but unimplemented at the moment)

Part of #18967
2023-09-29 09:26:25 -04:00
David Sherret d43e48c4e9
refactor(ext/node): remove dependency on deno_npm and deno_semver (#20718)
This is required from BYONM (bring your own node_modules).

Part of #18967
2023-09-28 22:43:45 +02:00
Bartek Iwańczuk 46a4bd5178
feat(unstable): add Deno.jupyter.broadcast API (#20656)
Closes https://github.com/denoland/deno/issues/20591

---------

Co-authored-by: Kyle Kelley <rgbkrk@gmail.com>
2023-09-27 02:21:06 +02:00