Support dynamic import under NodeJS
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- javascript, nodejs
- 領域
- tooling
調査の方向性
まず、vm.Script がどこで構築されるか、そして nodeInstrumenter オプションがその経路にどのような影響を与えるかを追跡します。アプローチを選ぶ前に、Node の importModuleDynamically API とリンクされている Node issue を確認してください。完了の条件は、nodeInstrumenter のサポートを削除せずに、ESM ではない NodeJS コンテキストで動的 import が機能することです。
索引モデルが issue の本文から書いたものです。
説明
In a non-ESM context normally import() can be used to bring in ESM code. Under this loader this will be true for browsers, but not NodeJS which does not include an implementation by default for scripts constructed with vm.Script.
Downstream this complicates extension development in VSCode as it means ESM packages can only be used if first transformed into a compatible syntax (usually by a bundler). Note that the extension development host appears to load extensions without using this loader, so such dynamic import restrictions will not be seen there.
At present, I can see 2 paths towards supporting dynamic import.
- Supply a callback via the
importModuleDynamicallyoption (this API and those which may be needed for the implementation are marked experimental, it may be worth waiting on https://github.com/nodejs/node/issues/37648) Forfeit thenodeInstrumenteroption so the implementation can be simplified to justrequire(by far easiest and not blocked by experimental API, but will be a breaking change)
EDIT 2023-03-13: On closer inspection, it appears I read the codepath wrong. This is not an option.
Downstream issue: https://github.com/microsoft/vscode/issues/130367
- 主要言語
- JavaScript
- スター
- 181
- フォーク
- 62
- 平均マージ
- 2日 5時間
- マージ済み PR(30日)
- 1
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
microsoft/vscode-loader のほかの issue
-
Support ES6 Modulesオープンfeature-request
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
microsoft/vscode-loader#56 · コメント 10 件 · リアクション 35 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 45/100
microsoft/vscode-loader#44 ·
-
String format should check number of args against placeholders to detect mismatches再び着手できるかも @TylerLeonhardt が 1886 日前に担当しましたが、オープン中のプルリクエストはありません。 オープンenhancement
microsoft/vscode-loader#31 · コメント 3 件 · 担当者 1 名 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 42/100
microsoft/vscode-loader#28 ·
-
Bugオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 42/100
microsoft/vscode-loader#21 ·
microsoft/vscode-loader の issue をすべて見る
似ている issue
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
melodic-software/claude-code-plugins#9619 ·
メンテナーはふだん 1 日以内に返信
-
bug Frontend P2-medium UI UX
難易度 1/5 1時間未満 初心者へのやさしさ 76/100
Deepak3699/Ai_Mentor#427 ·
メンテナーはふだん 1 日以内に返信
-
area: core
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
venn: a name that starts with set-, union-, text- or style- followed by a letter is a parse errorオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
obsidianmd/pele#65 ·
メンテナーはふだん 3 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
11ty/buildawesome#4407 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信