From a33423f78bb4c48daa93bc13fb45fcae33954c50 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <209825114+claude[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 10:39:49 +0000 Subject: [PATCH 1/3] fix: move puppeteer to devDependencies and bump version to 1.16.0 Puppeteer is only used in development/testing scripts and should not be a runtime dependency for consumers of the library. Fixes #74 Co-authored-by: Ivan Galiatin --- package.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/package.json b/package.json index 289a0a9..2a70c95 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jsdom-testing-mocks", - "version": "1.15.2", + "version": "1.16.0", "author": "Ivan Galiatin", "license": "MIT", "description": "A set of tools for emulating browser behavior in jsdom environment", @@ -83,11 +83,11 @@ }, "dependencies": { "bezier-easing": "^2.1.0", - "css-mediaquery": "^0.1.2", - "puppeteer": "^24.15.0" + "css-mediaquery": "^0.1.2" }, "devDependencies": { "@playwright/test": "^1.54.1", + "puppeteer": "^24.15.0", "@swc/core": "^1.3.82", "@swc/jest": "^0.2.29", "@types/css-mediaquery": "^0.1.1", From 25711963ba313d062be6f27768fb3adc36064763 Mon Sep 17 00:00:00 2001 From: "claude[bot]" <209825114+claude[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 11:20:57 +0000 Subject: [PATCH 2/3] fix: convert Jest configs to ES module syntax Convert jest.config.ts and swcjest.config.ts from CommonJS to ES module syntax to fix 'module is not defined in ES module scope' error. The issue occurred because package.json has "type": "module" which makes Node.js treat .ts files as ES modules, but Jest configs were using module.exports (CommonJS syntax). Co-authored-by: Ivan Galiatin --- jest.config.ts | 2 +- swcjest.config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/jest.config.ts b/jest.config.ts index 4c673f8..0084c0a 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -1,5 +1,5 @@ /** @type {import('ts-jest/dist/types').InitialOptionsTsJest} */ -module.exports = { +export default { preset: 'ts-jest', testEnvironment: 'jsdom', setupFilesAfterEnv: ['/jest-setup.ts'], diff --git a/swcjest.config.ts b/swcjest.config.ts index 625d7ca..137c65f 100644 --- a/swcjest.config.ts +++ b/swcjest.config.ts @@ -1,4 +1,4 @@ -module.exports = { +export default { testEnvironment: 'jsdom', transform: { '^.+\\.(t|j)sx?$': '@swc/jest', From 9a82ddd2eac60249e5fbdaebe8512a730cd20f00 Mon Sep 17 00:00:00 2001 From: Ivan Galiatin Date: Sat, 13 Sep 2025 11:58:23 +0200 Subject: [PATCH 3/3] chore: update Claude code review workflow configuration Enhance the Claude code review workflow by allowing any bot to trigger reviews and adding accessibility to the review criteria. Adjust the feedback prompt to emphasize conciseness and constructiveness. Clean up unnecessary whitespace for better readability. --- .github/workflows/claude-code-review.yml | 25 +++++++++++++----------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/claude-code-review.yml b/.github/workflows/claude-code-review.yml index 5bf8ce5..c426fec 100644 --- a/.github/workflows/claude-code-review.yml +++ b/.github/workflows/claude-code-review.yml @@ -17,14 +17,14 @@ jobs: # github.event.pull_request.user.login == 'external-contributor' || # github.event.pull_request.user.login == 'new-developer' || # github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' - + runs-on: ubuntu-latest permissions: contents: read pull-requests: read issues: read id-token: write - + steps: - name: Checkout repository uses: actions/checkout@v4 @@ -39,21 +39,25 @@ jobs: # Optional: Specify model (defaults to Claude Sonnet 4, uncomment for Claude Opus 4) # model: "claude-opus-4-20250514" - + + # Allow any bot to trigger the review + allowed_bots: '*' + # Direct prompt for automated review (no @claude mention needed) direct_prompt: | Please review this pull request and provide feedback on: - Code quality and best practices + - Accessibility - Potential bugs or issues - Performance considerations - Security concerns - Test coverage - - Be constructive and helpful in your feedback. + + Be concise and constructive in your feedback. # Optional: Use sticky comments to make Claude reuse the same comment on subsequent pushes to the same PR # use_sticky_comment: true - + # Optional: Customize review based on file types # direct_prompt: | # Review this PR focusing on: @@ -61,18 +65,17 @@ jobs: # - For API endpoints: Security, input validation, and error handling # - For React components: Performance, accessibility, and best practices # - For tests: Coverage, edge cases, and test quality - + # Optional: Different prompts for different authors # direct_prompt: | - # ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' && + # ${{ github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR' && # 'Welcome! Please review this PR from a first-time contributor. Be encouraging and provide detailed explanations for any suggestions.' || # 'Please provide a thorough code review focusing on our coding standards and best practices.' }} - + # Optional: Add specific tools for running tests or linting # allowed_tools: "Bash(npm run test),Bash(npm run lint),Bash(npm run typecheck)" - + # Optional: Skip review for certain conditions # if: | # !contains(github.event.pull_request.title, '[skip-review]') && # !contains(github.event.pull_request.title, '[WIP]') -