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
[Ruby] Develop a Morse Code Learning Gem & Beep from Strings
oguressive
1
150
フロントエンド設計にモブ設計を導入してみた / 20241212_cloudsign_TechFrontMeetup
bengo4com
0
1.9k
Postman と API セキュリティ / Postman and API Security
yokawasa
0
200
10個のフィルタをAXI4-Streamでつなげてみた
marsee101
0
170
1等無人航空機操縦士一発試験 合格までの道のり ドローンミートアップ@大阪 2024/12/18
excdinc
0
160
Opcodeを読んでいたら何故かphp-srcを読んでいた話
murashotaro
0
180
TSKaigi 2024 の登壇から広がったコミュニティ活動について
tsukuha
0
160
NW-JAWS #14 re:Invent 2024(予選落ち含)で 発表された推しアップデートについて
nagisa53
0
260
ゼロから創る横断SREチーム 挑戦と進化の軌跡
rvirus0817
2
270
PHP ユーザのための OpenTelemetry 入門 / phpcon2024-opentelemetry
shin1x1
1
190
DevOps視点でAWS re:invent2024の新サービス・アプデを振り返ってみた
oshanqq
0
180
マイクロサービスにおける容易なトランザクション管理に向けて
scalar
0
120
Featured
See All Featured
Producing Creativity
orderedlist
PRO
341
39k
Testing 201, or: Great Expectations
jmmastey
40
7.1k
KATA
mclloyd
29
14k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
6
520
Bash Introduction
62gerente
608
210k
Building Applications with DynamoDB
mza
91
6.1k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
44
6.9k
Put a Button on it: Removing Barriers to Going Fast.
kastner
59
3.6k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
111
49k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
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 ੵۃతʹ࡞͍ͬͯ͜͏
͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·ͨ͠