-
Notifications
You must be signed in to change notification settings - Fork 4
feat: Release v2.0.0 - Major React 18 upgrade and modernization #103
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR implements a major version 2.0.0 release that modernizes the React Laika client with React 18 support and comprehensive testing improvements. The upgrade includes breaking changes by dropping React 16 support and migrating from yarn to npm.
Key changes:
- Updated React peer dependencies to support React 17+ and React 18
- Added comprehensive test coverage with new test files and enhanced error handling tests
- Modernized development toolchain with updated dependencies (TypeScript 5, Webpack 5, Cypress 15, ESLint 9)
Reviewed Changes
Copilot reviewed 20 out of 22 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated version to 2.0.0, migrated to npm, updated React peer deps and all dev dependencies |
| src/utils.ts | Improved type safety by replacing any with unknown and fixing unreachable code |
| src/utils.test.ts | Added comprehensive error handling tests for network failures and corrupted data |
| src/index.test.ts | New test file for verifying main exports |
| src/hook.test.tsx | Added error handling test for uninitialized hook usage |
| webpack.config.js | New webpack configuration with TypeScript and coverage support |
| eslint.config.js | New ESLint flat configuration with TypeScript and React rules |
| cypress.config.ts | New Cypress configuration for component testing with coverage |
| .nycrc.json | Coverage configuration with 90% statement coverage requirement |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| const isValidLaika = (data: unknown): data is LaikaInfo => { | ||
| if (!data || typeof data !== 'object') return false | ||
| const obj = data as Record<string, unknown> | ||
| return ( | ||
| typeof obj.value === 'boolean' && | ||
| typeof obj.timestamp === 'number' && | ||
| typeof obj.env === 'string' | ||
| ) | ||
| } |
Copilot
AI
Oct 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type guard function should handle null explicitly since typeof null === 'object' in JavaScript. Consider changing the condition to if (!data || typeof data !== 'object' || data === null) to be more explicit about null handling.
| "test": "cypress run --component", | ||
| "test:coverage": "cypress run --component && nyc report --reporter=text --reporter=lcov", |
Copilot
AI
Oct 15, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The test script uses the deprecated --component flag. In Cypress 15.4.0, component testing should be configured via the cypress.config.ts file and run with just cypress run when component testing is the default or specify the config explicitly.
| "test": "cypress run --component", | |
| "test:coverage": "cypress run --component && nyc report --reporter=text --reporter=lcov", | |
| "test": "cypress run", | |
| "test:coverage": "cypress run && nyc report --reporter=text --reporter=lcov", |
BREAKING CHANGES: - Drop React 16 support, now requires React 17+ - Migrate from yarn to npm package manager - Update minimum Node.js requirements ✨ New Features: - Add React 18 full compatibility - Add comprehensive test coverage (94% statement coverage) - Add ESLint with modern flat configuration - Add Cypress code coverage integration - Add new test files for complete API coverage 🔧 Improvements: - Update all dependencies to latest secure versions - Modernize build toolchain (Webpack 5, TypeScript 5, Cypress 15) - Enhanced error handling and edge case coverage in tests - Streamlined npm-only development workflow - Updated GitHub Actions with modern authentication - Added comprehensive lint rules for code quality 🛠 Technical Updates: - TypeScript 5.0.0 with ES2018 target - Webpack 5.102.1 with modern configuration - Cypress 15.4.0 with component testing - ESLint 9.x with flat configuration format - @cypress/code-coverage with nyc reporting 📦 Dependencies: - React peer dependencies: '^17.0.0 || ^18.0.0' - Remove all yarn configuration and files - Update all devDependencies to latest stable versions - Add babel-plugin-istanbul for test instrumentation 🔒 Security: - Resolve vulnerabilities in outdated dependencies - Update to secure versions of all development tools
✨ Improvements: - Update Node.js to LTS version (lts/*) for stability - Add comprehensive CI pipeline for pull requests - Include all quality gates: build, lint, and test - Modernize GitHub Actions to v4 - Add npm caching for faster workflow runs - Enhance publish workflow with pre-publish validation 🔧 CI Pipeline now runs: - make install (dependency installation) - make build (TypeScript compilation) - make lint (ESLint + Prettier checks) - make test (Cypress tests with 94% coverage) This ensures all PRs maintain code quality, formatting standards, and pass comprehensive testing before merge.
🔧 Package Updates: - @cypress/webpack-dev-server: ^3.0.0 → ^5.1.3 (security fix) - prettier: ^2.4.1 → ^3.6.2 (latest version) 🛡️ Security Fixes: - Fixed 2 moderate severity vulnerabilities in webpack-dev-server - Resolved deprecation warnings for inflight, rimraf, and glob ✅ Results: - 0 vulnerabilities found - No more deprecation warnings during npm install - All tests and builds continue to work correctly
- Add Codecov integration to GitHub workflows for automated coverage reporting - Update README badges to reference main MEDIGO/laika-react repository - Configure automatic coverage upload after test runs - Replace manual coverage badge with automated Codecov badge
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
BREAKING CHANGES:
✨ New Features:
🔧 Improvements:
🛠 Technical Updates:
📦 Dependencies:
🔒 Security: