browserify / browserify/static-module
Transform which ran with v1 not working with v3
- 主要言語
- JavaScript
- スター
- 75
- フォーク
- 22
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
Hi! [cwise](https://github.com/scijs/cwise) has had some long-running issues/PRs to upgrade its usage of static-module and get rid of some security warnings, but it seems that the particular usage static-module is no longer functioning under static-module 3.*.
The [cwise transform](https://github.com/scijs/cwise/blob/master/lib/cwise-transform.js) finds references to `var cwise = require('cwise'); cwise({...})` and replaces them with evaluated code.
I'm guessing a bit, but it seems like maybe the usage as a bare function require as opposed to properties on the require (i.e. `require('cwise')(...)` as opposed to `require('fs).readFileSync(...)`) are not working.
FWIW, the transform has not changed and so _does_ still function and get triggered correctly.
I've detailed a test case [here](https://github.com/scijs/cwise/pull/25#issuecomment-442942342).
Glad to debug a bit further, but I'd thought I'd check to see if this might just need a small API usage update instead of involved debugging. Thanks!
/cc @archmoj @etpinard
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
調査の方向性
lib/cwise-transform.js と cwise pull request #25 で説明されているテストケースから始め、static-module 3 で transform が裸の関数 require をどのように扱うかを比較します。transform が引き続き発動するかを確認し、関連する static-module API の動作を特定します。リンクされた cwise のケースが static-module 3 でセキュリティ警告なしに動作すれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- javascript
- 領域
- tooling
- issue の種類
- バグ
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100