nestjs icon indicating copy to clipboard operation
nestjs copied to clipboard

Convert to using NX Monorepo

Open WonderPanda opened this issue 5 years ago • 8 comments

WonderPanda avatar May 10 '20 14:05 WonderPanda

Alongside with Nx i would suggest pnpm, i can have a PR soon for this after we release the next version that supports nestjs v8

underfisk avatar Jan 21 '22 09:01 underfisk

The biggest thing that I don't have a clear understanding of yet is how we should implement the publishing step with NX. This is currently something that Lerna still does much better as it takes care of incrementing all the version numbers for dependent packages and releasing them together.

Maybe @jmcdo29 has this all figured out now in his Ogma repo?

WonderPanda avatar Jan 21 '22 14:01 WonderPanda

He has, he's using https://github.com/changesets/changesets which is great

underfisk avatar Jan 21 '22 14:01 underfisk

Cool, does it have an NX plugin integration? Or what is the rough process we would have to follow to integrate it?

WonderPanda avatar Jan 21 '22 14:01 WonderPanda

https://dev.to/jmcdo29/automating-your-package-deployment-in-an-nx-monorepo-with-changeset-4em8

underfisk avatar Jan 21 '22 14:01 underfisk

I've seen this package mentioned as a good option on the official Nrwl Twitter account: https://github.com/jscutlery/semver

Would be interesting to see what the pros and cons are of this versus a manual setup using changesets

I like that this one is an actual NX plugin as opposed to a lot of glue scripts tying everything together

WonderPanda avatar Jan 21 '22 14:01 WonderPanda

Oh, I started implementing this a lot of time ago but didn't manage to finish. I've done it today. Unfortunately, I didn't see the discussion here beforehand, sorry about that. I've opened a PR to migrate to Nx, but I indeed need to work on the publishing step.

EDIT: I've added the semver plugin and plugged the npm publish integration too. The implementation seems fine, but it should be tested after merging to confirm :)

jeremylvln avatar Jan 21 '22 16:01 jeremylvln