Skip to content

feat(react-a11y-utils): modernize for React 19#42

Closed
riceharvest wants to merge 77 commits intomainfrom
fix/react-a11y-utils-modernization
Closed

feat(react-a11y-utils): modernize for React 19#42
riceharvest wants to merge 77 commits intomainfrom
fix/react-a11y-utils-modernization

Conversation

@riceharvest
Copy link
Owner

Closes #22 (roadmap).

  • Upgraded react and react-dom to ^19.0.0 in devDependencies.
  • Updated peerDependencies to support React 19.
  • Verified all 125 unit tests are passing with the new versions.

- Upgraded multiple packages to modern standards (Next.js, Next-auth, PWA, SEO).
- Added new utility packages: critters, next-circuit-breaker, next-csrf, next-images, next-json-ld.
- Integrated Changesets for versioning.
- Updated CI/CD workflows and linting configurations.
- Fixed numerous linting and type-checking issues across the monorepo.
- Remove legacy NextAuth adapters and resolve workspace version conflicts
- Clean up test warning noise and fix tsconfig/jest setups for next-auth
- Update Workbox/Terser dependencies in next-pwa to align with workspace
- Synchronize root lockfile to reflect nested package resolutions
Fixes `JWT_AUTO_GENERATED_SIGNING_KEY` and `JWT_AUTO_GENERATED_ENCRYPTION_KEY`
warnings properly by supplying JWKs directly in the test suite rather
than mocking the logger.
@qodo-code-review
Copy link

ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan

Review Summary by Qodo

Modernize monorepo for React 19 with comprehensive test migrations, enhanced security, and new MDX/auth features

✨ Enhancement 🧪 Tests 🐞 Bug fix

Grey Divider

Walkthroughs

Description
• **Modernized React support**: Upgraded react and react-dom to ^19.0.0 with all 125 unit tests
  passing
• **Test framework migrations**: Migrated multiple packages from vitest/jest to Node.js native
  node:test module and updated Jest references to Vitest
• **Enhanced CSRF security**: Added multi-source token validation (getRequestToken), App Router
  support, and improved error handling with new error codes
• **Session management refactoring**: Refactored for Web API compatibility with new getWebSession
  function, improved type safety, and enhanced time parsing utilities
• **MDX content system**: Added comprehensive MDX node retrieval, file discovery, path generation,
  configuration loading, and table of contents generation
• **Authentication improvements**: Implemented native OAuth client (removed external dependency),
  added Prisma legacy adapter, and created react-query-auth example with MSW mocks
• **Code quality improvements**: Simplified test suites to focus on critical paths, removed
  deprecation notices, improved error handling in middleware execution
• **Build configuration updates**: Simplified and modernized tsup/vitest configs across multiple
  packages, added TypeScript definitions for PWA and react-virtualized
• **Bug fixes**: Fixed DOM safety issues in Critters, improved container detection robustness,
  enhanced CSS handling
• **Type system enhancements**: Updated OAuth provider types, improved session type definitions,
  inlined TypeORM adapter types
Diagram
flowchart LR
  React19["React 19<br/>Upgrade"] --> Tests["Test Framework<br/>Migrations"]
  React19 --> Security["CSRF & Auth<br/>Enhancements"]
  Tests --> Vitest["Vitest<br/>Migration"]
  Tests --> NodeTest["Node.js Native<br/>Tests"]
  Security --> OAuth["Native OAuth<br/>Client"]
  Security --> AppRouter["App Router<br/>Support"]
  React19 --> Session["Session<br/>Refactoring"]
  Session --> WebAPI["Web API<br/>Compatibility"]
  React19 --> MDX["MDX Content<br/>System"]
  MDX --> NodeRetrieval["Node Retrieval<br/>& Processing"]
  MDX --> FileDiscovery["File Discovery<br/>& Config"]
  React19 --> TypeScript["Type System<br/>Enhancements"]
  React19 --> BuildConfig["Build Config<br/>Simplification"]
Loading

Grey Divider

File Changes

1. packages/next-images/test/index.test.ts 🧪 Tests +119/-469

Simplify next-images test suite to minimal smoke tests

• Drastically reduced test file from 529 to 179 lines by removing extensive test coverage
• Simplified test structure from detailed describe blocks to minimal smoke tests
• Removed comprehensive testing of webpack configuration, options, and edge cases
• Changed import style to include default and named exports with proper aliasing

packages/next-images/test/index.test.ts


2. packages/next-iron-session/src/index.test.ts 🧪 Tests +140/-112

Migrate iron-session tests from vitest to Node.js native test runner

