Skip to content

Commit e09891e

Browse files
committed
feature #93 Moving Turbo to be a peer dependency (weaverryan)
This PR was squashed before being merged into the main branch. Discussion ---------- Moving Turbo to be a peer dependency | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Tickets | None | License | MIT Like with Stimulus itself, I believe this should be a peer dependency. The only downside is that users need to install it directly, which I don't see as a huge downside. This should guarantee that the the same "turbo" module is used from both the symfony/ux-turbo package and the end-users code (as well as from any other libraries that could potentially list turbo as a peer dependency). It should also fix this annoying little line I get in PhpStorm ;) <img width="867" alt="Screen Shot 2021-05-06 at 11 31 18 AM" src="https://user-images.githubusercontent.com/121003/117325305-954de100-ae5e-11eb-8959-4ca150f6ed49.png"> Cheers! Commits ------- b3c2d3d removing all package.json dependencies in favor of peer dependencies d62a25b Moving Turbo to be a peer dependency
2 parents fa47c06 + b3c2d3d commit e09891e

File tree

9 files changed

+26
-13
lines changed

9 files changed

+26
-13
lines changed

src/Chartjs/Resources/assets/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,8 @@
1818
"test": "babel src -d dist && jest",
1919
"lint": "eslint src test"
2020
},
21-
"dependencies": {
22-
"chart.js": "^2.9.4"
23-
},
2421
"peerDependencies": {
22+
"chart.js": "^2.9.4",
2523
"stimulus": "^2.0.0"
2624
},
2725
"devDependencies": {
@@ -30,6 +28,7 @@
3028
"@babel/plugin-proposal-class-properties": "^7.12.1",
3129
"@babel/preset-env": "^7.12.7",
3230
"@symfony/stimulus-testing": "^1.1.0",
31+
"chart.js": "^2.9.4",
3332
"jest-canvas-mock": "^2.3.0",
3433
"stimulus": "^2.0.0"
3534
},

src/Chartjs/composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@
3737
"symfony/twig-bundle": "^4.4.17|^5.0",
3838
"symfony/var-dumper": "^4.4.17|^5.0"
3939
},
40+
"conflict": {
41+
"symfony/flex": "<1.13"
42+
},
4043
"extra": {
4144
"branch-alias": {
4245
"dev-main": "1.3-dev"

src/Cropperjs/Resources/assets/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,8 @@
2222
"test": "babel src -d dist && jest",
2323
"lint": "eslint src test"
2424
},
25-
"dependencies": {
26-
"cropperjs": "^1.5.9"
27-
},
2825
"peerDependencies": {
26+
"cropperjs": "^1.5.9",
2927
"stimulus": "^2.0.0"
3028
},
3129
"devDependencies": {
@@ -34,6 +32,7 @@
3432
"@babel/plugin-proposal-class-properties": "^7.12.1",
3533
"@babel/preset-env": "^7.12.7",
3634
"@symfony/stimulus-testing": "^1.1.0",
35+
"cropperjs": "^1.5.9",
3736
"stimulus": "^2.0.0"
3837
},
3938
"jest": {

src/Cropperjs/composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
"symfony/twig-bundle": "^4.4.17|^5.0",
4141
"symfony/var-dumper": "^4.4.17|^5.0"
4242
},
43+
"conflict": {
44+
"symfony/flex": "<1.13"
45+
},
4346
"extra": {
4447
"branch-alias": {
4548
"dev-main": "1.3-dev"

src/Swup/Resources/assets/package.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,21 +18,24 @@
1818
"test": "babel src -d dist && jest",
1919
"lint": "eslint src test"
2020
},
21-
"dependencies": {
21+
"peerDependencies": {
2222
"@swup/fade-theme": "^1.0",
2323
"@swup/slide-theme": "^1.0",
2424
"@swup/forms-plugin": "^1.0",
2525
"@swup/debug-plugin": "^1.0",
26-
"swup": "^2.0"
27-
},
28-
"peerDependencies": {
26+
"swup": "^2.0",
2927
"stimulus": "^2.0.0"
3028
},
3129
"devDependencies": {
3230
"@babel/cli": "^7.12.1",
3331
"@babel/core": "^7.12.3",
3432
"@babel/plugin-proposal-class-properties": "^7.12.1",
3533
"@babel/preset-env": "^7.12.7",
34+
"@swup/fade-theme": "^1.0",
35+
"@swup/slide-theme": "^1.0",
36+
"@swup/forms-plugin": "^1.0",
37+
"@swup/debug-plugin": "^1.0",
38+
"swup": "^2.0",
3639
"@symfony/stimulus-testing": "^1.1.0",
3740
"stimulus": "^2.0.0"
3841
},

src/Swup/composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
"homepage": "https://symfony.com/contributors"
1818
}
1919
],
20+
"conflict": {
21+
"symfony/flex": "<1.13"
22+
},
2023
"extra": {
2124
"branch-alias": {
2225
"dev-main": "1.3-dev"

src/Turbo/Resources/assets/package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@
1919
"test": "babel src -d dist && jest",
2020
"lint": "eslint src test"
2121
},
22-
"dependencies": {
23-
"@hotwired/turbo": "^7.0.0-beta.4"
24-
},
2522
"peerDependencies": {
23+
"@hotwired/turbo": "^7.0.0-beta.5",
2624
"stimulus": "^2.0.0"
2725
},
2826
"devDependencies": {
2927
"@babel/cli": "^7.12.1",
3028
"@babel/core": "^7.12.3",
3129
"@babel/plugin-proposal-class-properties": "^7.12.1",
3230
"@babel/preset-env": "^7.12.7",
31+
"@hotwired/turbo": "^7.0.0-beta.5",
3332
"@symfony/stimulus-testing": "^1.1.0",
3433
"stimulus": "^2.0.0"
3534
},

src/Turbo/Tests/app/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"devDependencies": {
3+
"@hotwired/turbo": "^7.0.0-beta.5",
34
"@symfony/ux-turbo": "file:../../Resources/assets",
45
"@symfony/ux-turbo-mercure": "file:../../Bridge/Mercure/Resources/assets",
56
"@symfony/webpack-encore": "^0.32.0",

src/Turbo/composer.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@
5757
"symfony/twig-bundle": "^5.2",
5858
"symfony/web-profiler-bundle": "^5.2"
5959
},
60+
"conflict": {
61+
"symfony/flex": "<1.13"
62+
},
6063
"extra": {
6164
"branch-alias": {
6265
"dev-main": "1.3-dev"

0 commit comments

Comments
 (0)