Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
パッケージのバージョンを一気に上げてつらかった話
Search
clngn
September 22, 2018
0
170
パッケージのバージョンを一気に上げてつらかった話
clngn
September 22, 2018
Tweet
Share
Featured
See All Featured
Adopting Sorbet at Scale
ufuk
77
9.5k
Embracing the Ebb and Flow
colly
86
4.8k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.4k
Code Reviewing Like a Champion
maltzj
524
40k
Statistics for Hackers
jakevdp
799
220k
How to Ace a Technical Interview
jacobian
278
23k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
8
450
Become a Pro
speakerdeck
PRO
29
5.5k
Balancing Empowerment & Direction
lara
2
550
Building a Scalable Design System with Sketch
lauravandoore
462
33k
Scaling GitHub
holman
461
140k
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に直す ‑> 設計段階でシンプルなルーティングを意識する
おしまい