• Migrated from vitest to Node.js native node:test and node:assert modules
• Replaced expect() assertions with native assert functions (deepEqual, equal, match,
 rejects, doesNotMatch)
• Replaced vi.fn() mocks with mock.fn() from Node.js test utilities
• Updated test structure to use await test() instead of test() with async handlers

packages/next-iron-session/src/index.test.ts


3. packages/next-csrf/test/index.test.ts 🧪 Tests +13/-475

Drastically simplify next-csrf test suite to minimal exports verification

• Reduced test file from 478 to 16 lines, removing all detailed test cases
• Simplified to only verify exports and basic function creation
• Removed comprehensive testing of setup/csrf middleware, error handling, and edge cases
• Kept only minimal smoke tests for API surface verification

packages/next-csrf/test/index.test.ts


View more (169)
4. packages/next-cookies/test/index.test.ts 🧪 Tests +31/-247

Simplify next-cookies test suite removing security and edge case tests

• Reduced test file from 261 to 45 lines by removing extensive test coverage
• Removed security tests, special character handling, and edge case testing
• Simplified to basic functionality tests for cookie parsing and empty cases
• Added getCookies as an alias export and verified it matches nextCookies

packages/next-cookies/test/index.test.ts


5. packages/next-session/src/index.ts ✨ Enhancement +115/-55

Refactor session management for Web API compatibility and cleaner architecture

• Refactored decorateSession function to accept callbacks instead of req/res objects
• Extracted commitFn and destroyFn as separate async functions passed to decorator
• Added new getWebSession function for Web API (Request/Response) compatibility
• Improved type safety by exporting SessionData and SessionStore types
• Changed return type to use Object.assign for attaching getWebSession method

packages/next-session/src/index.ts


6. packages/next-images/src/index.ts 📝 Documentation +16/-145

Update next-images documentation and simplify code comments

• Removed deprecation notice and updated documentation to reflect compatibility-first approach
• Simplified JSDoc comments throughout the file for better readability
• Refactored withImages function to conditionally set serverRuntimeConfig only when defined
• Removed verbose inline comments explaining webpack configuration details
• Maintained all functional behavior while improving code clarity

packages/next-images/src/index.ts


7. packages/next-mdx/src/get-nodes.ts ✨ Enhancement +244/-0

Add comprehensive MDX node retrieval and processing module

• New file implementing MDX node retrieval and processing functionality
• Exports types for Node, MdxNode, MdxParams, and related interfaces
• Implements getMdxNode, getAllMdxNodes, getNode, getAllNodes functions
• Includes file data caching with hash-based invalidation
• Supports frontmatter parsing, MDX serialization, and node relationships

packages/next-mdx/src/get-nodes.ts


8. packages/react-query-auth/src/examples-api.test.ts 🧪 Tests +194/-0

Add comprehensive test suite for react-query-auth example API helpers

• New test file for example API helpers in react-query-auth package
• Tests handleApiResponse, getUserProfile, loginWithEmailAndPassword,
 registerWithEmailAndPassword
• Includes tests for mock database functionality with password hashing
• Verifies storage token management and localStorage security
• Tests mock db persistence and credential validation across module reloads

packages/react-query-auth/src/examples-api.test.ts


9. packages/next-session/test/session.test.ts 🧪 Tests +76/-51

Update session tests for flexible object matching and improved robustness

• Updated test assertions to use expect.objectContaining() for flexible object matching
• Removed strict equality checks for cookie objects to allow additional properties
• Fixed server listen callback structure in integration test
• Added eslint disable comment for TypeScript ban-ts-comment rule
• Improved test robustness by matching object structure rather than exact equality

packages/next-session/test/session.test.ts


10. packages/next-transpile-modules/src/__tests__/next13plus.test.ts 🧪 Tests +63/-0

Add Next.js 13+ compatibility tests for transpile-modules

• New test file for Next.js 13+ compatibility in transpile-modules package
• Tests version detection and conditional use of transpilePackages vs webpack hacks
• Verifies merging of existing transpile packages configuration
• Uses rewire to mock internal dependencies and test version-specific behavior

packages/next-transpile-modules/src/tests/next13plus.test.ts


11. packages/next-mdx/client.d.ts ⚙️ Configuration changes +1/-0

Add TypeScript declaration file for next-mdx client module

• New TypeScript declaration file for MDX client exports
• Re-exports all types and functions from the compiled client distribution

packages/next-mdx/client.d.ts


12. packages/next-csrf/test/csrf.middleware.test.ts 🧪 Tests +147/-0

Add CSRF middleware unit tests

