Skip to content

Conversation

@ascorbic
Copy link
Contributor

@ascorbic ascorbic commented May 21, 2025

Changes

Ponyfills import.meta.resolve, because it's behind a flag in Node.js 20.3-20.5. The import-meta-resolve package is already a dep of @astrojs/markdown-remark. We can't use it at runtime because of node builtins, so we split it into different functions, where the runtime one doesn't resolve the name and we import it directly. It's only important at build time, as it allows us to bundle the driver.

Fixes #13800

Testing

Session tests pass. Tested with Node 20.4

Docs

@changeset-bot
Copy link

changeset-bot bot commented May 21, 2025

🦋 Changeset detected

Latest commit: 6fa15d6

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added the pkg: astro Related to the core `astro` package (scope) label May 21, 2025
@codspeed-hq
Copy link

codspeed-hq bot commented May 21, 2025

CodSpeed Performance Report

Merging #13833 will not alter performance

Comparing import-meta-resolve (6fa15d6) with main (85b19d8)

Summary

✅ 6 untouched benchmarks

@ematipico
Copy link
Member

Ouch, it seems that edge middleware tests are failing

@ascorbic ascorbic merged commit 5a6d2ae into main May 21, 2025
17 checks passed
@ascorbic ascorbic deleted the import-meta-resolve branch May 21, 2025 15:54
@astrobot-houston astrobot-houston mentioned this pull request May 21, 2025
openscript pushed a commit to openscript/astro that referenced this pull request Sep 12, 2025
* fix: polyfill import.meta.resolve

* Don't resolve at runtime

* Linit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: astro Related to the core `astro` package (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Session driver “memory” fails to initialize on Node v20.4.0 (“module did not export a driver”)

3 participants