OMEX-Azure-DevOps-Extensions/package.json

101 строка
3.8 KiB
JSON
Исходник Постоянная ссылка Обычный вид История

2021-03-19 22:14:11 +03:00
{
2021-03-31 21:51:02 +03:00
"$schema": "https://json.schemastore.org/package.json",
"name": "prmetrics",
"publisher": "ms-omex",
"version": "1.6.3",
"description": "Augments pull request titles to let reviewers quickly determine PR size and test coverage.",
"main": "dist/index.js",
"scripts": {
M⚠️ ◾ Modernising Linting (#511) ## Summary Updating ESLint to use the modern configuration file and work with the newer releases. This resulted in some new violations, many of which have been fixed as part of these changes. Others are suppressed and will be considered for resolution in the future. ### Detailed Description This includes several changes mainly aimed at improving code quality, updating the version of the software, and modifying the test coverage requirements. The most significant changes include the modification of the `.c8rc.json` file to require 100% test coverage, removal of the `.eslintrc.yml` file, addition of the `eslint.config.mjs` file, updates to the version of the software in several files, and various code quality improvements in TypeScript files. **Test coverage requirement changes:** * [`.c8rc.json`](diffhunk://#diff-9fd2b089a79150b0fd1cad8f8961358547e3cc3256f8466c8602c647e5734de1L7-R10): Modified the test coverage requirements to 100% for statements, branches, functions, and lines. **ESLint configuration changes:** * [`.eslintrc.yml`](diffhunk://#diff-9e1ecc14c733bb1ae2e523089f1262ac6ffccbcf950487ee0984403603550e57L1-L18): Removed this file. * [`eslint.config.mjs`](diffhunk://#diff-9601a8f6c734c2001be34a2361f76946d19a39a709b5e8c624a2a5a0aade05f2R1-R82): Added this file to configure ESLint. **Version updates:** * [`.github/workflows/release-phase-1.yml`](diffhunk://#diff-a775c174b4973a7a42b20039065ebe3444ca9b3e3d28ee17ec7f8da67924460bL24-R25): Updated the minor version and reset the patch version. * [`.github/workflows/support/release-trigger.txt`](diffhunk://#diff-4a1ff8fb39a32cd5133d791b3ed91ed72e8ab200b9a45f157f2c422a94a5c11fL1-R1): Updated the version. * [`README.md`](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L116-R116): Updated the version in two places. [[1]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L116-R116) [[2]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L126-R126) * [`package.json`](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L5-R20): Updated the version. * [`src/task/Strings/resources.resjson/en-US/resources.resjson`](diffhunk://#diff-c0fc6893012d5b83ce394e09ff298a469483e5eec91edd15b9744fc81db6f598L5-R5): Updated the version. **Code quality improvements:** * [`src/task/index.ts`](diffhunk://#diff-445f33c5199a2e71fde9062a5f8c6b5237e3230e83e8be8fcfbf06de48abd5abL1-R12): Modified the run function to be an arrow function and added await to the call to `pullRequestMetrics.run(__dirname)`. * [`src/task/src/git/gitInvoker.ts`](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L1-R10): Made several changes to improve code quality, such as using radix parameter in `parseInt` calls, removing unnecessary else blocks, and changing the `for` loop to use `+= 1` instead of `++`. [[1]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L1-R10) [[2]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L56-R58) [[3]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L87-R89) [[4]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L160-R163) [[5]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L169) [[6]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L183-R187) * [`src/task/src/git/octokitGitDiffParser.ts`](diffhunk://#diff-0e959b5630206a4ce8a405c21439f051d4bd44fee10de7c1976ba982365899bbL69-R79): Changed the `diffResponses` split to use the `u` flag in the regular expression and modified the `for` loop to use template literals. * [`src/task/src/metrics/codeMetrics.ts`](diffhunk://#diff-f34569608b714fbc5a7b215183b770a19aec3c8056562c96219e2bcaea0fb794L45-R47): Made the constructor public and changed an `Error` throw to use `new Error`. [[1]](diffhunk://#diff-f34569608b714fbc5a7b215183b770a19aec3c8056562c96219e2bcaea0fb794L45-R47) [[2]](diffhunk://#diff-f34569608b714fbc5a7b215183b770a19aec3c8056562c96219e2bcaea0fb794L138-R140) ## Testing ### Test Types - [X] Unit tests - [X] Manual tests ### Unit Test Coverage 100% --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-18 17:26:50 +03:00
"build:initialization": "npm ci && cross-env-shell \"mkdirp $npm_config_dir && ncp src $npm_config_dir\"",
"build:debug": "npm run build:initialization --dir=debug && cd debug/task && tsc --sourceMap",
"build:release": "npm run build:initialization --dir=release && cd release/task && tsc && ncc build index.js --out . --minify && babel index.js --out-file index2.js --config-file ../../babel.config.json && ncc build index2.js --out . --minify && ncp index2.js index.js && rimraf src tests typedocs *.ts index2.js package.json tsconfig.json typedoc.json && cd .. && mkdirp extension && ncp ../package.json extension/package.json",
XS⚠️ ◾ Repo Enhancements (#509) ## Summary This changes the project's configuration files and build scripts. The most significant changes include the addition of hardening steps to the GitHub Actions workflows, updates to Node.js and npm commands, and modifications to file paths and URLs. GitHub Actions Workflow Updates: * `Harden Runner` steps have been added to all jobs in the `.github/workflows/build.yml`, `.github/workflows/release-phase-1-internal.yml`, `.github/workflows/release-phase-2.yml`, and `.github/workflows/support/release-phase-1-comment.md` files. These steps use the `step-security/harden-runner` action to improve the security of the runner environment. [[1]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721R31-R36) [[2]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721R94-R109) [[3]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721L108-L111) [[4]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721R137-R142) [[5]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721L147-R169) [[6]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721L157-L287) [[7]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721R197-R202) [[8]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721R228-R233) [[9]](diffhunk://#diff-14e6314d4859c0dde5728dcd1d7101abd5a80d211b4e9c7153f246eba26f7f9fR32-R37) [[10]](diffhunk://#diff-c7e4bd8feb36835f6722b91d36ca67dcad2ece6f364e0404754016195651f1b0R24-L41) [[11]](diffhunk://#diff-97db29a7915320e63d41d38a0440360a87055ee8ed03757aa263116dbbb4aabeL131-R131) [[12]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L9-R12) Node.js and npm Command Updates: * The Node.js version used in the workflows has been downgraded from 22.x to LTS 20.14.0. [[1]](diffhunk://#diff-25f998e817515523e95edd3b4e0eb06fad5909deec7e3d4b7d57f4912cb39349L71-R79) [[2]](diffhunk://#diff-9ba73744bad564cb8afb7eac4a1ffce0822431667e90f80de88300f094aae565L36-R41) [[3]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721L43-R52) [[4]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721R94-R109) [[5]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721L108-L111) [[6]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721R137-R142) [[7]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721L147-R169) [[8]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721R197-R202) [[9]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721R228-R233) [[10]](diffhunk://#diff-c7e4bd8feb36835f6722b91d36ca67dcad2ece6f364e0404754016195651f1b0R24-L41) * The `npm install` commands have been replaced with `npm ci` for more reliable dependency installations. [[1]](diffhunk://#diff-25f998e817515523e95edd3b4e0eb06fad5909deec7e3d4b7d57f4912cb39349L71-R79) [[2]](diffhunk://#diff-9ba73744bad564cb8afb7eac4a1ffce0822431667e90f80de88300f094aae565L36-R41) [[3]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721L43-R52) [[4]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721R94-R109) [[5]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721L108-L111) [[6]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721R137-R142) [[7]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721L147-R169) [[8]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721R197-R202) [[9]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721R228-R233) [[10]](diffhunk://#diff-c7e4bd8feb36835f6722b91d36ca67dcad2ece6f364e0404754016195651f1b0R24-L41) [[11]](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L9-R12) * The `npm-check-updates` package has been added to the project's dependencies. File Path and URL Modifications: * The `indent_size` setting for the `LICENSE.txt` file has been moved to the `src/LICENSE.txt` file in the `.editorconfig` file. * Several URLs in the `README.md` and `docs/development.md` files have been updated to their correct versions. [[1]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L177-R182) [[2]](diffhunk://#diff-97db29a7915320e63d41d38a0440360a87055ee8ed03757aa263116dbbb4aabeL131-R131) * The `LICENSE.txt` reference in the `README.md` file has been updated to `LICENSE` so that it will be picked up by GitHub. * The `npm install -g tfx-cli` step has been removed from the `.github/workflows/build.yml` and `.github/workflows/release-phase-2.yml` files. The `tfx-cli` command is now run with `npx`. [[1]](diffhunk://#diff-5c3fa597431eda03ac3339ae6bf7f05e1a50d6fc7333679ec38e21b337cb6721L108-L111) [[2]](diffhunk://#diff-c7e4bd8feb36835f6722b91d36ca67dcad2ece6f364e0404754016195651f1b0R24-L41) * The `npm install -g npm-check-updates` step has been removed from the `.github/workflows/release-phase-1-internal.yml` file. The `ncu -u` command is now run with `npx`. * The `npm install && mkdirp $npm_config_dir && ncp src $npm_config_dir` command in the `build:initialization` script in the `package.json` file has been updated to use `npm ci` instead of `npm install`. * The URL for the `reflect-metadata` library in the `src/LICENSE.txt` file has been added.
2024-06-07 11:23:19 +03:00
"build:package": "npm ci && ncc build src/task/index.ts --out dist --minify && rimraf dist/package.json && ncp src/task/Strings/resources.resjson/en-US/resources.resjson dist/resources.resjson",
"build:docs": "cd src/task && typedoc",
"build": "npm run build:release && npm run build:package && npm run build:docs",
"clean": "rimraf debug && rimraf release",
"deploy": "npm run build:release && exitzero tfx build tasks delete --task-id 907d3b28-6b37-4ac7-ac75-9631ee53e512 --no-prompt && tfx build tasks upload --task-path release/task --no-prompt",
L✔ ◾ Enhancing linting (#537) ## Summary This change adds additional linting rules, to create a more prescriptive and less ad hoc design. This is designed to help facilitate external contributions to maintain the existing style. These changes have been automatically or manually applied but are typically fairly mechanical. Therefore, there should be little risk of regression. ## Detailed Summary This includes several changes to improve code quality, update dependencies, and enhance error handling. The most important changes include updating the ESLint configuration, modifying the `package.json` file, and refactoring the `GitInvoker` class. ### ESLint Configuration Updates: * Changed ESLint configuration to use recommended and strict type-checked settings, and replaced single quotes with double quotes for consistency. (`eslint.config.mjs`, [eslint.config.mjsL6-R354](diffhunk://#diff-9601a8f6c734c2001be34a2361f76946d19a39a709b5e8c624a2a5a0aade05f2L6-R354)) * Updated rules to enforce stricter linting, including rules such as `@typescript-eslint/explicit-function-return-type` and `@typescript-eslint/no-unused-expressions`. (`eslint.config.mjs`, [eslint.config.mjsL6-R354](diffhunk://#diff-9601a8f6c734c2001be34a2361f76946d19a39a709b5e8c624a2a5a0aade05f2L6-R354)) ### `package.json` Modifications: * Updated the lint script to target TypeScript files. (`package.json`, [package.jsonL17-R17](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L17-R17)) * Added the `http-status-codes` dependency. (`package.json`, [package.jsonR55](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R55)) ### Code Refactoring: * Improved error handling in `index.ts` by adding a catch block to exit with a failure code. (`src/task/index.ts`, [src/task/index.tsR9-R19](diffhunk://#diff-445f33c5199a2e71fde9062a5f8c6b5237e3230e83e8be8fcfbf06de48abd5abR9-R19)) * Refactored `GitInvoker` class to remove redundant methods and use more concise syntax. (`src/task/src/git/gitInvoker.ts`, [[1]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L7-R10) [[2]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L22-R25) [[3]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L37-L80) [[4]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L93-L124) [[5]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L142-R101) [[6]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L182-R113) [[7]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L206-R137) ## Testing ### Test Types - [X] Unit tests - [X] Manual tests ### Unit Test Coverage 100% --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-06 10:57:34 +03:00
"lint": "eslint --fix **/*.ts",
M⚠️ ◾ Modernising Linting (#511) ## Summary Updating ESLint to use the modern configuration file and work with the newer releases. This resulted in some new violations, many of which have been fixed as part of these changes. Others are suppressed and will be considered for resolution in the future. ### Detailed Description This includes several changes mainly aimed at improving code quality, updating the version of the software, and modifying the test coverage requirements. The most significant changes include the modification of the `.c8rc.json` file to require 100% test coverage, removal of the `.eslintrc.yml` file, addition of the `eslint.config.mjs` file, updates to the version of the software in several files, and various code quality improvements in TypeScript files. **Test coverage requirement changes:** * [`.c8rc.json`](diffhunk://#diff-9fd2b089a79150b0fd1cad8f8961358547e3cc3256f8466c8602c647e5734de1L7-R10): Modified the test coverage requirements to 100% for statements, branches, functions, and lines. **ESLint configuration changes:** * [`.eslintrc.yml`](diffhunk://#diff-9e1ecc14c733bb1ae2e523089f1262ac6ffccbcf950487ee0984403603550e57L1-L18): Removed this file. * [`eslint.config.mjs`](diffhunk://#diff-9601a8f6c734c2001be34a2361f76946d19a39a709b5e8c624a2a5a0aade05f2R1-R82): Added this file to configure ESLint. **Version updates:** * [`.github/workflows/release-phase-1.yml`](diffhunk://#diff-a775c174b4973a7a42b20039065ebe3444ca9b3e3d28ee17ec7f8da67924460bL24-R25): Updated the minor version and reset the patch version. * [`.github/workflows/support/release-trigger.txt`](diffhunk://#diff-4a1ff8fb39a32cd5133d791b3ed91ed72e8ab200b9a45f157f2c422a94a5c11fL1-R1): Updated the version. * [`README.md`](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L116-R116): Updated the version in two places. [[1]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L116-R116) [[2]](diffhunk://#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L126-R126) * [`package.json`](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L5-R20): Updated the version. * [`src/task/Strings/resources.resjson/en-US/resources.resjson`](diffhunk://#diff-c0fc6893012d5b83ce394e09ff298a469483e5eec91edd15b9744fc81db6f598L5-R5): Updated the version. **Code quality improvements:** * [`src/task/index.ts`](diffhunk://#diff-445f33c5199a2e71fde9062a5f8c6b5237e3230e83e8be8fcfbf06de48abd5abL1-R12): Modified the run function to be an arrow function and added await to the call to `pullRequestMetrics.run(__dirname)`. * [`src/task/src/git/gitInvoker.ts`](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L1-R10): Made several changes to improve code quality, such as using radix parameter in `parseInt` calls, removing unnecessary else blocks, and changing the `for` loop to use `+= 1` instead of `++`. [[1]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L1-R10) [[2]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L56-R58) [[3]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L87-R89) [[4]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L160-R163) [[5]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L169) [[6]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L183-R187) * [`src/task/src/git/octokitGitDiffParser.ts`](diffhunk://#diff-0e959b5630206a4ce8a405c21439f051d4bd44fee10de7c1976ba982365899bbL69-R79): Changed the `diffResponses` split to use the `u` flag in the regular expression and modified the `for` loop to use template literals. * [`src/task/src/metrics/codeMetrics.ts`](diffhunk://#diff-f34569608b714fbc5a7b215183b770a19aec3c8056562c96219e2bcaea0fb794L45-R47): Made the constructor public and changed an `Error` throw to use `new Error`. [[1]](diffhunk://#diff-f34569608b714fbc5a7b215183b770a19aec3c8056562c96219e2bcaea0fb794L45-R47) [[2]](diffhunk://#diff-f34569608b714fbc5a7b215183b770a19aec3c8056562c96219e2bcaea0fb794L138-R140) ## Testing ### Test Types - [X] Unit tests - [X] Manual tests ### Unit Test Coverage 100% --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-06-18 17:26:50 +03:00
"test": "npm run build:debug && cd debug/task && c8 --reporter=text --reporter=text-summary mocha tests/**/*.spec.js",
"test:fast": "cross-env-shell \"mkdirp debug && ncp src debug\" && cd debug/task && tsc --sourceMap && c8 --reporter=text --reporter=text-summary mocha tests/**/*.spec.js",
"update:package": "npm update"
},
2021-03-19 22:14:11 +03:00
"repository": {
"type": "git",
"url": "git+https://github.com/microsoft/PR-Metrics.git"
2021-03-19 22:14:11 +03:00
},
"keywords": [
"Extension",
"Marketplace",
"Continuous Integration",
"Continuous Delivery",
"Build",
"Release",
"GitHub Actions",
"Azure Pipelines",
"Azure DevOps Extensions",
"Visual Studio Extensions"
2021-03-19 22:14:11 +03:00
],
"author": "Microsoft Corporation",
"license": "MIT",
"bugs": {
"url": "https://github.com/microsoft/PR-Metrics/issues"
},
"homepage": "https://github.com/microsoft/PR-Metrics#readme",
"engines": {
"node": ">=16.20.2"
},
"dependencies": {
"@actions/core": "1.10.1",
"@actions/exec": "1.1.1",
"@octokit/plugin-rest-endpoint-methods": "13.2.4",
"@octokit/types": "13.5.0",
"axios": "1.7.7",
"azure-devops-node-api": "14.0.2",
"azure-pipelines-task-lib": "4.17.0",
L✔ ◾ Enhancing linting (#537) ## Summary This change adds additional linting rules, to create a more prescriptive and less ad hoc design. This is designed to help facilitate external contributions to maintain the existing style. These changes have been automatically or manually applied but are typically fairly mechanical. Therefore, there should be little risk of regression. ## Detailed Summary This includes several changes to improve code quality, update dependencies, and enhance error handling. The most important changes include updating the ESLint configuration, modifying the `package.json` file, and refactoring the `GitInvoker` class. ### ESLint Configuration Updates: * Changed ESLint configuration to use recommended and strict type-checked settings, and replaced single quotes with double quotes for consistency. (`eslint.config.mjs`, [eslint.config.mjsL6-R354](diffhunk://#diff-9601a8f6c734c2001be34a2361f76946d19a39a709b5e8c624a2a5a0aade05f2L6-R354)) * Updated rules to enforce stricter linting, including rules such as `@typescript-eslint/explicit-function-return-type` and `@typescript-eslint/no-unused-expressions`. (`eslint.config.mjs`, [eslint.config.mjsL6-R354](diffhunk://#diff-9601a8f6c734c2001be34a2361f76946d19a39a709b5e8c624a2a5a0aade05f2L6-R354)) ### `package.json` Modifications: * Updated the lint script to target TypeScript files. (`package.json`, [package.jsonL17-R17](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519L17-R17)) * Added the `http-status-codes` dependency. (`package.json`, [package.jsonR55](diffhunk://#diff-7ae45ad102eab3b6d7e7896acd08c427a9b25b346470d7bc6507b6481575d519R55)) ### Code Refactoring: * Improved error handling in `index.ts` by adding a catch block to exit with a failure code. (`src/task/index.ts`, [src/task/index.tsR9-R19](diffhunk://#diff-445f33c5199a2e71fde9062a5f8c6b5237e3230e83e8be8fcfbf06de48abd5abR9-R19)) * Refactored `GitInvoker` class to remove redundant methods and use more concise syntax. (`src/task/src/git/gitInvoker.ts`, [[1]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L7-R10) [[2]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L22-R25) [[3]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L37-L80) [[4]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L93-L124) [[5]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L142-R101) [[6]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L182-R113) [[7]](diffhunk://#diff-393c3008fe54c65d56363117b91baeb2bfacc051055e6fbffc71df7ea919cc28L206-R137) ## Testing ### Test Types - [X] Unit tests - [X] Manual tests ### Unit Test Coverage 100% --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-06 10:57:34 +03:00
"http-status-codes": "2.3.0",
"isomorphic-fetch": "3.0.0",
"octokit": "3.2.1",
"parse-git-diff": "0.0.15",
"reflect-metadata": "0.2.2",
"tsyringe": "4.8.0"
2021-03-19 22:14:11 +03:00
},
"devDependencies": {
"@babel/cli": "7.25.6",
"@babel/core": "7.25.2",
"@babel/preset-env": "7.25.4",
"@tsconfig/node16": "16.1.3",
"@types/glob": "8.1.0",
"@types/isomorphic-fetch": "0.0.39",
"@types/mocha": "10.0.7",
"@types/node": "22.5.4",
"@typescript-eslint/eslint-plugin": "8.4.0",
"@typescript-eslint/parser": "8.4.0",
"@vercel/ncc": "0.38.1",
"babel-plugin-transform-globalthis": "1.0.0",
"c8": "10.1.2",
"cross-env": "7.0.3",
"eslint": "9.9.1",
"exitzero": "1.0.1",
"glob": "11.0.0",
"mkdirp": "3.0.1",
"mocha": "10.7.3",
"ncp": "2.0.0",
"npm-check-updates": "17.1.1",
"rimraf": "6.0.1",
"source-map-support": "0.5.21",
"tfx-cli": "0.17.0",
"ts-mockito": "2.6.1",
"typedoc": "0.26.6",
"typescript": "5.5.4",
"typescript-eslint": "8.4.0"
},
"overrides": {
"@octokit/core": "5.2.0"
},
"ts-standard": {
"ignore": [
"dist"
]
2021-03-19 22:14:11 +03:00
}
}