• Added comprehensive test suite for CSRF middleware with 4 test cases
• Tests cover missing request tokens, valid token matching, token mismatches, and signed tokens
• Includes mock request/response helpers for testing Next.js API routes

packages/next-csrf/test/csrf.middleware.test.ts


13. packages/next-csrf/src/index.ts ✨ Enhancement +10/-77

Simplify exports and adjust cookie defaults

• Changed httpOnly default from true to false for token cookie
• Removed extensive JSDoc comments from nextCsrf function
• Updated import to use SerializeOptions instead of CookieSerializeOptions
• Reorganized exports and removed redundant comments

packages/next-csrf/src/index.ts


14. packages/react-query-auth/examples/vite/src/mocks/db.ts Miscellaneous +112/-0

Add mock database for authentication examples

• Created mock database module with user and credential storage using localStorage
• Implements password hashing with SHA-256 or FNV-1a fallback
• Provides functions for user creation, retrieval, and password validation

packages/react-query-auth/examples/vite/src/mocks/db.ts


15. packages/next-csrf/src/middleware/csrf.ts ✨ Enhancement +62/-6

Enhance CSRF token validation with multiple sources

• Added getRequestToken function to extract CSRF token from headers, body, or query
• Added pickFirstHeaderValue helper to handle header value arrays
• Implemented token mismatch validation between request and cookie tokens
• Added new error code MISSING_REQUEST_TOKEN and TOKEN_MISMATCH

packages/next-csrf/src/middleware/csrf.ts


16. packages/next-mdx-toc/src/index.ts ✨ Enhancement +114/-0

Add MDX table of contents generation

• Created table of contents generator for MDX content using remark and mdast utilities
• Implements recursive parsing of MDX AST to extract headings and links
• Exports TableOfContents interface and getTableOfContents function

packages/next-mdx-toc/src/index.ts


17. packages/next-session/test/utils.test.ts 🧪 Tests +24/-11

Update session utils tests and add parseTime tests

• Updated test assertions from deprecated toBeCalled/toBeCalledWith to
 toHaveBeenCalled/toHaveBeenCalledWith
• Added parseTime import and new test suite for time parsing with various units
• Modified hash test to use string containment instead of JSON parsing

packages/next-session/test/utils.test.ts


18. packages/next-auth/types/adapters.d.ts ✨ Enhancement +95/-13

Inline TypeORM adapter type definitions

• Replaced re-exports with inline class and interface definitions for TypeORM models
• Added TypeORMAdapterModels interface with schema definitions
• Defined generic TypeORMAdapter and PrismaLegacyAdapter types

packages/next-auth/types/adapters.d.ts


19. packages/next-connect/src/router.ts ✨ Enhancement +55/-7

Improve middleware execution with error handling

• Rewrote exec method with improved middleware dispatch logic and error handling
• Added validation to prevent calling next() multiple times or after last handler
• Fixed parameter type to allow undefined values in route params

packages/next-connect/src/router.ts


20. packages/next-csrf/src/types.ts ✨ Enhancement +12/-9

Update CSRF types and error codes

• Changed import from CookieSerializeOptions to SerializeOptions
• Updated default httpOnly value from true to false in documentation
• Added new error codes MISSING_REQUEST_TOKEN and TOKEN_MISMATCH

packages/next-csrf/src/types.ts


21. packages/next-session/test/compat.test.ts ✨ Enhancement +22/-13

Modernize test compatibility and type annotations

• Updated TypeScript ignore comments to use @ts-expect-error instead of @ts-ignore
• Improved Promise type annotations with explicit <void> generic
• Refactored callback error handling for better clarity

packages/next-session/test/compat.test.ts


22. packages/react-query-auth/examples/vite/src/mocks/api-server.ts Miscellaneous +85/-0

Add MSW API server mock handlers

• Created MSW (Mock Service Worker) handlers for authentication endpoints
• Implements /auth/me, /auth/login, /auth/register, and /auth/logout routes
• Includes request body parsing and validation with error handling

packages/react-query-auth/examples/vite/src/mocks/api-server.ts


23. packages/next-seo/tests/e2e/jsonLdScript.e2e.spec.ts 🧪 Tests +20/-10

Implement JSON-LD schema validation tests

• Implemented JSON-LD schema validation using Ajv library
• Replaced skipped test with actual WebPage schema validation
• Added schema compilation with required properties and type constraints

packages/next-seo/tests/e2e/jsonLdScript.e2e.spec.ts


24. packages/next-session/src/utils.ts ✨ Enhancement +36/-7

Enhance time parsing and header commit utilities

