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

Lerna is dead #196

Closed
rhysd opened this issue May 4, 2022 · 6 comments · Fixed by #197
Closed

Lerna is dead #196

rhysd opened this issue May 4, 2022 · 6 comments · Fixed by #197

Comments

@rhysd
Copy link
Sponsor Member

rhysd commented May 4, 2022

Lerna is no longer maintained. We would need to migrate to some other tools (external tool like pnpm or yarn/npm workspace). I don't have much experience to manage monorepo so I don't have strong opinion.

@justinmk
Copy link
Member

justinmk commented May 4, 2022

Regular NPM sounds great to me. If it can't handle "monorepo" for some reason then I guess yarn is fine, unless pnpm is more popular. Whatever is the most boring (popular) will hopefully give us the least trouble.

@rhysd
Copy link
Sponsor Member Author

rhysd commented May 5, 2022

I agree that less dependencies is better. I will try both npm workspaces and yarn workspaces.

@rhysd
Copy link
Sponsor Member Author

rhysd commented May 5, 2022

I tried both yarn and npm, and chose npm at #197.

This is because

  • Yarn does not support running scripts in each workspaces out-of-the-box. It requires a Yarn plugin and newer version of Yarn.
  • Yarn enables PnP by default, but it works very differently from npm. Maintaining this repository to work with both Yarn and npm will be harder.
  • While trying migration to Yarn, I faced some lock file issue. I could avoid it by deleting the local repository and cloning it again, but I don't know why it was fixed. And Yarn's lock file was slightly modified after editing scripts section of package.json.

I concerned that npm is slower than Yarn. Though Yarn is faster, I think npm is still acceptable.

Remaining concern is releasing. Since @billyvg is responsible for releases, I don't know how this change affects work for release. I think lerna provides some useful feature for releasing new versions. Now they would not be available.

Steps to make new releases are now:

  1. Run npm version with --workspace (or -w) option
  2. Go to the package directory to release
  3. Run npm publish

I believe this flow is acceptable since we release packages not so frequently. But I'd like to confirm it with @billyvg.

@justinmk
Copy link
Member

justinmk commented May 5, 2022

Why do we need workspaces/ monorepo ?

@rhysd
Copy link
Sponsor Member Author

rhysd commented May 6, 2022

This repository needs to be monorepo because we maintain separate two packages.

@neovim/decorators is a package to make a plugin host.

neovim is a package for Neovim client and it can be used not only for a plugin host. For example, GUI frontend can be implemented on the client.

@rhysd rhysd closed this as completed in #197 May 6, 2022
rhysd added a commit that referenced this issue May 6, 2022
* replace lerna with npm workspaces

* update CI to use npm instead of yarn

* specify range of npm version
@justinmk
Copy link
Member

This repository needs to be monorepo because we maintain separate two packages.

@neovim/decorators is a package to make a plugin host.

Maybe we should get rid of that. Doesn't seem worth the complexity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants