-
Notifications
You must be signed in to change notification settings - Fork 311
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: インポート一覧をチェックするように #2513
feat: インポート一覧をチェックするように #2513
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 3 out of 4 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- package.json: Language not supported
🚀 プレビュー用ページを作成しました 🚀 更新時点でのコミットハッシュ: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whyがわからなくなってるかもです・・・!
まずこのPRの意図としては、pnpm
とelectron-builder
を組み合わせるとバンドルがうまく行かないことがあり、その条件に当てはまるものをチェックするため・・・とかですよね!
で、この意図はコードとして書かれないので、なぜ存在してどういうときにコードを消せるのかわからなくなってるかもです。
どうするのが良さそうでしょうか? 👀
(いろいろ解決策を考えましたが、あえてオープンに聞いてみてます)
あー、Issue URLをdoc commentに書くとかですかね? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
すみません遅くなりました!
ほぼLGTMです!!
ちなみになのですが、今viteでチェックしてるけど、別途CIでチェックに変えられたりしないですかね・・・?
というのもこれだとelectronが実行されるたびに実行されちゃうんだよなーと。
(eslintとかもvite使うたびに実行されるのでなんとかしたい気持ち)
allowedInTryCatchModules?: string[]; | ||
list?: boolean; | ||
}; | ||
export function checkSuspiciousImports( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(判断コメント)
このファイルのコードは相当文脈が深く、何やってるか雰囲気はわかるけどぶっちゃけメンテは大変そうな気がしています。
特にacornライブラリを使う周りが専門知識。(どうしようもない)
なのでこのコードのメンテは @sevenc-nanashi さんに頼らせていただけると頼もしいです!!
electron:buildとかのbuild系でNODE_ENV=productionをつけて、NODE_ENV === productionならプラグイン追加とかですかね? |
あ、prodのときのみ実行良いですね!! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!!
ありがとうございます、マージします!!!
どんどんこうやってリファクタリングしていきたいですね!!!!!
内容
dist/{main.js,preload.js}のimport/requireの一覧をチェックし、怪しいモノがあれば弾くようにします。
関連 Issue
スクリーンショット・動画など
(なし)
その他
(なし)