我剛發布了一篇新文章,分享我在維護開源 Angular 函式庫時學到的經驗。
我曾經在工作區和 dist/ 目錄中驗證相容性,但後來發現這並不是開發者實際從 npm 安裝的內容。
因此,我重新設計了 CI 流程,改為在多個 Angular 版本中驗證已發佈的套件。
這篇文章涵蓋:
- 為什麼測試
dist/是不夠的 - Angular 部分編譯與連結器
- 為什麼僅進行型別檢查可能遺漏相容性問題
- 使用
npm pack驗證已打包的成品 - 為 Angular 17–22 建立相容性矩陣
如果你也在維護 Angular 函式庫(或任何 npm 套件),我很樂意聽聽你如何進行相容性測試。
📖 Why I Validate Angular Compatibility Using the Published npm Package (Not the Source Code)
0 Comments
Log in to join the conversation.No comments yet. Be the first to share your thoughts.