bypassImportMap = async (packageDir, options = {}) => {
  // TODO: Use globby's gitignore option
  const ignoredDirs = options.ignoredDirs || ['node_modules'];
  if (!existsSync(packageDir)) {
    throw new Error(ERROR_CAN_NOT_ACCESS_PACKAGE_DIR);
  }
  const require = createRequire(import.meta.url);
  // eslint-disable-next-line import/no-dynamic-require
  const { imports } = require(path.resolve(packageDir, 'package.json'));
  if (!imports) {
    return Promise.resolve();
  }
  const ignoredPatterns = ignoredDirs.map(dir => `!${path.join(packageDir, dir)}`);
  const searchPatterns = [path.join(packageDir, '**', '*.js'), ...ignoredPatterns];
  const filePaths = await globby(searchPatterns);
  const importMap = normalizeImportMap(imports);
  // @ts-ignore
  return asyncConcurrentForEach(filePaths, filePath =>
    bypassImportMapForFile(filePath, packageDir, importMap),
  );
}
Bypasses import map for a package given by `packageDir`

@param {string} packageDir
@param {{ignoredDirs?: string[]}} [options]
@throws ERROR_CAN_NOT_ACCESS_PACKAGE_DIR
@returns {Promise<any>}