Some generators return file.content values that are promises. This is due to a major version update to Prettier that returns a promise instead of a string. The internal comparison between previous and next files always flagged these files as modified because the existing string on the file system was never equal to a Promise.
Change
This change simply awaits the file contents. This is a no-op if the contents are a string, but correctly resolves Promises.
Consequences
All files created by generators that (incorrectly) return Promises will be correctly labeled as "no change" if the re-generated contents are the same.
Context
Some generators return
file.content
values that are promises. This is due to a major version update to Prettier that returns a promise instead of a string. The internal comparison between previous and next files always flagged these files as modified because the existing string on the file system was never equal to a Promise.Change
This change simply awaits the file contents. This is a no-op if the contents are a string, but correctly resolves Promises.
Consequences
All files created by generators that (incorrectly) return Promises will be correctly labeled as "no change" if the re-generated contents are the same.