Skip to content

Commit d89a955

Browse files
committed
chore: upgrade deps, migrate context/hooks, switch to vite
- Upgrade all dependencies to latest versions - Refactor context and hooks for Fast Refresh compatibility - Update ESLint configuration for modern React/TypeScript - Update jest setup to use recommended @testing-library/jest-dom import - Replace Rollup with Vite for library build and type generation
1 parent 94c1aa8 commit d89a955

23 files changed

+3715
-2823
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc.json

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

eslint.config.js

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import js from '@eslint/js'
2+
import globals from 'globals'
3+
import reactHooks from 'eslint-plugin-react-hooks'
4+
import reactRefresh from 'eslint-plugin-react-refresh'
5+
import tseslint from 'typescript-eslint'
6+
import { defineConfig, globalIgnores } from 'eslint/config'
7+
8+
export default defineConfig([
9+
globalIgnores(['dist']),
10+
{
11+
files: ['**/*.{ts,tsx}'],
12+
extends: [
13+
js.configs.recommended,
14+
tseslint.configs.recommended,
15+
reactHooks.configs['recommended-latest'],
16+
reactRefresh.configs.vite,
17+
],
18+
languageOptions: {
19+
ecmaVersion: 2020,
20+
globals: globals.browser,
21+
},
22+
},
23+
])
File renamed without changes.

example/src/pages/Main/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function Main() {
4343
<QueryBuilder
4444
setIsBboxDrawEnabled={setIsBboxDrawEnabled}
4545
handleSubmit={submit}
46-
collections={collections}
46+
collections={collections || {}}
4747
selectedCollections={selectedCollections}
4848
setCollections={setCollections}
4949
dateRangeFrom={dateRangeFrom}
File renamed without changes.

jest.setup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import '@testing-library/jest-dom/extend-expect';
1+
import '@testing-library/jest-dom';
22

33
import { enableFetchMocks } from 'jest-fetch-mock';
44
enableFetchMocks();

package.json

Lines changed: 32 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -3,42 +3,50 @@
33
"version": "0.1.0-alpha.10",
44
"description": "React components and hooks for building STAC-API front-ends",
55
"repository": "git@github.com:developmentseed/stac-react.git",
6-
"author": "Oliver Roick <oliver@roick.email>",
6+
"authors": [
7+
"Oliver Roick <oliver@roick.email>",
8+
"Alice Rühl <alice.ruehl@gmail.com>"
9+
],
710
"license": "MIT",
11+
"type": "module",
812
"main": "./dist/stac-react.cjs",
913
"module": "./dist/stac-react.es.mjs",
1014
"types": "./dist/index.d.ts",
1115
"source": "./src/index.ts",
1216
"peerDependencies": {
13-
"react": "^18.1.0",
14-
"react-dom": "^18.1.0"
17+
"react": "^19.2.0",
18+
"react-dom": "^19.2.0"
1519
},
1620
"devDependencies": {
17-
"@rollup/plugin-typescript": "^9.0.2",
18-
"@testing-library/jest-dom": "^5.16.4",
19-
"@testing-library/react": "^13.1.1",
20-
"@types/geojson": "^7946.0.8",
21-
"@types/jest": "^27.4.1",
22-
"@types/react": "^18.0.8",
23-
"@types/react-dom": "^18.0.3",
24-
"@typescript-eslint/eslint-plugin": "^5.21.0",
25-
"@typescript-eslint/parser": "^5.21.0",
26-
"eslint": "^8.14.0",
27-
"eslint-plugin-react": "^7.29.4",
28-
"eslint-plugin-react-hooks": "^4.5.0",
29-
"jest": "^27.5.1",
21+
"@eslint/js": "^9.38.0",
22+
"@testing-library/dom": "^10.4.1",
23+
"@testing-library/jest-dom": "^6.9.1",
24+
"@testing-library/react": "^16.3.0",
25+
"@types/geojson": "^7946.0.16",
26+
"@types/jest": "^30.0.0",
27+
"@types/node": "^24.9.1",
28+
"@types/react": "^19.2.2",
29+
"@types/react-dom": "^19.2.2",
30+
"@vitejs/plugin-react": "^5.0.4",
31+
"eslint": "^9.38.0",
32+
"eslint-plugin-react-hooks": "^5.2.0",
33+
"eslint-plugin-react-refresh": "^0.4.24",
34+
"globals": "^16.4.0",
35+
"jest": "^30.2.0",
36+
"jest-environment-jsdom": "^30.2.0",
3037
"jest-fetch-mock": "^3.0.3",
31-
"react": "^18.1.0",
32-
"react-dom": "^18.1.0",
33-
"rollup": "^3.4.0",
34-
"rollup-plugin-dts": "^5.0.0",
35-
"ts-jest": "^27.1.4",
36-
"typescript": "^4.6.4"
38+
"react": "^19.2.0",
39+
"react-dom": "^19.2.0",
40+
"ts-jest": "^29.4.5",
41+
"typescript": "~5.9.3",
42+
"typescript-eslint": "^8.46.2",
43+
"vite": "^7.1.11",
44+
"vite-plugin-dts": "^4.5.4"
3745
},
3846
"scripts": {
47+
"lint": "eslint .",
3948
"test": "jest",
40-
"lint": "eslint 'src/**/*.ts' 'src/**/*.tsx'",
41-
"build": "rollup -c rollup.config.mjs"
49+
"build": "tsc -b && vite build"
4250
},
4351
"packageManager": "yarn@4.10.3"
4452
}

0 commit comments

Comments
 (0)