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

chore: update to node 18.16.0 #844

Merged
merged 10 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ defaults: &defaults
parallelism: 1
working_directory: ~/app
docker:
- image: cypress/browsers:node16.16.0-chrome105-ff104-edge
- image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
environment:
TERM: xterm
steps:
Expand Down Expand Up @@ -51,13 +51,13 @@ jobs:
build:
working_directory: ~/app
docker:
- image: cypress/browsers:node16.16.0-chrome105-ff104-edge
- image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
environment:
TERM: xterm
steps:
- checkout
- restore_cache:
key: cache-dirs-{{ .Branch }}-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
key: cache-dirs-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum ".circleci/config.yml" }}
- run: npm ci

# run verify and then save cache.
Expand All @@ -66,7 +66,7 @@ jobs:
- run: npm run cypress:info
- run: npm run stop-only
- save_cache:
key: cache-dirs-{{ .Branch }}-{{ checksum "package.json" }}-{{ checksum ".circleci/config.yml" }}
key: cache-dirs-{{ .Branch }}-{{ checksum "package-lock.json" }}-{{ checksum ".circleci/config.yml" }}
paths:
- ~/.npm
- ~/.cache
Expand All @@ -83,7 +83,7 @@ jobs:
lint:
working_directory: ~/app
docker:
- image: cypress/browsers:node16.16.0-chrome105-ff104-edge
- image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
steps:
- attach_workspace:
at: ~/
Expand All @@ -93,7 +93,7 @@ jobs:
# dummy job running after all end-to-end tests
after-tests:
docker:
- image: cypress/browsers:node16.16.0-chrome105-ff104-edge
- image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
steps:
- run: echo "all good"

Expand All @@ -104,7 +104,7 @@ jobs:
parallelism: 20
working_directory: ~/app
docker:
- image: cypress/browsers:node16.16.0-chrome105-ff104-edge
- image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
environment:
TERM: xterm
steps:
Expand All @@ -120,7 +120,7 @@ jobs:
parallelism: 10
working_directory: ~/app
docker:
- image: cypress/browsers:node16.16.0-chrome105-ff104-edge
- image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
environment:
TERM: xterm
# no need to record these runs yet
Expand All @@ -130,7 +130,7 @@ jobs:
steps:
- attach_workspace:
at: ~/
- run: npm run test:ci:chrome -- --chunk $CIRCLE_NODE_INDEX --total-chunks $CIRCLE_NODE_TOTAL
- run: DISABLE_ESLINT_PLUGIN=true npm run test:ci:chrome -- --chunk $CIRCLE_NODE_INDEX --total-chunks $CIRCLE_NODE_TOTAL
# store test artifacts from any failing projects
# if the project is not running on this machine, no worries
- store_artifacts:
Expand All @@ -143,7 +143,7 @@ jobs:
parallelism: 1
working_directory: ~/app
docker:
- image: cypress/browsers:node16.16.0-chrome105-ff104-edge
- image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
environment:
TERM: xterm
# no need to record these runs yet
Expand All @@ -153,13 +153,13 @@ jobs:
steps:
- attach_workspace:
at: ~/
- run: npm run test:ci:chrome:headless -- --chunk $CIRCLE_NODE_INDEX --total-chunks $CIRCLE_NODE_TOTAL
- run: DISABLE_ESLINT_PLUGIN=true npm run test:ci:chrome:headless -- --chunk $CIRCLE_NODE_INDEX --total-chunks $CIRCLE_NODE_TOTAL

test-examples-firefox:
parallelism: 10
working_directory: ~/app
docker:
- image: cypress/browsers:node16.16.0-chrome105-ff104-edge
- image: cypress/browsers:node-18.16.0-chrome-114.0.5735.133-1-ff-114.0.2-edge-114.0.1823.51-1
environment:
TERM: xterm
# no need to record these runs yet
Expand Down
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ examples/blogs__testing-redux-store/src
**/vendor
**/dist
# React DevTools extension source code
examples/blogs__use-react-devtools/4.2.1_0
examples/blogs__use-react-devtools/4.28.0_0
# and demo game
examples/blogs__use-react-devtools/src
# don't ignore hidden files, useful for formatting json config files
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.16.0
18.15.0
AtofStryker marked this conversation as resolved.
Show resolved Hide resolved
2 changes: 1 addition & 1 deletion examples/blogs__application-actions/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
SKIP_PREFLIGHT_CHECK=true
DISABLE_ESLINT_PLUGIN=true
BROWSER=none
2 changes: 1 addition & 1 deletion examples/blogs__element-coverage/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
SKIP_PREFLIGHT_CHECK=true
DISABLE_ESLINT_PLUGIN=true
BROWSER=none
6 changes: 3 additions & 3 deletions examples/blogs__element-coverage/src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React from 'react'
import Header from '../containers/Header'
import MainSection from '../containers/MainSection'

