Yarn run multiple scripts in parallel

There is a difference between using & and &&. Using & will run scripts in parallel, using && will run scripts one after the other. package.json: { “parallel”: “yarn script1 & yarn script2”, “serial”: “yarn script1 && yarn script2”, “script1”: “… some script here”, “script2”: “… some there script here” }

Should I have Travis cache node_modules or $HOME/.npm

I noticed caching the node_modules folder caused problems (build fails) while caching the .npm cache avoided it. I believe it’s because the .npm cache doesn’t store compiled native modules while the node_modules folder does. So when you test different versions of node, as is common in Travis-CI, it will try to load a native module … Read more

Allow local project to depend on local lerna packages

You should be able to accomplish this with npm link. Although I have not tried this using a local dependency that is not published on npm. Directory tree foo/ packages/ core/ package.json errors/ package.json bar/ package.json foo/packages/core/package.json { … dependencies: { “@foo/errors”: “*” } } bar/package.json { … dependencies: { “@foo/core”: “../foo/packages/core” } } Run … Read more

Do yarn workspaces work with npm, too?

Now that npm v7.0.0 is out, npm supports workspaces. You can manage multiple packages from within a singular top-level, root package. See more at https://github.blog/2020-10-13-presenting-v7-0-0-of-the-npm-cli/ Your workflows will not get npm v7.0.0 by default unless you install it using npm install -g npm@7.