Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PR #42

Closed
wants to merge 166 commits into from
Closed

PR #42

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
166 commits
Select commit Hold shift + click to select a range
4c29657
fix: add rolesWithReviewAuth to config
Keyrxng Sep 7, 2024
0820f92
Merge branch 'ubiquibot:development' into fix/approved-roles
Keyrxng Sep 16, 2024
d0df976
Merge remote-tracking branch 'upstream/development' into fix/approved…
Keyrxng Sep 19, 2024
d9054ea
chore: fix setting default and tests
Keyrxng Sep 19, 2024
4543ca6
chore: normalize maxTask roles, add test
Keyrxng Sep 19, 2024
5a4c243
chore: change test role
Keyrxng Sep 19, 2024
a4f9ecb
Update tests/main.test.ts
Keyrxng Sep 19, 2024
44454b7
chore: format
Keyrxng Sep 19, 2024
58b457e
feat: added validator endpoint
gentlementlegen Sep 20, 2024
05bacd5
Merge pull request #37 from ubq-testing/fix/approved-roles
ubiquity-os[bot] Sep 23, 2024
30959ec
feat: pull edit handler
gentlementlegen Sep 23, 2024
818e747
chore: fixed errors
gentlementlegen Sep 23, 2024
56e061e
chore: fixed errors
gentlementlegen Sep 23, 2024
564a7e4
chore: fixed errors
gentlementlegen Sep 23, 2024
3349b9a
Merge pull request #57 from gentlementlegen/fix/pull-edit
0x4007 Sep 23, 2024
6024e9c
chore: fixed tests
gentlementlegen Sep 23, 2024
41d0023
Merge pull request #58 from gentlementlegen/development
0x4007 Sep 24, 2024
8dd8463
fix: register warning message change
gentlementlegen Sep 26, 2024
e3b3313
chore: register warning message change
gentlementlegen Sep 26, 2024
c9fc81c
Merge pull request #59 from gentlementlegen/fix/register-warning
0x4007 Sep 26, 2024
3f61f14
fix: removed duplicate error messages
gentlementlegen Sep 30, 2024
a48f8a7
chore: fix wrangler version
gentlementlegen Sep 30, 2024
3ece0fd
chore: fixed tests
gentlementlegen Sep 30, 2024
0b3a2bf
chore: enabled observability
gentlementlegen Oct 2, 2024
ea1b270
chore: bump wrangler
gentlementlegen Oct 2, 2024
b4a84fe
Merge branch 'development' into fix/duplicate-error-messages
gentlementlegen Oct 2, 2024
be81469
chore: fixed import
gentlementlegen Oct 2, 2024
886425d
Merge pull request #61 from gentlementlegen/fix/duplicate-error-messages
0x4007 Oct 2, 2024
9180717
fix: add rolesWithReviewAuth to config
Keyrxng Sep 7, 2024
04d081a
chore: fix setting default and tests
Keyrxng Sep 19, 2024
258b134
chore: normalize maxTask roles, add test
Keyrxng Sep 19, 2024
ea9c416
chore: change test role
Keyrxng Sep 19, 2024
2a3b42e
Update tests/main.test.ts
Keyrxng Sep 19, 2024
46cfcf4
chore: format
Keyrxng Sep 19, 2024
188d00e
feat: pull edit handler
gentlementlegen Sep 23, 2024
13bc655
chore: fixed tests
gentlementlegen Sep 23, 2024
8868146
fix: register warning message change
gentlementlegen Sep 26, 2024
3333aee
chore: register warning message change
gentlementlegen Sep 26, 2024
da03c15
fix: removed duplicate error messages
gentlementlegen Sep 30, 2024
a158660
chore: fix wrangler version
gentlementlegen Sep 30, 2024
1eea2ee
chore: fixed tests
gentlementlegen Sep 30, 2024
1e4f1ad
chore: enabled observability
gentlementlegen Oct 2, 2024
7162e23
chore: bump wrangler
gentlementlegen Oct 2, 2024
8fec87e
chore: fixed import
gentlementlegen Oct 2, 2024
5999073
feat: schema generation
gentlementlegen Oct 4, 2024
ed69ffa
chore: schema generation
gentlementlegen Oct 4, 2024
8548aad
Merge branch 'development' into feat/schema-validation
gentlementlegen Oct 4, 2024
7e8fcc1
chore: schema generation
gentlementlegen Oct 4, 2024
233b2b2
chore: schema generation
gentlementlegen Oct 4, 2024
f838618
chore: schema generation
gentlementlegen Oct 4, 2024
b000a54
chore: schema generation
gentlementlegen Oct 4, 2024
064a4b1
chore: schema generation
gentlementlegen Oct 4, 2024
0250520
chore: schema generation
gentlementlegen Oct 4, 2024
b0b21f7
chore: schema generation
gentlementlegen Oct 4, 2024
7685217
chore: updated generated configuration
ubiquity-os[bot] Oct 4, 2024
2f3f8b0
Merge pull request #63 from gentlementlegen/feat/schema-validation
gentlementlegen Oct 4, 2024
413c844
feat: enforce collaborator-only label restriction
gentlementlegen Oct 10, 2024
c5e58f5
feat(tests): add collaborator tests for issue assignment
gentlementlegen Oct 10, 2024
ef125f2
test: add database drop in beforeEach of User start/stop tests
gentlementlegen Oct 10, 2024
65248b1
Update src/handlers/shared/start.ts
0x4007 Oct 10, 2024
4a954be
fix(tests): update error message for collaborators assignment
gentlementlegen Oct 10, 2024
7445be1
Merge pull request #65 from gentlementlegen/feat/task-restriction
0x4007 Oct 10, 2024
1ceebb3
refactor: rename package and update references from @ubiquibot to @ub…
0x4007 Oct 10, 2024
5497d7e
feat: task limit improvement
ariesgun Oct 19, 2024
32a4457
fix: collaborator check with try catch
gentlementlegen Oct 29, 2024
c49982b
fix: using graphql to fetch prs
gentlementlegen Oct 29, 2024
995e6be
chore: changed wrangler port
gentlementlegen Oct 29, 2024
91a375e
chore: http request for test
gentlementlegen Oct 29, 2024
fd65299
chore: prs fetch (WIP)
gentlementlegen Oct 29, 2024
3f535b2
refactor: remove prs.ts and update pull request fetching
gentlementlegen Oct 29, 2024
cf145f0
chore: add @octokit/types dependency
gentlementlegen Oct 29, 2024
742b3e4
refactor: update pull request fetching logic
gentlementlegen Oct 29, 2024
16ba3a8
fix: add fallback methods for fetching issues/PRs
gentlementlegen Oct 29, 2024
3d760e3
fix: update octokit method namespace
gentlementlegen Oct 29, 2024
f6232c0
test: add tests for `getAllPullRequestsWithRetry`
gentlementlegen Oct 29, 2024
5dd9641
test: removed comment
gentlementlegen Oct 29, 2024
b960b84
Merge pull request #71 from gentlementlegen/fix/gql
gentlementlegen Oct 30, 2024
f00a9c6
feat: task limit improvement
ariesgun Oct 19, 2024
3e18c1b
fix: fixed failing test
ariesgun Oct 20, 2024
cd96022
fix: used API to query orgs where the app is installed
ariesgun Oct 20, 2024
0b63098
fix: added www. prefix
ariesgun Oct 20, 2024
58fd4da
fix: query network in getAllPRs
ariesgun Oct 21, 2024
734f97b
feat: update style
ariesgun Oct 22, 2024
ad20e32
fix: removed debug lines
ariesgun Oct 22, 2024
044f8a8
fix: fix format and type
ariesgun Oct 23, 2024
72cc120
fix: alternative way to list issues within network
ariesgun Oct 26, 2024
0953019
fix: update mock handlers
ariesgun Oct 26, 2024
2474312
fix: handle fetch error
ariesgun Oct 27, 2024
d09f2d4
fix: handle 404
ariesgun Oct 28, 2024
8bf9f6f
fix: revert change in package.json
ariesgun Oct 29, 2024
910ebf0
fix: update yarn.lock
ariesgun Oct 29, 2024
239d26e
fix: cleanup
ariesgun Oct 29, 2024
32e9280
feat: make issues and PRs search configurable
ubiquity-os[bot] Nov 3, 2024
d10db4a
Merge remote-tracking branch 'original/development' into task-limit-i…
ubiquity-os[bot] Nov 3, 2024
0a6bd74
fix: updated yarn.lock
ubiquity-os[bot] Nov 3, 2024
82064c5
fix(issue): handle 404 status in fetch pull request reviews
gentlementlegen Nov 4, 2024
f496b20
build: set environment based on branch ref
gentlementlegen Nov 4, 2024
5659fc3
fix: ensure assignee is checked in userUnassigned handler
gentlementlegen Nov 4, 2024
8fcedd9
fix: process review comments
ubiquity-os[bot] Nov 4, 2024
87e7b16
fix: renamed checkIssues to assignedIssueScope
ubiquity-os[bot] Nov 4, 2024
986261a
fix: convert AssignedIssueScope to enum
ubiquity-os[bot] Nov 4, 2024
d8fead7
fix: handle search API private repo
ubiquity-os[bot] Nov 4, 2024
3827d28
fix: undo changes in manifest
ubiquity-os[bot] Nov 5, 2024
5326f20
feat: requiredLabelsToStart config
Keyrxng Nov 7, 2024
1aacf5e
chore: update tests
Keyrxng Nov 7, 2024
a7a38e1
chore: add test
Keyrxng Nov 7, 2024
ed9fa6d
Merge branch 'development' into feat/requiredStartLabels
Keyrxng Nov 7, 2024
b6e3882
chore: updated generated configuration
ubiquity-os[bot] Nov 7, 2024
0896e78
chore: restore pkgManager field, fix type
Keyrxng Nov 7, 2024
474881b
chore: updated generated configuration
ubiquity-os[bot] Nov 7, 2024
00c8675
chore: empty by default, allow start if empty
Keyrxng Nov 7, 2024
3317d59
chore: updated generated configuration
ubiquity-os[bot] Nov 7, 2024
6a013ba
Merge pull request #66 from ariesgun/task-limit-improvement
gentlementlegen Nov 8, 2024
d9642c0
chore: updated generated configuration
ubiquity-os[bot] Nov 8, 2024
b8c8d45
Merge branch 'refs/heads/development' into fix/close-prs
gentlementlegen Nov 8, 2024
9c40d09
fix: prevent bot from double posting messages
gentlementlegen Nov 8, 2024
d6f7a1e
chore: update compatibility settings in wrangler.toml
gentlementlegen Nov 8, 2024
ed12d21
chore: throw logger
Keyrxng Nov 8, 2024
f27380a
Merge branch 'development' into feat/requiredStartLabels
Keyrxng Nov 8, 2024
56232c8
chore: updated generated configuration
ubiquity-os[bot] Nov 8, 2024
844cac7
Merge pull request #80 from ubq-testing/feat/requiredStartLabels
rndquu Nov 8, 2024
f36e484
chore: merge if statement
gentlementlegen Nov 9, 2024
0480ab3
Merge pull request #77 from gentlementlegen/fix/close-prs
gentlementlegen Nov 9, 2024
6c1a13e
feat: sdk and command interface
whilefoo Nov 16, 2024
ef6198a
feat: new error msg on missing required label
rndquu Nov 18, 2024
ee4f7c6
Merge pull request #87 from rndquu/feat/new-priority-msg
0x4007 Nov 18, 2024
1a32260
feat: upgrade typebox
whilefoo Nov 20, 2024
5f81ebf
fix: switch back to CJS
whilefoo Nov 20, 2024
aaf9c59
feat: manifest commands object
whilefoo Nov 20, 2024
b3405d7
refactor: reorder imports and optimize async operations
gentlementlegen Nov 22, 2024
5c2ec98
chore: updated generated configuration
ubiquity-os[bot] Nov 22, 2024
e26a4f6
chore: changed conditions for testing
gentlementlegen Nov 24, 2024
410a76c
chore: changed entry file
gentlementlegen Nov 24, 2024
fa5a60e
chore: changed version
gentlementlegen Nov 24, 2024
46ce5a6
chore: updated manifest.json and dist build
github-actions[bot] Nov 24, 2024
8c7e8f3
chore: upgrade octokit
whilefoo Nov 24, 2024
d725423
chore: changed http test and logs
gentlementlegen Nov 25, 2024
f84b7e5
chore: updated manifest.json and dist build
github-actions[bot] Nov 25, 2024
bd0aab6
chore: changed user id for test
gentlementlegen Nov 25, 2024
e5259f1
fix: logic to retrieve pull-requests pending for a user updated
gentlementlegen Nov 25, 2024
cfb54db
chore: updated manifest.json and dist build
github-actions[bot] Nov 25, 2024
8fd3029
chore: split function for readability
gentlementlegen Nov 25, 2024
e3ed8f6
chore: updated manifest.json and dist build
github-actions[bot] Nov 25, 2024
7deffaf
fix: yarn v1
whilefoo Nov 25, 2024
7b19d2c
Merge pull request #86 from ubiquity-whilefoo/command-interface
gentlementlegen Nov 25, 2024
a787355
chore: updated generated configuration
ubiquity-os[bot] Nov 25, 2024
44fd708
Merge branch 'development' into fix/task-limit
gentlementlegen Nov 25, 2024
ac15c98
chore: updated manifest.json and dist build
github-actions[bot] Nov 25, 2024
d74a9f2
chore: update hono to version 4.6.12
gentlementlegen Nov 25, 2024
6241af7
feat: switch to Bun and fix deploy
whilefoo Nov 25, 2024
9155361
fix: ignore eslint config
whilefoo Nov 25, 2024
2ba5e14
fix: ignore dist
whilefoo Nov 25, 2024
bb9e06e
chore: remove node
whilefoo Nov 26, 2024
688dfbb
Merge pull request #93 from ubiquity-whilefoo/deploy-fix
gentlementlegen Nov 26, 2024
29c2aef
fix: ncc build
whilefoo Nov 26, 2024
dc54e30
chore: updated manifest.json and dist build
github-actions[bot] Nov 26, 2024
dee590e
Merge pull request #95 from ubiquity-whilefoo/deploy-fix
gentlementlegen Nov 26, 2024
2d6199a
chore: updated manifest.json and dist build
github-actions[bot] Nov 26, 2024
37e2e55
Merge branch 'development' into fix/task-limit
gentlementlegen Nov 26, 2024
f81051c
chore: updated lock file
gentlementlegen Nov 26, 2024
21d9f55
chore: fixed pull request length check
gentlementlegen Nov 26, 2024
c3540aa
chore: changed logic for opened PRs
gentlementlegen Nov 26, 2024
adca88b
chore: simplified logic for opened PRs
gentlementlegen Nov 26, 2024
45a0726
Merge pull request #91 from gentlementlegen/fix/task-limit
0x4007 Nov 27, 2024
bc695de
chore: fixed plugin entry path
gentlementlegen Nov 27, 2024
7f38023
chore: updated manifest.json and dist build
github-actions[bot] Nov 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .cspell.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,17 @@
{
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
"version": "0.2",
"ignorePaths": ["**/*.json", "**/*.css", "node_modules", "**/*.log", "./src/adapters/supabase/**/**.ts"],
"ignorePaths": [
"**/*.json",
"**/*.css",
"bun.lockb",
"tests/http/**",
"node_modules",
"**/*.log",
"./src/adapters/supabase/**/**.ts",
"dist/**",
"coverage/**"
],
"useGitignore": true,
"language": "en",
"words": [
Expand All @@ -15,7 +25,7 @@
"supabase",
"SUPABASE",
"typebox",
"ubiquibot",
"ubiquity-os",
"signoff",
"sonarjs",
"mswjs",
Expand Down
2 changes: 1 addition & 1 deletion .github/knip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const config: KnipConfig = {
ignore: ["src/types/config.ts", "**/__mocks__/**", "**/__fixtures__/**", "src/worker.ts"],
ignoreExportsUsedInFile: true,
// eslint can also be safely ignored as per the docs: https://knip.dev/guides/handling-issues#eslint--jest
ignoreDependencies: ["eslint-config-prettier", "eslint-plugin-prettier", "@types/jest"],
ignoreDependencies: ["eslint-config-prettier", "eslint-plugin-prettier", "ts-node", "@octokit/rest"],
eslint: true,
};

Expand Down
27 changes: 0 additions & 27 deletions .github/workflows/cspell.yml

This file was deleted.

28 changes: 28 additions & 0 deletions .github/workflows/formatting-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Formatting Check

on:
push:

jobs:
format-check:
name: Check for formatting errors
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Install toolchain
run: bun install --frozen-lockfile

- name: Eslint
run: bun run eslint --fix-dry-run

- name: Cspell
run: bun run format:cspell

- name: Prettier
run: bun run prettier --check .
9 changes: 6 additions & 3 deletions .github/workflows/jest-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,14 @@ jobs:
with:
fetch-depth: 0

- name: Enable corepack
run: corepack enable
- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Install toolchain
run: bun install --frozen-lockfile

- name: Jest With Coverage
run: yarn install && yarn test
run: bun run test

- name: Add Jest Report to Summary
if: always()
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/knip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ jobs:
with:
node-version: 20.10.0

- name: Enable corepack
run: corepack enable
- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Install toolchain
run: yarn install
run: bun install --frozen-lockfile

- name: Store PR number
run: echo ${{ github.event.number }} > pr-number.txt

- name: Run Knip
run: yarn knip || yarn knip --reporter json > knip-results.json
run: bun run knip || bun run knip --reporter json > knip-results.json

- name: Upload knip result
if: failure()
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/update-configuration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Update Manifest and Commit Changes

on:
workflow_dispatch:
push:

jobs:
update-manifest:
name: "Update Manifest and Commit Changes"
runs-on: ubuntu-latest
permissions: write-all

steps:
- name: Update Manifest and Commit Changes
uses: ubiquity-os/action-deploy-plugin@main
with:
treatAsEsm: false
sourcemap: false
pluginEntry: ${{ github.workspace }}/src/index.ts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/worker-delete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ jobs:
delete:
runs-on: ubuntu-latest
name: Delete Deployment
environment: ${{ github.ref == 'refs/heads/main' && 'main' || 'development' }}
steps:
- name: Setup Node
uses: actions/setup-node@v4
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/worker-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
name: Deploy
environment: ${{ github.ref == 'refs/heads/main' && 'main' || 'development' }}
steps:
- name: Setup Node
uses: actions/setup-node@v4
Expand All @@ -19,6 +20,9 @@ jobs:

- uses: actions/checkout@v4

- name: Setup Bun
uses: oven-sh/setup-bun@v2

- name: Update wrangler.toml Name Field
run: |
branch_name=$(echo '${{ github.event.ref }}' | sed 's#refs/heads/##' | sed 's#[^a-zA-Z0-9]#-#g')
Expand All @@ -31,21 +35,24 @@ jobs:
# Update the wrangler.toml file
sed -i "s/^name = .*/name = \"$new_name\"/" wrangler.toml
echo "Updated wrangler.toml name to: $new_name"

- name: Deploy with Wrangler
id: wrangler_deploy
uses: cloudflare/wrangler-action@v3
with:
wranglerVersion: "3.57.0"
wranglerVersion: "3.87.0"
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
secrets: |
SUPABASE_URL
SUPABASE_KEY
BOT_USER_ID
${{ secrets.KERNEL_PUBLIC_KEY && secrets.KERNEL_PUBLIC_KEY != '' && 'KERNEL_PUBLIC_KEY' || '' }}
env:
SUPABASE_URL: ${{ secrets.SUPABASE_URL }}
SUPABASE_KEY: ${{ secrets.SUPABASE_KEY }}
BOT_USER_ID: ${{ secrets.BOT_USER_ID }}
KERNEL_PUBLIC_KEY: ${{ secrets.KERNEL_PUBLIC_KEY }}

- name: Write Deployment URL to Summary
run: |
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ junit.xml
cypress/screenshots
script.ts
.wrangler
test-dashboard.md
test-dashboard.md
*.env.json
2 changes: 1 addition & 1 deletion .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn commitlint --edit "$1"
bun commitlint --edit "$1"
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env sh
. "$(dirname -- "$0")/_/husky.sh"

yarn lint-staged
bun lint-staged
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
dist/
coverage/
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# `@ubiquibot/command-start-stop`
# `@ubiquity-os/command-start-stop`

This plugin allows a hunter to begin a task as well as gracefully stop a task without incurring a negative impact on the hunter's XP or karma.

Expand All @@ -24,9 +24,9 @@ To stop a task, a hunter should use the `/stop` command. This will unassign them

### [Configuration](./src/types/plugin-input.ts)

#### Note: The command name is `"start"` when configuring your `.ubiquibot-config.yml` file.
#### Note: The command name is `"start"` when configuring your `.ubiquity-os.config.yml` file.

To configure your Ubiquibot to run this plugin, add the following to the `.ubiquibot-config.yml` file in your organization configuration repository.
To configure your Ubiquity Kernel to run this plugin, add the following to the `.ubiquity-os.config.yml` file in your organization configuration repository.

```yml
- plugin: http://localhost:4000 # or the URL where the plugin is hosted
Expand All @@ -42,7 +42,10 @@ To configure your Ubiquibot to run this plugin, add the following to the `.ubiqu
member: 5
contributor: 3
startRequiresWallet: true # default is true
assignedIssueScope: "org" # or "org" or "network". Default is org
emptyWalletText: "Please set your wallet address with the /wallet command first and try again."
rolesWithReviewAuthority: ["MEMBER", "OWNER"]
requiredLabelsToStart: ["Priority: 5 (Emergency)"]
```

# Testing
Expand Down
Binary file added bun.lockb
Binary file not shown.
3 changes: 3 additions & 0 deletions dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default tsEslint.config({
"@typescript-eslint": tsEslint.plugin,
"check-file": checkFile,
},
ignores: [".github/knip.ts", ".github/cspell.ts", ".wrangler/**/*.ts", ".wrangler/**/*.js"],
ignores: [".github/knip.ts", ".github/cspell.ts", ".wrangler/**/*.ts", ".wrangler/**/*.js", "dist/**", "eslint.config.mjs"],
extends: [eslint.configs.recommended, ...tsEslint.configs.recommended, sonarjs.configs.recommended],
languageOptions: {
parser: tsEslint.parser,
Expand Down
10 changes: 0 additions & 10 deletions jest.config.json

This file was deleted.

27 changes: 27 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import type { Config } from "jest";

const cfg: Config = {
transform: {
"^.+\\.tsx?$": [
"ts-jest",
{
useESM: true,
},
],
},
moduleFileExtensions: ["ts", "tsx", "js", "jsx", "json", "node"],
coveragePathIgnorePatterns: ["node_modules", "mocks"],
collectCoverage: true,
coverageReporters: ["json", "lcov", "text", "clover", "json-summary"],
reporters: ["default", "jest-junit", "jest-md-dashboard"],
coverageDirectory: "coverage",
testTimeout: 20000,
roots: ["<rootDir>", "tests"],
extensionsToTreatAsEsm: [".ts"],
moduleNameMapper: {
"^(\\.{1,2}/.*)\\.js$": "$1",
},
setupFilesAfterEnv: ["dotenv/config"],
};

export default cfg;
Loading