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
For a Future-Friendly Web
brad_frost
182
10k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.1k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
200
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
340
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Mind Mapping
helmedeiros
PRO
0
90
Designing Powerful Visuals for Engaging Learning
tmiket
0
240
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
120
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に直す ‑> 設計段階でシンプルなルーティングを意識する
おしまい