refactor(compartment-mapper): Shift usage to link from deprecatedly named assemble
MODIFY
packages/compartment-mapper/src/archive.js
packages/compartment-mapper/src/archive.js
@@ -16,7 +16,7 @@ import { writeZip } from '@endo/zip';
import { resolve } from './node-module-specifier.js';
import { compartmentMapForNodeModules } from './node-modules.js';
import { search } from './search.js';
-import { assemble } from './assemble.js';
+import { link } from './assemble.js';
import { makeImportHookMaker } from './import-hook.js';
import { parseJson } from './parse-json.js';
import { parseArchiveCjs } from './parse-archive-cjs.js';
@@ -200,7 +200,7 @@ const digestLocation = async (powers, moduleLocation, options) => {
);
// Induce importHook to record all the necessary modules to import the given module specifier.
- const compartment = assemble(compartmentMap, {
+ const { compartment } = link(compartmentMap, {
resolve,
modules: exitModules,
makeImportHook,

MODIFY
packages/compartment-mapper/src/import-archive.js
packages/compartment-mapper/src/import-archive.js
/** @typedef {import('./types.js').ExecuteOptions} ExecuteOptions */
import { readZip } from '@endo/zip';
-import { assemble } from './assemble.js';
+import { link } from './assemble.js';
import { parsePreCjs } from './parse-pre-cjs.js';
import { parseJson } from './parse-json.js';
import { parsePreMjs } from './parse-pre-mjs.js';
@@ -167,7 +167,7 @@ export const parseArchive = async (
archiveLocation,
computeSha512,
);
- const compartment = assemble(compartmentMap, {
+ const { compartment } = link(compartmentMap, {
makeImportHook,
parserForLanguage,
globals,

MODIFY
packages/compartment-mapper/src/import.js
packages/compartment-mapper/src/import.js
import { compartmentMapForNodeModules } from './node-modules.js';
import { search } from './search.js';
-import { assemble } from './assemble.js';
+import { link } from './assemble.js';
import { makeImportHookMaker } from './import-hook.js';
import { parseJson } from './parse-json.js';
import { parseCjs } from './parse-cjs.js';
@@ -70,7 +70,7 @@ export const loadLocation = async (readPowers, moduleLocation, options) => {
Compartment,
} = options;
const makeImportHook = makeImportHookMaker(read, packageLocation);
- const compartment = assemble(compartmentMap, {
+ const { compartment } = link(compartmentMap, {
makeImportHook,
parserForLanguage,
globals,

refactor(compartment-mapper): Shift usage to link from deprecatedly named assemble