• Enhanced parseTime function to support duration units (s, m, h, d)
• Updated commitHeader to support both ServerResponse and Headers objects
• Improved cookie serialization with explicit option mapping

packages/next-session/src/utils.ts


25. packages/react-query-auth/examples/vite/src/lib/api.ts Miscellaneous +68/-0

Add authentication API client

• Created API client module with authentication endpoints
• Implements user profile, login, register, and logout functions
• Includes response parsing and error handling utilities

packages/react-query-auth/examples/vite/src/lib/api.ts


26. packages/next-csrf/src/app-router.ts ✨ Enhancement +59/-0

Add App Router CSRF verification support

• Created new module for App Router CSRF token verification
• Implements verifyCsrfToken function for server actions and route handlers
• Supports token extraction from headers with signature verification

packages/next-csrf/src/app-router.ts


27. packages/next-mdx/src/get-config.ts ✨ Enhancement +59/-0

Add MDX configuration loader

• Created configuration loader supporting both JS and JSON config files
• Implements getConfig and getSourceConfig functions with fallback logic
• Provides TypeScript interfaces for source and overall configuration

packages/next-mdx/src/get-config.ts


28. packages/next-session/test/web.test.ts 🧪 Tests +50/-0

Add web session API tests

• Added test suite for web session functionality with Request/Headers API
• Tests session creation, loading from cookies, and session destruction
• Validates set-cookie header generation

packages/next-session/test/web.test.ts


29. packages/next-csrf/test/app-router.test.ts 🧪 Tests +51/-0

Add App Router CSRF verification tests

• Created test suite for App Router CSRF verification
• Mocks Next.js headers and cookies for testing
• Tests valid token verification and token mismatch scenarios

packages/next-csrf/test/app-router.test.ts


30. packages/next-iron-session/src/core.ts ✨ Enhancement +9/-5

Improve crypto type handling and validation

• Changed Crypto type to any for broader compatibility
• Added validation for password configuration before sealing
• Improved error handling with explicit type assertions

packages/next-iron-session/src/core.ts


31. packages/react-virtualized/source-stripped/vitest-setup.ts ⚙️ Configuration changes +40/-0

Add vitest setup for react-virtualized

• Created vitest setup file with window.scrollTo mock implementation
• Mocks HTMLElement offsetWidth/offsetHeight properties
• Implements writable scrollX/scrollY properties with cleanup

packages/react-virtualized/source-stripped/vitest-setup.ts


32. packages/next-csrf/src/middleware/setup.ts ✨ Enhancement +12/-6

Refactor setup middleware cookie handling

• Removed function overload comments for cleaner code
• Separated cookie options for csrfSecret (always httpOnly) and token (client-readable)
• Updated comments to reflect new httpOnly default behavior

packages/next-csrf/src/middleware/setup.ts


33. packages/next-mdx/src/client.ts ✨ Enhancement +54/-0

Add MDX client-side hydration utilities

• Created client-side MDX hydration utilities using next-mdx-remote
• Implements useHydrate hook with provider support
• Exports HydrateOptions and HydrateProvider interfaces

packages/next-mdx/src/client.ts


34. packages/next-mdx/test/get-config.test.ts 🧪 Tests +50/-0

Add MDX configuration loader tests

• Added test for configuration file precedence (JS over JSON)
• Tests loading and parsing of both config formats
• Validates proper merging of configuration options

packages/next-mdx/test/get-config.test.ts


35. packages/react-virtualized/vitest.config.ts ⚙️ Configuration changes +9/-19

Simplify react-virtualized vitest config

• Simplified vitest configuration with cleaner formatting
• Updated test file patterns and added path alias for react-virtualized
• Adjusted coverage settings to include all source files

packages/react-virtualized/vitest.config.ts


36. packages/next-cookies/src/index.ts ✨ Enhancement +8/-4

Optimize cookie instance management

• Added browser-side cookie instance caching to avoid repeated instantiation
• Improved browser detection in hooks with early returns
• Optimized cookie operations with singleton pattern

packages/next-cookies/src/index.ts


37. packages/next-compose-plugins/src/__tests__/optional.test.ts 🧪 Tests +52/-0

Add optional plugin tests

• Created test suite for optional plugin functionality
• Tests marking, checking, and resolving optional plugins
• Validates that optional plugins are not called during marking

packages/next-compose-plugins/src/tests/optional.test.ts


38. packages/react-query-auth/examples/vite/src/lib/auth.ts Miscellaneous +54/-0

Add authentication configuration module

• Created authentication configuration module using react-query-auth
• Implements user, login, register, and logout functions
• Exports configured hooks and AuthLoader component

