transformModuleSource = async (
    parser,
    sourceBytes,
    specifier,
    location,
    sourceMap,
  ) => {
    if (!['mjs', 'cjs'].includes(parser)) {
      throw Error(`Parser ${parser} not supported in evadeEvalCensor`);
    }
    const babelSourceType = parser === 'mjs' ? 'module' : 'script';
    const source = textDecoder.decode(sourceBytes);
    let object;
    ({ code: object, map: sourceMap } = await evadeCensor(source, {
      sourceType: babelSourceType,
      sourceMap,
      sourceMapUrl: new URL(specifier, location).href,
      elideComments,
    }));
    const objectBytes = textEncoder.encode(object);
    return { bytes: objectBytes, parser, sourceMap };
  }
@param {import('@endo/compartment-mapper/src/types.js').Language} parser
@param {Uint8Array} sourceBytes
@param {string} specifier
@param {string} location
@param {string|import('source-map').RawSourceMap} sourceMap