aws / aws/aws-lambda-nodejs-runtime-interface-client
Imports and requires may not be using Node Loaders/Registration for ESM
- 主要語言
- TypeScript
- 星號
- 224
- 分支
- 60
- PR 合併指標
- 30 天內沒有已合併 PR
描述
The Yarn PNP mechanism uses loaders and/or registration for CJS and ESM support.
Presently using `-r .pnp.cjs` works appropriately in AWS SAM but using `--loader` runs into a host of issues as detailed in:
https://github.com/yarnpkg/berry/issues/6604
I'm not clear why the two are not working together, as they work in other contexts - but in the AWS SAM `index.mjs` it seems that the tryRequire path goes through a route where `pnp.setup();` is unable to monkey patch calls once it is working within the CJS loader by route of the ESM loader.
貢獻指南
研究方向
從 issue 中描述的 AWS SAM index.mjs 路徑開始,重點嘗試 tryRequire 和對 pnp.setup() 的呼叫,然後比較使用 -r .pnp.cjs 與 --loader 時的行為。查看連結的 Yarn issue,並重現 CJS 和 ESM 的情況;當 imports 和 requires 在 AWS SAM 與 Yarn PnP 下能夠協同運作時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- aws, node.js, typescript
- 領域
- backend, cloud
- Issue 類型
- 缺陷
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 需要釐清
- 新手友好度
- 28/100