summaryrefslogtreecommitdiff
path: root/ext/cache/lib.rs
AgeCommit message (Collapse)Author
2024-11-08fix(ext/cache): don't panic when creating cache (#26780)Divy Srivastava
2024-10-17refactor(ext/net): use concrete error type (#26227)Leo Kettmeir
2024-10-12refactor(ext/cache): use concrete error type (#26109)Leo Kettmeir
2024-09-04refactor(ext): align error messages (#25310)Ian Bull
2024-06-12fix: don't panic when cache is not available (#24175)Luca Casonato
Fixes #22144
2024-01-15chore(ext/cache): remove CachePutResource in preparation for resource ↵Matt Mastracci
rewrite (#21949) We can use `resourceForReadableStream` to ensure that cached resources are implemented more efficiently and remove one more resource special case.
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-09-23refactor: rewrite ops using i64/usize to op2 (#20647)Bartek Iwańczuk
2023-09-19refactor: rewrite BC, cache exts to op2 (#20486)Bartek Iwańczuk
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
2023-08-09refactor(ext/cache): Remove custom shutdown and use fast async ops (#20107)Matt Mastracci
The original implementation of `Cache` used a custom `shutdown` method on the resource, but to simplify fast streams work we're going to move this to an op of its own. While we're in here, we're going to replace `opAsync` with `ensureFastOps`. `op2` work will have to wait because of some limitations to our async support, however.
2023-03-17perf(core) Reduce copying and cloning in extension initialization (#18252)Matt Mastracci
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`
2023-03-17feat(core) deno_core::extension! macro to simplify extension registration ↵Matt Mastracci
(#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>
2023-03-09refactor: Split extension registration for runtime and snapshotting (#18095)Bartek Iwańczuk
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
2023-03-09refactor(core): Extension::builder_with_deps (#18093)Bartek Iwańczuk
Prerequisite for https://github.com/denoland/deno/pull/18080
2023-03-07refactor(core): don't use Result in ExtensionBuilder::state (#18066)Bartek Iwańczuk
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.
2023-02-07 refactor: remove prefix from include_js_files & use extension name (#17683)Leo Kettmeir
2023-02-07refactor: Use ES modules for internal runtime code (#17648)Leo Kettmeir
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>
2023-02-05 refactor: rename `deno` specifiers to `internal` (#17655)Leo Kettmeir
2023-01-15refactor: clean up `unwrap` and `clone` (#17282)Yiyu Lin
Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com>
2023-01-08feat(core): allow specifying name and dependencies of an Extension (#17301)Leo Kettmeir
2023-01-02chore: update copyright year to 2023 (#17247)David Sherret
Yearly tradition of creating extra noise in git.
2022-10-03chore(ext/cache): make helper functions public (#16117)Satya Rohith
2022-09-28feat: implement Web Cache API (#15829)Satya Rohith