code: function unlinkIfExistsSync(filePath: string) {
    try {
      fs.unlinkSync(filePath);
    } catch (error) {
      if (error.code === 'ENOENT') {
        return;
      }
      throw error;
    }
  }
docs: We want to unlink all cache files before writing, so that it is as much
  atomic as possible.