-
Notifications
You must be signed in to change notification settings - Fork 5
React 17-19 compatibility #11
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
Changes from all commits
09e4b9e
a02f2ca
9b6220c
9a63c7f
4ced915
c0f3ab6
1702a23
358306b
d1614a4
96f7cd0
c243f44
a21ea4e
ca64bcc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,3 +1,4 @@ | ||
| semi: false | ||
| singleQuote: true | ||
| trailingComma: es5 | ||
| trailingComma: es5 | ||
| parser: babel |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,14 +7,15 @@ | |
| "url": "git://github.com/acdlite/recompose.git" | ||
| }, | ||
| "license": "MIT", | ||
| "packageManager": "[email protected]", | ||
| "scripts": { | ||
| "lint": "eslint scripts src", | ||
| "build:recompose": "cross-env PACKAGE_NAME=recompose rollup --config scripts/rollup.config.js", | ||
| "test": "jest && flow check && cross-env SNAPSHOT=match npm run build:recompose", | ||
| "test:watch": "cross-env BABEL_ENV=cjs jest --watch", | ||
| "release": "node scripts/release.js", | ||
| "postinstall": "node scripts/installNestedPackageDeps.js", | ||
| "format": "prettier --semi false --trailing-comma es5 --single-quote --write 'scripts/*.js' 'src/packages/*/*.js' 'src/packages/*/!(node_modules)/**/*.js'", | ||
| "format": "prettier --write 'scripts/*.js' 'src/packages/*/*.js' 'src/packages/*/!(node_modules)/**/*.js'", | ||
| "precommit": "lint-staged", | ||
| "prepush": "yarn test" | ||
| }, | ||
|
|
@@ -26,71 +27,66 @@ | |
| "text-summary", | ||
| "lcov" | ||
| ], | ||
| "setupTestFrameworkScriptFile": "<rootDir>/scripts/jest.setup.js" | ||
| "testTimeout": 20000, | ||
| "testEnvironment": "jsdom", | ||
| "restoreMocks": true | ||
| }, | ||
| "lint-staged": { | ||
| "*.js": [ | ||
| "prettier --semi false --trailing-comma es5 --single-quote --write", | ||
| "prettier --write", | ||
| "eslint --fix", | ||
| "git add" | ||
| ] | ||
| }, | ||
| "devDependencies": { | ||
| "@babel/cli": "^7.0.0", | ||
| "@babel/core": "^7.0.0", | ||
| "@babel/plugin-proposal-class-properties": "^7.0.0", | ||
| "@babel/plugin-transform-runtime": "^7.0.0", | ||
| "@babel/preset-env": "^7.0.0", | ||
| "@babel/preset-react": "^7.0.0", | ||
| "@babel/runtime": "^7.0.0", | ||
| "babel-core": "^7.0.0-bridge.0", | ||
| "@babel/cli": "^7.22.0", | ||
| "@babel/core": "^7.22.0", | ||
| "@babel/plugin-transform-class-properties": "^7.25.0", | ||
| "@babel/plugin-transform-runtime": "^7.22.0", | ||
| "@babel/preset-env": "^7.22.0", | ||
| "@babel/preset-react": "^7.22.0", | ||
| "@babel/runtime": "^7.22.0", | ||
| "@testing-library/dom": "^10.4.0", | ||
| "@testing-library/react": "^16.3.0", | ||
| "babel-eslint": "^9.0.0", | ||
| "babel-jest": "^22.4.3", | ||
| "babel-jest": "^29.7.0", | ||
| "baconjs": "^0.7.84", | ||
| "chalk": "^1.1.1", | ||
| "change-case": "^2.3.1", | ||
| "codecov": "^1.0.1", | ||
| "create-react-class": "^15.5.0", | ||
| "cross-env": "^4.0.0", | ||
| "enzyme": "^3.3.0", | ||
| "eslint": "^5.3.0", | ||
| "eslint-config-airbnb": "^17.0.0", | ||
| "eslint-config-prettier": "^2.9.0", | ||
| "eslint-plugin-import": "^2.13.0", | ||
| "eslint-plugin-jsx-a11y": "^6.1.1", | ||
| "eslint-plugin-prettier": "^2.0.1", | ||
| "eslint-plugin-prettier": "^3.4.0", | ||
| "eslint-plugin-react": "^7.10.0", | ||
| "flow-bin": "^0.72.0", | ||
| "flyd": "^0.2.4", | ||
| "husky": "^0.13.3", | ||
| "jest": "^22.4.3", | ||
| "jest": "^29.7.0", | ||
| "jest-environment-jsdom": "^29.7.0", | ||
| "kefir": "^3.2.3", | ||
| "lint-staged": "^3.4.0", | ||
| "most": "^1.0.2", | ||
| "prettier": "^1.2.2", | ||
| "prettier": "^1.19.1", | ||
| "prop-types": "^15.6.1", | ||
| "react": "^16.3.1", | ||
| "react-dom": "^16.3.1", | ||
| "react": "^19.0.0", | ||
| "react-dom": "^19.0.0", | ||
| "readline-sync": "^1.2.21", | ||
| "rollup": "^0.65.0", | ||
| "rollup-plugin-babel": "^4.0.1", | ||
| "rollup-plugin-commonjs": "^9.1.6", | ||
| "rollup-plugin-node-resolve": "^3.3.0", | ||
| "rollup-plugin-replace": "^2.0.0", | ||
| "rollup-plugin-size-snapshot": "^0.6.1", | ||
| "rollup-plugin-uglify": "^4.0.0", | ||
| "@rollup/plugin-babel": "^6.0.0", | ||
| "@rollup/plugin-commonjs": "^28.0.0", | ||
| "@rollup/plugin-node-resolve": "^16.0.0", | ||
| "@rollup/plugin-replace": "^6.0.0", | ||
| "@rollup/plugin-terser": "^0.4.0", | ||
| "rollup": "^4.0.0", | ||
| "rollup-plugin-size-snapshot": "^0.12.0", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: # First, check what Rollup version is in package.json
cat package.json | grep -A2 -B2 '"rollup"'Repository: shakacode/recompose Length of output: 231 🏁 Script executed: # Check the package.json for rollup version
cat package.json | jq '.dependencies.rollup // .devDependencies.rollup // "not found"'Repository: shakacode/recompose Length of output: 71 🏁 Script executed: # Query npm registry for rollup-plugin-size-snapshot package info
npm view rollup-plugin-size-snapshot versions --json 2>/dev/null | tail -5Repository: shakacode/recompose Length of output: 110 🏁 Script executed: # Get recent releases and maintenance info
npm view rollup-plugin-size-snapshot --json 2>/dev/null | jq '{name, "dist-tags": .["dist-tags"], latest_version: .version, modified: .time.modified, maintainers: .maintainers}'Repository: shakacode/recompose Length of output: 283 🏁 Script executed: # Check specifically for [email protected] details
npm view [email protected] --json 2>/dev/null | jq '{version, peerDependencies, dependencies}'Repository: shakacode/recompose Length of output: 405 Replace
🤖 Prompt for AI Agents
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It works fine for now. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| "rx": "^4.1.0", | ||
| "rxjs": "^5.0.0", | ||
| "shelljs": "^0.6.0", | ||
| "sinon": "^1.17.1", | ||
| "webpack": "^2.4.1", | ||
| "xstream": "^5.0.5" | ||
| }, | ||
| "devEngines": { | ||
| "node": "5.x", | ||
| "npm": "3.x" | ||
| }, | ||
| "dependencies": { | ||
| "enzyme-adapter-react-16": "^1.1.1" | ||
| } | ||
| "dependencies": {} | ||
| } | ||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,12 +1,14 @@ | ||
| import path from 'path' | ||
| import nodeResolve from 'rollup-plugin-node-resolve' | ||
| import babel from 'rollup-plugin-babel' | ||
| import replace from 'rollup-plugin-replace' | ||
| import commonjs from 'rollup-plugin-commonjs' | ||
| import { uglify } from 'rollup-plugin-uglify' | ||
| import { createRequire } from 'module' | ||
| import nodeResolve from '@rollup/plugin-node-resolve' | ||
| import babel from '@rollup/plugin-babel' | ||
| import replace from '@rollup/plugin-replace' | ||
| import commonjs from '@rollup/plugin-commonjs' | ||
| import terser from '@rollup/plugin-terser' | ||
| import { sizeSnapshot } from 'rollup-plugin-size-snapshot' | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: cat package.json | jq '.devDependencies, .dependencies' | grep -A 5 -B 5 "rollup"Repository: shakacode/recompose Length of output: 538 🌐 Web query:
💡 Result:
If you must try it on Rollup 4, you’d be in “best-effort” territory: override peer deps and run your build/tests, but expect potential breakage. [1] Sources: [1] [2]
Version 0.12.0 (the latest, from May 2020) declares 🤖 Prompt for AI Agents |
||
| import { pascalCase } from 'change-case' | ||
|
|
||
| const require = createRequire(import.meta.url) | ||
| const { PACKAGES_SRC_DIR, PACKAGES_OUT_DIR } = require('./getPackageNames') | ||
|
|
||
| const packageName = process.env.PACKAGE_NAME | ||
|
|
@@ -21,7 +23,7 @@ const isExternal = id => !id.startsWith('.') && !id.startsWith('/') | |
|
|
||
| const getBabelOptions = ({ useESModules }) => ({ | ||
| exclude: '**/node_modules/**', | ||
| runtimeHelpers: true, | ||
| babelHelpers: 'runtime', | ||
| plugins: [['@babel/transform-runtime', { useESModules }]], | ||
| }) | ||
|
|
||
|
|
@@ -43,7 +45,10 @@ export default [ | |
| nodeResolve(), | ||
| babel(getBabelOptions({ useESModules: true })), | ||
| commonjs(), | ||
| replace({ 'process.env.NODE_ENV': JSON.stringify('development') }), | ||
| replace({ | ||
| preventAssignment: true, | ||
| 'process.env.NODE_ENV': JSON.stringify('development'), | ||
| }), | ||
| sizeSnapshot({ matchSnapshot }), | ||
| ], | ||
| }, | ||
|
|
@@ -63,9 +68,12 @@ export default [ | |
| nodeResolve(), | ||
| babel(getBabelOptions({ useESModules: true })), | ||
| commonjs(), | ||
| replace({ 'process.env.NODE_ENV': JSON.stringify('production') }), | ||
| replace({ | ||
| preventAssignment: true, | ||
| 'process.env.NODE_ENV': JSON.stringify('production'), | ||
| }), | ||
| sizeSnapshot({ matchSnapshot }), | ||
| uglify(), | ||
| terser(), | ||
| ], | ||
| }, | ||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
🧩 Analysis chain
🏁 Script executed:
Repository: shakacode/recompose
Length of output: 257
🏁 Script executed:
Repository: shakacode/recompose
Length of output: 172
🏁 Script executed:
Repository: shakacode/recompose
Length of output: 634
🏁 Script executed:
Repository: shakacode/recompose
Length of output: 67
🏁 Script executed:
Repository: shakacode/recompose
Length of output: 113
🏁 Script executed:
Repository: shakacode/recompose
Length of output: 1495
🏁 Script executed:
Repository: shakacode/recompose
Length of output: 1948
🏁 Script executed:
Repository: shakacode/recompose
Length of output: 645
🏁 Script executed:
Repository: shakacode/recompose
Length of output: 188
🏁 Script executed:
Repository: shakacode/recompose
Length of output: 45
🏁 Script executed:
Repository: shakacode/recompose
Length of output: 135
🏁 Script executed:
Repository: shakacode/recompose
Length of output: 272
🏁 Script executed:
Repository: shakacode/recompose
Length of output: 1387
🏁 Script executed:
# Check the structure - is there a monorepo setup? ls -la src/packages/Repository: shakacode/recompose
Length of output: 359
Tests only run against React 19, but the library claims React 17/18 support.
The recompose package declares
"react": "^17.0.0 || ^18.0.0 || ^19.0.0"as a peer dependency, yet the root package.json pinsreactandreact-domdevDependencies to^19.0.0only. The test suite will validate against React 19 exclusively. Consider adding a CI matrix or local verification step to run tests against React 17 and 18 to ensure compatibility claims are backed by actual validation.🤖 Prompt for AI Agents
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 APIs used are stable. Adding tests for older React versions is a potential improvement, but not worth the complexity.
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.
@alexeyr-ci2, understood. I've noted your preference for the future.