Skip to content

Commit

Permalink
deps: bulk update JS libraries (#4082)
Browse files Browse the repository at this point in the history
* bulk js updates

* update dockerfile

* update yarnrc

* update cypress image tag

* upgrade prettier and concurrently

* update graphiql and glob

* Update eslint-plugin-cypress to v3.5.0

- Upgraded eslint-plugin-cypress from 2.15.1 to 3.5.0 for improved compatibility with ESLint v7+ and updated peer dependencies.

* Update ESLint dependencies

- Updated `eslint-plugin-import` to version 2.30.0
- Synced transitive dependencies for ` yarn.lock`

* Update ESLint dependencies

* Update eslint-plugin-promise to v7.1.0

* Update eslint-plugin-react to v7.36.1

* Update @typescript-eslint/eslint-plugin and @typescript-eslint/parser to v8.7.0

* Update eslint-disable rules for @typescript-eslint/no-var-requires and @typescript-eslint/no-require-imports

* Update stylelint and stylelint-config-standard dependencies

* Update eslint to version 8.57.1
  • Loading branch information
mastercactapus authored Sep 25, 2024
1 parent edf646e commit e30eb81
Show file tree
Hide file tree
Showing 13 changed files with 481 additions and 363 deletions.
1 change: 1 addition & 0 deletions cypress.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint-disable @typescript-eslint/no-var-requires */
/* eslint-disable @typescript-eslint/no-require-imports */

const { defineConfig } = require('cypress')
const setupNodeEvents = require('./web/src/cypress/plugins/index')
Expand Down
32 changes: 16 additions & 16 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,35 +71,35 @@
"@types/react-dom": "18.3.0",
"@types/react-transition-group": "4.4.11",
"@types/react-virtualized-auto-sizer": "1.0.4",
"@typescript-eslint/eslint-plugin": "7.15.0",
"@typescript-eslint/parser": "7.15.0",
"@typescript-eslint/eslint-plugin": "8.7.0",
"@typescript-eslint/parser": "8.7.0",
"@urql/exchange-retry": "1.3.0",
"bowser": "2.11.0",
"chance": "1.1.12",
"classnames": "2.5.1",
"concurrently": "8.2.2",
"concurrently": "9.0.1",
"cypress": "13.14.2",
"detect-package-manager": "3.0.2",
"diff": "5.2.0",
"esbuild": "0.24.0",
"esbuild-jest": "0.5.0",
"eslint": "8.57.0",
"eslint": "8.57.1",
"eslint-config-prettier": "9.1.0",
"eslint-config-standard": "17.1.0",
"eslint-config-standard-jsx": "11.0.0",
"eslint-plugin-cypress": "2.15.1",
"eslint-plugin-import": "2.29.1",
"eslint-plugin-jsx-a11y": "6.8.0",
"eslint-plugin-n": "17.10.2",
"eslint-plugin-cypress": "3.5.0",
"eslint-plugin-import": "2.30.0",
"eslint-plugin-jsx-a11y": "6.10.0",
"eslint-plugin-n": "17.10.3",
"eslint-plugin-node": "11.1.0",
"eslint-plugin-prettier": "5.1.3",
"eslint-plugin-promise": "6.1.1",
"eslint-plugin-react": "7.34.1",
"eslint-plugin-prettier": "5.2.1",
"eslint-plugin-promise": "7.1.0",
"eslint-plugin-react": "7.36.1",
"eslint-plugin-react-hooks": "4.6.2",
"eslint-plugin-storybook": "0.8.0",
"fuse.js": "7.0.0",
"glob": "10.4.5",
"graphiql": "3.0.10",
"glob": "11.0.0",
"graphiql": "3.7.1",
"graphql": "16.9.0",
"http-server": "14.1.1",
"jest": "29.7.0",
Expand All @@ -109,7 +109,7 @@
"mdi-material-ui": "7.9.2",
"msw": "2.4.9",
"msw-storybook-addon": "2.0.3",
"prettier": "3.2.5",
"prettier": "3.3.3",
"prettier-plugin-go-template": "0.0.15",
"prop-types": "15.8.1",
"punycode": "2.3.1",
Expand All @@ -134,8 +134,8 @@
"semver": "7.6.3",
"storybook": "8.3.3",
"storybook-addon-mock": "4.3.0",
"stylelint": "16.7.0",
"stylelint-config-standard": "36.0.0",
"stylelint": "16.9.0",
"stylelint-config-standard": "36.0.1",
"typescript": "5.5.2",
"urql": "4.1.0",
"vite": "5.4.7",
Expand Down
2 changes: 1 addition & 1 deletion test/integration/setup/global-setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ async function canRead(file: string): Promise<boolean> {
try {
await fs.promises.access(file, fs.constants.R_OK)
return true
} catch (err) {
} catch {
return false
}
}
Expand Down
3 changes: 2 additions & 1 deletion test/integration/setup/global-teardown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ export const getProcessBinary = (pid: number): string => {
const binary = execSync(`ps -p ${pid} -o command=`).toString().trim()
return binary
} catch (e) {
console.error('Failed to get process binary', e)
return 'unknown'
}
}
Expand All @@ -47,7 +48,7 @@ const tryKill = (pid: number, signal: NodeJS.Signals): boolean => {
try {
process.kill(pid, signal)
return true
} catch (e) {
} catch {
return false
}
}
Expand Down
4 changes: 3 additions & 1 deletion web/src/app/dialogs/FormDialog.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ export default function FormDialog(props) {

function renderErrors() {
const errors =
typeof props.errors === 'function' ? props.errors() : props?.errors ?? []
typeof props.errors === 'function'
? props.errors()
: (props?.errors ?? [])
return errors.map((err, idx) => (
<DialogContentError
className={classes.errorContainer}
Expand Down
4 changes: 2 additions & 2 deletions web/src/app/lists/PageControls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export function PageControls(props: {
data-cy='back-button'
disabled={!onBack}
onClick={() => {
onBack && onBack()
if (onBack) onBack()
window.scrollTo(0, 0)
}}
>
Expand All @@ -87,7 +87,7 @@ export function PageControls(props: {
data-cy='next-button'
disabled={!onNext}
onClick={() => {
onNext && onNext()
if (onNext) onNext()
window.scrollTo(0, 0)
}}
>
Expand Down
5 changes: 2 additions & 3 deletions web/src/app/schedules/ScheduleShiftList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,8 @@ function ScheduleShiftList({
disabled={activeOnly}
value={duration}
onChange={(e: React.ChangeEvent<HTMLTextAreaElement>) => {
e.target.value === 'SPECIFY'
? setSpecifyDuration(true)
: setDuration(e.target.value)
if (e.target.value === 'SPECIFY') setSpecifyDuration(true)
else setDuration(e.target.value)
}}
>
{quickOptions.map((opt) => (
Expand Down
6 changes: 3 additions & 3 deletions web/src/app/util/ISOPickers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function ISOPicker(props: ISOPickerProps): JSX.Element {
let dt: DateTime
try {
dt = DateTime.fromISO(value, { zone })
} catch (e) {
} catch {
return `Invalid date/time`
}

Expand Down Expand Up @@ -128,15 +128,15 @@ function ISOPicker(props: ISOPickerProps): JSX.Element {
)
}
return dtToISO(inputAsDT)
} catch (e) {
} catch {
// ignore if input doesn't match format
}

// if format string invalid, try validating input as iso string
try {
const iso = DateTime.fromISO(input, { zone })
return dtToISO(iso)
} catch (e) {
} catch {
// ignore if input doesn't match iso format
}

Expand Down
2 changes: 1 addition & 1 deletion web/src/app/util/copyToClipboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function fallback(str: string): void {
export default function copyToClipboard(text: string): void {
try {
navigator.clipboard.writeText(text)
} catch (error) {
} catch {
fallback(text)
}
}
1 change: 1 addition & 0 deletions web/src/cypress/plugins/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
/* eslint @typescript-eslint/no-var-requires: 0 */
/* eslint @typescript-eslint/no-require-imports: 0 */
const http = require('http')
const { exec } = require('child_process')

Expand Down
1 change: 1 addition & 0 deletions web/src/esbuild.config.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env node
/* eslint @typescript-eslint/no-var-requires: 0 */
/* eslint @typescript-eslint/no-require-imports: 0 */
const path = require('path')

const isProdBuild =
Expand Down
1 change: 1 addition & 0 deletions web/src/esbuild.cypress.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#!/usr/bin/env node
/* eslint @typescript-eslint/no-var-requires: 0 */
/* eslint @typescript-eslint/no-require-imports: 0 */
const path = require('path')
const glob = require('glob')

Expand Down
Loading

0 comments on commit e30eb81

Please sign in to comment.