const App = () => (
<div>
const App = () => {
return <div>
<Header />
<MainSection />
</div>
)
}

export default App
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@ const mapDispatchToProps = (dispatch, ownProps) => {

export default connect(
mapStateToProps,
mapDispatchToProps
mapDispatchToProps,
)(Link)
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ const mapDispatchToProps = (dispatch) => {

export default connect(
mapStateToProps,
mapDispatchToProps
mapDispatchToProps,
)(MainSection)
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const mapDispatchToProps = (dispatch) => {

const VisibleTodoList = connect(
mapStateToProps,
mapDispatchToProps
mapDispatchToProps,
)(TodoList)

export default VisibleTodoList
5 changes: 2 additions & 3 deletions examples/blogs__element-coverage/src/reducers/todos.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* global window */
import { ADD_TODO, CLEAR_COMPLETED, COMPLETE_ALL_TODOS, COMPLETE_TODO, DELETE_TODO, EDIT_TODO } from '../constants/ActionTypes'

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

case EDIT_TODO:
return state.map(
(todo) => (todo.id === action.id ? { ...todo, text: action.text } : todo)
(todo) => (todo.id === action.id ? { ...todo, text: action.text } : todo),
)

case COMPLETE_TODO:
Expand All @@ -36,7 +35,7 @@ export default function todos (state = initialState, action) {
return (todo.id === action.id
? { ...todo, completed: !todo.completed }
: todo)
}
},
)

case COMPLETE_ALL_TODOS: {
Expand Down
22 changes: 11 additions & 11 deletions examples/blogs__element-coverage/src/reducers/todos.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import * as types from '../constants/ActionTypes'
describe('todos reducer', () => {
it('should handle initial state', () => {
expect(
todos(undefined, {})
todos(undefined, {}),
).toEqual([
{
text: 'Use Redux',
Expand All @@ -19,7 +19,7 @@ describe('todos reducer', () => {
todos([], {
type: types.ADD_TODO,
text: 'Run the tests',
})
}),
).toEqual([
{
text: 'Run the tests',
Expand All @@ -38,7 +38,7 @@ describe('todos reducer', () => {
], {
type: types.ADD_TODO,
text: 'Run the tests',
})
}),
).toEqual([
{
text: 'Use Redux',
Expand Down Expand Up @@ -66,7 +66,7 @@ describe('todos reducer', () => {
], {
type: types.ADD_TODO,
text: 'Fix the tests',
})
}),
).toEqual([
{
text: 'Use Redux',
Expand Down Expand Up @@ -102,7 +102,7 @@ describe('todos reducer', () => {
], {
type: types.DELETE_TODO,
id: 1,
})
}),
).toEqual([
{
text: 'Use Redux',
Expand All @@ -128,7 +128,7 @@ describe('todos reducer', () => {
type: types.EDIT_TODO,
text: 'Fix the tests',
id: 1,
})
}),
).toEqual([
{
text: 'Fix the tests',
Expand Down Expand Up @@ -157,7 +157,7 @@ describe('todos reducer', () => {
], {
type: types.COMPLETE_TODO,
id: 1,
})
}),
).toEqual([
{
text: 'Run the tests',
Expand Down Expand Up @@ -185,7 +185,7 @@ describe('todos reducer', () => {
},
], {
type: types.COMPLETE_ALL_TODOS,
})
}),
).toEqual([
{
text: 'Run the tests',
Expand All @@ -212,7 +212,7 @@ describe('todos reducer', () => {
},
], {
type: types.COMPLETE_ALL_TODOS,
})
}),
).toEqual([
{
text: 'Run the tests',
Expand Down Expand Up @@ -240,7 +240,7 @@ describe('todos reducer', () => {
},
], {
type: types.CLEAR_COMPLETED,
})
}),
).toEqual([
{
text: 'Use Redux',
Expand Down Expand Up @@ -272,7 +272,7 @@ describe('todos reducer', () => {
completed: false,
text: 'Write tests',
},
])
]),
).toEqual([
{
text: 'Write tests',
Expand Down
4 changes: 2 additions & 2 deletions examples/blogs__element-coverage/src/selectors/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const getVisibleTodos = createSelector(
default:
throw new Error(`Unknown filter: ${visibilityFilter}`)
}
}
},
)

export const getCompletedTodoCount = createSelector(
Expand All @@ -29,5 +29,5 @@ export const getCompletedTodoCount = createSelector(
},
0)
)
}
},
)
2 changes: 1 addition & 1 deletion examples/blogs__testing-redux-store/.env
Original file line number Diff line number Diff line change
@@ -1 +1 @@
SKIP_PREFLIGHT_CHECK=true
DISABLE_ESLINT_PLUGIN=true
14 changes: 10 additions & 4 deletions examples/blogs__testing-redux-store/src/actions/index.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
import * as types from '../constants/ActionTypes'

