feat(react-a11y-utils): modernize for React 19#42
Conversation
- 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.
ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan Review Summary by QodoModernize monorepo for React 19 with comprehensive test migrations, enhanced security, and new MDX/auth features
WalkthroughsDescription• **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 Diagramflowchart 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"]
File Changes1. packages/next-images/test/index.test.ts
|
ⓘ You are approaching your monthly quota for Qodo. Upgrade your plan Code Review by QodoLooking for bugs?Check back in a few minutes. An AI review agent is analyzing this pull request. |
There was a problem hiding this comment.
💡 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".
| return { | ||
| getOAuthAccessToken: (code, codeVerifier) => getOAuth2AccessToken(code, provider, codeVerifier), | ||
| get: (accessToken, results) => getOAuth2(provider, accessToken, results) | ||
| } |
There was a problem hiding this comment.
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 👍 / 👎.
| 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.") |
There was a problem hiding this comment.
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", | |||
There was a problem hiding this comment.
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 👍 / 👎.
|
|
4 similar comments
|
|
|
|
|
|
|
|
|
Superseded by #59 (squash merge of all modernization PRs). Changes included in main. |

Closes #22 (roadmap).
reactandreact-domto ^19.0.0 indevDependencies.peerDependenciesto support React 19.