Skip to content

Commit

Permalink
fix(compartment-mapper): node-modules - name packageLocations differe…
Browse files Browse the repository at this point in the history
…ntly
  • Loading branch information
kumavis committed Nov 17, 2022
1 parent 7f6638d commit d396fed
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/compartment-mapper/src/node-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,9 +501,9 @@ const translateGraph = (
// The full map includes every exported module from every dependencey
// package and is a complete list of every external module that the
// corresponding compartment can import.
for (const packageLocation of keys(graph).sort()) {
for (const dependeeLocation of keys(graph).sort()) {
const { name, path, label, dependencies, parsers, types } = graph[
packageLocation
dependeeLocation
];
/** @type {Record<string, ModuleDescriptor>} */
const modules = Object.create(null);
Expand All @@ -529,17 +529,17 @@ const translateGraph = (
}
};
// Support reflexive package imports.
digest(name, packageLocation);
digest(name, dependeeLocation);
// Support external package imports.
for (const dependencyName of keys(dependencies).sort()) {
const packageLocation = dependencies[dependencyName];
digest(dependencyName, packageLocation);
const dependencyLocation = dependencies[dependencyName];
digest(dependencyName, dependencyLocation);
}
compartments[packageLocation] = {
compartments[dependeeLocation] = {
label,
name,
path,
location: packageLocation,
location: dependeeLocation,
modules,
scopes,
parsers,
Expand Down

0 comments on commit d396fed

Please sign in to comment.