0x80 / isolate-package

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

If workspaces is set to an object, we get a crash. #9

Closed JoachimKoenigslieb closed 1 year ago

JoachimKoenigslieb commented 1 year ago

I have this object as my workspaces setting in my root package.json

"workspaces": { "packages": [ "apps/*", "packages/*" ], "nohoist": [ "**/ts-node" ] },

This causes an error on this line: https://github.com/0x80/isolate-package/blob/main/src/helpers/create-packages-registry.ts#L61, as flatMap is not defined on an object.

I have fixed my issue by providing it trough setting workspacePackages in the config manually. Thanks a lot for the project!

You rock!

0x80 commented 1 year ago

Hi @JoachimKoenigslieb thanks for reporting, and for the kind words :) I will look into it, hopefully soon, but I'm traveling atm.