(text: string, path: string)
| 14 | e instanceof Error && fileErrors.has(e) |
| 15 | |
| 16 | export const parseJsonText = (text: string, path: string): unknown => { |
| 17 | try { |
| 18 | return JSON.parse(text.charCodeAt(0) === 0xfeff ? text.slice(1) : text) |
| 19 | } catch (e) { |
| 20 | const error = new Error(`${path} isn't JSON: ${(e as Error).message}`) |
| 21 | fileErrors.add(error) |
| 22 | throw error |
| 23 | } |
| 24 | } |
| 25 | |
| 26 | // the package.json fields @ark/aot reads |
| 27 | export type PackageManifest = { |
no test coverage detected