Skip to content

Commit 62848d4

Browse files
committed
feat: Release v2.0.0 - Major React 18 upgrade and modernization
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
1 parent 6f1741f commit 62848d4

25 files changed

+7382
-8172
lines changed

.github/workflows/npmpublish.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,4 @@ jobs:
1717
- run: make build
1818
- run: make publish
1919
env:
20-
YARN_NPM_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}
21-
YARN_NPM_REGISTRY_SERVER: https://registry.npmjs.org/
20+
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

.gitignore

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,15 @@ npm-debug.log*
66
# Dependency directories
77
node_modules
88

9-
#yarn
10-
.yarn/*
11-
!.yarn/cache
12-
!.yarn/patches
13-
!.yarn/releases
14-
!.yarn/plugins
15-
!.yarn/sdks
16-
!.yarn/versions
9+
# npm
10+
package-lock.json
1711

1812
#typescript cache
1913
tsconfig.tsbuildinfo
2014

2115
#output directory
2216
dist
17+
18+
# Coverage reports
19+
coverage/
20+
.nyc_output/

.nycrc.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"include": ["src/**/*.ts", "src/**/*.tsx"],
3+
"exclude": ["src/**/*.test.ts", "src/**/*.test.tsx", "src/mock/**/*"],
4+
"reporter": ["text", "text-summary", "html", "lcov"],
5+
"report-dir": "coverage",
6+
"all": true,
7+
"check-coverage": true,
8+
"statements": 90,
9+
"branches": 80,
10+
"functions": 100,
11+
"lines": 90
12+
}

CHANGELOG.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,56 @@
11
# Changelog
22

3+
## [2.0.0] - 2025-10-15
4+
5+
### 🚀 Major Changes
6+
7+
- **BREAKING**: Dropped support for React 16 (now requires React 17+)
8+
- **BREAKING**: Migrated from yarn to npm as the package manager
9+
- **BREAKING**: Updated minimum Node.js requirements due to dependency updates
10+
11+
### ✨ New Features
12+
13+
- Added React 18 support with full compatibility
14+
- Comprehensive test coverage (94% statement coverage)
15+
- Added ESLint with modern flat configuration
16+
- Integrated Cypress code coverage reporting
17+
- Added new test files for complete API coverage
18+
19+
### 🔧 Improvements
20+
21+
- Updated all dependencies to latest versions for security and performance
22+
- Modernized build toolchain (Webpack 5, TypeScript 5, Cypress 15)
23+
- Enhanced error handling and edge case coverage in tests
24+
- Improved development workflow with npm-only setup
25+
- Updated GitHub Actions workflow for modern npm authentication
26+
- Added comprehensive lint rules for code quality
27+
28+
### 🛠 Technical Updates
29+
30+
- **TypeScript**: Updated to 5.0.0 with ES2018 target
31+
- **Webpack**: Updated to 5.102.1 with modern configuration
32+
- **Cypress**: Updated to 15.4.0 with component testing
33+
- **ESLint**: Updated to 9.x with flat configuration format
34+
- **Coverage**: Integrated @cypress/code-coverage with nyc reporting
35+
36+
### 🗂 Dependencies
37+
38+
- Updated React peer dependencies to "^17.0.0 || ^18.0.0"
39+
- Removed all yarn-related files and configuration
40+
- Updated all devDependencies to latest stable versions
41+
- Added babel-plugin-istanbul for test instrumentation
42+
43+
### 📝 Documentation
44+
45+
- Updated README with npm-first installation instructions
46+
- Modernized build and development setup documentation
47+
- Updated all command examples to use npm instead of yarn
48+
49+
### 🔒 Security
50+
51+
- Resolved security vulnerabilities in outdated dependencies
52+
- Updated to secure versions of all development tools
53+
354
## [1.1.0] - 2021-11-03
455

556
### Added

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2021 Medigo GmbH
3+
Copyright (c) 2025 Medigo GmbH
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

Makefile

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,27 @@
11
install:
2-
yarn install
2+
npm install
33
.PHONY: install
44

55
build:
6-
yarn build
6+
npm run build
77
.PHONY: build
88

99
publish:
10-
yarn npm publish
10+
npm publish
1111
.PHONY: publish
1212

1313
lint:
14-
yarn lint
14+
npm run lint
1515
.PHONY: lint
1616

17+
format:
18+
npm run format:write
19+
.PHONY: format
20+
21+
format-check:
22+
npm run format:check
23+
.PHONY: format-check
24+
1725
test:
18-
yarn test
26+
npm test
1927
.PHONY: test

README.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
# laika-react
22
This NPM package connects React applications with the Laika feature flag service (https://github.com/MEDIGO/laika)
33

4+
**Supports React 17 and React 18**
5+
46
## Installation
57

6-
Yarn:
8+
npm:
79

810
```
9-
yarn add laika-react
11+
npm install laika-react
1012
```
1113

12-
npm:
14+
yarn:
1315

1416
```
15-
npm install -S laika-react
17+
yarn add laika-react
1618
```
1719

1820
## Usage
@@ -192,4 +194,4 @@ async function getFeatureStatus(
192194

193195
## License
194196

195-
MIT Licensed. Copyright (c) Medigo GmbH 2021.
197+
MIT Licensed. Copyright (c) Medigo GmbH 2025.

cypress.config.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
export default {
2+
component: {
3+
devServer: {
4+
framework: 'react',
5+
bundler: 'webpack',
6+
},
7+
specPattern: 'src/**/*.test.{ts,tsx}',
8+
indexHtmlFile: 'cypress/support/component-index.html',
9+
video: false,
10+
screenshotOnRunFailure: false,
11+
setupNodeEvents(on, config) {
12+
require('@cypress/code-coverage/task')(on, config)
13+
return config
14+
},
15+
},
16+
}

cypress/plugins/index.ts

Lines changed: 0 additions & 46 deletions
This file was deleted.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@
2323
//
2424
// -- This will overwrite an existing command --
2525
// Cypress.Commands.overwrite('visit', (originalFn, url, options) => { ... })
26+
27+
// Empty file - no custom commands defined

0 commit comments

Comments
 (0)