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

Make packages.json synchronization optional #1017

Open
FrancoisPog opened this issue Mar 1, 2024 · 1 comment · May be fixed by #1032
Open

Make packages.json synchronization optional #1017

FrancoisPog opened this issue Mar 1, 2024 · 1 comment · May be fixed by #1032

Comments

@FrancoisPog
Copy link

FrancoisPog commented Mar 1, 2024

There are cases where a project uses Yarn workspaces and Javascript dependencies may be in multiple packages.json files, not just the one at the root.
In this case we don't want them added.

@dmaicher
Copy link
Contributor

dmaicher commented Feb 5, 2025

I have an issue where symfony/stimulus-bundle is a transitive dependency and I don't use it for my own assets. So I don't want my package.json to be modified in any way. So 👍 for this option.

For now I prevent any update to package.json with this ugly workaround in composer.json:

    "scripts": {
        "pre-install-cmd": "test -e 'package.json' && mv package.json _package.json || exit 0",
        "pre-update-cmd": "test -e 'package.json' && mv package.json _package.json || exit 0",
        "post-install-cmd": "mv _package.json package.json",
        "post-update-cmd": "mv _package.json package.json"
    },

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants