wixplosives / pleb

a casual publisher
MIT License
25 stars 2 forks source link

pleb doesn't support monorepos with nested package structure #505

Open RomanYar opened 1 year ago

RomanYar commented 1 year ago

We tried implementing pleb for publishing our packages, and we saw that in our structure, which is not a flat packages structure, pleb fails locating the packages.

steps to reproduce:

git clone git@github.com:wixplosives/sample-monorepo.git ./test-pleb
cd test-pleb
# now we need to change the root package.json's workspaces field to "packages/**/*".
# after done that: 
rm -rf packages
mkdir -p packages/test/test-package
cd packages/test/test-package
npm init -y
echo "console.log('hello world')">index.js

# this will locate that the package was never published
npx pleb publish --dry-run
cd ../../../

# this will not find the package
npx pleb publish --dry-run
AviVahl commented 1 year ago

Need to update the workspaces field in root package.json?

RomanYar commented 1 year ago

no sure it's a mandatory step, I am not sure on how pleb locates the packages in the repo

AviVahl commented 1 year ago

It looks the packages up using the "workspaces" field, just like npm or yarn would. It needs to point to the packages.

AviVahl commented 1 year ago

oh, just noticed the comment saying packages/**/*. that worked on npm/yarn, but not pleb?