I created a package for spotting most publish-related errors (and more) during testing:
https://github.com/zkochan/package-preview
Basically, it achieves the same results as publishing to veraccio and installing from there.
Though, package-preview spots even more issues because it uses pnpm for installation, which is a strict package manager. Code won't work if it relies on packages that are not referenced in package.json
Hopefully it should be easier to move to pnpm from npm.
pnpm uses npm's config system.
pnpm has the same CLI as npm ("pnpm install foo" not "pnpm add foo")
pnpm overrides only some of npm's commands: install, uninstall and link. Other commands are passed through to npm. "pnpm init" is same as "npm init"
TBH I would prefer merging pnpm to npm instead. I don't see any reason to further promote Yarn which is already overrated.
The concept of linking packages existed long before Yarn. First commit to Yarn was on Jan 23, 2016.
The concept of linking packages was introduced by Alexander Gugel in the ied package, first commit on Aug 6, 2015.
Approximately half year later Rico Sta. Cruz has created pnpm which was pretty similar to ied but with better npm compatibility.
Creators of Yarn did know about the possibility to use symlinks and links. You can search in their repo for discussions about it. They discussed the possibility of using symlinks back when Yarn was not public and due to many reasons decided not to use symlinks.