chore(deps-dev): bump gts from 5.3.1 to 6.0.0 (#665)

Bumps [gts](https://github.com/google/gts) from 5.3.1 to 6.0.0.
- [Release notes](https://github.com/google/gts/releases)
- [Changelog](https://github.com/google/gts/blob/main/CHANGELOG.md)
- [Commits](https://github.com/google/gts/compare/v5.3.1...v6.0.0)

---
updated-dependencies:
- dependency-name: gts
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
dependabot[bot]
2024-10-24 10:58:48 +00:00
committed by GitHub
parent 6e5b99c8db
commit 8190631d94
8 changed files with 130 additions and 125 deletions

View File

@@ -1,3 +1,3 @@
module.exports = {
...require('gts/.prettierrc.json')
}
...require('gts/.prettierrc.json'),
};

4
lib/index.js generated

File diff suppressed because one or more lines are too long

162
package-lock.json generated
View File

@@ -21,7 +21,7 @@
"@vercel/ncc": "^0.38.2",
"all-contributors-cli": "^6.26.1",
"eslint-config-prettier": "^9.1.0",
"gts": "^5.3.1",
"gts": "^6.0.0",
"husky": "^9.1.6",
"typescript": "~5.6.3"
},
@@ -285,21 +285,22 @@
}
},
"node_modules/@eslint/js": {
"version": "8.57.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz",
"integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==",
"version": "8.57.1",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz",
"integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==",
"dev": true,
"engines": {
"node": "^12.22.0 || ^14.17.0 || >=16.0.0"
}
},
"node_modules/@humanwhocodes/config-array": {
"version": "0.11.14",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",
"integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==",
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz",
"integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==",
"deprecated": "Use @eslint/config-array instead",
"dev": true,
"dependencies": {
"@humanwhocodes/object-schema": "^2.0.2",
"@humanwhocodes/object-schema": "^2.0.3",
"debug": "^4.3.1",
"minimatch": "^3.0.5"
},
@@ -321,9 +322,10 @@
}
},
"node_modules/@humanwhocodes/object-schema": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz",
"integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==",
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz",
"integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==",
"deprecated": "Use @eslint/object-schema instead",
"dev": true
},
"node_modules/@kwsites/file-exists": {
@@ -1297,16 +1299,17 @@
}
},
"node_modules/eslint": {
"version": "8.57.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz",
"integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==",
"version": "8.57.1",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz",
"integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==",
"deprecated": "This version is no longer supported. Please see https://eslint.org/version-support for other options.",
"dev": true,
"dependencies": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
"@eslint/eslintrc": "^2.1.4",
"@eslint/js": "8.57.0",
"@humanwhocodes/config-array": "^0.11.14",
"@eslint/js": "8.57.1",
"@humanwhocodes/config-array": "^0.13.0",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
"@ungap/structured-clone": "^1.2.0",
@@ -1432,13 +1435,13 @@
}
},
"node_modules/eslint-plugin-prettier": {
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz",
"integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==",
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz",
"integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==",
"dev": true,
"dependencies": {
"prettier-linter-helpers": "^1.0.0",
"synckit": "^0.8.6"
"synckit": "^0.9.1"
},
"engines": {
"node": "^14.18.0 || >=16.0.0"
@@ -1983,24 +1986,24 @@
"dev": true
},
"node_modules/gts": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/gts/-/gts-5.3.1.tgz",
"integrity": "sha512-P9F+krJkGOkisUX+P9pfUas1Xy+U+CxBFZT62uInkJbgvZpnW1ug/pIcMJJmLOthMq1J88lpQUGhXDC9UTvVcw==",
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/gts/-/gts-6.0.0.tgz",
"integrity": "sha512-wTZZYGwa67j88rEzW8nyshxHJKNk8ytGjYHu+Y1uC/B+oMTEqMNXikULzQfc5/BcmtVQ/FWurj84Q/WWS6Wd3g==",
"dev": true,
"dependencies": {
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"chalk": "^4.1.2",
"eslint": "8.57.0",
"eslint": "8.57.1",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-n": "15.7.0",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-prettier": "5.2.1",
"execa": "^5.0.0",
"inquirer": "^7.3.3",
"json5": "^2.1.3",
"meow": "^9.0.0",
"ncp": "^2.0.0",
"prettier": "3.2.5",
"prettier": "3.3.3",
"rimraf": "3.0.2",
"write-file-atomic": "^4.0.0"
},
@@ -2008,10 +2011,10 @@
"gts": "build/src/cli.js"
},
"engines": {
"node": ">=14"
"node": ">=18"
},
"peerDependencies": {
"typescript": ">=3"
"typescript": ">=5.6.3"
}
},
"node_modules/gts/node_modules/execa": {
@@ -2572,12 +2575,13 @@
}
},
"node_modules/micromatch": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
"integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
"dev": true,
"license": "MIT",
"dependencies": {
"braces": "^3.0.2",
"braces": "^3.0.3",
"picomatch": "^2.3.1"
},
"engines": {
@@ -3007,9 +3011,9 @@
}
},
"node_modules/prettier": {
"version": "3.2.5",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz",
"integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==",
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz",
"integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==",
"dev": true,
"bin": {
"prettier": "bin/prettier.cjs"
@@ -3625,9 +3629,9 @@
}
},
"node_modules/synckit": {
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz",
"integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==",
"version": "0.9.2",
"resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz",
"integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==",
"dev": true,
"dependencies": {
"@pkgr/core": "^0.1.0",
@@ -3641,9 +3645,9 @@
}
},
"node_modules/synckit/node_modules/tslib": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz",
"integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==",
"dev": true
},
"node_modules/text-table": {
@@ -4137,18 +4141,18 @@
}
},
"@eslint/js": {
"version": "8.57.0",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz",
"integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==",
"version": "8.57.1",
"resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz",
"integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==",
"dev": true
},
"@humanwhocodes/config-array": {
"version": "0.11.14",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",
"integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==",
"version": "0.13.0",
"resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz",
"integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==",
"dev": true,
"requires": {
"@humanwhocodes/object-schema": "^2.0.2",
"@humanwhocodes/object-schema": "^2.0.3",
"debug": "^4.3.1",
"minimatch": "^3.0.5"
}
@@ -4160,9 +4164,9 @@
"dev": true
},
"@humanwhocodes/object-schema": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz",
"integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==",
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.3.tgz",
"integrity": "sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==",
"dev": true
},
"@kwsites/file-exists": {
@@ -4902,16 +4906,16 @@
"integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ="
},
"eslint": {
"version": "8.57.0",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz",
"integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==",
"version": "8.57.1",
"resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz",
"integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==",
"dev": true,
"requires": {
"@eslint-community/eslint-utils": "^4.2.0",
"@eslint-community/regexpp": "^4.6.1",
"@eslint/eslintrc": "^2.1.4",
"@eslint/js": "8.57.0",
"@humanwhocodes/config-array": "^0.11.14",
"@eslint/js": "8.57.1",
"@humanwhocodes/config-array": "^0.13.0",
"@humanwhocodes/module-importer": "^1.0.1",
"@nodelib/fs.walk": "^1.2.8",
"@ungap/structured-clone": "^1.2.0",
@@ -5052,13 +5056,13 @@
}
},
"eslint-plugin-prettier": {
"version": "5.1.3",
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.1.3.tgz",
"integrity": "sha512-C9GCVAs4Eq7ZC/XFQHITLiHJxQngdtraXaM+LoUFoFp/lHNl2Zn8f3WQbe9HvTBBQ9YnKFB0/2Ajdqwo5D1EAw==",
"version": "5.2.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-5.2.1.tgz",
"integrity": "sha512-gH3iR3g4JfF+yYPaJYkN7jEl9QbweL/YfkoRlNnuIEHEz1vHVlCmWOS+eGGiRuzHQXdJFCOTxRgvju9b8VUmrw==",
"dev": true,
"requires": {
"prettier-linter-helpers": "^1.0.0",
"synckit": "^0.8.6"
"synckit": "^0.9.1"
}
},
"eslint-scope": {
@@ -5388,24 +5392,24 @@
"dev": true
},
"gts": {
"version": "5.3.1",
"resolved": "https://registry.npmjs.org/gts/-/gts-5.3.1.tgz",
"integrity": "sha512-P9F+krJkGOkisUX+P9pfUas1Xy+U+CxBFZT62uInkJbgvZpnW1ug/pIcMJJmLOthMq1J88lpQUGhXDC9UTvVcw==",
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/gts/-/gts-6.0.0.tgz",
"integrity": "sha512-wTZZYGwa67j88rEzW8nyshxHJKNk8ytGjYHu+Y1uC/B+oMTEqMNXikULzQfc5/BcmtVQ/FWurj84Q/WWS6Wd3g==",
"dev": true,
"requires": {
"@typescript-eslint/eslint-plugin": "5.62.0",
"@typescript-eslint/parser": "5.62.0",
"chalk": "^4.1.2",
"eslint": "8.57.0",
"eslint": "8.57.1",
"eslint-config-prettier": "9.1.0",
"eslint-plugin-n": "15.7.0",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-prettier": "5.2.1",
"execa": "^5.0.0",
"inquirer": "^7.3.3",
"json5": "^2.1.3",
"meow": "^9.0.0",
"ncp": "^2.0.0",
"prettier": "3.2.5",
"prettier": "3.3.3",
"rimraf": "3.0.2",
"write-file-atomic": "^4.0.0"
},
@@ -5823,12 +5827,12 @@
"dev": true
},
"micromatch": {
"version": "4.0.5",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz",
"integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==",
"version": "4.0.8",
"resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz",
"integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==",
"dev": true,
"requires": {
"braces": "^3.0.2",
"braces": "^3.0.3",
"picomatch": "^2.3.1"
}
},
@@ -6140,9 +6144,9 @@
"dev": true
},
"prettier": {
"version": "3.2.5",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz",
"integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==",
"version": "3.3.3",
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.3.3.tgz",
"integrity": "sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==",
"dev": true
},
"prettier-linter-helpers": {
@@ -6581,9 +6585,9 @@
"dev": true
},
"synckit": {
"version": "0.8.8",
"resolved": "https://registry.npmjs.org/synckit/-/synckit-0.8.8.tgz",
"integrity": "sha512-HwOKAP7Wc5aRGYdKH+dw0PRRpbO841v2DENBtjnR5HFWoiNByAl7vrx3p0G/rCyYXQsrxqtX48TImFtPcIHSpQ==",
"version": "0.9.2",
"resolved": "https://registry.npmjs.org/synckit/-/synckit-0.9.2.tgz",
"integrity": "sha512-vrozgXDQwYO72vHjUb/HnFbQx1exDjoKzqx23aXEg2a9VIg2TSFZ8FmeZpTjUCFMYw7mpX4BE2SFu8wI7asYsw==",
"dev": true,
"requires": {
"@pkgr/core": "^0.1.0",
@@ -6591,9 +6595,9 @@
},
"dependencies": {
"tslib": {
"version": "2.6.2",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
"integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
"version": "2.8.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.0.tgz",
"integrity": "sha512-jWVzBLplnCmoaTr13V9dYbiQ99wvZRd0vNWaDRg+aVYRcjDF3nDksxFDE/+fkXnKhpnUUkmx5pK/v8mCtLVqZA==",
"dev": true
}
}

View File

@@ -28,7 +28,7 @@
"@vercel/ncc": "^0.38.2",
"all-contributors-cli": "^6.26.1",
"eslint-config-prettier": "^9.1.0",
"gts": "^5.3.1",
"gts": "^6.0.0",
"husky": "^9.1.6",
"typescript": "~5.6.3"
},

