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

Improve versioning/release/etc. process #87

Open
charlie-yao opened this issue Oct 5, 2022 · 1 comment
Open

Improve versioning/release/etc. process #87

charlie-yao opened this issue Oct 5, 2022 · 1 comment
Projects

Comments

@charlie-yao
Copy link
Owner

charlie-yao commented Oct 5, 2022

I initially thought it'd be cool to use a combination of Yarn Berry workspaces and Lerna because they supposedly synergized well. Apparently, Lerna went unmaintained for a while and also didn't suppport the "workspaces:*" syntax in package.json: lerna/lerna#2450

I wanted the demo website workspace to be able to refer to local files, so I decided to remove Lerna and try just using basic git and yarn commands.

Still, I'm sure there's a better way. For example, this (unmerged?) PR is an attempt to replace Lerna commands with "vanilla" yarn commands: storybookjs/storybook#15413

For example, one issue that I'm running into right now is that I'm only publishing the react-aria-widgets workspace to NPM, but that workspace doesn't contain a README.md because the readme actually lives in the root workspace. That means, from NPM's perspective, there's no readme!

The README.md has been "fixed" with a horribly kludgey yarn script, but this whole thing takes a lot of manual steps that could surely be automated.

Readme uses a symlink so it can show up in both NPM and GitHub. Let's pretend that script never existed. :)

First use yarn version <...> to increment the version, then commit the changes to package.json, the merge into master, create a tag off master, and then publish the tag? Jeez!

@charlie-yao charlie-yao added this to To do in Misc. via automation Oct 5, 2022
@ghiscoding
Copy link

ghiscoding commented Oct 17, 2022

@charlie-yao I saw you reference this issue to Lerna workspace:, you could use Lerna-Lite, it's a fork of Lerna and much more modular than Lerna, the default basic install will only install the version and publish commands which seems to be what you need. I created Lerna-Lite when Lerna was largely unmaintained but couple months after that Nrwl took Lerna over and it's becoming more and more a Nrwl product, they are now forcing Nx requirement in latest Lerna v6 but I don't force any of that in Lerna-Lite. Lastly in Lerna-Lite, I converted the project itself to use pnpm workspace: (which is supported in Lerna-Lite), and you can also use Yarn Berry for that and Jest is a great example since they migrated to Lerna-Lite couple months ago and are using workspace: protocol with Yarn and they were only interested in the version/publish part just like you are (I think).

So anyway, good luck with your task and feel free to ignore my post since this is just a suggestion 😉
Cheers

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

No branches or pull requests

2 participants