releasify
releasify copied to clipboard
fix: compare only a git status subset
releasify v3 triggers this error on node v18.
Note the detached property.
This fix aims to check only the fields we are interested in
[1661407621817] DEBUG: Complete repo status current="master" tracking="origin/master"
ERROR: The git repo must be clean (committed and pushed) before releasing!
err: {
"type": "AssertionError",
"message": "The git repo must be clean (committed and pushed) before releasing!",
"stack":
AssertionError [ERR_ASSERTION]: The git repo must be clean (committed and pushed) before releasing!
at module.exports (/Users/mspigolon/.nvm/versions/node/v18.6.0/lib/node_modules/releasify/lib/commands/publish.js:83:10)
at async Command.func (/Users/mspigolon/.nvm/versions/node/v18.6.0/lib/node_modules/releasify/lib/cli.js:18:7)
"generatedMessage": false,
"code": "ERR_ASSERTION",
"actual": {
"not_added": [],
"conflicted": [],
"created": [],
"deleted": [],
"modified": [],
"renamed": [],
"files": [],
"staged": [],
"ahead": 0,
"behind": 0,
"tracking": "origin/master",
"detached": false
},
"expected": {
"not_added": [],
"conflicted": [],
"created": [],
"deleted": [],
"modified": [],
"renamed": [],
"files": [],
"staged": [],
"ahead": 0,
"behind": 0,
"tracking": "origin/master"
},
"operator": "deepStrictEqual"
}