build: update dependencies and move to react-router 8
react-router-dom stops at 7; version 8 ships only as react-router, which the other archived sites already use. - import the router from react-router instead of react-router-dom - update React, Vite, three.js types, Biome and CSpell - keep @types/node on the 24.x line with .ncurc.js
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
// Keep @types/node on the 24.x line to match the deployment target. Its
|
||||
// "latest" dist-tag points at the 22.x line, so the default target would
|
||||
// report no updates at all instead of offering 24.x patches.
|
||||
export default {
|
||||
target: (name) => (name === '@types/node' ? 'minor' : 'latest'),
|
||||
};
|
||||
@@ -13,7 +13,7 @@ The application provides dataset search, dataset detail pages, downloadable data
|
||||
| Build tool | Vite 8 with `@vitejs/plugin-react` |
|
||||
| Language | TypeScript 7 |
|
||||
| UI | React 19, CSS Modules |
|
||||
| Routing | React Router 7 (`react-router-dom`) |
|
||||
| Routing | React Router 8 |
|
||||
| State management | Redux Toolkit, React Redux |
|
||||
| HTTP client | ky |
|
||||
| 3D rendering | three.js |
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "https://biomejs.dev/schemas/2.5.12/schema.json",
|
||||
"$schema": "https://biomejs.dev/schemas/2.5.13/schema.json",
|
||||
"vcs": {
|
||||
"enabled": true,
|
||||
"clientKind": "git",
|
||||
|
||||
+10
-10
@@ -17,24 +17,24 @@
|
||||
"@dr.pogodin/react-helmet": "^3.2.3",
|
||||
"@reduxjs/toolkit": "^2.12.0",
|
||||
"ky": "^2.1.0",
|
||||
"react": "^19.2.8",
|
||||
"react-dom": "^19.2.8",
|
||||
"react": "^19.3.0",
|
||||
"react-dom": "^19.3.0",
|
||||
"react-ga4": "^3.0.1",
|
||||
"react-redux": "^9.3.0",
|
||||
"react-router-dom": "^7.18.3",
|
||||
"react-router": "^8.3.1",
|
||||
"redux": "^5.0.1",
|
||||
"three": "^0.186.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@biomejs/biome": "^2.5.12",
|
||||
"@types/node": "^24.13.3",
|
||||
"@types/react": "^19.2.18",
|
||||
"@types/react-dom": "^19.2.7",
|
||||
"@biomejs/biome": "^2.5.13",
|
||||
"@types/node": "^24.13.4",
|
||||
"@types/react": "^19.3.0",
|
||||
"@types/react-dom": "^19.3.0",
|
||||
"@types/react-redux": "^7.1.34",
|
||||
"@types/three": "^0.185.4",
|
||||
"@types/three": "^0.186.0",
|
||||
"@vitejs/plugin-react": "^6.1.1",
|
||||
"cspell": "^10.3.0",
|
||||
"cspell": "^10.3.1",
|
||||
"typescript": "~7.0.2",
|
||||
"vite": "^8.2.2"
|
||||
"vite": "^8.3.0"
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import React from 'react';
|
||||
import ReactGA from 'react-ga4';
|
||||
import { BrowserRouter, NavLink, Route, Routes, useLocation } from 'react-router-dom';
|
||||
import { BrowserRouter, NavLink, Route, Routes, useLocation } from 'react-router';
|
||||
import styles from './App.module.css';
|
||||
import CompatRedirect from './features/compat-redirect/CompatRedirect';
|
||||
import Contact from './features/contact/Contact';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type React from 'react';
|
||||
import { Navigate, useLocation } from 'react-router-dom';
|
||||
import { Navigate, useLocation } from 'react-router';
|
||||
import NotFound from '../not-found/NotFound';
|
||||
|
||||
const CompatRedirect: React.FC = () => {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import ky from 'ky';
|
||||
import { useEffect, useState } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Link } from 'react-router';
|
||||
import { useAppDispatch } from '../../app/hooks';
|
||||
import DataUtils from '../data/DataUtils';
|
||||
import Loading from '../loading/Loading';
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import ky from 'ky';
|
||||
import type React from 'react';
|
||||
import { useEffect, useRef, useState } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Link } from 'react-router';
|
||||
import * as THREE from 'three';
|
||||
import { TrackballControls } from 'three/examples/jsm/controls/TrackballControls';
|
||||
import { useAppDispatch } from '../../app/hooks';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type React from 'react';
|
||||
import { Route, Routes, useParams } from 'react-router-dom';
|
||||
import { Route, Routes, useParams } from 'react-router';
|
||||
import DataDetail from '../data-detail/DataDetail';
|
||||
import DataViewer from '../data-viewer/DataViewer';
|
||||
import NotFound from '../not-found/NotFound';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type React from 'react';
|
||||
import { useEffect } from 'react';
|
||||
import { Link, Route, Routes } from 'react-router-dom';
|
||||
import { Link, Route, Routes } from 'react-router';
|
||||
import { useAppDispatch } from '../../app/hooks';
|
||||
import NotFound from '../not-found/NotFound';
|
||||
import { setTitle } from '../page-title/pageTitleSlice';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useState } from 'react';
|
||||
import { useNavigate } from 'react-router-dom';
|
||||
import { useNavigate } from 'react-router';
|
||||
import { useAppDispatch } from '../../app/hooks';
|
||||
import DataUtils, { type SearchResults } from '../data/DataUtils';
|
||||
import { setTitle } from '../page-title/pageTitleSlice';
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import type React from 'react';
|
||||
import { useEffect } from 'react';
|
||||
import { Link } from 'react-router-dom';
|
||||
import { Link } from 'react-router';
|
||||
import { useAppDispatch, useAppSelector } from '../../app/hooks';
|
||||
import { setTitle } from '../page-title/pageTitleSlice';
|
||||
import styles from './SearchResults.module.css';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type React from 'react';
|
||||
import { Route, Routes } from 'react-router-dom';
|
||||
import { Route, Routes } from 'react-router';
|
||||
import NotFound from '../not-found/NotFound';
|
||||
import SearchForm from '../search-form/SearchForm';
|
||||
import SearchResults from '../search-results/SearchResults';
|
||||
|
||||
Reference in New Issue
Block a user