Skip to content

Commit 7d2f665

Browse files
authored
chore: update to node 18.16.0 (#844)
* chore: udpate to node 18.15.0 * rework installed depedencies to work with node 18 (webpack 5) and run linting against files * chore: install eslint * make sure dev server starts and disable lint * chore: bump cache key * chore: disable eslint plugin for blogs and chrome browser * chore: fix react extension loading * chore: update react devtools extensions to 4.28.0_0 (latest) and properly load extension into chrome * Update .node-version * Update package.json
1 parent f881fe1 commit 7d2f665

File tree

117 files changed

+216383
-65853
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+216383
-65853
lines changed

.circleci/config.yml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ defaults: &defaults
1414
parallelism: 1
1515
working_directory: ~/app
1616
docker:
17-
- image: cypress/browsers:node16.16.0-chrome105-ff104-edge
17+
- image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
1818
environment:
1919
TERM: xterm
2020
steps:
@@ -51,13 +51,13 @@ jobs:
5151
build:
5252
working_directory: ~/app
5353
docker:
54-
- image: cypress/browsers:node16.16.0-chrome105-ff104-edge
54+
- image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
5555
environment:
5656
TERM: xterm
5757
steps:
5858
- checkout
5959
- restore_cache:
60-
key: cache-dirs-{{ .Branch }}-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
60+
key: cache-dirs-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum ".circleci/config.yml" }}
6161
- run: npm ci
6262

6363
# run verify and then save cache.
@@ -66,7 +66,7 @@ jobs:
6666
- run: npm run cypress:info
6767
- run: npm run stop-only
6868
- save_cache:
69-
key: cache-dirs-{{ .Branch }}-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
69+
key: cache-dirs-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum ".circleci/config.yml" }}
7070
paths:
7171
- ~/.npm
7272
- ~/.cache
@@ -83,7 +83,7 @@ jobs:
8383
lint:
8484
working_directory: ~/app
8585
docker:
86-
- image: cypress/browsers:node16.16.0-chrome105-ff104-edge
86+
- image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
8787
steps:
8888
- attach_workspace:
8989
at: ~/
@@ -93,7 +93,7 @@ jobs:
9393
# dummy job running after all end-to-end tests
9494
after-tests:
9595
docker:
96-
- image: cypress/browsers:node16.16.0-chrome105-ff104-edge
96+
- image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
9797
steps:
9898
- run: echo "all good"
9999

@@ -104,7 +104,7 @@ jobs:
104104
parallelism: 20
105105
working_directory: ~/app
106106
docker:
107-
- image: cypress/browsers:node16.16.0-chrome105-ff104-edge
107+
- image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
108108
environment:
109109
TERM: xterm
110110
steps:
@@ -120,7 +120,7 @@ jobs:
120120
parallelism: 10
121121
working_directory: ~/app
122122
docker:
123-
- image: cypress/browsers:node16.16.0-chrome105-ff104-edge
123+
- image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
124124
environment:
125125
TERM: xterm
126126
# no need to record these runs yet
@@ -130,7 +130,7 @@ jobs:
130130
steps:
131131
- attach_workspace:
132132
at: ~/
133-
- run: npm run test:ci:chrome -- --chunk $CIRCLE_NODE_INDEX --total-chunks $CIRCLE_NODE_TOTAL
133+
- run: DISABLE_ESLINT_PLUGIN=true npm run test:ci:chrome -- --chunk $CIRCLE_NODE_INDEX --total-chunks $CIRCLE_NODE_TOTAL
134134
# store test artifacts from any failing projects
135135
# if the project is not running on this machine, no worries
136136
- store_artifacts:
@@ -143,7 +143,7 @@ jobs:
143143
parallelism: 1
144144
working_directory: ~/app
145145
docker:
146-
- image: cypress/browsers:node16.16.0-chrome105-ff104-edge
146+
- image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
147147
environment:
148148
TERM: xterm
149149
# no need to record these runs yet
@@ -153,13 +153,13 @@ jobs:
153153
steps:
154154
- attach_workspace:
155155
at: ~/
156-
- run: npm run test:ci:chrome:headless -- --chunk $CIRCLE_NODE_INDEX --total-chunks $CIRCLE_NODE_TOTAL
156+
- run: DISABLE_ESLINT_PLUGIN=true npm run test:ci:chrome:headless -- --chunk $CIRCLE_NODE_INDEX --total-chunks $CIRCLE_NODE_TOTAL
157157

158158
test-examples-firefox:
159159
parallelism: 10
160160
working_directory: ~/app
161161
docker:
162-
- image: cypress/browsers:node16.16.0-chrome105-ff104-edge
162+
- image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
163163
environment:
164164
TERM: xterm
165165
# no need to record these runs yet

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ examples/blogs__testing-redux-store/src
66
**/vendor
77
**/dist
88
# React DevTools extension source code
9-
examples/blogs__use-react-devtools/4.2.1_0
9+
examples/blogs__use-react-devtools/4.28.0_0
1010
# and demo game
1111
examples/blogs__use-react-devtools/src
1212
# don't ignore hidden files, useful for formatting json config files

