0x80 / isolate-package

Isolate a monorepo package with its internal dependencies to form a self-contained directory with a pruned lockfile
MIT License
129 stars 14 forks source link

Running script in prepack fails the packing process #114

Closed hjellek closed 15 hours ago

hjellek commented 3 days ago

I am trying to run a script in prepack, but it causes the output to be more than only the filename and therefore fails because it cannot find the packed file.

0x80 commented 3 days ago

Can you give an example?

I assume the output from your script comes before the filename then?

Maybe it would work if we take the part after the last space character...

hjellek commented 3 days ago

When I log out stdout at the position I mentioned, I get this example output:

> @team/package@1.0.0 prepack
> yarn clean && yarn build

> @team/package@1.0.0 postpack
> yarn clean

team-package-1.0.0.tgz

It works to split the stdout and grab the last line, I can create a PR shortly