up
up copied to clipboard
Inline symlinked when outside of root
Currently Up supports symlinks, however these will fail your files are outside of the root dir as they're not in the zip at all. We could just readlink and pull the file in.
Hey @tj I just want to bump this. Would you consider giving this a go or is this not high up on your priority list. Thanks. 🙇♂️
I'll try and check it out soon, I don't think too many people are hitting it but it should be pretty quick to add! I should have written down the use-case hahah, it was for Yarn workspaces or something like that right?
This would be awesome! Yes, this was for monorepos — yarn, lerna, etc.
Hmm unless I'm doing it wrong, it looks like Yarn doesn't symlink those modules in, it just uses Node's delegation of parent node_modules to resolve them
I am sure you are not doing anything wrong. Yarn seems to use nodes module resolution, lerna though uses symlinks.
hey @tj so its node module resolution for hoisted dependencies and symlinks for linking packages within your monorepo. Sorry for my ill informed answer earlier.
ahhh darn, we might be out of luck there unless Up becomes Node-aware to resolve the same way. It would be cool if they had a mode to symlink everything
There is also bolt for mono repos which symlinks everything — https://github.com/boltpkg/bolt
We are running into the exact same issue with Lerna and Yarn workspaces. We hacked our way around this issue in CI by not using workspaces there and running yarn install
again within our package folder but it's far from ideal.
@tj & I talked on slack. yarn
has a nohoist
configuration option, that can be used on the package that uses up
.
nohoist
will cause yarn to download external dependencies into the package node_modules
directory & symlink to the dependency packages in the monorepo. It would be sufficient if up
were to zip the files contained in each of the symlinks.
Still waiting for support symlink outside of rootDir
Is it possible? or I should try another solution?