encore icon indicating copy to clipboard operation
encore copied to clipboard

Bug: Running "encore check" when self-hosted should not modify package.json

Open dcitron opened this issue 9 months ago • 0 comments

Problem

Running encore check is currently modifying package.json via (I believe) the code at https://github.com/encoredev/encore/blob/5693c679f64a3546ab80b4438c75ecec58e11320/tsparser/src/builder/package_mgmt.rs#L159

It modifies the file in a way that makes it fail our prettier check, and, in any case, it's confusing behavior.

We don't want the package.json to be modified from a readonly CI/CD step and most of our developers do not have permission to update package.json so this creates a local git delta for them that they cannot deal with.

We manage our package.json changes through a different workflow.

Proposed fix

It would be better if encore commands did not modify package.json by default, and perhaps a new command-line or environment flag could be added for those who would like to have this current behavior.

dcitron avatar Jun 12 '25 14:06 dcitron