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
Yarn + CI + GitHub で挑む npm パッケージの定期更新
Search
tsuyoshi wada
March 09, 2018
Technology
3
1.7k
Yarn + CI + GitHub で挑む npm パッケージの定期更新
Greenkeeper を使わない npm パッケージの更新戦略について提案です
tsuyoshi wada
March 09, 2018
Tweet
Share
More Decks by tsuyoshi wada
See All by tsuyoshi wada
技術面からみる パフォーマンス改善 / Frontrend Vol.13 Dec 19th, 2018
tsuyoshiwada
7
1.3k
Chrome の marquee 要素が 優秀だった話
tsuyoshiwada
8
5k
Other Decks in Technology
See All in Technology
20241214_WACATE2024冬_テスト設計技法をチョット俯瞰してみよう
kzsuzuki
3
670
クレカ・銀行連携機能における “状態”との向き合い方 / SmartBank Engineer LT Event
smartbank
2
100
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
180
Amazon Kendra GenAI Index 登場でどう変わる? 評価から学ぶ最適なRAG構成
naoki_0531
0
130
pg_bigmをRustで実装する(第50回PostgreSQLアンカンファレンス@オンライン 発表資料)
shinyakato_
0
110
Storage Browser for Amazon S3
miu_crescent
1
290
多様なメトリックとシステムの健全性維持
masaaki_k
0
110
Work as an App Engineer
lycorp_recruit_jp
0
340
普通のエンジニアがLaravelコアチームメンバーになるまで
avosalmon
0
120
怖くない!ゼロから始めるPHPソースコードコンパイル入門
colopl
0
150
[トレノケ雲の会 mod.13] 3回目のre:Inventで気づいたこと -CloudOperationsを添えて-
shintaro_fukatsu
0
110
20241220_S3 tablesの使い方を検証してみた
handy
4
680
Featured
See All Featured
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
1.2k
Visualization
eitanlees
146
15k
Making Projects Easy
brettharned
116
6k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.2k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.4k
Designing for humans not robots
tammielis
250
25k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
450
Reflections from 52 weeks, 52 projects
jeffersonlam
347
20k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Side Projects
sachag
452
42k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.3k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
520
Transcript
Yarn + CI + GitHub ͰΉ npm ύοέʔδͷఆظߋ৽ 2018-03-09 /
Gotanda.js #10 @wadackel
ࣗݾհ @wadackel / ΘͩͭΑ͠ tsuyoshiwada https://blog.wadackel.me • ΠϯλʔωοτͰͷŘŕŭ͍ͬͯ·͢ • ࠓ1݄ʹ
CyberAgent, Inc ʹೖࣾ͠·ͨ͠ • Web ϑϩϯτΤϯδχΞʹͳΓ·ͨ͠ • ࠷ۙ Go ָ͕͍͠
ࠓ͓͢Δ͜ͱ • Greenkeeper ศརʂ͔͠͠… • npm ύοέʔδͱୡͷઓ͍ • ࣮ࡍʹӡ༻ͯ͠Έͯ •
·ͱΊ
ʑߋ৽͞Εଓ͚Δ npm ύοέʔδͱ օ͞ΜͲ͏ઓ͍ͬͯ·͔͢ʁ
Greenkeeper https://greenkeeper.io
Greenkeeper ศར • ࣗಈͰ npm ύοέʔδͷߋ৽Λͯ͘͠ΕΔ • ߋ৽࣌ʹςετΛ࣮ߦ͠ɺύοέʔδߋ৽ʹΑͬͯίʔυ͕յΕ͍ͯͳ ͍͔ݕূͯ͘͠ΕΔ •
ߋ৽ޙʹ PR ·Ͱग़ͯ͘͠ΕΔݡ͍ͭ • ͍ͬͯΔϓϩδΣΫτଟ͍
“͔͠͠ɺສೳͳͳͲଘࡏ͠ͳ͔ͬͨ…”
༷ʑͳཧ༝͋Δͱࢥ͍·͕͢… • όʔδϣϯΞοϓʹΑͬͯܰඍͳमਖ਼͕ඞཁʹͳΔ͜ͱ͕ଟ͍ (Linter ܥͩͱݦஶ) • ςετͷΓ͍ͯͳ͍෦ݕग़ෆՄɻ࣮ࡍʹίʔυ͕յΕ͍ͯͯ ؾ͚ͳ͍߹͕͋Δ… • 2018-03-09࣌Ͱ
Yarn Workspaces ʹະରԠ https://github.com/greenkeeperio/greenkeeper/issues/139
ͦ͜Ͱ…
ͪ͜Βͷهࣄ http://developer.hatenastaff.com/entry/2017/06/06/163000
yarn-outdated-formatter • $ yarn outdated ͷ݁Ռʹ CHANGELOG ͷϦϯΫΛ͚ͯ͘ΕΔ • ݁Ռ
Markdown JSON Ͱड͚औΕΔ • CHANGELOG ͷࢀরͰɺมߋՕॴ͕ѲͰ͖Δͱ… • Assignee ͱ Reviewer ͷෛ୲͕ܰݮͰ͖ͯօϋοϐʔ • هࣄதͰ1ϲ݄͓͖ʹʮΞοϓσʔτσʔʯΛઃ͚͍ͯΔͱͷ͜ͱ
ͬͱศརʹ͍͍ͨ
yarn-outdated-formatter ͷ ݁ՌΛ GitHub Issue ఆظతʹ௨͢Δͱͬͱϋοϐʔ
ͱ͍͏Θ͚Ͱ… yarn-outdated-formatter ͷ݁ՌΛ GitHub Issue ʮ͍͍ײ͡ʯʹ௨͠ ͯ͘ΕΔ؆୯ͳπʔϧΛ࡞ͬͨ yarn-outdated-notifier https://github.com/tsuyoshiwada/yarn-outdated-notifier
yarn-outdated-notifier yarn-outdated-formatter ͷ݁ՌΛ GitHub ͷ Personal access tokens Λ ͬͯ
Issue ௨ͯ͘͠ΕΔ $ yarn outdated-notifier \ --api-token <your_token> \ --labels <label_name> \ --assignees <assignee_name> \ --changelogs ./changelogs.yml
࣮ࡍʹ௨͞ΕΔ Issue ͜Μͳײ͡ ※௨͞ΕΔ༰ Handlebars ͷςϯϓϨʔτͰมߋͰ͖Δ
yarn-outdated-notifier ௨ػೳ͚ͩΛ࣋ͭ ఆظతͳ௨ CI ͷ cron Λ͏ͱָ
CircleCI with yarn-outdated-notifier
# GITHUB_API_TOKEN Environment Variables ʹՃ͓ͯ͘͠ job: notify_outdated: docker: -
image: circleci/node:9.3 working_directory: ~/repo steps: - checkout - yarn - run: yarn outdated-notifier --api-token $GITHUB_API_TOKEN ௨༻ͷ job Λ࡞Δ
# workflows Ͱઌఔ࡞ͬͨ `job` Λݺͼग़͢ # ҎԼɺຊ࣌ؒͷຖि༵ۚޕલ10:00ʹ௨ॲཧΛ։࢝͢Δྫ workflows: version: 2
notifications: jobs: - notify_outdated triggers: cron: “0 1 * * 5” filters: branches: only: - master cron Ͱ job Λݺͼग़͢
ఆظతʹ npm ύοέʔδΛ ߋ৽͢Δͬͨ
࣮ࡍʹӡ༻ͯ͠Έͯ
िҰͷߋ৽࡞ۀ͕ྑͦ͞͏ • ݄Ұͩͱɺґଘ͢Δύοέʔδ͕ଟ͍߹ʹߋ৽͕ඃΔ • ࡞ۀස͕ଟ͚ΕɺҰʹൃੜ͢Δߋ৽࡞ۀͷෛ୲͕ܰݮ͞ΕΔ • ͨͩ͠ɺଟ͗͢Δͷਏ͍ɻिҰ͘Β͍͕ஸ͍͍ • िҰ͕͠ΜͲ͍ or
ύοέʔδ͕গͳ͘ඞཁੑ͕ബ͍ͳΒִिͰOK
ߋ৽࡞ۀͷ࣌ؒ͋ΔఔͰ۠Δ • ຖि࡞ۀߦ͏ͷͰɺޕલத2࣌ؒɺ۠Γͷྑ͍࣌ؒͰ۠Δ • ͦͷ࣌ؒʹऩ·Βͳͦ͏ͳύοέʔδผ్ Issue Λͬͯ࡞ۀʹऔΓ ֻ͔Δ • ϓϩμΫτͷՁʹ݁͢Δͷʹɺ૬Ԡͷ࿑ྗΛֻ͚Α͏
• ྫ) ʮwebpack v4.x ग़ͨ͠ɺ͍ͯ͠ΈΔ͔ʔʂʂʯ
CI ͱ Yarn ͚ͩͰಋೖͰ͖Δͷखܰ • Greenkeeper ͳͲͷ֎෦αʔϏεΛಋೖ͢Δͱཧର͕૿͑ͯखؒ • CI ΈΜͳͬͯΔ͠
(ͬͯΔΑͶ??) ɺಋೖোน͕͍ • CircleCI Λྫʹग़͚ͨ͠Ͳɺେͷ CI cron ࣋ͬͯΔ
Assignee ͷઃఆݕ౼͕ඞཁ • ʮnpm ύοέʔδߋ৽େ͖ʯͱ͍͏حಛͳํ͕͍ΕҰ • ͦ͏Ͱͳ͚Εɺ୲ϝϯόʔͰϩʔςʔγϣϯ • ຢϥϯμϜʹ Assignee
ΛׂΓৼΓ (ͷνʔϜ͜ΕΛ࠾༻)
·ͱΊ
• ʮ͜Εܾͧఆ൛ʂʯͱ͍͏ํ๏Ͱͳ͍ • ֤νʔϜʹ͖͋ͬͨ߹͍ํΛࡧ͠ • npm ύοέʔδͷߋ৽ͱటष͘ઓ͏ඞཁ͕͋Δ • ͥͻօ͞Μͷઓ͍ํΛڭ͍͑ͯͩ͘͞ʂ
ྑ͍ CHANGELOG ॏཁ (એ) • Go ͷ CHANGELOG δΣωϨʔλΛ࡞ͬͨ https://github.com/git-chglog/git-chglog
• CHANGELOG ੵۃతʹ࡞͍ͬͯ͜͏
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