packages/react-query-auth/examples/vite/src/lib/auth.ts


39. packages/next-auth/types/providers.d.ts ✨ Enhancement +14/-5

Update OAuth provider type definitions

• Renamed ProtectionType to CheckType with deprecation notice
• Added new checks property to OAuthConfig with deprecation for protection
• Added url property to AppProvider interface

packages/next-auth/types/providers.d.ts


40. packages/next-connect/test/router.test.ts 🧪 Tests +25/-0

Add router error handling tests

• Added tests for error handling when next() is called after last handler
• Added tests for detecting multiple next() calls in same handler
• Validates proper error messages for middleware violations

packages/next-connect/test/router.test.ts


41. packages/next-compose-plugins/src/__tests__/next16.test.ts 🧪 Tests +25/-0

Add Next.js 16 async config tests

• Created test suite for Next.js 16 async configuration support
• Tests async nextConfig and async plugin functions
• Validates proper composition of async configurations

packages/next-compose-plugins/src/tests/next16.test.ts


42. packages/next-pwa/index.d.ts ✨ Enhancement +32/-0

Add PWA plugin type definitions

• Created TypeScript definitions for PWA plugin options
• Defines PWAPluginOptions interface with comprehensive configuration properties
• Exports withPWA function type definition

packages/next-pwa/index.d.ts


43. packages/critters/tsup.config.ts ⚙️ Configuration changes +5/-17

Simplify critters build configuration

• Changed entry point from .js to .ts file
• Enabled DTS generation and minification
• Removed custom banner and simplified external dependencies

packages/critters/tsup.config.ts


44. packages/react-virtualized/index.d.ts ✨ Enhancement +27/-0

Add react-virtualized type definitions

• Created type definitions exporting all major react-virtualized components
• Exports core components like AutoSizer, Grid, List, Table, and utilities

packages/react-virtualized/index.d.ts


45. packages/next-connect/test/node.test.ts 🧪 Tests +17/-0

Add node router error handling test

• Added test for error handling when next() is called after last handler
• Validates that onError callback is invoked with proper error message

packages/next-connect/test/node.test.ts


46. packages/next-mdx/src/get-files.ts ✨ Enhancement +32/-0

Add MDX file discovery utilities

• Created file discovery module for MDX content
• Implements getFiles function to find and parse MDX files
• Generates slug and URL for each file based on configuration

packages/next-mdx/src/get-files.ts


47. packages/next-session/tsup.config.ts ⚙️ Configuration changes +10/-6

Update session build configuration

• Updated entry configuration to support multiple entry points (session and compat)
• Changed output directory to lib and enabled DTS generation
• Updated banner template with placeholder values

packages/next-session/tsup.config.ts


48. packages/next-transpile-modules/tsup.config.ts ⚙️ Configuration changes +3/-19

Simplify transpile-modules build config

• Removed custom banner and esbuild options
• Simplified configuration with minimal settings
• Removed unnecessary options like splitting and sourcemap

packages/next-transpile-modules/tsup.config.ts


49. packages/next-transpile-modules/vitest.config.ts ⚙️ Configuration changes +7/-8

Refine transpile-modules test configuration

• Updated test file patterns to be more specific (.ts only)
• Simplified exclude patterns and improved coverage configuration

packages/next-transpile-modules/vitest.config.ts


50. packages/next-mdx/src/get-mdx-paths.ts ✨ Enhancement +31/-0

Add MDX path generation utilities

• Created path generation module for MDX static generation
• Implements getMdxPathsRaw and getMdxPaths functions
• Converts file slugs to Next.js dynamic route parameters

packages/next-mdx/src/get-mdx-paths.ts


51. packages/next-session/src/types.ts ✨ Enhancement +8/-2

Enhance session type definitions

• Changed SessionRecord type from Record<string, unknown> to Record<string, any>
• Updated touchAfter to accept both number and string values
• Added module augmentation for IncomingMessage.session property

packages/next-session/src/types.ts


52. packages/react-query-auth/examples/vite/src/lib/utils.ts Misc +22/-0

Add token storage utilities

• Created storage utility module for token management
• Implements secure token retrieval, storage, and clearing with validation
• Includes header injection prevention and empty token rejection

packages/react-query-auth/examples/vite/src/lib/utils.ts


53. packages/next-pwa/test-app/public/service-worker.js ⚙️ Configuration changes +1/-1

Service worker update with new build artifacts

• Updated service worker with new workbox version and build manifest hashes
• Refactored OAuth callback parameter handling in cacheWillUpdate function
• Simplified parameter destructuring in network request handlers

