summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/async_hooks.ts
AgeCommit message (Collapse)Author
2024-09-12feat(ext/node): export missing symbols from domain, puncode, repl, tls (#25585)Bartek Iwańczuk
2024-08-29fix: reland async context (#25140)snek
This reverts commit 71ca61e189cca9215982ce4598b7a4da8430c584. Now uses a shared implementation from deno_core.
2024-08-02Revert "feat: async context" (#24856)snek
Reverts denoland/deno#24402 deno_web can't depend on code in runtime
2024-08-02feat: async context (#24402)snek
We are switching to ContinuationPreservedEmbedderData. This allows adding async context tracking to the various async operations that deno provides. Fixes: https://github.com/denoland/deno/issues/7010 Fixes: https://github.com/denoland/deno/issues/22886 Fixes: https://github.com/denoland/deno/issues/24368
2024-05-15fix(node): stub `AsyncResource.emitDestroy()` (#23802)Marvin Hagemeister
<!-- Before submitting a PR, please read https://docs.deno.com/runtime/manual/references/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. --> Fixes https://github.com/denoland/deno/issues/23397
2024-04-15fix(ext/node): add stub for AsyncResource#asyncId() (#23372)Divy Srivastava
Ref https://github.com/denoland/deno/issues/23263
2024-04-02feat: improve AsyncLocalStorage api (#23175)Alex Yang
Fixes: https://github.com/denoland/deno/issues/23174
2024-03-06fix(node): implement ALS enterWith (#22740)Divy Srivastava
Fixes https://github.com/denoland/deno/issues/18127 https://github.com/denoland/deno/issues/17248 SvelteKit works now! ``` $ deno run -A npm:create-svelte@latest my-app create-svelte version 6.0.9 ┌ Welcome to SvelteKit! │ ◇ Which Svelte app template? │ SvelteKit demo app │ ◇ Add type checking with TypeScript? │ Yes, using JavaScript with JSDoc comments │ ◇ Select additional options (use arrow keys/space bar) │ none │ └ Your project is ready! ✔ Type-checked JavaScript https://www.typescriptlang.org/tsconfig#checkJs Install community-maintained integrations: https://github.com/svelte-add/svelte-add Next steps: 1: cd my-app 2: npm install 3: git init && git add -A && git commit -m "Initial commit" (optional) 4: npm run dev -- --open To close the dev server, hit Ctrl-C Stuck? Visit us at https://svelte.dev/chat $ cd my-app/ $ deno task dev Task dev vite dev VITE v5.1.4 ready in 1632 ms ➜ Local: http://localhost:5173/ ➜ Network: use --host to expose ➜ press h + enter to show help ```
2024-01-29refactor: migrate 'ext/node' extension to virtual ops module (#22157)Bartek Iwańczuk
Follow up to https://github.com/denoland/deno/pull/22135
2024-01-23refactor: port more ops to `ensureFastOps()` (#22046)Asher Gomez
2024-01-01chore: update copyright to 2024 (#21753)David Sherret
2023-08-10fix(node/async_hooks): don't pop async context frame if stack if empty (#20077)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/20076
2023-07-06perf(node/async_hooks): optimize AsyncLocalStorage (#19729)Bartek Iwańczuk
This makes the implementation of "AsyncLocalStorage" from "node:async_hooks" 3.5x faster than before for noop benchmark (measuring baseline overhead). It's still 3.5x slower than not using `AsyncLocalStorage` and 1.64x slower than using noop promise hooks.
2023-06-27chore(ext/node): disable prefer-primordials on a per-file basis (#19553)Kenta Moriuchi
2023-04-20refactor(ext/node): remove polyfills/_core.ts (#18766)Yoshiya Hinosawa
2023-03-17chore: add tests for node:async_hooks (#18004)Bartek Iwańczuk
Closes https://github.com/denoland/deno/issues/17878 --------- Co-authored-by: crowlkats <crowlkats@toaxl.com>
2023-03-08refactor: rename InternalModuleLoader to ExtModuleLoader, use ext: scheme ↵Bartek Iwańczuk
for snapshotted modules (#18041) This commit renames "deno_core::InternalModuleLoader" to "ExtModuleLoader" and changes the specifiers used by the modules loaded from this loader to "ext:". "internal:" scheme was really ambiguous and it's more characters than "ext:", which should result in slightly smaller snapshot size. Closes https://github.com/denoland/deno/issues/18020
2023-03-05refactor(core): include_js_files! 'dir' option doesn't change specifiers ↵Bartek Iwańczuk
(#18019) This commit changes "include_js_files!" macro from "deno_core" in a way that "dir" option doesn't cause specifiers to be rewritten to include it. Example: ``` include_js_files! { dir "js", "hello.js", } ``` The above definition required embedders to use: `import ... from "internal:<ext_name>/js/hello.js"`. But with this change, the "js" directory in which the files are stored is an implementation detail, which for embedders results in: `import ... from "internal:<ext_name>/hello.js"`. The directory the files are stored in, is an implementation detail and in some cases might result in a significant size difference for the snapshot. As an example, in "deno_node" extension, we store the source code in "polyfills" directory; which resulted in each specifier to look like "internal:deno_node/polyfills/<module_name>", but with this change it's "internal:deno_node/<module_name>". Given that "deno_node" has over 100 files, many of them having several import specifiers to the same extension, this change removes 10 characters from each import specifier.
2023-02-14feat(ext/node): embed std/node into the snapshot (#17724)Bartek Iwańczuk
This commit moves "deno_std/node" in "ext/node" crate. The code is transpiled and snapshotted during the build process. During the first pass a minimal amount of work was done to create the snapshot, a lot of code in "ext/node" depends on presence of "Deno" global. This code will be gradually fixed in the follow up PRs to migrate it to import relevant APIs from "internal:" modules. Currently the code from snapshot is not used in any way, and all Node/npm compatibility still uses code from "https://deno.land/std/node" (or from the location specified by "DENO_NODE_COMPAT_URL"). This will also be handled in a follow up PRs. --------- Co-authored-by: crowlkats <crowlkats@toaxl.com> Co-authored-by: Divy Srivastava <dj.srivastava23@gmail.com> Co-authored-by: Yoshiya Hinosawa <stibium121@gmail.com>