Skip to content

Commit f36d7bf

Browse files
authored
Dependency update (#48)
## Describe your changes Updating all dependencies ## Checklist before requesting a review - [x] I have performed a self-review of my code - [x] If it is a core feature, I have added thorough tests.
1 parent c9c5e1a commit f36d7bf

File tree

14 files changed

+1785
-2624
lines changed

14 files changed

+1785
-2624
lines changed

.eslintrc.js

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/pr-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
node-version: [20.x]
12+
node-version: [22.x]
1313
steps:
1414
- uses: actions/checkout@v4
1515
- name: Use Node.js ${{ matrix.node-version }}

.github/workflows/publish-new-release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
node-version: [20.x]
12+
node-version: [22.x]
1313
steps:
1414
- uses: actions/checkout@v4
1515
- name: Use Node.js ${{ matrix.node-version }}
@@ -32,7 +32,7 @@ jobs:
3232
runs-on: ubuntu-latest
3333
strategy:
3434
matrix:
35-
node-version: [20.x]
35+
node-version: [22.x]
3636
steps:
3737
- uses: actions/checkout@v4
3838
- name: Use Node.js ${{ matrix.node-version }}

cypress/cypress.d.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { mount } from 'cypress/react18'
2+
import { shouldHaveColor } from './support/commands'
23

34
declare global {
45
namespace Cypress {
56
interface Chainable {
67
mount: typeof mount
7-
shouldHaveColor: Function
8+
shouldHaveColor: typeof shouldHaveColor
89
}
910
}
1011
}

cypress/support/commands.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@ import { colord } from 'colord'
44

55
const expectColorsToMatch = (color1: string | undefined, color2: string | undefined) => {
66
expect(Boolean(color1), 'expected both color to be defined or undefined').to.equal(Boolean(color2))
7-
expect(colord(color1).toHex()).to.be.equal(colord(color2).toHex())
7+
if (color1 && color2) {
8+
expect(colord(color1).toHex()).to.be.equal(colord(color2).toHex())
9+
}
810
}
911

10-
Cypress.Commands.addQuery('shouldHaveColor', function (type: 'attr' | 'css', property: string, expectedColor: string) {
12+
export const shouldHaveColor = function (this: unknown, type: 'attr' | 'css', property: string, expectedColor: string): ($el: JQuery) => JQuery<HTMLElement> {
1113
return ($el: JQuery) => {
1214
expect(type).to.be.oneOf(['attr', 'css'])
1315

@@ -19,4 +21,6 @@ Cypress.Commands.addQuery('shouldHaveColor', function (type: 'attr' | 'css', pro
1921

2022
return $el
2123
}
22-
})
24+
}
25+
26+
Cypress.Commands.addQuery('shouldHaveColor', shouldHaveColor)

demo/.eslintrc.js

Lines changed: 0 additions & 30 deletions
This file was deleted.

demo/package.json

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,32 @@
33
"homepage": "https://Bayer-Group.github.io/react-color-a11y",
44
"private": true,
55
"dependencies": {
6-
"@emotion/react": "^11.11.3",
7-
"@emotion/styled": "^11.11.0",
8-
"@mui/icons-material": "^6.0.2",
9-
"@mui/material": "^6.0.1",
10-
"@testing-library/jest-dom": "^6.4.2",
11-
"@testing-library/react": "^16.0.0",
6+
"@emotion/react": "^11.14.0",
7+
"@emotion/styled": "^11.14.0",
8+
"@mui/icons-material": "^6.3.0",
9+
"@mui/material": "^6.3.0",
10+
"@testing-library/jest-dom": "^6.6.3",
11+
"@testing-library/react": "^16.1.0",
1212
"@testing-library/user-event": "^14.5.2",
13-
"@types/jest": "^29.5.12",
14-
"@types/node": "^22.0.2",
15-
"@types/react": "^18.2.54",
16-
"@types/react-dom": "^18.2.18",
13+
"@types/jest": "^29.5.14",
14+
"@types/node": "^22.10.3",
15+
"@types/react": "^19.0.2",
16+
"@types/react-dom": "^19.0.2",
1717
"@types/react-helmet": "^6.1.11",
18-
"react": "^18.3.1",
18+
"react": "^19.0.0",
1919
"react-color-a11y": "workspace:*",
2020
"react-colorful": "^5.6.1",
21-
"react-dom": "^18.3.1",
22-
"react-helmet-async": "^2.0.4",
21+
"react-dom": "^19.0.0",
22+
"react-helmet-async": "^2.0.5",
2323
"react-scripts": "5.0.1",
24-
"typescript": "^5.3.3",
25-
"web-vitals": "^4.2.0"
24+
"typescript": "^5.7.2",
25+
"web-vitals": "^4.2.4"
2626
},
2727
"scripts": {
28-
"start": "react-scripts start",
29-
"build": "react-scripts build",
28+
"start": "DISABLE_ESLINT_PLUGIN=true react-scripts start",
29+
"build": "DISABLE_ESLINT_PLUGIN=true react-scripts build",
3030
"test": "react-scripts test",
31-
"eject": "react-scripts eject",
32-
"lint": "eslint --ext .ts,.tsx ."
31+
"eject": "react-scripts eject"
3332
},
3433
"browserslist": {
3534
"production": [

demo/src/App.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useCallback, useRef, useState } from 'react'
1+
import React, { JSX, useCallback, useRef, useState } from 'react'
22
import ReactColorA11y from 'react-color-a11y'
33
import {
44
Box,

eslint.config.mjs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import eslint from '@eslint/js';
2+
import tseslint from 'typescript-eslint';
3+
4+
export default tseslint.config({
5+
files: ['**/*.ts'],
6+
extends: [
7+
eslint.configs.recommended,
8+
tseslint.configs.recommended,
9+
],
10+
ignores: [
11+
'lib/*'
12+
],
13+
rules: {
14+
'semi': ['error', 'never']
15+
}
16+
})

package.json

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"module": "lib/index.esm.js",
1010
"types": "lib/index.d.ts",
1111
"engines": {
12-
"node": ">=20"
12+
"node": ">=22"
1313
},
1414
"scripts": {
1515
"clean": "rm -rf lib",
@@ -19,7 +19,7 @@
1919
"start-demo": "pnpm --prefix demo start",
2020
"build-demo": "pnpm --prefix demo build",
2121
"deploy-demo": "pnpm build-demo && gh-pages -d demo/build",
22-
"lint": "eslint --ext .ts,.tsx . && pnpm --prefix demo lint",
22+
"lint": "eslint .",
2323
"test": "pnpm cypress run --component",
2424
"test-interactive": "pnpm cypress open"
2525
},
@@ -45,29 +45,26 @@
4545
"react-dom": ">=17.0.0"
4646
},
4747
"devDependencies": {
48-
"@rollup/plugin-commonjs": "^28.0.0",
48+
"@eslint/js": "^9.17.0",
49+
"@rollup/plugin-commonjs": "^28.0.2",
4950
"@rollup/plugin-node-resolve": "^16.0.0",
50-
"@types/node": "^22.0.2",
51-
"@types/react": "^18.2.54",
52-
"@types/react-dom": "^18.2.18",
53-
"@typescript-eslint/eslint-plugin": "^6.21.0",
54-
"cypress": "^13.6.4",
55-
"eslint": "^8.56.0",
56-
"eslint-config-standard-with-typescript": "^43.0.1",
57-
"eslint-plugin-import": "^2.29.1",
58-
"eslint-plugin-n": "^16.6.2",
59-
"eslint-plugin-promise": "^6.1.1",
60-
"eslint-plugin-react": "^7.33.2",
61-
"gh-pages": "^6.1.1",
62-
"postcss": "^8.4.33",
63-
"react": "^18.3.1",
64-
"react-dom": "^18.3.1",
65-
"rollup": "^4.9.6",
51+
"@types/node": "^22.10.3",
52+
"@types/react": "^19.0.2",
53+
"@types/react-dom": "^19.0.2",
54+
"@typescript-eslint/eslint-plugin": "^8.19.0",
55+
"cypress": "^13.17.0",
56+
"eslint": "^9.17.0",
57+
"gh-pages": "^6.2.0",
58+
"postcss": "^8.4.49",
59+
"react": "^19.0.0",
60+
"react-dom": "^19.0.0",
61+
"rollup": "^4.29.1",
6662
"rollup-plugin-peer-deps-external": "^2.2.4",
6763
"rollup-plugin-typescript2": "^0.36.0",
6864
"ts-loader": "^9.5.1",
6965
"ts-node": "^10.9.2",
70-
"typescript": "^5.3.3",
71-
"webpack": "^5.90.1"
66+
"typescript": "^5.7.2",
67+
"typescript-eslint": "^8.18.2",
68+
"webpack": "^5.97.1"
7269
}
7370
}

0 commit comments

Comments
 (0)