fix(compartment-mapper): Elide source URL from archived MJS
This is necessary for the creation of canonical archives, that do not
vary depending on the locations of the sources on the machine that
created the archive.
Ideally, these source URLs are produced after the archive has
been canonicalized.
MODIFY
packages/compartment-mapper/src/parse-archive-mjs.js
packages/compartment-mapper/src/parse-archive-mjs.js
@@ -9,11 +9,11 @@ const textDecoder = new TextDecoder();
export const parseArchiveMjs = async (
bytes,
_specifier,
- location,
+ _location,
_packageLocation,
) => {
const source = textDecoder.decode(bytes);
- const record = new StaticModuleRecord(source, location);
+ const record = new StaticModuleRecord(source);
const pre = encodeSyrup(record);
return {
parser: 'premjs',

fix(compartment-mapper): Elide source URL from archived MJS

This is necessary for the creation of canonical archives, that do not
vary depending on the locations of the sources on the machine that
created the archive.

Ideally, these source URLs are produced after the archive has
been canonicalized.