Skip to content

Commit f726243

Browse files
committed
remove global dependency to tanstack router
1 parent 40880cd commit f726243

5 files changed

Lines changed: 24 additions & 19 deletions

File tree

package.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@
4444
"@storybook/react-webpack5": "^8.6.11",
4545
"@storybook/source-loader": "^8.6.11",
4646
"@storybook/test": "^8.6.11",
47-
"@tanstack/react-router": "^1.143.11",
4847
"@types/babel__preset-env": "^7",
4948
"@types/eslint-plugin-jsx-a11y": "^6",
5049
"@types/gh-pages": "^6",

packages/ra-router-tanstack/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
"build": "zshy --silent"
2323
},
2424
"devDependencies": {
25+
"@tanstack/history": "^1.0.0",
26+
"@tanstack/react-router": "^1.143.11",
2527
"ra-core": "^5.13.4",
2628
"typescript": "^5.1.3",
2729
"zshy": "^0.5.0"

packages/ra-router-tanstack/src/tanStackRouterProvider.spec.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -618,9 +618,7 @@ describe('tanStackRouterProvider', () => {
618618
it('should navigate back in history with navigate(-1)', async () => {
619619
render(<HistoryNavigation />);
620620

621-
await waitFor(() => {
622-
expect(screen.getByText('Posts')).toBeInTheDocument();
623-
});
621+
await screen.findByText('Post #1');
624622

625623
fireEvent.click(screen.getByText('Post #1'));
626624

test-setup.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
import '@testing-library/jest-dom';
66
import '@testing-library/jest-dom/jest-globals';
77

8+
// TextEncoder/TextDecoder are required by TanStack Router
9+
import { TextEncoder, TextDecoder } from 'util';
10+
global.TextEncoder = TextEncoder;
11+
global.TextDecoder = TextDecoder;
12+
813
// Make the CI fail if console.error in tests
914
let error = console.error;
1015
console.error = (...args) => {

yarn.lock

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5256,10 +5256,10 @@ __metadata:
52565256
languageName: node
52575257
linkType: hard
52585258

5259-
"@tanstack/history@npm:1.141.0":
5260-
version: 1.141.0
5261-
resolution: "@tanstack/history@npm:1.141.0"
5262-
checksum: b564e6617e612a5b77657ecd9b7ae9c73e6a808f1a5600471aedd4ce878cd3f9b48cc31a1b7e1ac9c1ed9b1f321599ee6023335d8474b1d1c86bb127e78cef28
5259+
"@tanstack/history@npm:1.145.7, @tanstack/history@npm:^1.0.0":
5260+
version: 1.145.7
5261+
resolution: "@tanstack/history@npm:1.145.7"
5262+
checksum: 6c4b0a987639aa08a3e2b87c466edc20ac4701e15821fa4b2833abc78d6e047da3f9f73032377fe4f3d492a22f7829339b509d549dab509c58dc4985a590a09c
52635263
languageName: node
52645264
linkType: hard
52655265

@@ -5301,19 +5301,19 @@ __metadata:
53015301
linkType: hard
53025302

53035303
"@tanstack/react-router@npm:^1.143.11":
5304-
version: 1.143.11
5305-
resolution: "@tanstack/react-router@npm:1.143.11"
5304+
version: 1.150.0
5305+
resolution: "@tanstack/react-router@npm:1.150.0"
53065306
dependencies:
5307-
"@tanstack/history": "npm:1.141.0"
5307+
"@tanstack/history": "npm:1.145.7"
53085308
"@tanstack/react-store": "npm:^0.8.0"
5309-
"@tanstack/router-core": "npm:1.143.6"
5309+
"@tanstack/router-core": "npm:1.150.0"
53105310
isbot: "npm:^5.1.22"
53115311
tiny-invariant: "npm:^1.3.3"
53125312
tiny-warning: "npm:^1.0.3"
53135313
peerDependencies:
53145314
react: ">=18.0.0 || >=19.0.0"
53155315
react-dom: ">=18.0.0 || >=19.0.0"
5316-
checksum: de0b17082c3cea3d5b795c067eae9f19059ba8efe4900b06a5288616c8c003368e9e26b9c54113d445eff258f0778d1b6cbf37661caedf9d86c5e16415d87a92
5316+
checksum: 447cd14cfb9bdd2bf1ff18aec47bfca95fb48779a55b3533b35d978054cc183316f3b35e2a5bdc8e46ea803bf2b5b53de5fc08133bb7cc48aa05463f628fc157
53175317
languageName: node
53185318
linkType: hard
53195319

@@ -5330,18 +5330,18 @@ __metadata:
53305330
languageName: node
53315331
linkType: hard
53325332

5333-
"@tanstack/router-core@npm:1.143.6":
5334-
version: 1.143.6
5335-
resolution: "@tanstack/router-core@npm:1.143.6"
5333+
"@tanstack/router-core@npm:1.150.0":
5334+
version: 1.150.0
5335+
resolution: "@tanstack/router-core@npm:1.150.0"
53365336
dependencies:
5337-
"@tanstack/history": "npm:1.141.0"
5337+
"@tanstack/history": "npm:1.145.7"
53385338
"@tanstack/store": "npm:^0.8.0"
53395339
cookie-es: "npm:^2.0.0"
53405340
seroval: "npm:^1.4.1"
53415341
seroval-plugins: "npm:^1.4.0"
53425342
tiny-invariant: "npm:^1.3.3"
53435343
tiny-warning: "npm:^1.0.3"
5344-
checksum: 7e3f6f2537f645db160bbdcd2b98d37714e17db9f1448d918d4bd38877b0d68c3b96a8486cf0f8701a8e7faaf620a518432d4920ad6951627802cc5047a0a01f
5344+
checksum: a8900591d72fbd31c13b7f8916f2295bfc2879e0ccd009b595ec1093af80353099341ba4feba2a10776bf6e6601f492a153d154b0bfba4822e91d3df432e8dd0
53455345
languageName: node
53465346
linkType: hard
53475347

@@ -19639,6 +19639,8 @@ __metadata:
1963919639
version: 0.0.0-use.local
1964019640
resolution: "ra-router-tanstack@workspace:packages/ra-router-tanstack"
1964119641
dependencies:
19642+
"@tanstack/history": "npm:^1.0.0"
19643+
"@tanstack/react-router": "npm:^1.143.11"
1964219644
ra-core: "npm:^5.13.4"
1964319645
typescript: "npm:^5.1.3"
1964419646
zshy: "npm:^0.5.0"
@@ -19824,7 +19826,6 @@ __metadata:
1982419826
"@storybook/react-webpack5": "npm:^8.6.11"
1982519827
"@storybook/source-loader": "npm:^8.6.11"
1982619828
"@storybook/test": "npm:^8.6.11"
19827-
"@tanstack/react-router": "npm:^1.143.11"
1982819829
"@types/babel__preset-env": "npm:^7"
1982919830
"@types/eslint-plugin-jsx-a11y": "npm:^6"
1983019831
"@types/gh-pages": "npm:^6"

0 commit comments

Comments
 (0)