Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
パッケージのバージョンを一気に上げてつらかった話
Search
clngn
September 22, 2018
190
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
パッケージのバージョンを一気に上げてつらかった話
clngn
September 22, 2018
Featured
See All Featured
For a Future-Friendly Web
brad_frost
184
10k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
560
Building an army of robots
kneath
307
47k
A designer walks into a library…
pauljervisheath
211
25k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
How GitHub (no longer) Works
holman
316
150k
YesSQL, Process and Tooling at Scale
rocio
174
15k
Building the Perfect Custom Keyboard
takai
2
910
How to make the Groovebox
asonas
2
2.5k
Designing for Timeless Needs
cassininazir
1
530
The untapped power of vector embeddings
frankvandijk
2
1.9k
Transcript
パッケージのバージョンを一気に上げてつらかった話 @clngn
つらかったこと1: lintが落ちる
基本は‑‑fix できないものも結構ある 一気にやってしまうとcommitがひどいことになる レビュアーの死 ‑> eslintの‑‑ruleオプションを使って地道に確認しつつ潰していく ‑> git diffの‑‑name‑onlyオプションでパイプを繋いだりして工夫する $
git diff --name-only src | xargs $(npm bin)/eslint --rule '"indent": [1, 4]' --no-eslintrc --parser babel-eslint --fix
つらかったこと2: テストが落ちる
window.document以下を上書きしている テストの実行順やディレクトリ指定で結果が変わる ‑> テストランナーのbefore/afterフックでwindowオブジェクトを戻すようにする stub,mockをちゃんと使えてない sinon restore忘れ、spy,stub,mockの使い分け ‑> 実コードと合わせて知見をドキュメントにまとめて共有 この辺の概念は資料だけで理解しづらいのでフォローアップをちゃんとする
ライブラリの挙動が変わった enzymeのlifecycleなど ちゃんとドキュメントを読む
つらかったこと3: react‑router v4
v2 ‑> v4 ‑> がんばりましょう https://github.com/ReactTraining/react‑router/blob/master/packages/react‑ router/docs/guides/migrating.md props.params ‑> props.match.paramsとか
複雑なルーティングをpath‑to‑regexpに直す ‑> 設計段階でシンプルなルーティングを意識する
おしまい