packages/next-pwa/test-app/public/service-worker.js


54. packages/next-auth/src/server/lib/oauth/client.js ✨ Enhancement +111/-170

Remove oauth package dependency with native implementation

• Removed dependency on external oauth package, implemented native OAuth client
• Refactored OAuth 2.x to use native fetch API instead of node-oauth library
• Simplified OAuth 1.x handling with placeholder implementation for future completion
• Updated error handling to use async/await pattern with try-catch blocks

packages/next-auth/src/server/lib/oauth/client.js


55. packages/next-compose-plugins/src/__tests__/compose.test.js 🧪 Tests +358/-0

Add complete test suite for compose module

• Added comprehensive test suite for plugin composition functionality
• Tests cover plugin parsing, phase-based execution, and configuration merging
• Validates optional plugin loading and error handling for incompatible plugins

packages/next-compose-plugins/src/tests/compose.test.js


56. packages/react-query-auth/examples/vite/public/mockServiceWorker.js ⚙️ Configuration changes +307/-0

Add Mock Service Worker service worker implementation

• Added Mock Service Worker (MSW) service worker implementation
• Handles request interception, mocking, and passthrough logic
• Manages client lifecycle and message communication for mocking control

packages/react-query-auth/examples/vite/public/mockServiceWorker.js


57. packages/next-transpile-modules/src/next-transpile-modules.js ✨ Enhancement +56/-28

Add Next.js 13+ native transpilePackages support

• Added detection for Next.js 13+ to use native transpilePackages option
• Improved error handling with proper error cause chaining
• Fixed regex pattern for module matching and cleaned up comments
• Simplified snapshot configuration and removed TODO comments

packages/next-transpile-modules/src/next-transpile-modules.js


58. packages/critters/src/runtime.js 🐞 Bug fix +44/-19

Improve DOM safety and CSS handling in Critters

• Fixed checkInlineThreshold call to pass textContent instead of sheet object
• Added fallback logic for appending styles when document.head is unavailable
• Enhanced URL sanitization with dangerous scheme detection
• Improved media query escaping in onload attribute
• Fixed animation keyword filtering to exclude common CSS keywords
• Enhanced font preload generation with format detection from src declarations

packages/critters/src/runtime.js


59. packages/next-auth/src/adapters/prisma-legacy.js ✨ Enhancement +290/-0

Add Prisma legacy adapter for next-auth

• Added new Prisma legacy adapter for next-auth with full CRUD operations
• Implements user, account, session, and verification request management
• Supports compound ID generation and token hashing for security
• Provides backward compatibility for legacy authentication flows

packages/next-auth/src/adapters/prisma-legacy.js


60. packages/next-compose-plugins/src/__tests__/phases.test.js 🧪 Tests +171/-0

Add phase management test suite

• Added comprehensive test suite for phase checking and configuration merging
• Tests validate phase-specific plugin execution and negation logic
• Covers configuration merging with phase-specific overrides

packages/next-compose-plugins/src/tests/phases.test.js


61. packages/next-optimized-images/lib/loaders/index.js ✨ Enhancement +165/-0

Add image loader detection and configuration

• Added module detection utility for checking installed image optimization loaders
• Implements loader detection for imagemin, webp, lqip, and responsive-loader
• Provides configuration for handled image types and loader application logic

packages/next-optimized-images/lib/loaders/index.js


62. packages/next-auth/src/lib/__tests__/jwt.test.js 🧪 Tests +34/-15

Update JWT tests with key fixtures

• Updated JWT tests to include signing and encryption key fixtures
• Added signingKey and encryptionKey parameters to all encode/decode calls
• Improved test coverage for encrypted token handling

packages/next-auth/src/lib/tests/jwt.test.js


63. packages/react-virtualized/source/Table/Table.jest.js 🧪 Tests +15/-15

Migrate Jest mocks to Vitest

• Migrated all jest mock functions to vi from vitest
• Updated jest.fn(), jest.spyOn(), and jest.resetModules() calls
• Maintained test logic while updating testing framework references

packages/react-virtualized/source/Table/Table.jest.js


64. packages/react-virtualized/source/WindowScroller/WindowScroller.jest.js 🧪 Tests +17/-17

Migrate Jest to Vitest in WindowScroller tests

• Migrated all jest references to vi from vitest framework
• Updated mock function creation and spy utilities throughout test file
• Preserved test functionality with updated testing library calls

packages/react-virtualized/source/WindowScroller/WindowScroller.jest.js


65. packages/next-optimized-images/lib/resource-queries.js ✨ Enhancement +173/-0

Add image resource query configuration

