It is possible to merge `package.json` files that will fail to release
Author: gnidanCreated Mar 10, 2023Updated Sep 27, 2023
Issue
Let's say you make a new package for the Truffle monorepo. And you forget to add publishConfig. Well, when we go to release, it will fail! Because NPM will see the new package, since it's org-scoped, as private.
That's not good! Why didn't CI stop this???
This repo should have a CI job that validates package.json changes for this situation and potentially others.
Steps to Reproduce
Yeah, best not to reproduce this one.
Expected Behavior
Faina should not get surprised by a messed up release when she's trying to go have dinner with her family.
No but seriously:
- Org-scoped packages should get checked to either have a
"private": true(e.g. in @truffle/compile-solidity-tests) or"publishConfig": { "access": "public" }(e.g., in @truffle/dashboard). - CI should check for the existence of a
preparescript andtestscript (even if they're no-ops) - CI should probably also check to make sure
repository,bugs, etc. are all well-formed
For all of these, we should use jq or just make it a JS script that parses the JSON, rather than doing naïve regex matching.
Actual Results
Environment
- Operating System:
- Ethereum client:
- Truffle version (
truffle version): 5.7.9 - node version (
node --version): - npm version (
npm --version):
Source: ConsenSys-archive/truffle