.node-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.16.0
1+
18.16.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
SKIP_PREFLIGHT_CHECK=true
1+
DISABLE_ESLINT_PLUGIN=true
22
BROWSER=none

examples/blogs__element-coverage/.env

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
SKIP_PREFLIGHT_CHECK=true
1+
DISABLE_ESLINT_PLUGIN=true
22
BROWSER=none

examples/blogs__element-coverage/src/components/App.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import React from 'react'
22
import Header from '../containers/Header'
33
import MainSection from '../containers/MainSection'
44

5-
const App = () => (
6-
<div>
5+
const App = () => {
6+
return <div>
77
<Header />
88
<MainSection />
99
</div>
10-
)
10+
}
1111

1212
export default App

examples/blogs__element-coverage/src/containers/FilterLink.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@ const mapDispatchToProps = (dispatch, ownProps) => {
1818

1919
export default connect(
2020
mapStateToProps,
21-
mapDispatchToProps
21+
mapDispatchToProps,
2222
)(Link)

examples/blogs__element-coverage/src/containers/MainSection.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ const mapDispatchToProps = (dispatch) => {
1919

2020
export default connect(
2121
mapStateToProps,
22-
mapDispatchToProps
22+
mapDispatchToProps,
2323
)(MainSection)

examples/blogs__element-coverage/src/containers/VisibleTodoList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const mapDispatchToProps = (dispatch) => {
1818

1919
const VisibleTodoList = connect(
2020
mapStateToProps,
21-
mapDispatchToProps
21+
mapDispatchToProps,
2222
)(TodoList)
2323

2424
export default VisibleTodoList

examples/blogs__element-coverage/src/reducers/todos.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* global window */
21
import { ADD_TODO, CLEAR_COMPLETED, COMPLETE_ALL_TODOS, COMPLETE_TODO, DELETE_TODO, EDIT_TODO } from '../constants/ActionTypes'
32

43
const initialState = (window.Cypress && window.initialState) || [
@@ -27,7 +26,7 @@ export default function todos (state = initialState, action) {
2726

2827
case EDIT_TODO:
2928
return state.map(
30-
(todo) => (todo.id === action.id ? { ...todo, text: action.text } : todo)
29+
(todo) => (todo.id === action.id ? { ...todo, text: action.text } : todo),
3130
)
3231

3332
case COMPLETE_TODO:
@@ -36,7 +35,7 @@ export default function todos (state = initialState, action) {
3635
return (todo.id === action.id
3736
? { ...todo, completed: !todo.completed }
3837
: todo)
39-
}
38+
},
4039
)
4140

4241
case COMPLETE_ALL_TODOS: {

examples/blogs__element-coverage/src/reducers/todos.spec.js

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as types from '../constants/ActionTypes'
44
describe('todos reducer', () => {
55
it('should handle initial state', () => {
66
expect(
7-
todos(undefined, {})
7+
todos(undefined, {}),
88
).toEqual([
99
{
1010
text: 'Use Redux',
@@ -19,7 +19,7 @@ describe('todos reducer', () => {
1919
todos([], {
2020
type: types.ADD_TODO,
2121
text: 'Run the tests',
22-
})
22+
}),
2323
).toEqual([
2424
{
2525
text: 'Run the tests',
@@ -38,7 +38,7 @@ describe('todos reducer', () => {
3838
], {
3939
type: types.ADD_TODO,
4040
text: 'Run the tests',
41-
})
41+
}),
4242
).toEqual([
4343
{
4444
text: 'Use Redux',
@@ -66,7 +66,7 @@ describe('todos reducer', () => {
6666
], {
6767
type: types.ADD_TODO,
6868
text: 'Fix the tests',
69-
})
69+
}),
7070
).toEqual([
7171
{
7272
text: 'Use Redux',
@@ -102,7 +102,7 @@ describe('todos reducer', () => {
102102
], {
103103
type: types.DELETE_TODO,
104104
id: 1,
105-
})
105+
}),
106106
).toEqual([
107107
{
108108
text: 'Use Redux',
@@ -128,7 +128,7 @@ describe('todos reducer', () => {
128128
type: types.EDIT_TODO,
129129
text: 'Fix the tests',
130130
id: 1,
131-
})
131+
}),
132132
).toEqual([
133133
{
134134
text: 'Fix the tests',
@@ -157,7 +157,7 @@ describe('todos reducer', () => {
157157
], {
158158
type: types.COMPLETE_TODO,
159159
id: 1,
160-
})
160+
}),
161161
).toEqual([
162162
{
163163
text: 'Run the tests',
@@ -185,7 +185,7 @@ describe('todos reducer', () => {
185185
},
186186
], {
187187
type: types.COMPLETE_ALL_TODOS,
188-
})
188+
}),
189189
).toEqual([
190190
{
191191
text: 'Run the tests',
@@ -212,7 +212,7 @@ describe('todos reducer', () => {
212212
},
213213
], {
214214
type: types.COMPLETE_ALL_TODOS,
215-
})
215+
}),
216216
).toEqual([
217217
{
218218
text: 'Run the tests',
@@ -240,7 +240,7 @@ describe('todos reducer', () => {
240240
},
241241
], {
242242
type: types.CLEAR_COMPLETED,
243-
})
243+
}),
244244
).toEqual([
245245
{
246246
text: 'Use Redux',
@@ -272,7 +272,7 @@ describe('todos reducer', () => {
272272
completed: false,
273273
text: 'Write tests',
274274
},
275-
])
275+
]),
276276
).toEqual([
277277
{
278278
text: 'Write tests',

examples/blogs__element-coverage/src/selectors/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ export const getVisibleTodos = createSelector(
1717
default:
1818
throw new Error(`Unknown filter: ${visibilityFilter}`)
1919
}
20-
}
20+
},
2121
)
2222

2323
export const getCompletedTodoCount = createSelector(
@@ -29,5 +29,5 @@ export const getCompletedTodoCount = createSelector(
2929
},
3030
0)
3131
)
32-
}
32+
},
3333
)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
SKIP_PREFLIGHT_CHECK=true
1+
DISABLE_ESLINT_PLUGIN=true
Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
import * as types from '../constants/ActionTypes'
22

3-
export const addTodo = text => ({ type: types.ADD_TODO, text })
4-
export const deleteTodo = id => ({ type: types.DELETE_TODO, id })
3+
export const addTodo = (text) => ({ type: types.ADD_TODO, text })
4+
5+
export const deleteTodo = (id) => ({ type: types.DELETE_TODO, id })
6+
57
export const editTodo = (id, text) => ({ type: types.EDIT_TODO, id, text })
6-
export const completeTodo = id => ({ type: types.COMPLETE_TODO, id })
8+
9+
export const completeTodo = (id) => ({ type: types.COMPLETE_TODO, id })
10+
711
export const completeAllTodos = () => ({ type: types.COMPLETE_ALL_TODOS })
12+
813
export const clearCompleted = () => ({ type: types.CLEAR_COMPLETED })
9-
export const setVisibilityFilter = filter => ({ type: types.SET_VISIBILITY_FILTER, filter})
14+
15+
export const setVisibilityFilter = (filter) => ({ type: types.SET_VISIBILITY_FILTER, filter })

examples/blogs__testing-redux-store/src/actions/index.spec.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,41 +5,41 @@ describe('todo actions', () => {
55
it('addTodo should create ADD_TODO action', () => {
66
expect(actions.addTodo('Use Redux')).toEqual({
77
type: types.ADD_TODO,
8-
text: 'Use Redux'
8+
text: 'Use Redux',
99
})
1010
})
1111

1212
it('deleteTodo should create DELETE_TODO action', () => {
1313
expect(actions.deleteTodo(1)).toEqual({
1414
type: types.DELETE_TODO,
15-
id: 1
15+
id: 1,
1616
})
1717
})
1818

1919
it('editTodo should create EDIT_TODO action', () => {
2020
expect(actions.editTodo(1, 'Use Redux everywhere')).toEqual({
2121
type: types.EDIT_TODO,
2222
id: 1,
23-
text: 'Use Redux everywhere'
23+
text: 'Use Redux everywhere',
2424
})
2525
})
2626

2727
it('completeTodo should create COMPLETE_TODO action', () => {
2828
expect(actions.completeTodo(1)).toEqual({
2929
type: types.COMPLETE_TODO,
30-
id: 1
30+
id: 1,
3131
})
3232
})
3333

3434
it('completeAll should create COMPLETE_ALL action', () => {
3535
expect(actions.completeAllTodos()).toEqual({
36-
type: types.COMPLETE_ALL_TODOS
36+
type: types.COMPLETE_ALL_TODOS,
3737
})
3838
})
3939

4040
it('clearCompleted should create CLEAR_COMPLETED action', () => {
4141
expect(actions.clearCompleted()).toEqual({
42-
type: types.CLEAR_COMPLETED
42+
type: types.CLEAR_COMPLETED,
4343
})
4444
})
4545
})

examples/blogs__testing-redux-store/src/components/App.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ import React from 'react'
22
import Header from '../containers/Header'
33
import MainSection from '../containers/MainSection'
44

5-
const App = () => (
6-
<div>
5+
const App = () => {
6+
return <div>
77
<Header />
88
<MainSection />
99
</div>
10-
)
10+
}
1111

1212
export default App
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,13 @@
11
export const ADD_TODO = 'ADD_TODO'
2+
23
export const DELETE_TODO = 'DELETE_TODO'
4+
35
export const EDIT_TODO = 'EDIT_TODO'
6+
47
export const COMPLETE_TODO = 'COMPLETE_TODO'
8+
59
export const COMPLETE_ALL_TODOS = 'COMPLETE_ALL_TODOS'
10+
611
export const CLEAR_COMPLETED = 'CLEAR_COMPLETED'
12+
713
export const SET_VISIBILITY_FILTER = 'SET_VISIBILITY_FILTER'

0 commit comments

Comments
 (0)