* Reload config from disk and refresh the context
(fn?: (conf: LoadConfigResult) => void)
| 13 | * Reload config from disk and refresh the context |
| 14 | */ |
| 15 | async reloadConfigAndRefreshContext(fn?: (conf: LoadConfigResult) => void) { |
| 16 | const conf = await loadConfig({ cwd: this.ctx.config.cwd, file: this.ctx.conf.path }) |
| 17 | |
| 18 | // attach tsconfig options from previous config |
| 19 | const { tsconfig, tsconfigFile, tsOptions } = this.ctx.conf |
| 20 | Object.assign(conf, { tsconfig, tsconfigFile, tsOptions }) |
| 21 | |
| 22 | return this.refresh(conf, fn) |
| 23 | } |
| 24 | |
| 25 | /** |
| 26 | * Update the context from the refreshed config |
no test coverage detected