Skip to content

Commit e48c64c

Browse files
authored
Upgrading react-router (#71)
1 parent 839ddb7 commit e48c64c

File tree

3 files changed

+45
-72
lines changed

3 files changed

+45
-72
lines changed

app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@
4747
"react-helmet-async": "^1.3.0",
4848
"react-hook-form": "^7.54.2",
4949
"react-image-file-resizer": "^0.4.8",
50-
"react-router": "^7.1.3",
51-
"react-router-dom": "^7.1.5",
50+
"react-router": "^7.6.2",
51+
"react-router-dom": "^7.6.2",
5252
"react-spring": "^9.7.5",
5353
"styled-components": "^6.1.14",
5454
"three": "^0.172.0",

app/plopfile.js

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,65 @@
11
export default function (plop) {
22
plop.setGenerator('component', {
3+
actions: [
4+
{
5+
path: 'src/{{path}}/{{camelCase name}}.tsx',
6+
templateFile: 'templates/component/component.js.hbs',
7+
type: 'add',
8+
},
9+
{
10+
path: 'src/{{path}}/__tests__/{{camelCase name}}.test.tsx',
11+
skip: (data) => !data.testsFolder,
12+
templateFile: 'templates/component/__tests__/component.test.js.hbs',
13+
type: 'add',
14+
},
15+
],
316
description: 'Create a component',
417
prompts: [
518
{
6-
type: 'input',
7-
name: 'name',
819
message: 'What is the name of the component?',
20+
name: 'name',
21+
type: 'input',
922
},
1023
{
11-
type: 'input',
12-
name: 'path',
1324
message: 'What path should this component live under? (src/[your answer here]/. Omit trailing slash.)',
25+
name: 'path',
26+
type: 'input',
1427
},
1528
{
16-
type: 'confirm',
17-
name: 'styledComponents',
1829
message: 'Do you want to add a styled component wrapper?',
19-
},
20-
{
30+
name: 'styledComponents',
2131
type: 'confirm',
22-
name: 'testsFolder',
23-
message: 'Do you want to generate a tests folder?',
24-
},
25-
],
26-
actions: [
27-
{
28-
type: 'add',
29-
path: 'src/{{path}}/{{camelCase name}}.tsx',
30-
templateFile: 'templates/component/component.js.hbs',
3132
},
3233
{
33-
type: 'add',
34-
path: 'src/{{path}}/__tests__/{{camelCase name}}.test.tsx',
35-
templateFile: 'templates/component/__tests__/component.test.js.hbs',
36-
skip: (data) => !data.testsFolder,
34+
message: 'Do you want to generate a tests folder?',
35+
name: 'testsFolder',
36+
type: 'confirm',
3737
},
3838
],
3939
});
4040
plop.setGenerator('feature', {
41-
description: 'Create feature base',
42-
prompts: [
43-
{
44-
type: 'input',
45-
name: 'name',
46-
message: 'What is the name of the feature?',
47-
},
48-
],
4941
actions: [
5042
{
51-
type: 'add',
5243
path: 'src/features/{{camelCase name}}/public/{{pascalCase name}}View.tsx',
5344
templateFile: 'templates/component/component.tsx.hbs',
45+
type: 'add',
5446
},
5547
{
56-
type: 'add',
5748
path: 'src/features/{{camelCase name}}/fence.json',
5849
templateFile: 'templates/feature/fence.json.hbs',
50+
type: 'add',
5951
},
6052
{
61-
type: 'add',
6253
path: 'src/features/{{camelCase name}}/components',
54+
type: 'add',
55+
},
56+
],
57+
description: 'Create feature base',
58+
prompts: [
59+
{
60+
message: 'What is the name of the feature?',
61+
name: 'name',
62+
type: 'input',
6363
},
6464
],
6565
});

yarn.lock

Lines changed: 11 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -7393,8 +7393,8 @@ __metadata:
73937393
react-hook-form: "npm:^7.54.2"
73947394
react-image-file-resizer: "npm:^0.4.8"
73957395
react-lottie-player: "npm:^2.1.0"
7396-
react-router: "npm:^7.1.3"
7397-
react-router-dom: "npm:^7.1.5"
7396+
react-router: "npm:^7.6.2"
7397+
react-router-dom: "npm:^7.6.2"
73987398
react-spring: "npm:^9.7.5"
73997399
rollup-plugin-visualizer: "npm:^5.14.0"
74007400
styled-components: "npm:^6.1.14"
@@ -18888,15 +18888,15 @@ __metadata:
1888818888
languageName: node
1888918889
linkType: hard
1889018890

18891-
"react-router-dom@npm:^7.1.5":
18892-
version: 7.1.5
18893-
resolution: "react-router-dom@npm:7.1.5"
18891+
"react-router-dom@npm:^7.6.2":
18892+
version: 7.6.2
18893+
resolution: "react-router-dom@npm:7.6.2"
1889418894
dependencies:
18895-
react-router: "npm:7.1.5"
18895+
react-router: "npm:7.6.2"
1889618896
peerDependencies:
1889718897
react: ">=18"
1889818898
react-dom: ">=18"
18899-
checksum: 10/caf34daec7ef6fdd4043dd56295fe6d5de4a2bfbbd650897b8cde23571a51f73f2b0ef2681a55f46ef524dc7e360b1f6c55d5b5bb1875196b48917042b52d82d
18899+
checksum: 10/e793578cced33fce83ed8341a70e2238bd247cdc648a105d600e53551ad56fddab8c186d3711c1c46203f77ec6c3f9617a57465494597eadc165c55ef573ab51
1890018900
languageName: node
1890118901
linkType: hard
1890218902

@@ -18919,39 +18919,19 @@ __metadata:
1891918919
languageName: node
1892018920
linkType: hard
1892118921

18922-
"react-router@npm:7.1.5":
18923-
version: 7.1.5
18924-
resolution: "react-router@npm:7.1.5"
18922+
"react-router@npm:7.6.2, react-router@npm:^7.6.2":
18923+
version: 7.6.2
18924+
resolution: "react-router@npm:7.6.2"
1892518925
dependencies:
18926-
"@types/cookie": "npm:^0.6.0"
1892718926
cookie: "npm:^1.0.1"
1892818927
set-cookie-parser: "npm:^2.6.0"
18929-
turbo-stream: "npm:2.4.0"
1893018928
peerDependencies:
1893118929
react: ">=18"
1893218930
react-dom: ">=18"
1893318931
peerDependenciesMeta:
1893418932
react-dom:
1893518933
optional: true
18936-
checksum: 10/3802ff0e0419aa53c1824b1ad2ebac6facb918306c67ff64ed86b5cbc49197c15f077b84e425f57beb24dd01cd5818a100da5269b8e160deee62b06fda008b56
18937-
languageName: node
18938-
linkType: hard
18939-
18940-
"react-router@npm:^7.1.3":
18941-
version: 7.1.3
18942-
resolution: "react-router@npm:7.1.3"
18943-
dependencies:
18944-
"@types/cookie": "npm:^0.6.0"
18945-
cookie: "npm:^1.0.1"
18946-
set-cookie-parser: "npm:^2.6.0"
18947-
turbo-stream: "npm:2.4.0"
18948-
peerDependencies:
18949-
react: ">=18"
18950-
react-dom: ">=18"
18951-
peerDependenciesMeta:
18952-
react-dom:
18953-
optional: true
18954-
checksum: 10/84b292e4947e5f9e0c5bae4059f28faf0b4c21944dc27707563188f001f006e2a62f0b5cfefda925f890629f40a237230c4e2a8572a64763e2cf809b504c0d87
18934+
checksum: 10/38a8473c7358d873eb60cc6660deae16a629701b8867ee00e67871ff61009b90f73853235ef3b0f2e43ebedee697389afc7bf170df069823dc872be79798965b
1895518935
languageName: node
1895618936
linkType: hard
1895718937

@@ -21541,13 +21521,6 @@ __metadata:
2154121521
languageName: node
2154221522
linkType: hard
2154321523

21544-
"turbo-stream@npm:2.4.0":
21545-
version: 2.4.0
21546-
resolution: "turbo-stream@npm:2.4.0"
21547-
checksum: 10/7079bbc82b58340f783144cd669cc7e598288523103a8d68bb8a4c6bb28c64eccb71d389b33aab07788d3a9030638b795709e15cb8486f722b1cdac59cb58afc
21548-
languageName: node
21549-
linkType: hard
21550-
2155121524
"type-check@npm:^0.4.0, type-check@npm:~0.4.0":
2155221525
version: 0.4.0
2155321526
resolution: "type-check@npm:0.4.0"

0 commit comments

Comments
 (0)