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.6k
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
4.9k
Other Decks in Technology
See All in Technology
CAMERA-Suite: 広告文生成のための評価スイート / ai-camera-suite
cyberagentdevelopers
PRO
3
270
LeSSに潜む「隠れWF病」とその処方箋
lycorptech_jp
PRO
2
120
AWS re:Inventを徹底的に楽しむためのTips / Tips for thoroughly enjoying AWS re:Invent
yuj1osm
1
560
【若手エンジニア応援LT会】AWS Security Hubの活用に苦労した話
kazushi_ohata
0
160
コンテンツを支える 若手ゲームクリエイターの アートディレクションの事例紹介 / cagamefi-game
cyberagentdevelopers
PRO
1
120
GitHub Universe: Evaluating RAG apps in GitHub Actions
pamelafox
0
170
AIを駆使したゲーム開発戦略: 新設AI組織の取り組み / sge-ai-strategy
cyberagentdevelopers
PRO
1
130
新卒1年目が挑む!生成AI × マルチエージェントで実現する次世代オンボーディング / operation-ai-onboarding
cyberagentdevelopers
PRO
1
160
ユーザーの購買行動モデリングとその分析 / dsc-purchase-analysis
cyberagentdevelopers
PRO
2
100
なんで、私がAWS Heroに!? 〜社外の広い世界に一歩踏み出そう〜
minorun365
PRO
6
1.1k
最速最小からはじめるデータプロダクト / Data Product MVP
amaotone
5
730
マネジメント視点でのre:Invent参加 ~もしCEOがre:Inventに行ったら~
kojiasai
0
460
Featured
See All Featured
Intergalactic Javascript Robots from Outer Space
tanoku
268
27k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Art, The Web, and Tiny UX
lynnandtonic
296
20k
Fireside Chat
paigeccino
32
3k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
37
1.8k
Six Lessons from altMBA
skipperchong
26
3.5k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
250
21k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
What’s in a name? Adding method to the madness
productmarketing
PRO
22
3.1k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.2k
Rails Girls Zürich Keynote
gr2m
93
13k
Teambox: Starting and Learning
jrom
132
8.7k
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 ੵۃతʹ࡞͍ͬͯ͜͏
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