Skip to content
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

v5 React 17+ support #1

Merged
merged 32 commits into from May 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
ed9c22b
Add .nvmrc with version matching target project
JakeSidSmith May 22, 2023
8c12be1
Generate package-lock.json with npm 9.6.6
JakeSidSmith May 22, 2023
3c156b6
Add common prettier config
JakeSidSmith May 22, 2023
ca0970e
Swap Travis for GitHub Actions
JakeSidSmith May 22, 2023
b8a3020
Install NPM 9
JakeSidSmith May 22, 2023
94564ce
Upgrade react and redux dependencies, and remove addons-test-utils
JakeSidSmith May 22, 2023
ec45883
npx react-codemod rename-unsafe-lifecycles (JavaScript)
JakeSidSmith May 22, 2023
21f7507
Swap mocha for jest
JakeSidSmith May 22, 2023
32b3101
Configure jest for DOM tests
JakeSidSmith May 22, 2023
fd4c89c
nox jest-codemods
JakeSidSmith May 22, 2023
1e7fba3
Manually replace some back mock references
JakeSidSmith May 22, 2023
cf24dff
Manually fix bad array assertions
JakeSidSmith May 22, 2023
10a2886
Remove test setup file
JakeSidSmith May 22, 2023
249eba9
Uninstall manually installed jsdom
JakeSidSmith May 22, 2023
6accebc
Fix field value tests
JakeSidSmith May 22, 2023
d43c1c2
Manually update bad mock return value calls
JakeSidSmith May 22, 2023
8d0f705
Remove createRestorableSpy wrappers
JakeSidSmith May 23, 2023
c103784
Write custom test utils that mimic React 16's test utils
JakeSidSmith May 23, 2023
a06bdcf
Downgrade react-redux
JakeSidSmith May 23, 2023
a795605
Re-export original test utils simulate
JakeSidSmith May 23, 2023
1866210
Export findRenderedDOMComponentWithTag and traverse siblings
JakeSidSmith May 23, 2023
bad7d0c
Loosen react-redux peer dependency
JakeSidSmith May 23, 2023
7a72dde
Fix external lib componentWillReceiveProps reference
JakeSidSmith May 23, 2023
cab999d
Fix bad mockReset calls (should clear, not remove mocks)
JakeSidSmith May 23, 2023
1882213
Apply only valid DOM props to DOM elements
JakeSidSmith May 23, 2023
af47fd7
Remove test of accessing ref without withRef: true
JakeSidSmith May 23, 2023
ac29bab
Use forwardRef instead of withRef (to match react-redux)
JakeSidSmith May 23, 2023
03a11ef
Update test ignore patterns
JakeSidSmith May 23, 2023
80bd2a1
Revert to original babel config and previous jest version to run babel 6
JakeSidSmith May 23, 2023
190fb09
Fix/ignore eslint errors caused by jest and react codemods
JakeSidSmith May 23, 2023
5c8cd03
Put ye olde forwardRef invariant test back
JakeSidSmith May 23, 2023
7afcd38
Fix array value copying when applying async errors
JakeSidSmith May 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .babelrc
@@ -1,5 +1,5 @@
{
plugins: [
"plugins": [
"transform-decorators-legacy",
["transform-es2015-template-literals", { "loose": true }],
"transform-es2015-literals",
Expand All @@ -23,4 +23,4 @@
"transform-react-jsx",
"syntax-jsx"
]
}
}
2 changes: 1 addition & 1 deletion .eslintrc
Expand Up @@ -2,7 +2,7 @@
"extends": "eslint-config-airbnb",
"env": {
"browser": true,
"mocha": true,
"jest": true,
"node": true
},
"rules": {
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/ci.yml
@@ -0,0 +1,23 @@
name: CI
on: [pull_request]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('package-lock.json') }}
- uses: actions/setup-node@v2
with:
node-version-file: '.nvmrc'
- name: Install newer NPM
run: npm i npm@^9 -g
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Run tests
run: npm test
1 change: 1 addition & 0 deletions .nvmrc
@@ -0,0 +1 @@
14.20.1
4 changes: 4 additions & 0 deletions .prettierrc.json
@@ -0,0 +1,4 @@
{
"singleQuote": true,
"trailingComma": "es5"
}
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

10 changes: 10 additions & 0 deletions jest.config.js
@@ -0,0 +1,10 @@
const config = {
testEnvironment: 'jsdom',
testPathIgnorePatterns: [
'/node_modules/',
'/lib/',
'/src/__tests__/test-utils.js',
],
};

module.exports = config;