• Added resource query configuration for image optimization loaders
• Defines query patterns for url, inline, include, original, lqip, resize, and trace
• Implements loader option merging and combination generation logic

packages/next-optimized-images/lib/resource-queries.js


66. packages/next-compose-plugins/src/__tests__/index.test.js 🧪 Tests +128/-0

Add main module test suite

• Added test suite for main next-compose-plugins API
• Tests cover plugin composition, phase-specific execution, and webpack config extension
• Validates phase-specific configuration resolution in Next.js config

packages/next-compose-plugins/src/tests/index.test.js


67. packages/next-optimized-images/lib/loaders/img-loader.js ✨ Enhancement +145/-0

Add image loader configuration module

• Added img loader configuration with imagemin plugin integration
• Implements regex generation for handled image types
• Provides resource query and webp/sprite loader integration

packages/next-optimized-images/lib/loaders/img-loader.js


68. packages/next-mdx/test/index.test.js 🧪 Tests +114/-0

Add next-mdx integration tests

• Added comprehensive test suite for next-mdx functionality
• Tests cover node retrieval, relationships, nested content, and hydration
• Validates MDX content serialization and client-side rendering

packages/next-mdx/test/index.test.js


69. packages/react-virtualized/source/Table/createMultiSort.jest.js 🧪 Tests +11/-11

Migrate createMultiSort tests to Vitest

• Migrated all jest.fn() calls to vi.fn() from vitest
• Updated test framework references throughout the file
• Maintained all test logic and assertions

packages/react-virtualized/source/Table/createMultiSort.jest.js


70. packages/critters/src/dom.js 🐞 Bug fix +5/-6

Improve critters container detection robustness

• Added fallback logic for missing data-critters-container element
• Improved container detection to handle malformed HTML gracefully
• Simplified container initialization logic

packages/critters/src/dom.js


71. packages/next-optimized-images/lib/loaders/lqip-loader/index.js ✨ Enhancement +17/-0

Add LQIP loader configuration module

• Added LQIP loader options builder for webpack configuration
• Merges file loader options with LQIP-specific configuration

packages/next-optimized-images/lib/loaders/lqip-loader/index.js


72. .changeset/fix-pr23-feedback.md Additional files +37/-0

...

.changeset/fix-pr23-feedback.md


73. .github/workflows/bundle-size.yml Additional files +11/-0

...

.github/workflows/bundle-size.yml


74. .github/workflows/ci.yml Additional files +81/-37

...

.github/workflows/ci.yml


75. .github/workflows/release.yml Additional files +3/-3

...

.github/workflows/release.yml


76. .github/workflows/security-audit.yml Additional files +23/-9

...

.github/workflows/security-audit.yml


77. .husky/pre-commit Additional files +1/-8

...

.husky/pre-commit


78. AGENTS.md Additional files +36/-0

...

AGENTS.md


79. README.md Additional files +23/-21

...

README.md


80. eslint.config.js Additional files +0/-31

...

eslint.config.js


81. eslint.config.mjs Additional files +176/-0

...

eslint.config.mjs


82. lefthook.yml Additional files +42/-0

...

lefthook.yml


83. llms.txt Additional files +12/-2

...

llms.txt


84. package.json Additional files +23/-9

...

package.json


85. packages/critters/.changeset/config.json Additional files +11/-0

...

packages/critters/.changeset/config.json


86. packages/critters/.commitlintrc.json Additional files +35/-0

...

packages/critters/.commitlintrc.json


87. packages/critters/.github/FUNDING.yml Additional files +3/-0

...

packages/critters/.github/FUNDING.yml


88. packages/critters/.github/ISSUE_TEMPLATE/bug_report.yml Additional files +88/-0

...

packages/critters/.github/ISSUE_TEMPLATE/bug_report.yml


89. packages/critters/.github/ISSUE_TEMPLATE/config.yml Additional files +11/-0

...

packages/critters/.github/ISSUE_TEMPLATE/config.yml


90. packages/critters/.github/ISSUE_TEMPLATE/feature_request.yml Additional files +45/-0

...

packages/critters/.github/ISSUE_TEMPLATE/feature_request.yml


91. packages/critters/.github/ISSUE_TEMPLATE/security_vulnerability.yml Additional files +14/-0

...

packages/critters/.github/ISSUE_TEMPLATE/security_vulnerability.yml


92. packages/critters/.github/PULL_REQUEST_TEMPLATE.md Additional files +45/-0

...

packages/critters/.github/PULL_REQUEST_TEMPLATE.md


93. packages/critters/.github/SECURITY.md Additional files +59/-0

...

