( contents: string, tag: string, comment: string )
| 126 | } |
| 127 | |
| 128 | export function createGeneratedHeaderComment( |
| 129 | contents: string, |
| 130 | tag: string, |
| 131 | comment: string |
| 132 | ): string { |
| 133 | const hashKey = createHash(contents); |
| 134 | |
| 135 | // Everything after the `${tag} ` is unversioned and can be freely modified without breaking changes. |
| 136 | return `${comment} @generated begin ${tag} - expo prebuild (DO NOT MODIFY) ${hashKey}`; |
| 137 | } |
| 138 | |
| 139 | export function createHash(src: string): string { |
| 140 | // this doesn't need to be secure, the shorter the better. |
no test coverage detected