feat: Only generate manifest if update is specified #8
1 changed files with 3 additions and 1 deletions
|
@ -33,7 +33,9 @@ if (!existsSync(MANIFEST_FILENAME)) {
|
|||
console.log(
|
||||
`Package size (${currentStats.packageSize}) adopted as new limit.`,
|
||||
)
|
||||
process.exit(0)
|
||||
// If the update flag wasn't specified, exit with a non-zero code so we
|
||||
// don't "accidentally" pass CI builds if the manifest didn't exist
|
||||
process.exit(isUpdatingManifest ? 0 : 1)
|
||||
}
|
||||
|
||||
|
||||
const previousStats = getPreviousPackageStats()
|
||||
|
|
Reference in a new issue
An argument could be made that there's never a valid use case in which you'd want CI to run
--update-manifest
and pass either (since having--update-manifest
in CI would always pass the check). That being said, I feel that this can be addressed further up and check if a CI env variable is set to error out early if--update-manifest
is passed in.LGTM.