Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent updates to package.json #1912

Closed
trsteel88 opened this issue Jun 12, 2024 · 14 comments
Closed

Prevent updates to package.json #1912

trsteel88 opened this issue Jun 12, 2024 · 14 comments
Labels

Comments

@trsteel88
Copy link

trsteel88 commented Jun 12, 2024

I am including symfony/ux-turbo in my application and it keeps trying to include a file in my package.json.

I don't want to include this in my package.json as I am including turbo myself. Is there a way to prevent changes to packages.json from specific bundles?

@smnandre
Copy link
Member

What file? The @symfony/ux-turbo/... one ?

@trsteel88
Copy link
Author

Yes, that's right.

@smnandre
Copy link
Member

Those files are the ones connecting Symfony with Turbo... what would you remove them ?

@trsteel88
Copy link
Author

I already have turbo included in my package.json

"@hotwired/turbo": "^7.1.0",

Why would I need the ux/turbo package? The only real reason that I am using symfony/ux-turbo is for the stream format helper. e.g:

if (TurboBundle::STREAM_FORMAT !== $request->getPreferredFormat(TurboBundle::STREAM_FORMAT)) {
    ...
}

@smnandre
Copy link
Member

The package would not install Turbo twice, so i am not sure to understand the problem here.

Why would I need the ux/turbo package?

Because you installed the symfony/ux-turbo bundle? :)
The bundle goal is to connect webpack or assetmapper with symfony and ease the installation & usage of Turbo.

More information about the @symfony/ux-turbo/ package (it does not contain Turbo): https://symfony.com/doc/4.x/frontend/ux.html#how-does-symfony-ux-work

@smnandre smnandre added the Turbo label Jun 14, 2024
@trsteel88
Copy link
Author

Yes but I still don't want it to change my package.json. Is there a way to prevent that? I only want to use this bundle to detect the request type.

@smnandre
Copy link
Member

If you disable Flex probably ?

@trsteel88
Copy link
Author

I can't do that. I guess I'll just have to reset package.json whenever an update occurs. It's a shame it can't be configured as I'm not using this package for loading turbo, I just want it to detect the request type

@smnandre
Copy link
Member

Well, if having another dependency installed (even if not called) is impossible for you, yes i think this should be the only solution right now.

If you have another idea / implementation suggestion, we'd be glad to help you open a PR

@carsonbot
Copy link

Thank you for this issue.
There has not been a lot of activity here for a while. Has this been resolved?

@carsonbot
Copy link

Friendly ping? Should this still be open? I will close if I don't hear anything.

@carsonbot
Copy link

Hey,

I didn't hear anything so I'm going to close it. Feel free to comment if this is still relevant, I can always reopen!

@94noni
Copy link
Contributor

94noni commented Feb 7, 2025

perhaps see symfony/flex#1032
cc @smnandre

@carsonbot carsonbot removed the Stalled label Feb 7, 2025
@smnandre
Copy link
Member

smnandre commented Feb 7, 2025

Good catch @94noni !

Closing here, as if something can be done, it will indeed be done on flex side.

@smnandre smnandre closed this as completed Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants