function analyzeCommonJS(cjsSource, name = '<unknown>') {
  resetState();
  try {
    parseSource(cjsSource);
  } catch (e) {
    e.message += `\n  at ${name}:${
      cjsSource.slice(0, pos).split('\n').length
    }:${pos - cjsSource.lastIndexOf('\n', pos - 1)}`;
    e.loc = pos;
    throw e;
  }
  const result = {
    exports: [...myexports].filter(expt => !unsafeGetters.has(expt)),
    reexports: [...reexports],
    requires,
  };
  resetState();
  return result;
}
@param {string} cjsSource
@param {string} [name]