Skip to content

fix: node 22 module filename resolution in win32 (#49) by @faulpeltz#49

Merged
robertsLando merged 1 commit into
yao-pkg:mainfrom
faulpeltz:main
Sep 24, 2024
Merged

fix: node 22 module filename resolution in win32 (#49) by @faulpeltz#49
robertsLando merged 1 commit into
yao-pkg:mainfrom
faulpeltz:main

Conversation

@faulpeltz

@faulpeltz faulpeltz commented Sep 24, 2024

Copy link
Copy Markdown

Fixes the workaround when loading modules to not use the C++ API.
The original code here uses toNamespacedPath() which converts win32 paths to "\\?\C:\snapshot\foo.js" which the snapshot fs cannot resolve -> use original path instead

@robertsLando robertsLando changed the title fix: Node 22 module filename resolution in win32 fix: node 22 module filename resolution in win32 Sep 24, 2024

@robertsLando robertsLando left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @faulpeltz !

@robertsLando robertsLando changed the title fix: node 22 module filename resolution in win32 fix: node 22 module filename resolution in win32 (#49) by @faulpeltz Sep 24, 2024
@robertsLando robertsLando merged commit e436d74 into yao-pkg:main Sep 24, 2024
@robertsLando

Copy link
Copy Markdown
Member

@faulpeltz Unfortunately we need to wait a new nodejs 22 release in order to test this as I have no way with current workflows to force build a specific version, I need to implement this

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants