Age | Commit message (Collapse) | Author |
|
Follow-up to #18210:
* we are passing the generated `cfg` object into the state function
rather than passing individual config fields
* reduce cloning dramatically by making the state_fn `FnOnce`
* `take` for `ExtensionBuilder` to avoid more unnecessary copies
* renamed `config` to `options`
|
|
(#18210)
This implements two macros to simplify extension registration and centralize a lot of the boilerplate as a base for future improvements:
* `deno_core::ops!` registers a block of `#[op]`s, optionally with type
parameters, useful for places where we share lists of ops
* `deno_core::extension!` is used to register an extension, and creates
two methods that can be used at runtime/snapshot generation time:
`init_ops` and `init_ops_and_esm`.
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
This commit splits "<ext_name>::init" functions into "init_ops" and
"init_ops_and_esm". That way we don't have to construct list of
ESM sources on each startup if we're running with a snapshot.
In a follow up commit "deno_core" will be changed to not have a split
between "extensions" and "extensions_with_js" - it will be embedders'
responsibility to pass appropriately configured extensions.
Prerequisite for https://github.com/denoland/deno/pull/18080
|
|
Prerequisite for https://github.com/denoland/deno/pull/18080
|
|
There's no point for this API to expect result. If something fails it should
result in a panic during build time to signal to embedder that setup is
wrong.
|
|
|
|
This PR refactors all internal js files (except core) to be written as
ES modules.
`__bootstrap`has been mostly replaced with static imports in form in
`internal:[path to file from repo root]`.
To specify if files are ESM, an `esm` method has been added to
`Extension`, similar to the `js` method.
A new ModuleLoader called `InternalModuleLoader` has been added to
enable the loading of internal specifiers, which is used in all
situations except when a snapshot is only loaded, and not a new one is
created from it.
---------
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
|
|
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
This reverts commit 36307c45
|
|
|
|
Yearly tradition of creating extra noise in git.
|
|
Reverts denoland/deno#16743
This fixes the server hangs we were seeing in benchy. cc @billywhizz
|
|
This reverts commit d76014192dbfd134794a6129e73f38645d7e6314.
|
|
Closes https://github.com/denoland/deno/issues/16450
|
|
Fixes #16450
|
|
Towards https://github.com/denoland/deno/issues/16315
|
|
Towards #16315
|
|
stream (#16004)
|
|
Co-authored-by: Leo Kettmeir <crowlkats@toaxl.com>
|
|
|
|
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Ben Noordhuis <info@bnoordhuis.nl>
Co-authored-by: crowlkats <crowlkats@toaxl.com>
Co-authored-by: Ryan Dahl <ry@tinyclouds.org>
|
|
|
|
|
|
|
|
This reverts commit 4e3ed37037a2aa1edeac260dc3463a81d9cf9b88.
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
|
|
Also cleanup & drop ignored wildcard op-args
|
|
Co-authored-by: Aaron O'Mullan <aaron.omullan@gmail.com>
|
|
|
|
|
|
Co-authored-by: Erfan Safari <erfanshield@outlook.com>
|
|
WebSocket (#13172)
|
|
|
|
|
|
Co-authored-by: Bartek Iwańczuk <biwanczuk@gmail.com>
Co-authored-by: Bert Belder <bertbelder@gmail.com>
|
|
also move create_http_client to deno_fetch
|
|
Fix a bad resource ID error when aborting a WebSocketStream immediately
after its creation.
|
|
Fixes: #12193
Fixes: #12251
Closes: #12714
|
|
(#12704)
This reverts commit 5b1e537446454f6332de44adbeb6a15ff072c2fa.
|
|
Fixes: #12193
|
|
|
|
|
|
These are confusing. They say they are "for users that don't care about
permissions", but that isn't correct. `NoTimersPermissions` disables
permissions instead of enabling them.
I would argue that implementors should decide what permissions they want
themselves, and not take our opinionated permissions struct.
|
|
This adds support for using in memory CA certificates for
`Deno.startTLS`, `Deno.connectTLS` and `Deno.createHttpClient`.
`certFile` is deprecated in `startTls` and `connectTls`, and removed
from `Deno.createHttpClient`.
|
|
Default to None if UnsafelyIgnoreCertificateErrors is not present in the
OpState.
Embedders may not have a need for restricting outgoing TLS connections
and having them hunt through the source code for the magic incantation
that makes the borrow panics go away, is less user friendly.
|
|
* refactor(ops): return BadResource errors in ResourceTable calls
Instead of relying on callers to map Options to Results via `.ok_or_else(bad_resource_id)` at over 176 different call sites ...
|
|
|