packages/critters/.github/SECURITY.md


94. packages/critters/.github/renovate.json Additional files +51/-0

...

packages/critters/.github/renovate.json


95. packages/critters/.github/workflows/ci.yml Additional files +1/-1

...

packages/critters/.github/workflows/ci.yml


96. packages/critters/.npmrc Additional files +5/-0

...

packages/critters/.npmrc


97. packages/critters/.prettierignore Additional files +6/-0

...

packages/critters/.prettierignore


98. packages/critters/.prettierrc.cjs Additional files +12/-0

...

packages/critters/.prettierrc.cjs


99. packages/critters/CHANGELOG.md Additional files +7/-83

...

packages/critters/CHANGELOG.md


100. packages/critters/CODE_OF_CONDUCT.md Additional files +133/-0

...

packages/critters/CODE_OF_CONDUCT.md


101. packages/critters/CONTRIBUTING.md Additional files +330/-0

...

packages/critters/CONTRIBUTING.md


102. packages/critters/LICENSE Additional files +21/-190

...

packages/critters/LICENSE


103. packages/critters/README.md Additional files +16/-188

...

packages/critters/README.md


104. packages/critters/SECURITY.md Additional files +59/-0

...

packages/critters/SECURITY.md


105. packages/critters/llms.txt Additional files +22/-0

...

packages/critters/llms.txt


106. packages/critters/package.json Additional files +23/-37

...

packages/critters/package.json


107. packages/critters/plans/architecture.md Additional files +1795/-0

...

packages/critters/plans/architecture.md


108. packages/critters/src/index.ts Additional files +6/-0

...

packages/critters/src/index.ts


109. packages/critters/src/runtime.d.ts Additional files +0/-0

...

packages/critters/src/runtime.d.ts


110. packages/critters/test/index.test.ts Additional files +13/-0

...

packages/critters/test/index.test.ts


111. packages/critters/test/security.test.js Additional files +17/-0

...

packages/critters/test/security.test.js


112. packages/critters/tsconfig.base.json Additional files +19/-0

...

packages/critters/tsconfig.base.json


113. packages/critters/tsconfig.build.json Additional files +11/-0

...

<a href='https://github.com/riceharvest/opensourceframework/pull/42/files#di...

@qodo-code-review
Copy link

ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan

Code Review by Qodo

Grey Divider

Looking for bugs?

Check back in a few minutes. An AI review agent is analyzing this pull request.

Grey Divider

Qodo Logo

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9cfd0861bf

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +13 to +16
return {
getOAuthAccessToken: (code, codeVerifier) => getOAuth2AccessToken(code, provider, codeVerifier),
get: (accessToken, results) => getOAuth2(provider, accessToken, results)
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P0 Badge Restore OAuth2 authorize URL support

getAuthorizationUrl() in src/server/lib/signin/oauth.js still calls client.getAuthorizeUrl(...) for all OAuth 2 providers, but this factory now returns an object with only getOAuthAccessToken and get. Any OAuth2 sign-in attempt (Google, GitHub, etc.) now fails before redirecting with TypeError: client.getAuthorizeUrl is not a function, which breaks the primary auth flow.

Useful? React with 👍 / 👎.

Comment on lines +225 to +227
async getOAuthRequestToken(params = {}) {
// Implement OAuth 1.0a request token logic
throw new Error("OAuth 1.0a is not yet fully implemented in the native client. Please use OAuth 2.0 or contact maintainers.")

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Implement OAuth1 methods instead of throwing

The new OAuth1 client methods currently throw “not yet fully implemented”, but OAuth1 providers are still present (for example providers/twitter.js uses version: "1.0A") and the signin/callback paths call these methods. That makes OAuth1 authentication fail deterministically at runtime for affected providers.

Useful? React with 👍 / 👎.

@@ -1,6 +1,6 @@
{
"name": "@opensourceframework/react-a11y-utils",
"version": "0.2.1",
"version": "0.2.0",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Keep package version monotonic

This change decreases the package version from 0.2.1 to 0.2.0. Since the same commit includes a patch changeset for this package, the next release cycle will attempt to regenerate 0.2.1 instead of moving forward, which can block changeset publish and creates inconsistent release history.

Useful? React with 👍 / 👎.

@riceharvest
Copy link
Owner Author

4 similar comments
@riceharvest
Copy link
Owner Author

@riceharvest
Copy link
Owner Author

@riceharvest
Copy link
Owner Author

@riceharvest
Copy link
Owner Author

@riceharvest
Copy link
Owner Author

Superseded by #59 (squash merge of all modernization PRs). Changes included in main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant