I don’t really understand the first question because you have elided some important details, but for the second question, there’s a “files” key you can set in package.json that specifies which files to include in the package tarball. If you set that to some pattern that excludes your tests, they will not be included. Alternatively, you can create a .npmignore file.
I use yarn 4 plus turborepo and am very happy with my setup. You can see tybalt for a reasonably-sized project with my preferred monorepo setup.