export const addTodo = text => ({ type: types.ADD_TODO, text })
export const deleteTodo = id => ({ type: types.DELETE_TODO, id })
export const addTodo = (text) => ({ type: types.ADD_TODO, text })

export const deleteTodo = (id) => ({ type: types.DELETE_TODO, id })

export const editTodo = (id, text) => ({ type: types.EDIT_TODO, id, text })
export const completeTodo = id => ({ type: types.COMPLETE_TODO, id })

export const completeTodo = (id) => ({ type: types.COMPLETE_TODO, id })

export const completeAllTodos = () => ({ type: types.COMPLETE_ALL_TODOS })

export const clearCompleted = () => ({ type: types.CLEAR_COMPLETED })
export const setVisibilityFilter = filter => ({ type: types.SET_VISIBILITY_FILTER, filter})

export const setVisibilityFilter = (filter) => ({ type: types.SET_VISIBILITY_FILTER, filter })
12 changes: 6 additions & 6 deletions examples/blogs__testing-redux-store/src/actions/index.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,41 +5,41 @@ describe('todo actions', () => {
it('addTodo should create ADD_TODO action', () => {
expect(actions.addTodo('Use Redux')).toEqual({
type: types.ADD_TODO,
text: 'Use Redux'
text: 'Use Redux',
})
})

it('deleteTodo should create DELETE_TODO action', () => {
expect(actions.deleteTodo(1)).toEqual({
type: types.DELETE_TODO,
id: 1
id: 1,
})
})

it('editTodo should create EDIT_TODO action', () => {
expect(actions.editTodo(1, 'Use Redux everywhere')).toEqual({
type: types.EDIT_TODO,
id: 1,
text: 'Use Redux everywhere'
text: 'Use Redux everywhere',
})
})

it('completeTodo should create COMPLETE_TODO action', () => {
expect(actions.completeTodo(1)).toEqual({
type: types.COMPLETE_TODO,
id: 1
id: 1,
})
})

it('completeAll should create COMPLETE_ALL action', () => {
expect(actions.completeAllTodos()).toEqual({
type: types.COMPLETE_ALL_TODOS
type: types.COMPLETE_ALL_TODOS,
})
})

it('clearCompleted should create CLEAR_COMPLETED action', () => {
expect(actions.clearCompleted()).toEqual({
type: types.CLEAR_COMPLETED
type: types.CLEAR_COMPLETED,
})
})
})
6 changes: 3 additions & 3 deletions examples/blogs__testing-redux-store/src/components/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ import React from 'react'
import Header from '../containers/Header'
import MainSection from '../containers/MainSection'

const App = () => (
<div>
const App = () => {
return <div>
<Header />
<MainSection />
</div>
)
}

export default App
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
export const ADD_TODO = 'ADD_TODO'

export const DELETE_TODO = 'DELETE_TODO'

export const EDIT_TODO = 'EDIT_TODO'

export const COMPLETE_TODO = 'COMPLETE_TODO'

export const COMPLETE_ALL_TODOS = 'COMPLETE_ALL_TODOS'

export const CLEAR_COMPLETED = 'CLEAR_COMPLETED'

export const SET_VISIBILITY_FILTER = 'SET_VISIBILITY_FILTER'
Loading