-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AsyncLocalStorage not working with dynamic imports #25275
Comments
I think #25140 should fix this. |
That is a nice improvement! Unfortunately I do not think that fixes this particular issue though 🥲 I rebased that PR on deno_core 0.307.0 and added this test case to Deno.test(async function worksWithDynamicImports() {
const store = new AsyncLocalStorage();
(globalThis as any).alsDynamicImport = () => store.getStore();
const dataUrl =
`data:application/javascript,export const data = alsDynamicImport()`;
await store.run("data", async () => {
const { data } = await import(dataUrl);
assertEquals(data, "data");
});
}); and it fails:
|
devsnek
added a commit
to denoland/deno_core
that referenced
this issue
Sep 10, 2024
Fix for denoland/deno#25275 This code is like hacks on top of hacks, but basically save & restore cped in the dynamic import flow.
devsnek
added a commit
that referenced
this issue
Sep 12, 2024
Fixes: #25275 Signed-off-by: snek <snek@deno.com>
kuruk-mm
pushed a commit
to dclexplorer/deno_core
that referenced
this issue
Oct 11, 2024
Fix for denoland/deno#25275 This code is like hacks on top of hacks, but basically save & restore cped in the dynamic import flow.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version: Deno 1.46.1
AsyncLocalStorage
does not seem to work inside of a dynamic import in Deno, but it does in Node:als.mjs
dynamic.mjs
not working in deno
working in node
The text was updated successfully, but these errors were encountered: