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
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.3k
Application Development WG Intro at AppDeveloperCon
salaboy
0
180
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
The Role of Developer Relations in AI Product Success.
giftojabu1
0
120
複雑なState管理からの脱却
sansantech
PRO
1
140
Can We Measure Developer Productivity?
ewolff
1
150
B2B SaaSから見た最近のC#/.NETの進化
sansantech
PRO
0
720
[FOSS4G 2024 Japan LT] LLMを使ってGISデータ解析を自動化したい!
nssv
1
210
第1回 国土交通省 データコンペ参加者向け勉強会③- Snowflake x estie編 -
estie
0
120
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
28
12k
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
170
初心者向けAWS Securityの勉強会mini Security-JAWSを9ヶ月ぐらい実施してきての近況
cmusudakeisuke
0
120
Featured
See All Featured
Six Lessons from altMBA
skipperchong
27
3.5k
The MySQL Ecosystem @ GitHub 2015
samlambert
250
12k
4 Signs Your Business is Dying
shpigford
180
21k
Side Projects
sachag
452
42k
Unsuck your backbone
ammeep
668
57k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
How to train your dragon (web standard)
notwaldorf
88
5.7k
Designing for Performance
lara
604
68k
Code Review Best Practice
trishagee
64
17k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
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 ੵۃతʹ࡞͍ͬͯ͜͏
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