Title: Provide built-in implementations of module linker, initializeImportMeta, importModuleDynamically · Issue #31234 · nodejs/node · GitHub
Open Graph Title: Provide built-in implementations of module linker, initializeImportMeta, importModuleDynamically · Issue #31234 · nodejs/node
X Title: Provide built-in implementations of module linker, initializeImportMeta, importModuleDynamically · Issue #31234 · nodejs/node
Description: Is your feature request related to a problem? Please describe. When using vm.SourceTextModule we have to implement a linker, initializeImportMeta, and importModuleDynamically, even if we just want the default behavior of built-in module ...
Open Graph Description: Is your feature request related to a problem? Please describe. When using vm.SourceTextModule we have to implement a linker, initializeImportMeta, and importModuleDynamically, even if we just want ...
X Description: Is your feature request related to a problem? Please describe. When using vm.SourceTextModule we have to implement a linker, initializeImportMeta, and importModuleDynamically, even if we just want ...
Opengraph URL: https://github.com/nodejs/node/issues/31234
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Provide built-in implementations of module linker, initializeImportMeta, importModuleDynamically","articleBody":"**Is your feature request related to a problem? Please describe.**\r\n\r\nWhen using vm.SourceTextModule we have to implement a linker, initializeImportMeta, and importModuleDynamically, even if we just want the default behavior of built-in module support. There are many subtle ways to get that wrong.\r\n\r\n**Describe the solution you'd like**\r\n\r\nDefault implementations that do basically what built-in module support does:\r\n- A linker function that:\r\n - Reads files from disk, within a specified root.\r\n - Uses Node module resolution as implemented for modules\r\n - Uses a specified module cache\r\n - `initializeImportMeta` that sets `url` property\r\n - By configuration, allows access to built-in modules.\r\n\r\n**Describe alternatives you've considered**\r\n\r\nUserland libraries can take the first cuts at easy-to-use vm.Modules, but I think something for common use cases should likely be included.\r\n\r\n","author":{"url":"https://github.com/justinfagnani","@type":"Person","name":"justinfagnani"},"datePublished":"2020-01-07T00:08:16.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":11},"url":"https://github.com/31234/node/issues/31234"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b224b33c-966b-f79d-2954-82da62fefbce |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ABE2:78281:2238D87:3191F88:6A4D10A2 |
| html-safe-nonce | ca585207c1dcbe937e14561e34f903454a5069b21ddbfef46c3212135a65155e |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQkUyOjc4MjgxOjIyMzhEODc6MzE5MUY4ODo2QTREMTBBMiIsInZpc2l0b3JfaWQiOiIzMjQzNjYyNDUxNjU3MjE2MTYyIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 4d84750f0629622f578d73ef3c2d730a353de1bcc4cc184ca379529d5766a9ea |
| hovercard-subject-tag | issue:546005120 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/nodejs/node/31234/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2dc776e82108b2b553cecbd4ea71af847d3037e2b4ce187e42a3837ff8f5848b/nodejs/node/issues/31234 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2dc776e82108b2b553cecbd4ea71af847d3037e2b4ce187e42a3837ff8f5848b/nodejs/node/issues/31234 |
| og:image:alt | Is your feature request related to a problem? Please describe. When using vm.SourceTextModule we have to implement a linker, initializeImportMeta, and importModuleDynamically, even if we just want ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | justinfagnani |
| hostname | github.com |
| expected-hostname | github.com |
| None | bcb4661e6fb4fe8b394c51ea02ccdb2236d40dc59afc75a3bbba50bf6517134c |
| turbo-cache-control | no-preview |
| go-import | github.com/nodejs/node git https://github.com/nodejs/node.git |
| octolytics-dimension-user_id | 9950313 |
| octolytics-dimension-user_login | nodejs |
| octolytics-dimension-repository_id | 27193779 |
| octolytics-dimension-repository_nwo | nodejs/node |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 27193779 |
| octolytics-dimension-repository_network_root_nwo | nodejs/node |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | fb70bd3c4b2bec429781b65419e912c66e2d5581 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width