View File

@@ -48,11 +48,11 @@ Object.entries(outputs).forEach(([name, value]) => core.setOutput(name, value));
export function getInput<T extends input>(name: T, parseAsBool: true): boolean;
export function getInput<T extends input>(
name: T,
parseAsBool?: false
parseAsBool?: false,
): InputTypes[T];
export function getInput<T extends input>(
name: T,
parseAsBool = false
parseAsBool = false,
): InputTypes[T] | boolean {
if (parseAsBool) return core.getBooleanInput(name);
return core.getInput(name) as InputTypes[T];
@@ -85,18 +85,18 @@ export async function checkInputs() {
// #region add, remove
if (!getInput('add') && !getInput('remove'))
throw new Error(
"Both 'add' and 'remove' are empty, the action has nothing to do."
"Both 'add' and 'remove' are empty, the action has nothing to do.",
);
if (getInput('add')) {
const parsed = parseInputArray(getInput('add'));
if (parsed.length === 1)
core.info(
'Add input parsed as single string, running 1 git add command.'
'Add input parsed as single string, running 1 git add command.',
);
else if (parsed.length > 1)
core.info(
`Add input parsed as string array, running ${parsed.length} git add commands.`
`Add input parsed as string array, running ${parsed.length} git add commands.`,
);
else core.setFailed('Add input: array length < 1');
}
@@ -104,11 +104,11 @@ export async function checkInputs() {
const parsed = parseInputArray(getInput('remove') || '');
if (parsed.length === 1)
core.info(
'Remove input parsed as single string, running 1 git rm command.'
'Remove input parsed as single string, running 1 git rm command.',
);
else if (parsed.length > 1)
core.info(
`Remove input parsed as string array, running ${parsed.length} git rm commands.`
`Remove input parsed as string array, running ${parsed.length} git rm commands.`,
);
else core.setFailed('Remove input: array length < 1');
}
@@ -119,10 +119,10 @@ export async function checkInputs() {
if (!default_author_valid.includes(getInput('default_author')))
throw new Error(
`'${getInput(
'default_author'
'default_author',
)}' is not a valid value for default_author. Valid values: ${default_author_valid.join(
', '
)}`
', ',
)}`,
);
// #endregion
@@ -154,11 +154,11 @@ export async function checkInputs() {
const res = await getUserInfo(process.env.GITHUB_ACTOR);
if (!res?.name)
core.warning(
"Couldn't fetch author name, filling with github_actor."
"Couldn't fetch author name, filling with github_actor.",
);
if (!res?.email)
core.warning(
"Couldn't fetch author email, filling with github_actor."
"Couldn't fetch author email, filling with github_actor.",
);
res?.name && (name = res?.name);
@@ -180,7 +180,7 @@ export async function checkInputs() {
default:
throw new Error(
'This should not happen, please contact the author of this action. (checkInputs.author)'
'This should not happen, please contact the author of this action. (checkInputs.author)',
);
}
@@ -188,8 +188,8 @@ export async function checkInputs() {
setDefault('author_email', email);
core.info(
`> Using '${getInput('author_name')} <${getInput(
'author_email'
)}>' as author.`
'author_email',
)}>' as author.`,
);
// #endregion
@@ -202,20 +202,20 @@ export async function checkInputs() {
} <${
getInput('committer_email') ||
getInput('author_email') + ' [from author info]'
}>`
}>`,
);
setDefault('committer_name', getInput('author_name'));
setDefault('committer_email', getInput('author_email'));
core.debug(
`Committer: ${getInput('committer_name')} <${getInput('committer_email')}>`
`Committer: ${getInput('committer_name')} <${getInput('committer_email')}>`,
);
// #endregion
// #region message
setDefault(
'message',
`Commit from GitHub Actions (${process.env.GITHUB_WORKFLOW})`
`Commit from GitHub Actions (${process.env.GITHUB_WORKFLOW})`,
);
core.info(`> Using "${getInput('message')}" as commit message.`);
// #endregion
@@ -225,17 +225,17 @@ export async function checkInputs() {
if (!peh_valid.includes(getInput('pathspec_error_handling')))
throw new Error(
`"${getInput(
'pathspec_error_handling'
'pathspec_error_handling',
)}" is not a valid value for the 'pathspec_error_handling' input. Valid values are: ${peh_valid.join(
', '
)}`
', ',
)}`,
);
// #endregion
// #region pull
if (getInput('pull') === 'NO-PULL')
core.warning(
"`NO-PULL` is a legacy option for the `pull` input. If you don't want the action to pull the repo, simply remove this input."
"`NO-PULL` is a legacy option for the `pull` input. If you don't want the action to pull the repo, simply remove this input.",
);
// #endregion
@@ -257,7 +257,7 @@ export async function checkInputs() {
// #region github_token
if (!getInput('github_token'))
core.warning(
'No github_token has been detected, the action may fail if it needs to use the API'
'No github_token has been detected, the action may fail if it needs to use the API',
);
// #endregion
}

View File

@@ -39,8 +39,8 @@ core.info(`Running in ${baseDir}`);
core.info(`> Found ${changedFiles} changed files.`);
core.debug(
`--allow-empty argument detected: ${matchGitArgs(
getInput('commit') || ''
).includes('--allow-empty')}`
getInput('commit') || '',
).includes('--allow-empty')}`,
);
await git
@@ -52,7 +52,7 @@ core.info(`Running in ${baseDir}`);
.addConfig('committer.name', getInput('committer_name'), undefined, log);
core.debug(
'> Current git config\n' +
JSON.stringify((await git.listConfig()).all, null, 2)
JSON.stringify((await git.listConfig()).all, null, 2),
);
let fetchOption: string | boolean;
@@ -65,7 +65,7 @@ core.info(`Running in ${baseDir}`);
core.info('> Fetching repo...');
await git.fetch(
matchGitArgs(fetchOption === true ? '' : fetchOption),
log
log,
);
} else core.info('> Not fetching repo.');
@@ -75,7 +75,7 @@ core.info(`Running in ${baseDir}`);
if (!fetchOption)
core.warning(
'Creating a new branch without fetching the repo first could result in an error when pushing to GitHub. Refer to the action README for more info about this topic.'
'Creating a new branch without fetching the repo first could result in an error when pushing to GitHub. Refer to the action README for more info about this topic.',
);
await git
@@ -109,7 +109,7 @@ core.info(`Running in ${baseDir}`);
throw new Error(
`There are ${
status.conflicted.length
} conflicting files: ${status.conflicted.join(', ')}`
} conflicting files: ${status.conflicted.join(', ')}`,
);
} else core.info('> Not pulling from repo.');
@@ -129,7 +129,7 @@ core.info(`Running in ${baseDir}`);
if (!fetchOption)
core.warning(
'Creating a tag without fetching the repo first could result in an error when pushing to GitHub. Refer to the action README for more info about this topic.'
'Creating a tag without fetching the repo first could result in an error when pushing to GitHub. Refer to the action README for more info about this topic.',
);
await git
@@ -158,7 +158,7 @@ core.info(`Running in ${baseDir}`);
core.debug(
`Running: git push origin ${
getInput('new_branch') || ''
} --set-upstream`
} --set-upstream`,
);
await git.push(
'origin',
@@ -167,7 +167,7 @@ core.info(`Running in ${baseDir}`);
(err, data?) => {
if (data) setOutput('pushed', 'true');
return log(err, data);
}
},
);
} else {
core.debug(`Running: git push ${pushOption}`);
@@ -178,7 +178,7 @@ core.info(`Running in ${baseDir}`);
(err, data?) => {
if (data) setOutput('pushed', 'true');
return log(err, data);
}
},
);
}
@@ -230,7 +230,7 @@ async function add(ignoreErrors: 'all' | 'pathspec' | 'none' = 'none') {
// If any of them fails, the whole function will return a Promise rejection
await git
.add(matchGitArgs(args), (err, data) =>
log(ignoreErrors === 'all' ? null : err, data)
log(ignoreErrors === 'all' ? null : err, data),
)
.catch((e: Error) => {
// if I should ignore every error, return
@@ -245,12 +245,12 @@ async function add(ignoreErrors: 'all' | 'pathspec' | 'none' = 'none') {
const peh = getInput('pathspec_error_handling'),
err = new Error(
`Add command did not match any file: git add ${args}`
`Add command did not match any file: git add ${args}`,
);
if (peh === 'exitImmediately') throw err;
if (peh === 'exitAtEnd') exitErrors.push(err);
} else throw e;
})
}),
);
}
@@ -258,7 +258,7 @@ async function add(ignoreErrors: 'all' | 'pathspec' | 'none' = 'none') {
}
async function remove(
ignoreErrors: 'all' | 'pathspec' | 'none' = 'none'
ignoreErrors: 'all' | 'pathspec' | 'none' = 'none',
): Promise<(void | Response<void>)[]> {
const input = getInput('remove');
if (!input) return [];
@@ -272,7 +272,7 @@ async function remove(
// If any of them fails, the whole function will return a Promise rejection
await git
.rm(matchGitArgs(args), (e, d) =>
log(ignoreErrors === 'all' ? null : e, d)
log(ignoreErrors === 'all' ? null : e, d),
)
.catch((e: Error) => {
// if I should ignore every error, return
@@ -287,12 +287,12 @@ async function remove(
const peh = getInput('pathspec_error_handling'),
err = new Error(
`Remove command did not match any file:\n git rm ${args}`
`Remove command did not match any file:\n git rm ${args}`,
);
if (peh === 'exitImmediately') throw err;
if (peh === 'exitAtEnd') exitErrors.push(err);
} else throw e;
})
}),
);
}

View File

@@ -21,7 +21,7 @@ export async function getUserInfo(username?: string) {
const res = await tools.github.users.getByUsername({username});
core.debug(
`Fetched github actor from the API: ${JSON.stringify(res?.data, null, 2)}`
`Fetched github actor from the API: ${JSON.stringify(res?.data, null, 2)}`,
);
return {

View File

@@ -3,6 +3,7 @@
"compilerOptions": {
"rootDir": "./src",
"outDir": "./lib",
"composite": false,
"declaration": false
},
"include": [