Skip to content

Commit 5c6e1a8

Browse files
authored
🤖 Merge PR DefinitelyTyped#64860 chore: remove react-router & react-router-dom by @43081j
* chore (react-router-dom): remove redundant types * chore (react-router): remove redundant types * fix: add react-router dependency * fix: bump a bunch of stuff to ts4.5 * fix: bump react-router-navigation to ts4.5 * fix: bump redux-auth-wrapper to ts4.5 * fix: move a bunch of dependents back to old types * fix: revert some ts4.5 bumps * fix: pin redux-router dep to 2.x * chore: update readme links * chore: drop notneeded changes
1 parent 5205774 commit 5c6e1a8

File tree

133 files changed

+38
-5116
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

133 files changed

+38
-5116
lines changed

Diff for: README.es.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -361,8 +361,8 @@ Por ejemplo [history v2 `tsconfig.json`](https://github.com/%44efinitelyTyped/De
361361

362362
Si hay otros paquetes en Definitely Typed que son incompatibles con la nueva versión, necesitarás mapear las rutas a la versión anterior. También deberá hacer esto para los paquetes que dependen de paquetes que dependen de una version anterior.
363363

364-
Por ejemplo, `react-router` depende de `history@2`, así que [react-router `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router/tsconfig.json) tiene una ruta mapeada a "history": `[ "history/v2" ]`;
365-
transitivo así mismo, `react-router-bootstrap` (que depende de `react-router`) también añade una ruta mapeada en su [tsconfig.json](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router-bootstrap/tsconfig.json).
364+
Por ejemplo, `browser-sync` depende de `micromatch@2`, así que [browser-sync `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/browser-sync/tsconfig.json) tiene una ruta mapeada a "micromatch": `[ "micromatch/v2" ]`;
365+
transitivo así mismo, `browser-sync-webpack-plugin` (que depende de `browser-sync`) también añade una ruta mapeada en su [tsconfig.json](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/browser-sync-webpack-plugin/tsconfig.json).
366366

367367
Además, `/// <reference types=".." />` no trabajará con rutas mapeadas, así que las dependencias deberán utilizar `import`.
368368

Diff for: README.it.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -582,8 +582,8 @@ Nel momento in cui questo README è stato scritto, il [`tsconfig.json` della his
582582
583583
Se ci sono pacchetti su Definitely Typed che sono incompatibili con la vesione più nuova di una libreria, dovrai mappare gli indirizzi alla vecchia versione, continuando ricorsivamente per gli altri pacchetti che dipendono da essa.
584584
585-
Per esempio, `react-router` dipende da `history@2`, quindi il [`tsconfig.json` di react-router](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router/v2/tsconfig.json) ha mappato gli indirizzi alla versione vecchia (`"history": [ "history/v2" ]`) fino a che non è passato alla nuova versione di `react-router`.
586-
A sua volta, la libreria `react-router-bootstrap` (che dipende da `react-router`) ha dovuto aggiungere lo stesso mapping nel suo `tsconfig.json`, fino a che la sua dipendenza `react-router` non è stata aggiornata all'ultima versione.
585+
Per esempio, `browser-sync` dipende da `micromatch@2`, quindi il [`tsconfig.json` di browser-sync](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/browser-sync/tsconfig.json) ha mappato gli indirizzi alla versione vecchia (`"micromatch": [ "micromatch/v2" ]`) fino a che non è passato alla nuova versione di `browser-sync`.
586+
A sua volta, la libreria `browser-sync-webpack-plugin` (che dipende da `browser-sync`) ha dovuto aggiungere lo stesso mapping nel suo `tsconfig.json`, fino a che la sua dipendenza `browser-sync` non è stata aggiornata all'ultima versione.
587587
588588
Nota che `/// <reference types=".." />` non funziona con il mapping degli indirizzi, quindi le dipendenze devono usare `import`.
589589

Diff for: README.ja.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,8 @@ Definitely Typed の各パッケージは npm に公開される際にバージ
500500
あるライブラリの新しいバージョンに、 Definitely Typed 内の他のパッケージが対応していない場合は、古いバージョンへのパス変換<small>path mapping</small>を追加する必要があります。
501501
古いバージョンに対応していないパッケージにさらに依存しているパッケージに対しても、再帰的に行う必要があります。
502502

503-
たとえば、 `react-router``history@2` に依存しているため、 [react-router`tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router/v2/tsconfig.json) には `"history": [ "history/v2" ]` というパス変換が追加されています。
504-
さらに、 `react-router` に依存している `react-router-bootstrap` でも、 `react-router` が最新版に更新されるまでの間、 `tsconfig.json` の中で同様のパス変換(`"history": [ "history/v2" ]`)を行う必要があります。
503+
たとえば、 `browser-sync``micromatch@2` に依存しているため、 [browser-sync`tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/browser-sync/tsconfig.json) には `"micromatch": [ "micromatch/v2" ]` というパス変換が追加されています。
504+
さらに、 `browser-sync` に依存している `browser-sync-webpack-plugin` でも、 `browser-sync` が最新版に更新されるまでの間、 `tsconfig.json` の中で同様のパス変換(`"micromatch": [ "micromatch/v2" ]`)を行う必要があります。
505505

506506
`/// <reference types=".." />` についてはパス変換でうまく動作しないため、依存モジュールは `import` を使う必要があります。
507507

Diff for: README.ko.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -385,8 +385,8 @@ npm 패키지의 경우, `node -p 'require("foo")'` 가 원하는 값이라면 `
385385

386386
수정 중인 패키지에 의존하는 Definitely Typed 의 다른 패키지들이 새 버전과 호환되지 않을 경우, 그 패키지들에도 옛날 버전으로의 경로 대응 규칙(Path mapping rule)을 추가해주어야 합니다. 수정 중인 패키지에 의존하는 패키지에 의존하는 패키지들에도 똑같은 작업을 해 주셔야 합니다.
387387

388-
예를 들어, `react-router` 패키지는 `history@2` 패키지에 의존하고 있기 때문에, [react-router 패키지의 `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router/tsconfig.json) 파일이 `"history": [ "history/v2" ]` 와 같은 경로 대응 규칙(Path mapping rule)을 가지고 있는 걸 볼 수 있습니다.
389-
이어서 (`react-router` 패키지에 의존하는 패키지인) `react-router-bootstrap` 또한 [`tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router-bootstrap/tsconfig.json) 파일 안에 경로 대응 규칙(Path mapping rule)을 가지고 있는 것을 보실 수 있습니다.
388+
예를 들어, `browser-sync` 패키지는 `history@2` 패키지에 의존하고 있기 때문에, [browser-sync 패키지의 `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/browser-sync/tsconfig.json) 파일이 `"micromatch": [ "micromatch/v2" ]` 와 같은 경로 대응 규칙(Path mapping rule)을 가지고 있는 걸 볼 수 있습니다.
389+
이어서 (`browser-sync` 패키지에 의존하는 패키지인) `browser-sync-webpack-plugin` 또한 [`tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/browser-sync-webpack-plugin/tsconfig.json) 파일 안에 경로 대응 규칙(Path mapping rule)을 가지고 있는 것을 보실 수 있습니다.
390390

391391
`/// <reference types=".." />` 에서는 경로 대응 규칙(Path mapping rule)이 동작하지 않기 때문에, Definitely Typed 패키지로에 의존할 때에는 임포트(import) 를 사용해야 합니다.
392392

Diff for: README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -606,8 +606,8 @@ At the time of writing, the [history v2 `tsconfig.json`](https://github.com/%44e
606606
If there are other packages in Definitely Typed that are incompatible with the new version, you will need to add path mappings to the old version.
607607
You will also need to do this recursively for packages depending on the old version.
608608

609-
For example, `react-router` depends on `history@2`, so [react-router `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router/v2/tsconfig.json) has a path mapping to `"history": [ "history/v2" ]`.
610-
Transitively, `react-router-bootstrap` (which depends on `react-router`) also needed to add the same path mapping (`"history": [ "history/v2" ]`) in its `tsconfig.json` until its `react-router` dependency was updated to the latest version.
609+
For example, `browser-sync` depends on `micromatch@2`, so [browser-sync `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/browser-sync/tsconfig.json) has a path mapping to `"micromatch": [ "micromatch/v2" ]`.
610+
Transitively, `browser-sync-webpack-plugin` (which depends on `browser-sync`) also needed to add the same path mapping (`"micromatch": [ "micromatch/v2" ]`) in its `tsconfig.json` until its `browser-sync` dependency was updated to the latest version.
611611

612612
Also, `/// <reference types=".." />` will not work with path mapping, so dependencies must use `import`.
613613

Diff for: README.pt.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,8 @@ No tempo de escrita, a [history v2 `tsconfig.json`](https://github.com/%44efinit
500500
Se há outros pacotes no Definitely Typed que são incompatíveis com a nova versão, você precisará adicionar mapeamentos de caminho para a versão antiga.
501501
Você também precisará fazer isso recursivamente para pacotes dependentes da versão antiga.
502502

503-
Por exemplo, `react-router` depende de `history@2`, então o [`tsconfig.json` do react-router](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router/v2/tsconfig.json) tem um mapeamento de caminho para `"history": [ "history/v2" ]`.
504-
Provisoriamente, o `react-router-bootstrap` (que depende do `react-router`) também precisou ter o mesmo mapeamento de caminhos adicionado (`"history": [ "history/v2" ]`) no seu `tsconfig.json` até que o sua dependência `react-router` fosse atualizada para a última versão.
503+
Por exemplo, `browser-sync` depende de `micromatch@2`, então o [`tsconfig.json` do browser-sync](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/browser-sync/tsconfig.json) tem um mapeamento de caminho para `"micromatch": [ "micromatch/v2" ]`.
504+
Provisoriamente, o `browser-sync-webpack-plugin` (que depende do `browser-sync`) também precisou ter o mesmo mapeamento de caminhos adicionado (`"micromatch": [ "micromatch/v2" ]`) no seu `tsconfig.json` até que o sua dependência `browser-sync` fosse atualizada para a última versão.
505505

506506
`/// <reference types=".." />` também não vai funcionar com o mapeamento de caminhos, então dependências devem usar `import`.
507507

Diff for: README.ru.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -377,8 +377,8 @@ Once a week the Definition Owners are synced to the file [.github/CODEOWNERS](ht
377377

378378
Если в Definitely Typed есть другие пакеты, несовместимые с новой версией, вам нужно будет добавить сопоставления путей к старой версии. Вам также нужно будет сделать это для пакетов в зависимости от пакетов в зависимости от старой версии.
379379

380-
Например, `react-router` зависит от `history@2`, поэтому [react-router `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router/tsconfig.json) есть сопоставление пути с `"history": [ "history/v2" ]`;
381-
транзитивно `react-router-bootstrap` (который зависит от `react-router`) также добавляет отображение пути в свой [`tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router-bootstrap/tsconfig.json).
380+
Например, `browser-sync` зависит от `micromatch@2`, поэтому [browser-sync `tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/browser-sync/tsconfig.json) есть сопоставление пути с `"micromatch": [ "micromatch/v2" ]`;
381+
транзитивно `browser-sync-webpack-plugin` (который зависит от `browser-sync`) также добавляет отображение пути в свой [`tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/browser-sync-webpack-plugin/tsconfig.json).
382382

383383
Также, `/// <reference types=".." />` не будет работать с отображением пути, поэтому зависимости должны использовать `import`.
384384

Diff for: README.zh-Hans.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -584,8 +584,8 @@ npm 软件包应该会在几分钟内更新。如果已经超过了一小时,
584584
如果 Definitely Typed 上的其他软件包与新版本不兼容,你需要将路径映射到旧版本。
585585
对于依赖于旧版本的软件包,你还需要递归地执行此操作。
586586

587-
例如,`react-router` 依赖 `history@2` 软件包,所以 [react-router`tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react-router/v2/tsconfig.json) 包含路径映射 `"history": [ "history/v2" ]`。
588-
所以,`react-router-bootstrap`(依赖 `react-router` 软件包)在它的依赖 `react-router` 更新到最新版本之前,也需要在它的 `tsconfig.json` 里添加相同的路径映射(`"history": [ "history/v2" ]`)。
587+
例如,`browser-sync` 依赖 `micromatch@2` 软件包,所以 [browser-sync`tsconfig.json`](https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/browser-sync/tsconfig.json) 包含路径映射 `"micromatch": [ "micromatch/v2" ]`。
588+
所以,`browser-sync-webpack-plugin`(依赖 `browser-sync` 软件包)在它的依赖 `browser-sync` 更新到最新版本之前,也需要在它的 `tsconfig.json` 里添加相同的路径映射(`"micromatch": [ "micromatch/v2" ]`)。
589589

590590
此外,`/// <reference types=".." />` 不适用于路径映射,因此依赖需要使用 `import`
591591

Diff for: types/mirrorx/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"private": true,
33
"dependencies": {
4-
"@types/history": "^4.7.11"
4+
"@types/history": "^4.7.11",
5+
"@types/react-router": "^5.1.0"
56
}
67
}

Diff for: types/react-router-config/package.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"private": true,
33
"dependencies": {
4-
"@types/history": "^4.7.11"
4+
"@types/history": "^4.7.11",
5+
"@types/react-router": "^5.1.0"
56
}
67
}

Diff for: types/react-router-config/react-router-config-tests.tsx

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import * as React from 'react';
22
import { RouteConfig, matchRoutes, MatchedRoute, renderRoutes, RouteConfigComponentProps } from 'react-router-config';
3-
import { BrowserRouter } from 'react-router-dom';
43

54
const Root = ({ route }: RouteConfigComponentProps) => (
65
<div>
@@ -63,7 +62,7 @@ const branch: Array<MatchedRoute<{}>> = matchRoutes<{}>(routes, '/child/23');
6362
// ]
6463

6564
// pass this into ReactDOM.render
66-
<BrowserRouter>{renderRoutes(routes)}</BrowserRouter>;
65+
<>{renderRoutes(routes)}</>;
6766

6867
interface CustomRouteConfig extends RouteConfig {
6968
customProperty: string;
@@ -90,4 +89,4 @@ const customRoute = branchWithCustomRoutes[0];
9089
// $ExpectType string
9190
const customProperty = customRoute.route.customProperty;
9291

93-
<BrowserRouter>{renderRoutes(routesWithCustomConfig)}</BrowserRouter>;
92+
<>{renderRoutes(routesWithCustomConfig)}</>;

Diff for: types/react-router-dom/index.d.ts

-98
This file was deleted.

0 commit comments

Comments
 (0)