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
4.9k
Other Decks in Technology
See All in Technology
インフラとバックエンドとフロントエンドをくまなく調べて遅いアプリを早くした件
tubone24
1
430
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
950
誰も全体を知らない ~ ロールの垣根を超えて引き上げる開発生産性 / Boosting Development Productivity Across Roles
kakehashi
2
230
複雑なState管理からの脱却
sansantech
PRO
1
160
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
150
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
130
TypeScript、上達の瞬間
sadnessojisan
46
13k
The Rise of LLMOps
asei
8
1.7k
OCI Security サービス 概要
oracle4engineer
PRO
0
6.5k
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.9k
AWS Lambda のトラブルシュートをしていて思うこと
kazzpapa3
2
180
安心してください、日本語使えますよ―Ubuntu日本語Remix提供休止に寄せて― 2024-11-17
nobutomurata
1
1k
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
693
190k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
329
21k
It's Worth the Effort
3n
183
27k
Facilitating Awesome Meetings
lara
50
6.1k
Agile that works and the tools we love
rasmusluckow
327
21k
Documentation Writing (for coders)
carmenintech
65
4.4k
Optimizing for Happiness
mojombo
376
70k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
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 ੵۃతʹ࡞͍ͬͯ͜͏
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