diff --git a/.eslintrc b/.eslintrc index 3377c72..2dca327 100644 --- a/.eslintrc +++ b/.eslintrc @@ -19,10 +19,16 @@ }, "plugins": ["react", "@typescript-eslint"], "rules": { - "react/react-in-jsx-scope": "off" + "react/react-in-jsx-scope": "off", + "@typescript-eslint/no-explicit-any": "off" }, "globals": { "chrome": "readonly" }, - "ignorePatterns": ["watch.js", "dist/**"] + "ignorePatterns": ["watch.js", "dist/**"], + "settings": { + "react": { + "version": "detect" + } + } } diff --git a/.github/stale.yml b/.github/stale.yml deleted file mode 100644 index 5b542d5..0000000 --- a/.github/stale.yml +++ /dev/null @@ -1,17 +0,0 @@ -# Number of days of inactivity before an issue becomes stale -daysUntilStale: 14 -# Number of days of inactivity before a stale issue is closed -daysUntilClose: 3 -# Issues with these labels will never be considered stale -exemptLabels: - - pinned - - security -# Label to use when marking an issue as stale -staleLabel: wontfix -# Comment to post when marking an issue as stale. Set to `false` to disable -markComment: > - This issue has been automatically marked as stale because it has not had - recent activity. It will be closed if no further activity occurs. Thank you - for your contributions. -# Comment to post when closing a stale issue. Set to `false` to disable -closeComment: true \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..82513a4 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,74 @@ +name: Build + +on: + workflow_call: + inputs: + version_full: + required: true + type: string + version_major: + required: true + type: string + version_minor: + required: true + type: string + version_patch: + required: true + type: string + version_build: + required: true + type: string + current_branch: + required: true + type: string + +jobs: + build: + strategy: + matrix: + include: + - os: ubuntu-latest + browser: chrome + - os: ubuntu-latest + browser: firefox + - os: ubuntu-latest + browser: edge + - os: macos-latest + browser: safari + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: '21' + + - name: Set Version + run: npm version --no-git-tag-version --allow-same-version ${{ inputs.version_full }} + + - name: Install dependencies + run: npm install + + - name: Build + run: npm run build ${{ matrix.browser }} + + - name: Generate Safari Project + if: matrix.browser == 'safari' + run: npm run build-safari + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: extension-${{ matrix.browser }} + path: dist/${{ matrix.browser }} + + - name: Upload Safari Project + if: matrix.browser == 'safari' + uses: actions/upload-artifact@v4 + with: + name: extension-safari-project + path: xcode/ + \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..3368602 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,24 @@ +name: Lint + +on: + workflow_call: + +jobs: + lint: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v2 + with: + node-version: '21' + + - name: Install dependencies + run: npm install + + - name: Lint + run: npx eslint src + + \ No newline at end of file diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..10e8a31 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,39 @@ +name: main + +on: + push: + branches: + - main + pull_request: + +concurrency: + group: ${{ github.repository }}-${{ github.workflow }}-${{ github.ref }}-${{ github.ref == 'refs/heads/main' && github.sha || ''}} + cancel-in-progress: true + +jobs: + determine-version: + uses: StaflSystems/CustomGitHubActions/.github/workflows/determine-version.yml@main + secrets: inherit + + lint: + uses: ./.github/workflows/lint.yml + secrets: inherit + + build: + uses: ./.github/workflows/build.yml + secrets: inherit + needs: [ determine-version ] + with: + version_full: ${{ needs.determine-version.outputs.version_full }} + version_major: ${{ needs.determine-version.outputs.version_major }} + version_minor: ${{ needs.determine-version.outputs.version_minor }} + version_patch: ${{ needs.determine-version.outputs.version_patch }} + version_build: ${{ needs.determine-version.outputs.version_build }} + current_branch: ${{ needs.determine-version.outputs.current_branch }} + + tag: + uses: ./.github/workflows/tag.yml + secrets: inherit + needs: [ determine-version, build, lint ] + with: + version_full: ${{ needs.determine-version.outputs.version_full }} diff --git a/.github/workflows/tag.yml b/.github/workflows/tag.yml new file mode 100644 index 0000000..3c340be --- /dev/null +++ b/.github/workflows/tag.yml @@ -0,0 +1,27 @@ +name: tag + +on: + workflow_call: + inputs: + version_full: + required: true + type: string + +jobs: + tag: + runs-on: ubuntu-latest + steps: + - name: Download Release Artifacts + uses: actions/download-artifact@v4 + with: + path: release-artifacts + pattern: extension-* + merge-multiple: true + + - name: Create a GitHub release + if: github.ref == 'refs/heads/main' + uses: StaflSystems/release-action@main + with: + artifacts: "release-artifacts/*" + tag: ${{ inputs.version_full }} + commit: ${{ github.sha }} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index 5cec1c2..5505f37 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "jira-minute7-autocomplete", - "version": "2.0.0", + "version": "1.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "jira-minute7-autocomplete", - "version": "2.0.0", + "version": "1.0.0", "license": "MIT", "dependencies": { "@types/webextension-polyfill": "^0.10.0", @@ -582,9 +582,9 @@ } }, "node_modules/@eslint/js": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.55.0.tgz", - "integrity": "sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -693,9 +693,9 @@ "dev": true }, "node_modules/@mdn/browser-compat-data": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-5.4.3.tgz", - "integrity": "sha512-+VnaO5zYUwFQVuRqp2qLPGR5GwhhJ/lrp0yEmamJ/nI15P2GKwGBEWRDiITZR8i6AYxeiQSu2rOi/gqxehnPuA==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-5.5.4.tgz", + "integrity": "sha512-3Ut58LMJig1igriRHsbRHd7tRi4zz3dlnM/6msgl6FqDglxWZLN+ikYsluOg4D6CFmsXBq5WyYF/7HLwHMzDzA==", "dev": true }, "node_modules/@nodelib/fs.scandir": { @@ -1231,35 +1231,35 @@ } }, "node_modules/addons-linter": { - "version": "6.19.0", - "resolved": "https://registry.npmjs.org/addons-linter/-/addons-linter-6.19.0.tgz", - "integrity": "sha512-Yz5YRfIQ12dIqXKmEoHNwoS/L1xIve2hdm9UEesOEsov5W0zeWMOWCnqdvJNVNy7f1FnPu1lnqzylelkTBS7dA==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/addons-linter/-/addons-linter-6.20.0.tgz", + "integrity": "sha512-u3nnnz+dZS5sOAJMF/DdVnjLVDqqbLbpdTNEbCEPIwKlAIDR+FbHHrgRp3JWJw2gvwZuZCmYStQd/G5Llp0nFg==", "dev": true, "dependencies": { "@fluent/syntax": "0.19.0", - "@mdn/browser-compat-data": "5.4.3", + "@mdn/browser-compat-data": "5.5.4", "addons-moz-compare": "1.3.0", - "addons-scanner-utils": "9.8.0", + "addons-scanner-utils": "9.9.0", "ajv": "8.12.0", "chalk": "4.1.2", "cheerio": "1.0.0-rc.12", "columnify": "1.6.0", "common-tags": "1.8.2", "deepmerge": "4.3.1", - "eslint": "8.55.0", + "eslint": "8.56.0", "eslint-plugin-no-unsanitized": "4.0.2", "eslint-visitor-keys": "3.4.3", "espree": "9.6.1", "esprima": "4.0.1", "fast-json-patch": "3.1.1", "glob": "10.3.10", - "image-size": "1.0.2", + "image-size": "1.1.1", "is-mergeable-object": "1.1.1", "jed": "1.1.1", "json-merge-patch": "1.0.2", "os-locale": "5.0.0", - "pino": "8.16.2", - "postcss": "8.4.32", + "pino": "8.17.2", + "postcss": "8.4.33", "relaxed-json": "1.0.3", "semver": "7.5.4", "sha.js": "2.4.11", @@ -1277,9 +1277,9 @@ } }, "node_modules/addons-linter/node_modules/addons-scanner-utils": { - "version": "9.8.0", - "resolved": "https://registry.npmjs.org/addons-scanner-utils/-/addons-scanner-utils-9.8.0.tgz", - "integrity": "sha512-nJJ4QazrtMImyb2OK9SGZlNtinNu25dzOR0lhWthhJQN2iDOf3yqHdSiVBEeZvCwuT/sS1cU6me4O4kgEATjFQ==", + "version": "9.9.0", + "resolved": "https://registry.npmjs.org/addons-scanner-utils/-/addons-scanner-utils-9.9.0.tgz", + "integrity": "sha512-YDP10U3sEZMuIgnjXMiAYgUU64jTbxmhpUXMlhi1nKO4Etz+ctGWoTUst7IQRoLWaY9y2r1KZDG3jALxLA1n7Q==", "dev": true, "dependencies": { "@types/yauzl": "2.10.3", @@ -1458,34 +1458,6 @@ } } }, - "node_modules/addons-linter/node_modules/postcss": { - "version": "8.4.32", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz", - "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==", - "dev": true, - "funding": [ - { - "type": "opencollective", - "url": "https://opencollective.com/postcss/" - }, - { - "type": "tidelift", - "url": "https://tidelift.com/funding/github/npm/postcss" - }, - { - "type": "github", - "url": "https://github.com/sponsors/ai" - } - ], - "dependencies": { - "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - }, - "engines": { - "node": "^10 || ^12 || >=14" - } - }, "node_modules/addons-linter/node_modules/supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -2479,9 +2451,9 @@ "dev": true }, "node_modules/concat-stream/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "dependencies": { "core-util-is": "~1.0.0", @@ -3440,15 +3412,15 @@ } }, "node_modules/eslint": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.55.0.tgz", - "integrity": "sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.55.0", + "@eslint/js": "8.56.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -4412,9 +4384,9 @@ } }, "node_modules/fx-runner": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fx-runner/-/fx-runner-1.3.0.tgz", - "integrity": "sha512-5b37H4GCyhF+Nf8xk9mylXoDq4wb7pbGAXxlCXp/631UTeeZomWSYcEGXumY4wk8g2QAqjPMGdWW+RbNt8PUcA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/fx-runner/-/fx-runner-1.4.0.tgz", + "integrity": "sha512-rci1g6U0rdTg6bAaBboP7XdRu01dzTAaKXxFf+PUqGuCv6Xu7o8NZdY1D5MvKGIjb6EdS1g3VlXOgksir1uGkg==", "dev": true, "dependencies": { "commander": "2.9.0", @@ -4957,9 +4929,9 @@ } }, "node_modules/image-size": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.0.2.tgz", - "integrity": "sha512-xfOoWjceHntRb3qFCrh5ZFORYH8XCdYpASltMhZ/Q0KZiOwjdE/Yl2QCiWdwD+lygV5bMCvauzgu5PxBX/Yerg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.1.1.tgz", + "integrity": "sha512-541xKlUw6jr/6gGuk92F+mYM5zaFAc5ahphvkqvNe2bQ6gVBkd6bfrmVJ2t4KDAfikAYZyIqTnktX3i6/aQDrQ==", "dev": true, "dependencies": { "queue": "6.0.2" @@ -4968,7 +4940,7 @@ "image-size": "bin/image-size.js" }, "engines": { - "node": ">=14.0.0" + "node": ">=16.x" } }, "node_modules/immediate": { @@ -6850,9 +6822,9 @@ } }, "node_modules/pino": { - "version": "8.16.2", - "resolved": "https://registry.npmjs.org/pino/-/pino-8.16.2.tgz", - "integrity": "sha512-2advCDGVEvkKu9TTVSa/kWW7Z3htI/sBKEZpqiHk6ive0i/7f5b1rsU8jn0aimxqfnSz5bj/nOYkwhBUn5xxvg==", + "version": "8.17.2", + "resolved": "https://registry.npmjs.org/pino/-/pino-8.17.2.tgz", + "integrity": "sha512-LA6qKgeDMLr2ux2y/YiUt47EfgQ+S9LznBWOJdN3q1dx2sv0ziDLUBeVpyVv17TEcGCBuWf0zNtg3M5m1NhhWQ==", "dev": true, "dependencies": { "atomic-sleep": "^1.0.0", @@ -6860,7 +6832,7 @@ "on-exit-leak-free": "^2.1.0", "pino-abstract-transport": "v1.1.0", "pino-std-serializers": "^6.0.0", - "process-warning": "^2.0.0", + "process-warning": "^3.0.0", "quick-format-unescaped": "^4.0.3", "real-require": "^0.2.0", "safe-stable-stringify": "^2.3.1", @@ -7121,9 +7093,9 @@ "dev": true }, "node_modules/process-warning": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-2.3.2.tgz", - "integrity": "sha512-n9wh8tvBe5sFmsqlg+XQhaQLumwpqoAUruLwjCopgTmUBjJ/fjtBsJzKleCaIGBOMXYEhp1YfKl4d7rJ5ZKJGA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-3.0.0.tgz", + "integrity": "sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ==", "dev": true }, "node_modules/promise-toolbox": { @@ -7850,9 +7822,9 @@ } }, "node_modules/sonic-boom": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.7.0.tgz", - "integrity": "sha512-IudtNvSqA/ObjN97tfgNmOKyDOs4dNcg4cUUsHDebqsgb8wGBBwb31LIgShNO8fye0dFI52X1+tFoKKI6Rq1Gg==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.8.0.tgz", + "integrity": "sha512-ybz6OYOUjoQQCQ/i4LU8kaToD8ACtYP+Cj5qd2AO36bwbdewxWJ3ArmJ2cr6AvxlL2o0PqnCcPGUgkILbfkaCA==", "dev": true, "dependencies": { "atomic-sleep": "^1.0.0" @@ -8772,14 +8744,14 @@ } }, "node_modules/web-ext": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/web-ext/-/web-ext-7.9.0.tgz", - "integrity": "sha512-oWMiM3e+u5E8X7aUMgQ0BCGjlbZt4XwF6ExAXsXx9Btdz3nLmUY/4eKEZA1J+2T7WhCdRwN7Pdh2VKMej/pthQ==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/web-ext/-/web-ext-7.10.0.tgz", + "integrity": "sha512-UTh4n/F6tvJrfYxICuJMkc7N4Qp3GrmQ1XIXTuc8XDt1tKFPfmKMa0D/kJZKoPg8PJud7j5TT3EtTqMqzPj8Rg==", "dev": true, "dependencies": { "@babel/runtime": "7.21.0", "@devicefarmer/adbkit": "3.2.3", - "addons-linter": "6.19.0", + "addons-linter": "6.20.0", "bunyan": "1.8.15", "camelcase": "7.0.1", "chrome-launcher": "0.15.1", @@ -8788,7 +8760,7 @@ "es6-error": "4.1.1", "firefox-profile": "4.3.2", "fs-extra": "11.1.0", - "fx-runner": "1.3.0", + "fx-runner": "1.4.0", "import-fresh": "3.3.0", "jose": "4.13.1", "mkdirp": "1.0.4", @@ -9610,9 +9582,9 @@ } }, "@eslint/js": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.55.0.tgz", - "integrity": "sha512-qQfo2mxH5yVom1kacMtZZJFVdW+E70mqHMJvVg6WTLo+VBuQJ4TojZlfWBjK0ve5BdEeNAVxOsl/nvNMpJOaJA==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz", + "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==", "dev": true }, "@fluent/syntax": { @@ -9688,9 +9660,9 @@ "dev": true }, "@mdn/browser-compat-data": { - "version": "5.4.3", - "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-5.4.3.tgz", - "integrity": "sha512-+VnaO5zYUwFQVuRqp2qLPGR5GwhhJ/lrp0yEmamJ/nI15P2GKwGBEWRDiITZR8i6AYxeiQSu2rOi/gqxehnPuA==", + "version": "5.5.4", + "resolved": "https://registry.npmjs.org/@mdn/browser-compat-data/-/browser-compat-data-5.5.4.tgz", + "integrity": "sha512-3Ut58LMJig1igriRHsbRHd7tRi4zz3dlnM/6msgl6FqDglxWZLN+ikYsluOg4D6CFmsXBq5WyYF/7HLwHMzDzA==", "dev": true }, "@nodelib/fs.scandir": { @@ -10092,35 +10064,35 @@ "dev": true }, "addons-linter": { - "version": "6.19.0", - "resolved": "https://registry.npmjs.org/addons-linter/-/addons-linter-6.19.0.tgz", - "integrity": "sha512-Yz5YRfIQ12dIqXKmEoHNwoS/L1xIve2hdm9UEesOEsov5W0zeWMOWCnqdvJNVNy7f1FnPu1lnqzylelkTBS7dA==", + "version": "6.20.0", + "resolved": "https://registry.npmjs.org/addons-linter/-/addons-linter-6.20.0.tgz", + "integrity": "sha512-u3nnnz+dZS5sOAJMF/DdVnjLVDqqbLbpdTNEbCEPIwKlAIDR+FbHHrgRp3JWJw2gvwZuZCmYStQd/G5Llp0nFg==", "dev": true, "requires": { "@fluent/syntax": "0.19.0", - "@mdn/browser-compat-data": "5.4.3", + "@mdn/browser-compat-data": "5.5.4", "addons-moz-compare": "1.3.0", - "addons-scanner-utils": "9.8.0", + "addons-scanner-utils": "9.9.0", "ajv": "8.12.0", "chalk": "4.1.2", "cheerio": "1.0.0-rc.12", "columnify": "1.6.0", "common-tags": "1.8.2", "deepmerge": "4.3.1", - "eslint": "8.55.0", + "eslint": "8.56.0", "eslint-plugin-no-unsanitized": "4.0.2", "eslint-visitor-keys": "3.4.3", "espree": "9.6.1", "esprima": "4.0.1", "fast-json-patch": "3.1.1", "glob": "10.3.10", - "image-size": "1.0.2", + "image-size": "1.1.1", "is-mergeable-object": "1.1.1", "jed": "1.1.1", "json-merge-patch": "1.0.2", "os-locale": "5.0.0", - "pino": "8.16.2", - "postcss": "8.4.32", + "pino": "8.17.2", + "postcss": "8.4.33", "relaxed-json": "1.0.3", "semver": "7.5.4", "sha.js": "2.4.11", @@ -10132,9 +10104,9 @@ }, "dependencies": { "addons-scanner-utils": { - "version": "9.8.0", - "resolved": "https://registry.npmjs.org/addons-scanner-utils/-/addons-scanner-utils-9.8.0.tgz", - "integrity": "sha512-nJJ4QazrtMImyb2OK9SGZlNtinNu25dzOR0lhWthhJQN2iDOf3yqHdSiVBEeZvCwuT/sS1cU6me4O4kgEATjFQ==", + "version": "9.9.0", + "resolved": "https://registry.npmjs.org/addons-scanner-utils/-/addons-scanner-utils-9.9.0.tgz", + "integrity": "sha512-YDP10U3sEZMuIgnjXMiAYgUU64jTbxmhpUXMlhi1nKO4Etz+ctGWoTUst7IQRoLWaY9y2r1KZDG3jALxLA1n7Q==", "dev": true, "requires": { "@types/yauzl": "2.10.3", @@ -10245,17 +10217,6 @@ "whatwg-url": "^5.0.0" } }, - "postcss": { - "version": "8.4.32", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.32.tgz", - "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==", - "dev": true, - "requires": { - "nanoid": "^3.3.7", - "picocolors": "^1.0.0", - "source-map-js": "^1.0.2" - } - }, "supports-color": { "version": "7.2.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", @@ -10974,9 +10935,9 @@ "dev": true }, "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.8.tgz", + "integrity": "sha512-8p0AUk4XODgIewSi0l8Epjs+EVnWiK7NoDIEGU0HhE7+ZyY8D1IMY7odu5lRrFXGg71L15KG8QrPmum45RTtdA==", "dev": true, "requires": { "core-util-is": "~1.0.0", @@ -11704,15 +11665,15 @@ "dev": true }, "eslint": { - "version": "8.55.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.55.0.tgz", - "integrity": "sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA==", + "version": "8.56.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz", + "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==", "dev": true, "requires": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.55.0", + "@eslint/js": "8.56.0", "@humanwhocodes/config-array": "^0.11.13", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", @@ -12430,9 +12391,9 @@ "dev": true }, "fx-runner": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/fx-runner/-/fx-runner-1.3.0.tgz", - "integrity": "sha512-5b37H4GCyhF+Nf8xk9mylXoDq4wb7pbGAXxlCXp/631UTeeZomWSYcEGXumY4wk8g2QAqjPMGdWW+RbNt8PUcA==", + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/fx-runner/-/fx-runner-1.4.0.tgz", + "integrity": "sha512-rci1g6U0rdTg6bAaBboP7XdRu01dzTAaKXxFf+PUqGuCv6Xu7o8NZdY1D5MvKGIjb6EdS1g3VlXOgksir1uGkg==", "dev": true, "requires": { "commander": "2.9.0", @@ -12818,9 +12779,9 @@ "dev": true }, "image-size": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.0.2.tgz", - "integrity": "sha512-xfOoWjceHntRb3qFCrh5ZFORYH8XCdYpASltMhZ/Q0KZiOwjdE/Yl2QCiWdwD+lygV5bMCvauzgu5PxBX/Yerg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.1.1.tgz", + "integrity": "sha512-541xKlUw6jr/6gGuk92F+mYM5zaFAc5ahphvkqvNe2bQ6gVBkd6bfrmVJ2t4KDAfikAYZyIqTnktX3i6/aQDrQ==", "dev": true, "requires": { "queue": "6.0.2" @@ -14205,9 +14166,9 @@ "dev": true }, "pino": { - "version": "8.16.2", - "resolved": "https://registry.npmjs.org/pino/-/pino-8.16.2.tgz", - "integrity": "sha512-2advCDGVEvkKu9TTVSa/kWW7Z3htI/sBKEZpqiHk6ive0i/7f5b1rsU8jn0aimxqfnSz5bj/nOYkwhBUn5xxvg==", + "version": "8.17.2", + "resolved": "https://registry.npmjs.org/pino/-/pino-8.17.2.tgz", + "integrity": "sha512-LA6qKgeDMLr2ux2y/YiUt47EfgQ+S9LznBWOJdN3q1dx2sv0ziDLUBeVpyVv17TEcGCBuWf0zNtg3M5m1NhhWQ==", "dev": true, "requires": { "atomic-sleep": "^1.0.0", @@ -14215,7 +14176,7 @@ "on-exit-leak-free": "^2.1.0", "pino-abstract-transport": "v1.1.0", "pino-std-serializers": "^6.0.0", - "process-warning": "^2.0.0", + "process-warning": "^3.0.0", "quick-format-unescaped": "^4.0.3", "real-require": "^0.2.0", "safe-stable-stringify": "^2.3.1", @@ -14376,9 +14337,9 @@ "dev": true }, "process-warning": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-2.3.2.tgz", - "integrity": "sha512-n9wh8tvBe5sFmsqlg+XQhaQLumwpqoAUruLwjCopgTmUBjJ/fjtBsJzKleCaIGBOMXYEhp1YfKl4d7rJ5ZKJGA==", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/process-warning/-/process-warning-3.0.0.tgz", + "integrity": "sha512-mqn0kFRl0EoqhnL0GQ0veqFHyIN1yig9RHh/InzORTUiZHFRAur+aMtRkELNwGs9aNwKS6tg/An4NYBPGwvtzQ==", "dev": true }, "promise-toolbox": { @@ -14913,9 +14874,9 @@ "dev": true }, "sonic-boom": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.7.0.tgz", - "integrity": "sha512-IudtNvSqA/ObjN97tfgNmOKyDOs4dNcg4cUUsHDebqsgb8wGBBwb31LIgShNO8fye0dFI52X1+tFoKKI6Rq1Gg==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/sonic-boom/-/sonic-boom-3.8.0.tgz", + "integrity": "sha512-ybz6OYOUjoQQCQ/i4LU8kaToD8ACtYP+Cj5qd2AO36bwbdewxWJ3ArmJ2cr6AvxlL2o0PqnCcPGUgkILbfkaCA==", "dev": true, "requires": { "atomic-sleep": "^1.0.0" @@ -15615,14 +15576,14 @@ } }, "web-ext": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/web-ext/-/web-ext-7.9.0.tgz", - "integrity": "sha512-oWMiM3e+u5E8X7aUMgQ0BCGjlbZt4XwF6ExAXsXx9Btdz3nLmUY/4eKEZA1J+2T7WhCdRwN7Pdh2VKMej/pthQ==", + "version": "7.10.0", + "resolved": "https://registry.npmjs.org/web-ext/-/web-ext-7.10.0.tgz", + "integrity": "sha512-UTh4n/F6tvJrfYxICuJMkc7N4Qp3GrmQ1XIXTuc8XDt1tKFPfmKMa0D/kJZKoPg8PJud7j5TT3EtTqMqzPj8Rg==", "dev": true, "requires": { "@babel/runtime": "7.21.0", "@devicefarmer/adbkit": "3.2.3", - "addons-linter": "6.19.0", + "addons-linter": "6.20.0", "bunyan": "1.8.15", "camelcase": "7.0.1", "chrome-launcher": "0.15.1", @@ -15631,7 +15592,7 @@ "es6-error": "4.1.1", "firefox-profile": "4.3.2", "fs-extra": "11.1.0", - "fx-runner": "1.3.0", + "fx-runner": "1.4.0", "import-fresh": "3.3.0", "jose": "4.13.1", "mkdirp": "1.0.4", diff --git a/package.json b/package.json index 9ff531a..c5908d0 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "jira-minute7-autocomplete", "displayName": "Jira Minute7 Autocomplete", - "version": "2.0.0", + "version": "1.0.0", "description": "Autocompletes Jira items in Minute7", "license": "MIT", "repository": { diff --git a/src/lib/jira.ts b/src/lib/jira.ts index 124635c..567f4a1 100644 --- a/src/lib/jira.ts +++ b/src/lib/jira.ts @@ -22,12 +22,12 @@ export class JiraIssueRetriever { } } - async get(endpoint: string, params: any): Promise { + async get(endpoint: string, params: Record): Promise { if (!this.Credentials) { throw new Error('Not initialized'); } - var url = new URL(this.Credentials.instanceUrl + endpoint); + const url = new URL(this.Credentials.instanceUrl + endpoint); url.search = new URLSearchParams(params).toString(); const response = await fetch(url.toString(), { diff --git a/src/pages/content/index.tsx b/src/pages/content/index.tsx index dcf4877..28bf971 100644 --- a/src/pages/content/index.tsx +++ b/src/pages/content/index.tsx @@ -7,7 +7,7 @@ import "./style.css"; async function getDescriptionField(): Promise { - var te: HTMLTextAreaElement | null = null; + let te: HTMLTextAreaElement | null = null; while (te == null) { te = document.getElementsByTagName("textarea")[0]; await new Promise(r => setTimeout(r, 100)); @@ -41,7 +41,7 @@ async function init() { onSelect: (item: JiraIssue) => { textArea.value = `${item.key} - ${item.summary.replaceAll('', '').replaceAll('', '')}`; }, - render: (item: JiraIssue, currentValue: string) => { + render: (item: JiraIssue) => { const div = document.createElement("div"); div.classList.add("autocomplete-entry"); diff --git a/src/pages/popup/Popup.tsx b/src/pages/popup/Popup.tsx index 72b8ea5..476c3d3 100644 --- a/src/pages/popup/Popup.tsx +++ b/src/pages/popup/Popup.tsx @@ -1,9 +1,7 @@ -import React, { useState, useEffect } from "react"; +import { useState, useEffect } from "react"; import { useForm } from "react-hook-form"; import { JiraCredentialStore, JiraCredentials } from "@src/lib/settings"; -import logo from "@assets/img/logo.svg"; - export default function Popup(): JSX.Element { const { register, handleSubmit, reset } = useForm(); @@ -12,7 +10,7 @@ export default function Popup(): JSX.Element { async function loadCredentials(): Promise { console.log("loading creds"); - var credentials = await JiraCredentialStore.load(); + let credentials = await JiraCredentialStore.load(); if (!credentials) { credentials = new JiraCredentials({ instanceUrl: "", username: "", apiToken: "" }); } @@ -30,7 +28,7 @@ export default function Popup(): JSX.Element { function handleSave(data: JiraCredentials): void { JiraCredentialStore.save(data); - }; + } return (