Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Discussion: Yarn v2 #5858

Closed
acid-chicken opened this issue Feb 6, 2020 · 13 comments · Fixed by #8764
Closed

Discussion: Yarn v2 #5858

acid-chicken opened this issue Feb 6, 2020 · 13 comments · Fixed by #8764
Assignees
Labels
🛠️Dev Development of Misskey itself 💬Discussion Being discussed or needs discussion

Comments

@acid-chicken
Copy link
Member

Summary

Yarn の次期メジャーバージョンが RC 版としてリリースが開始されており、https://yarnpkg.com/ も v2 に刷新されました。

Yarn v2 is a very different software from the v1.
— Migration | Yarn - Package Manager

とあるぐらいそれなりに仕様変更等があるようなので、マイグレーション等どうするか議論しておきたいです。

@acid-chicken acid-chicken added 💬Discussion Being discussed or needs discussion 🛠️Dev Development of Misskey itself labels Feb 6, 2020
@acid-chicken
Copy link
Member Author

acid-chicken commented Feb 6, 2020

Memo: #5259 が Yarn の設定のみで実現できそう。
FYI: https://yarnpkg.com/advanced/migration#dont-use-resolvealiasmodules-webpack-or-modulenamemapper-jest

@acid-chicken
Copy link
Member Author

少し触ってみた感想としてはまだ若干不安定(yarn.lock が存在しないとコマンドが何も動かなかったりする)

@acid-chicken
Copy link
Member Author

node_modules を生成せずに yarn node コマンド内で require を自力解決するっぽい。

@acid-chicken
Copy link
Member Author

node_modules を生成せずに yarn node コマンド内で require を自力解決するっぽい。

じゃあ patch-package とかはどうすんのと思ったけど、大体そういう類は内蔵するっぽい。なんなら Yarn を拡張できるようになるみたい。

@rinsuki
Copy link
Contributor

rinsuki commented Feb 6, 2020

とりあえず Windows Installer / Homebrew のパッケージあたりが提供されてからで良いんではという気はする (PR作っとくのはありかもしれないけどあんまりPRでいる期間が長くなると conflict 対応つらそう)

@rinsuki
Copy link
Contributor

rinsuki commented Feb 6, 2020

それはそれとして、例えば webpack 5 にするみたいな既存のyarn v1の環境を壊さずにスムーズに移行できる準備を今からやってくのはアリだと思う

@acid-chicken
Copy link
Member Author

acid-chicken commented Feb 6, 2020

とりあえず影響の少ない範囲で段階的に準備したい。

@acid-chicken
Copy link
Member Author

Webpack v5 の方が楽に扱えるっぽいので同タイミングで本格移行したい。

@rinsuki
Copy link
Contributor

rinsuki commented Apr 8, 2020

yarn set version berry をするとper-projectでv2にできる (が、.yarn/releases/*.js にyarnがまるまるダウンロードされるのでかなり渋い機能)

@acid-chicken
Copy link
Member Author

yarn set version berry をするとper-projectでv2にできる (が、.yarn/releases/*.js にyarnがまるまるダウンロードされるのでかなり渋い機能)

依存関係の解決に必要なものや、依存関係の実体も圧縮して .yarn 内に管理することで、環境の違いによる挙動差をより減らしたいためと思われる。

@rinsuki
Copy link
Contributor

rinsuki commented Apr 9, 2020

それはそうだけどあちこちに同じバージョンのyarnが転がるのアレだしバージョン指定で済ませられるようにして欲しかった

@mei23 mei23 removed their assignment Feb 5, 2022
@ThatOneCalculator
Copy link
Contributor

ThatOneCalculator commented Apr 6, 2022

I've been using yarn 3.x (berry) with Misskey for about a month -- both on my dev machine and on the server -- and there's been no problems.

image

@acid-chicken
Copy link
Member Author

それはそうだけどあちこちに同じバージョンのyarnが転がるのアレだしバージョン指定で済ませられるようにして欲しかった

@rinsuki 時は流れ、corepack によって実現された 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠️Dev Development of Misskey itself 💬Discussion Being discussed or needs discussion
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants