In one of our projects we're formatting all package.json files with prettier as part of a pre-commit hook (and after running workspaces-to-typescript-project-references).
This causes the change check of workspaces-to-typescript-project-references to fail because the strings it compares are different even though the JSON objects have the same contents.
As a side effect this causes tsc -b to take significantly longer when running after workspaces-to-typescript-project-references without any other code changes.
This change parses & re-stringifies the tsconfig file to make sure it has the same formatting as the new contents JSON string.
In one of our projects we're formatting all
package.json
files with prettier as part of a pre-commit hook (and after runningworkspaces-to-typescript-project-references
). This causes the change check ofworkspaces-to-typescript-project-references
to fail because the strings it compares are different even though the JSON objects have the same contents.As a side effect this causes
tsc -b
to take significantly longer when running afterworkspaces-to-typescript-project-references
without any other code changes.This change parses & re-stringifies the tsconfig file to make sure it has the same formatting as the new contents JSON string.