(config: GlobalConfig)
| 1045 | // the file's real mtime (Date.now() is recorded after the write) so the |
| 1046 | // freshness watcher skips re-reading our own write on its next tick. |
| 1047 | function writeThroughGlobalConfigCache(config: GlobalConfig): void { |
| 1048 | globalConfigCache = { config, mtime: Date.now() } |
| 1049 | lastReadFileStats = null |
| 1050 | } |
| 1051 | |
| 1052 | export function getGlobalConfig(): GlobalConfig { |
| 1053 | if (process.env.NODE_ENV === 'test') { |
no test coverage detected